I have a SQL script pulling data out of an IS_ZERO_VALUE field. The value is numeric and can be “1” or “0”. I can’t get Mule to evaluate the value:
<when expression="payload.IS_ZERO_VALUE==0" evaluator="groovy">
Mule seems to evaluate this as “false” whether the value is 1 or 0. If I change the SQL script to output a “NO” if 0 and a “YES” if 1 Mule has no trouble using…
<when expression="payload.IS_ZERO_VALUE=='NO'" evaluator="groovy">
Are you super sure the value is numeric?
If yes, then not sure why this happens… but in 3.3.0 you don’t need Groovy for this kind of expressions, MEL is what you want to use.
Try with: