Hello,
I have a flow with 2 outputs going out of Node RED which are set at the same time. The call order is important for the outer system.
I can controll the order statically by changing positions. Maybe its also controllable by order of the return object.
But how can I control this dynamically?
The flow is quite primitive. Depening how I arrange the outNodes on the paper they get called prior or not. I want to control and change which outputs fires fires first programatically.
Duplicating the output number of the function node is also static.
Q2
I did also an experiment with multiple messages:
var msg1 = { payload:"first out of output 1" };
var msg2 = { payload:"second out of output 1" };
var msg3 = { payload:"only message from output 2" };
return [ [ msg1, msg2], msg3 ];
This works as expected. Now I want to have msg3 come in between msg1 and msg2. How would I do this?
If you set the function node to have two outputs, you will see msg1 and 2 come out of one output and msg3 come out of the other and msg1+2 would go down one leg of the flow while msg3 would go downtime other.
You could use ajoin node (in manual configuration) to order the msgs and then run it thru a split to get the msgs in the order you want.