Run-time error on a microflow for a calculated attribute

0
The microflow contains an exclusive split. During run-time an error occurs while evaluating the expression of the exclusive split: Caused by: la: Failed to evaluate expression, error occurred on line 1, character 1 The expression is a simple comparison of two attributes in the originating entity: $Entitiy/Attribute1 > 0 and $Entity/Attribute2 > 0
asked
6 answers
1

To prevent such an error it is recommended to make sure that the Attribute1 and Attribute2 values actually have a value. Build an extra exclusive split in to prevent this.

if ($Entity/Attribute1 != empty and $Entity/Attribute2 != empty)
     then true 
 else false

When returned true go to your expression. When returned false do something else.

answered
1

I think I have found the problem. It was not in this expression but in a retreive action just before the exclusive split, which did not find a record.

answered
0

Is your attribute empty?

answered
0

This check will fail if your attribute is empty. So add the following, $Entity/Attribute1 != empty and $Entity/Attribute1 > 0 and $Entity/Attribute2 != empty and $Entity/Attribute2 > 0.

answered
0

Thanks for the quick replies!

I tried but the same result. Only now the error occurs on the expression of the extra exclusive split.

answered
0

You should first check if $Entity itself is not empty, so, if

$Entity != empty and $Entity/attribute1 != empty and $Entity/attribute2 != empty and $Entitiy/Attribute1 > 0 and $Entity/Attribute2 > 0 then true else false

That should work at least. But if $Entity is the single input argument of your calculated attribute, this should never be the case.

answered