What I need to do, is trigger a subsequent node if msg.payload.state_I4 is undefined, and another node if it is defined (shown as node 1 and 2 in the illustration)
The function node only has one output, so I can't use that. What node should I use for this?
And remember to not “recycle” the same msg if sending to multiple outputs at the same time.
Create a new object for each, or at least derived from the incoming msg
This often fools people, as the msg is an object, so if you send to output 1, change it, then to output 2 - output 1 will see the changes - which you likely don't want