Node.status clear in entire flow?

Is there a possibility to make a clear node.status for an entire flow, triggered by some inject/function?

The only possibility I know is to give Restart Flows, but I'm not interested in this method.

Restart flows is not guaranteed to clear the status text for all nodes, many nodes will initialise their status to a value and a retstart flows will cause the node to set its status to that value. There is no way to force all nodes to clear their status text, and in fact there can't be as each node is in control of its status.

1 Like

That is why I always put a

//clear status icon
      node.status({});

when constructing the node and again right first msg comes in

this.on('input', async function(msg, send, done)

I also like to put timers, when i can, on all status msg

this.status(
        {
          fill: 'blue',
          shape: 'dot',
          text: "finished"
        });
        // clear/end status msg after 3 seconds
        setTimeout(status_clear, 1000);

A further thought. Consider the MQTT nodes. Their status always tells you the state of the connection. If that were to be cleared then you would have no way of seeing whether it was connected or not.

I’m curious why you would want to do that. Is it only to control the appearance of the flow in the editor (“not a dashboard”), or is there some other problem you need to solve?

Just for visual debug.

At a flow with a few nodes it is easy to follow where the data flows.
But if you multiply by 10 the flow in the example, it is no longer easy to follow.

In other words, if a new value arrives, all status.nodes display the previous value.
If I could reset status.node, I could see exactly where the stream was flowing.

[{"id":"5bf05cc7.5ff1ec","type":"inject","z":"fc92f4ca.d11a28","name":"Go","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":830,"y":2980,"wires":[["489accb3.a50684"]]},{"id":"489accb3.a50684","type":"function","z":"fc92f4ca.d11a28","name":"Some Function","func":"msg.payload = Math.random() * 100;\n\nif (msg.payload < 50)  return [msg, null]\nelse  return [null, msg]","outputs":2,"noerr":0,"initialize":"","finalize":"","x":1000,"y":2980,"wires":[["39597268.0ce6fe"],["4423c59f.f6fbd4"]]},{"id":"39597268.0ce6fe","type":"function","z":"fc92f4ca.d11a28","name":"1","func":"node.status({fill:'green', text : msg.payload})\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1190,"y":2940,"wires":[[]]},{"id":"4423c59f.f6fbd4","type":"function","z":"fc92f4ca.d11a28","name":"2","func":"node.status({fill:'red', text : msg.payload})\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1190,"y":3000,"wires":[[]]}]

Status should not really be used for showing values... (the editor is NOT a dashboard :-)... it should show the state of the node like is it in error, connected, buffer full, etc.

No doubt that debugging can be difficult, and the developers are working on improvements like a proper flow debugger. In the meanwhile, there are a couple of things you might try in order to improve matters. You can identify which node in your example has changed its status by adding a status node connected to a debug node configured to show the node name:

[{"id":"5bf05cc7.5ff1ec","type":"inject","z":"8e3c2638.66102","name":"Go","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":250,"y":160,"wires":[["489accb3.a50684"]]},{"id":"489accb3.a50684","type":"function","z":"8e3c2638.66102","name":"Some Function","func":"msg.payload = Math.random() * 100;\n\nif (msg.payload < 50)  return [msg, null]\nelse  return [null, msg]","outputs":2,"noerr":0,"initialize":"","finalize":"","x":420,"y":160,"wires":[["39597268.0ce6fe"],["4423c59f.f6fbd4"]]},{"id":"39597268.0ce6fe","type":"function","z":"8e3c2638.66102","name":"1","func":"node.status({fill:'green', text : msg.payload})\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":610,"y":120,"wires":[[]]},{"id":"4423c59f.f6fbd4","type":"function","z":"8e3c2638.66102","name":"2","func":"node.status({fill:'red', text : msg.payload})\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":610,"y":180,"wires":[[]]},{"id":"4e525c00.139804","type":"status","z":"8e3c2638.66102","name":"","scope":null,"x":380,"y":260,"wires":[["f4e154b1.370ae"]]},{"id":"f4e154b1.370ae","type":"debug","z":"8e3c2638.66102","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"status.source.name","targetType":"msg","statusVal":"","statusType":"auto","x":570,"y":260,"wires":[]}]

Also, you can use a complete node to do some message tracing, as described in this post.

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