# Are Subflows the right way to tidy up complex flows?

**URL:** https://discourse.nodered.org/t/are-subflows-the-right-way-to-tidy-up-complex-flows/2681
**Category:** General
**Created:** [30 August 2018 00:58 UTC](https://discourse.nodered.org/t/are-subflows-the-right-way-to-tidy-up-complex-flows/2681 "2018-08-30T00:58:28Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)
#### Post date: [30 August 2018 00:58 UTC](https://discourse.nodered.org/t/are-subflows-the-right-way-to-tidy-up-complex-flows/2681/1 "2018-08-30T00:58:28Z")

</div>

GUys,

I have a fair few nodes and would like to take a "chunk" of them and say all good and done and happy with what they are doing and essentially "put them to bed". This would have the effect of tidying my workspace as well as knowing that these work as is.

Is a subflow the best way to do this or is there another method ?

If i turn something into a subflow - can i get them back into a normal flow at a later date if i wish ?

Craig

---

<div class="post-metadata">

### Author: ![nlecaude](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nlecaude/32/25_2.png) [@nlecaude](https://discourse.nodered.org/u/nlecaude)
#### Post date: [30 August 2018 01:54 UTC](https://discourse.nodered.org/t/are-subflows-the-right-way-to-tidy-up-complex-flows/2681/2 "2018-08-30T01:54:42Z")

</div>

Yes, subflows are a good way to do this. You can always copy paste from a subflow to the parent flow if you want to revert.

---

<div class="post-metadata">

### Author: ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)
#### Post date: [30 August 2018 02:05 UTC](https://discourse.nodered.org/t/are-subflows-the-right-way-to-tidy-up-complex-flows/2681/3 "2018-08-30T02:05:59Z")

</div>

thanks for the quick response - will give it a go !

regards

Craig

---

<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: [30 August 2018 08:10 UTC](https://discourse.nodered.org/t/are-subflows-the-right-way-to-tidy-up-complex-flows/2681/4 "2018-08-30T08:10:07Z")

</div>

Remember that a subflow needs to be used in an actual flow in order for it to do anything.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [30 August 2018 16:24 UTC](https://discourse.nodered.org/t/are-subflows-the-right-way-to-tidy-up-complex-flows/2681/5 "2018-08-30T16:24:04Z")

</div>

Subflows do have some limitations so this might not always work. I am more and more using link nodes to tidy my flows. This lets you move chunks of flow to somewhere more convenient. Possible away from the top-left or even to another tab altogether.

---

<div class="post-metadata">

### Author: ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)
#### Post date: [30 August 2018 22:48 UTC](https://discourse.nodered.org/t/are-subflows-the-right-way-to-tidy-up-complex-flows/2681/6 "2018-08-30T22:48:38Z")

</div>

OK i will try subflows first and then if i run into problems will check out links (i have used neither at this point)

Craig

---

<div class="post-metadata">

### Author: ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)
#### Post date: [30 August 2018 22:49 UTC](https://discourse.nodered.org/t/are-subflows-the-right-way-to-tidy-up-complex-flows/2681/7 "2018-08-30T22:49:35Z")

</div>

Colin,

I assume you mean i have ot take the sublfow node and drop it on my flow still for something to happen - rather than just leaving it in the palette ? or is there some other hidden secret ?

Craig

---

<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: [31 August 2018 07:10 UTC](https://discourse.nodered.org/t/are-subflows-the-right-way-to-tidy-up-complex-flows/2681/8 "2018-08-31T07:10:27Z")

</div>

Yes, a subflow is just the same as a normal node from that point of view. If you don't put it on a flow then it won't do anything.
