In my Mule flow I want to use a ternary operation in a message enrichment element.
For example, here is the existing line that throws an error when the source is null:
<enricher doc:name="Add revision number" target="#[variable:rev]" source="#[json:_rev]">
Here is the line when trying to use the ternary operation:
<enricher doc:name="Add revision number" target="#[variable:rev]" source="#[json:_rev == null ? '' : json:_rev]">
If a null is returned from the enrichment source, I want to return an empty string instead. I don't want errors to be thrown when Mule tries to use the 'setProperty()' function to assign a null value.
Currently the ternary example works, but it returns 'false' (not as a string).