# How can I access same flow code from various places?

**URL:** <https://discourse.nodered.org/t/how-can-i-access-same-flow-code-from-various-places/96591>\
**Category:** General\
**Created:** [15 April 2025 16:20 UTC](https://discourse.nodered.org/t/how-can-i-access-same-flow-code-from-various-places/96591 "2025-04-15T16:20:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ThingsTinkerer](https://avatars.discourse-cdn.com/v4/letter/t/91b2a8/32.png) [@ThingsTinkerer](https://discourse.nodered.org/u/ThingsTinkerer)\
**Post date:** [15 April 2025 16:20 UTC](https://discourse.nodered.org/t/how-can-i-access-same-flow-code-from-various-places/96591/1 "2025-04-15T16:20:42Z")

</div>

I've made a link call successfully, which acts as a sort of singleton. It is used to calculate current season (summer/winter) for controlling a building based on settings stored in context. This can be based on average temperature the next X days (X is also configurable), hard-coded dates (summer start / winter start) or manually hard-coded to summer or winter. So whenever I need to know what the current season is, I can call that with a `link call` node. Great! But I can't seem to reference this inside a subflow? I have various devices (air handling units, rooms/zones etc) that can either have their own season configuration, or rely on the "global" building settings. And if they rely on the building settings, then it would be very nice to reuse the code I already have for determining that. Similarly, I will have lots of devices, so be able to reuse that code inside a subflow would be great.

Perhaps convert the link call functionality to a subflow? But I have a queue there to prevent multiple messages being processed simultaneously. If I move it to a subflow, then each subflow would have their own queue...

Any suggestions?

---

<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:** [15 April 2025 18:53 UTC](https://discourse.nodered.org/t/how-can-i-access-same-flow-code-from-various-places/96591/2 "2025-04-15T18:53:12Z")

</div>

You can (should be able to) link-call out (of a subflow) to a link-in~link-out pair (subroutine). You cannot link-call to a link-in that is inside a subflow.

---

<div class="post-metadata">

**Author:** ![ThingsTinkerer](https://avatars.discourse-cdn.com/v4/letter/t/91b2a8/32.png) [@ThingsTinkerer](https://discourse.nodered.org/u/ThingsTinkerer)\
**Post date:** [15 April 2025 20:33 UTC](https://discourse.nodered.org/t/how-can-i-access-same-flow-code-from-various-places/96591/3 "2025-04-15T20:33:47Z")

</div>

Great I'll try that!

---

<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:** [14 July 2025 20:34 UTC](https://discourse.nodered.org/t/how-can-i-access-same-flow-code-from-various-places/96591/4 "2025-07-14T20:34:46Z")

</div>

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