I have a situation where I want to create and set a property to a value of another property as long as the other property exists.
I have tried to achieve this using the UpdateAttribute process configured as follows:
Property Value
A ${"B":isNull():ifElse(null, ${"B"})}
But syntax checker gives a red curly brace at the end of the line (I've tried null, Null, NULL). And if I run it anyway, I get a processor exception - unable to evaluate expression due to Unexpected token 'null'.
I'm beginning to think this is not just about finding the correct token to represent null. Is it because properties cannot be set to null? If so, what's the best way to solve this problem?
I achieved what I wanted using Rules. Condition : ${"B":notNull()} Action : Attribute A, Value ${"B"}
Since I have several attributes I want to condition using this Rule and I want all the results in the same output FlowFile, I select FlowFilePolicy to 'use original'