# Help with subflows and node-status.... Looking for ideas

**URL:** https://discourse.nodered.org/t/help-with-subflows-and-node-status-looking-for-ideas/97248
**Category:** General
**Created:** [24 May 2025 09:22 UTC](https://discourse.nodered.org/t/help-with-subflows-and-node-status-looking-for-ideas/97248 "2025-05-24T09:22:10Z")
**Posts on this page:** 4
**Page:** 1

<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: [24 May 2025 09:22 UTC](https://discourse.nodered.org/t/help-with-subflows-and-node-status-looking-for-ideas/97248/1 "2025-05-24T09:22:10Z")

</div>

Sorry folks, something has got my curiosity going and it is kind of annoying.

😉

I got _STUNG_ today re-writing code from 8 years ago (or there about).

I was using a `function` node as a gate, but with a bit more complicated.  
(Maybe I can have a look at the mechanics of that and do it differently.... But anyway.)

What I would like to get is a changing status on a subflow so it _blinks_.

I'll explain better. _BLINK_ - maybe a bad choice of words.

The subflow receives a message and does it's magic.  
There is considerable time between the arrival of the message and the sending of the message.

When it receives a message, I want to set the `status` to even just a `dot`.  
Then when it sends the message, it wipes itself clean.  
This way I can see messages are arriving and being sent.

I could _cheat_ and put a couple of `function` nodes that do a `node.status{()}` at the in and one on the output to wipe it.

But I've read/heard that is a LOT of overhead for such a _simple_ thing.

I don't know.

Is there an alternative?

I could post the subflow, but I don't think that would really achieve much.

Thanks in advance.

---

<div class="post-metadata">

### Author: ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)
#### Post date: [24 May 2025 09:35 UTC](https://discourse.nodered.org/t/help-with-subflows-and-node-status-looking-for-ideas/97248/2 "2025-05-24T09:35:43Z")

</div>

Unless I have misread, just use the status box inside the subflow?

 ![Screenshot 2025-05-24 at 10.34.25](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/3/c3bf7ee449259c241b8025bea534905c8221c33a.png)

```auto
[{"id":"9550e72362306bcd","type":"subflow","name":"Subflow 1","info":"","in":[{"x":180,"y":165,"wires":[{"id":"1d07da94e5eea09d"},{"id":"fc5858972fe27307"}]}],"out":[{"x":940,"y":170,"wires":[{"id":"fc5858972fe27307","port":0}]}],"status":{"x":940,"y":300,"wires":[{"id":"2029f6053930dbe4","port":0},{"id":"e1f1ed1612dad46e","port":0}]}},{"id":"2029f6053930dbe4","type":"change","z":"9550e72362306bcd","name":"Set Busy","rules":[{"t":"set","p":"payload","pt":"msg","to":"{ \"fill\": \"red\", \"shape\": \"dot\", \"text\": \"Busy....\" }","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":770,"y":300,"wires":[[]]},{"id":"fc5858972fe27307","type":"delay","z":"9550e72362306bcd","name":"Do Slow Stuff","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":470,"y":170,"wires":[["e1f1ed1612dad46e"]]},{"id":"e1f1ed1612dad46e","type":"change","z":"9550e72362306bcd","name":"Clear Status","rules":[{"t":"set","p":"payload","pt":"msg","to":"{}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":255,"wires":[[]]},{"id":"1d07da94e5eea09d","type":"junction","z":"9550e72362306bcd","x":430,"y":300,"wires":[["2029f6053930dbe4"]]},{"id":"ddb16088ef2c6977","type":"subflow:9550e72362306bcd","z":"2d7bf6e3.84c97a","name":"","x":395,"y":740,"wires":[["fd612c16dcf105fb"]]},{"id":"9518032fc4b9dd2c","type":"inject","z":"2d7bf6e3.84c97a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":200,"y":740,"wires":[["ddb16088ef2c6977"]]},{"id":"fd612c16dcf105fb","type":"debug","z":"2d7bf6e3.84c97a","name":"debug 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":600,"y":740,"wires":[]}]

```

![May-24-2025 10-33-35](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/c/4ce34900a81e1d3547cc203d14fa314f5176bae9.gif)

Try to avoid using a `function` node, just to set the status.  
Line up a few change nodes, and trigger them at your desired points in the operation.

---

<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: [24 May 2025 09:39 UTC](https://discourse.nodered.org/t/help-with-subflows-and-node-status-looking-for-ideas/97248/3 "2025-05-24T09:39:44Z")

</div>

HOW DID I MISS THAT?

Thanks.

As normal, I over thought it.

# Thanks.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [7 June 2025 09:40 UTC](https://discourse.nodered.org/t/help-with-subflows-and-node-status-looking-for-ideas/97248/4 "2025-06-07T09:40:27Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
