Sub-flows - help with their settings and getting information from them

Oh!

Ok.

But that begs the question:

Say I have multiple nodes which change their status - not often?

So in the sub-flow I have this: (Simplified example)

[{"id":"61e4266e.641e5","type":"status","z":"b1f30721.c3bde","name":"","scope":null,"x":2840,"y":1100,"wires":[[]]},{"id":"7212afb8.355e48","type":"function","z":"b1f30721.c3bde","name":"","func":"if (flow.get(\"DEBUG\") == 'ON')\n{\n    node.warn(msg.payload);\n}","outputs":1,"noerr":0,"x":2770,"y":1030,"wires":[[]]},{"id":"8246f273.ca7128","type":"inject","z":"b1f30721.c3bde","name":"","topic":"","payload":"Something","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":2600,"y":1030,"wires":[["7212afb8.355e48"]]},{"id":"3dbdaf17.e4d908","type":"inject","z":"b1f30721.c3bde","name":"","topic":"","payload":"Something","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":2600,"y":970,"wires":[["f754a1ef.4fead"]]},{"id":"f754a1ef.4fead","type":"function","z":"b1f30721.c3bde","name":"","func":"if (flow.get(\"DEBUG\") == 'ON')\n{\n    node.warn(msg.payload);\n}","outputs":1,"noerr":0,"x":2770,"y":970,"wires":[[]]},{"id":"3e41a160.dfec6e","type":"inject","z":"b1f30721.c3bde","name":"","topic":"","payload":"Something","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":2600,"y":920,"wires":[["4e158394.b7374c"]]},{"id":"4e158394.b7374c","type":"function","z":"b1f30721.c3bde","name":"","func":"if (flow.get(\"DEBUG\") == 'ON')\n{\n    node.warn(msg.payload);\n}","outputs":1,"noerr":0,"x":2770,"y":920,"wires":[[]]}]

As any of the internal function nodes get their respective messages and set their status that is captured by the status node which is connected to the status output node of the sub-flow and so that is reflected below the sub-flow's node - as you showed.

That your status messages aren't highlighted showing the debug node from which they come is slightly confusing to me. But I am trying to read around that.

Am I on track or still way off?

Yes, that is the right way for you to selectively allow node statuses to be propagated up to the subflow instance node's status.

I will of course point out all of your Function nodes in that example call node.warn - so as you've been saying, they would need to change to node.status before any of this would work.

But, and this is a key point, from outside the subflow, you will see the subflow status change but you won't see which internal node of the subflow did it. The whole point of the status output is to update the subflow status without exposing the internal workings of the subflow.

1 Like

Mea Culpa.

Good.

I think I have become slightly more intelligent that I was before.

Thank you.

How to transmit baudrate 2400 , data bit- 8 parity- Even Stop bit-2 on rasp Zero model W. i can transmit baudrate -9600 , data bit- 8 parity- none Stop bit-1

Welcome to the forum @batsukh.

You have added this question to the end of a old thread about sub-flows, which does not seem to be related to your question. Please start a new thread for your question. In that question tell us what happens when you try to use the rate you have specified.
Before you do that, if you did not install node-red using the recommended method for a pi then run that script first to make sure everything is up to date on your Pi. If you did not use that technique then run the script in the docs. https://nodered.org/docs/getting-started/raspberrypi