# Single subflow - check number of instances?

**URL:** <https://discourse.nodered.org/t/single-subflow-check-number-of-instances/69727>\
**Category:** General\
**Created:** [28 October 2022 10:52 UTC](https://discourse.nodered.org/t/single-subflow-check-number-of-instances/69727 "2022-10-28T10:52:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [28 October 2022 10:52 UTC](https://discourse.nodered.org/t/single-subflow-check-number-of-instances/69727/1 "2022-10-28T10:52:50Z")

</div>

I am creating a flow that I want to contain in a subflow, but as it exposes a websocket and http endpoint, I only want 1 subflow node to exist in the workspace (ie. can only expose the same http endpoint).

Is there a way to check/force if more than 1 instance exists in all flows ?

---

<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:** [28 October 2022 11:01 UTC](https://discourse.nodered.org/t/single-subflow-check-number-of-instances/69727/2 "2022-10-28T11:01:54Z")

</div>

Can't you search for the sublfow's name and see how many times it is found?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [28 October 2022 11:28 UTC](https://discourse.nodered.org/t/single-subflow-check-number-of-instances/69727/3 "2022-10-28T11:28:46Z")

</div>

Use link-call node?

---

<div class="post-metadata">

**Author:** ![SandeepA](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sandeepa/32/63225_2.png) [@SandeepA](https://discourse.nodered.org/u/SandeepA)\
**Post date:** [28 October 2022 11:30 UTC](https://discourse.nodered.org/t/single-subflow-check-number-of-instances/69727/4 "2022-10-28T11:30:14Z")

</div>

My thoughts precisely as well.

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [28 October 2022 11:34 UTC](https://discourse.nodered.org/t/single-subflow-check-number-of-instances/69727/5 "2022-10-28T11:34:18Z")

</div>

hmm I am not sure if i understand how this works.

- I have a flow, want to contain it in a subflow
- the subflow should only exist once in all flows

The idea is a self-contained flow that does not necessarily requires input and does not produce output. I just don't want to see it as a separate flow (in the tabs).

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [28 October 2022 11:39 UTC](https://discourse.nodered.org/t/single-subflow-check-number-of-instances/69727/6 "2022-10-28T11:39:21Z")

</div>

So, why do you want it to be in a subflow? Seems redundant?

I suggested link call as I assumed you meant a singleton model

> [@bakman2](#):
>
> I just don't want to see it as a separate flow (in the tabs).

Do you have latest node-red? regular tabs can now be hidden.

---

<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:** [11 November 2022 11:40 UTC](https://discourse.nodered.org/t/single-subflow-check-number-of-instances/69727/7 "2022-11-11T11:40:04Z")

</div>

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