Please advise on how to handle the error.

0
Hi There,   The following error has occurred However, not always, and sometimes it occurs and sometimes it does not.   2023-03-15 11:42:45.865 ERROR - Connector: com.mendix.modules.microflowengine.MicroflowException Advanced stacktrace:at com.mendix.languages.mxexpressions.MxExpressionImpl.evaluate(MxExpressionImpl.scala:32) Caused by: com.mendix.languages.expressions.ExpressionException: Condition must be a Boolean   Could you please give me some advice on this error that occurs randomly?   Thanks, Iwata
asked
3 answers
2

The stacktrace should point to a specific microflow. It looks like you use attributes somewhere to build a boolean expression, but the object or the attribute can be empty, throwing this kind of error. You should always and everywhere check first if an object or attribute is empty. It's called defensive programming and you can't easily overdo it.

answered
0

Right-click on the 'call webservice' action. Choose ErrorHandling, select custom with/without rollback. Create a new action above the action. Connect it to the webservice action, right click on the connection, 'set as error handler'.

Do your custom error handling there, anything you can do in Mendix (Log, save a Log record, show a custom message, retry a second endpoint).

answered
0

Check out the CommunityCommons Java action "ThrowException"

Edit: see Mendix how-to on advanced error handling

 

answered