# Is their anyway to stop a flow?

**URL:** <https://discourse.nodered.org/t/is-their-anyway-to-stop-a-flow/24965>\
**Category:** General\
**Created:** [16 April 2020 18:38 UTC](https://discourse.nodered.org/t/is-their-anyway-to-stop-a-flow/24965 "2020-04-16T18:38:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Beefy\_carrot](https://avatars.discourse-cdn.com/v4/letter/b/ccd318/32.png) [@Beefy\_carrot](https://discourse.nodered.org/u/Beefy_carrot)\
**Post date:** [16 April 2020 18:38 UTC](https://discourse.nodered.org/t/is-their-anyway-to-stop-a-flow/24965/1 "2020-04-16T18:38:39Z")

</div>

Im taking in sensor data and displaying it with gauges. I use a switch to display a value on the gauges or the string "disabled". The flow has 4 inject nodes with 4 exec nodes that all goes to the IOT hub node for adding data to the database.

My probelm is: how can i stop an individual sensor thread from passing data to the exec node(node that sends data to the command line for retrieving a sensor). i dont want the flow to stop i just want the node to stop sending data to the next node based on the condition wheather the data is the string "disabled" or a number

---

<div class="post-metadata">

**Author:** ![wb666greene](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/wb666greene/32/6534_2.png) [@wb666greene](https://discourse.nodered.org/u/wb666greene)\
**Post date:** [16 April 2020 19:08 UTC](https://discourse.nodered.org/t/is-their-anyway-to-stop-a-flow/24965/2 "2020-04-16T19:08:43Z")

</div>

I think you need to look into one of the logic or boolean gate nodes.

This is one of the newer ones, but I've not used it.

> **[node-red-contrib-boolean-logic-ultimate](https://flows.nodered.org/node/node-red-contrib-boolean-logic-ultimate)**
>
> A set of Node-RED enhanced boolean logic, with persisten values after reboot and more

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [16 April 2020 19:27 UTC](https://discourse.nodered.org/t/is-their-anyway-to-stop-a-flow/24965/3 "2020-04-16T19:27:47Z")

</div>

use a `switch` node....

---

<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:** [16 April 2020 19:35 UTC](https://discourse.nodered.org/t/is-their-anyway-to-stop-a-flow/24965/4 "2020-04-16T19:35:31Z")

</div>

Or possibly the simplest is to use node-red-contrib-simple-gate. Insert that into the flow you want to break and all you need to do is send it the appropriate commands to block or allow the flow.

---

<div class="post-metadata">

**Author:** ![Beefy\_carrot](https://avatars.discourse-cdn.com/v4/letter/b/ccd318/32.png) [@Beefy\_carrot](https://discourse.nodered.org/u/Beefy_carrot)\
**Post date:** [17 April 2020 16:09 UTC](https://discourse.nodered.org/t/is-their-anyway-to-stop-a-flow/24965/5 "2020-04-17T16:09:38Z")

</div>

worked like a clockworks

---

<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:** [16 June 2020 16:09 UTC](https://discourse.nodered.org/t/is-their-anyway-to-stop-a-flow/24965/6 "2020-06-16T16:09:40Z")

</div>

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