washi
(Petr Hrehorovsky)
December 28, 2021, 4:12pm
1
If Origam.Rule
logging is enabled on level debug
and there is a data structure rule related to an entity with an array field with a default lookup, rule evaluation fails.
Initial research points to lookup evaluation for the array field, where the numeric value is supplied instead of guid.
if(log.IsDebugEnabled)
{
if(rule.TargetField != null)
{
string columnName = rule.TargetField.Name;
DataColumn col = rowChanged.Table.Columns[columnName];
object oldValue = rowChanged[col];
string newLookupValue = null;
string oldLookupValue = null;
if(col.ExtendedProperties.Contains(Const.DefaultLookupIdAttribute))
{
if(result != DBNull.Value && !(result is XmlDocument))
{
try
{
newLookupValue = LookupValue(
col.ExtendedProperties[Const.DefaultLookupIdAttribute]
.ToString(), result.ToString());
}
tvavrda
(Tomáš Vavrda)
December 30, 2021, 12:47am
2
I see a test for an XmlDocument
. This seems old. But maybe unrelated.
I would also think about ending gracefully (catching and logging any error) inside the logging procedure.
washi
(Petr Hrehorovsky)
December 30, 2021, 6:23am
3
At the moment the error is logged and the exception is suppressed, so the user doesn’t see anything in the UI, but the rule just doesn’t work.
jsusen
(Jindřich Sušeň)
January 19, 2022, 8:42am
4
An example has to be prepared.
washi
(Petr Hrehorovsky)
Closed
October 17, 2022, 6:39am
13
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.