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

**URL:** <https://discourse.nodered.org/t/sub-flows-help-with-their-settings-and-getting-information-from-them/19884>\
**Category:** General\
**Created:** [3 January 2020 22:12 UTC](https://discourse.nodered.org/t/sub-flows-help-with-their-settings-and-getting-information-from-them/19884 "2020-01-03T22:12:35Z")\
**Posts on this page:** 5\
**Page:** 2

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [4 January 2020 01:03 UTC](https://discourse.nodered.org/t/sub-flows-help-with-their-settings-and-getting-information-from-them/19884/21 "2020-01-04T01:03:28Z")

</div>

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)

```auto
[{"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?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [4 January 2020 01:07 UTC](https://discourse.nodered.org/t/sub-flows-help-with-their-settings-and-getting-information-from-them/19884/22 "2020-01-04T01:07:40Z")

</div>

> [@Trying\_to\_learn](#):
>
> 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.

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.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [4 January 2020 01:11 UTC](https://discourse.nodered.org/t/sub-flows-help-with-their-settings-and-getting-information-from-them/19884/23 "2020-01-04T01:11:44Z")

</div>

> [@knolleary](#):
>
> 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.

Mea Culpa.

Good.

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

Thank you.

---

<div class="post-metadata">

**Author:** ![batsukh](https://avatars.discourse-cdn.com/v4/letter/b/3bc359/32.png) [@batsukh](https://discourse.nodered.org/u/batsukh)\
**Post date:** [25 September 2020 04:06 UTC](https://discourse.nodered.org/t/sub-flows-help-with-their-settings-and-getting-information-from-them/19884/24 "2020-09-25T04:06:52Z")

</div>

![Zero W 2400 8e2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/4/14b6c56f162de412e7b690e185572935c8ea519e.jpeg)

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

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [25 September 2020 08:36 UTC](https://discourse.nodered.org/t/sub-flows-help-with-their-settings-and-getting-information-from-them/19884/25 "2020-09-25T08:36:27Z")

</div>

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](https://nodered.org/docs/getting-started/raspberrypi)

[Previous page](https://discourse.nodered.org/t/sub-flows-help-with-their-settings-and-getting-information-from-them/19884.md?page=1)
