How to reference a flow variable in an expression filter?
Assuming that myVariable is a boolean, I tried:
<expression-filter evaluator="variable" expression="myVariable" />
but that did not work. Eventually I settled for:
<expression-filter evaluator="groovy" expression="message.getInvocationProperty('myVariable')" />
Thanks
The variable expression is not complete and can’t be evaluated to a boolean as is (while the Groovy probably can because the variable is a boolean).
See: http://www.mulesoft.org/documentation/display/MULE3USER/Using+Expressions#UsingExpressions-UsingExpressionFilters
You need to specify an expected value :
The following should work too: