Hi Team,
I am trying to use XOR gate in the process model for diverting the flow based on the 2 conditions as shown below ,
here in XOR gate we are getting error because 2nd condition getting failed as per our analysis it should go end node because the first condition becomes true in that case why XOR gate checking 2nd condition?
could you please suggest me!
Thanks!
Discussion posts and replies are publicly visible
XOR gateways work correctly at runtime (only executing one path), but all expressions must be syntactically valid during design time validation.Checks all XOR conditions for errors, even if only the first "true" one is used. If any condition has an invalid expression, you'll get an error - even if the flow will never use it. Make sure every condition is a valid expression to avoid errors.
Hi Shubham Aware
thanks for the response,
but how we can eliminate this flow , why can't XOR gate handle this logic like if in the flow of conditions any middle conditions become true it should go end flow by default instead of checking all conditions? .
PM validates all expressions when you save/publish, not during execution.The XOR gateway validates all conditions at design time, not runtime.AFAIK, The expression validator runs separately from the runtime engine
Seems like the behaviour of XOR is like it evaluates all the conditions in a process instance and then goes to the path where first 'true' result is found. In your case since during evaluation the process couldn't get an output as sum() has null in it - the process errored out before proceeding further!
Its necessary for all conditions to give a definitive output true/ false without running into any error!
During design or while publishing a model Appian does a syntax check and returns errors/ warnings related to code & configurations but for some functions or expressions it misses as well and allows to publish. Those results in error at runtime.
Like in this case the null parameter in sum() is caught at runtime. Sometimes extra colons in keyword syntaxes (':') are ignored by process compiler as well but result in runtime error. So better to adhere to the function definitions or test functions/rules outside processes to validate output as expected and avoid such errors during runtime.
Hi Harsha Sharma
thanks for the clarification,