I'm somewhat of a noob. I'd been creating subflows to separate different types of flow components, but I recently discovered that you can link regular flows, so I started just creating regular flows and using links. However, in my latest endeavor, I have the following:
Flow A
Flow B
Subflow C
I created a path that goes:
Flow A -> Subflow C -> Flow B
I finally concluded that messages aren't passing to flow B from Subflow C. Is this a limitation imposed by node red or should I keep debugging to figure out what I've done wrong?
I know subflow C is running and in Flow B, I have a debug node connected directly to the link and nothing is coming out of it.
Not directly. What you can do is create Subflow C with an input and output. Then in Flow A connect to the input of Subflow C. Next a link-out, connecting the output of C to flow B with a link-in there.
You can't use any link nodes inside subflows by design.
But it should work with the above:
A:
node -> [input C]-subflow-[output C] -> node -> link-out
B:
link-in -> ...
It seems this add on may allow what you want.
i.e. using a global action and replacing the link out with an action, and the link in with an action in. Not sure if it'll allow the action to not return though.. I'll update this when I get around to testing it.
Can confirm this is working with optional return from the subflow.
And you can short circuit the action out, and it still keeps running the rest of the linked nodes.
If any node red experts are reading, can you see a problem with that subflow? (alert if on chat otherwise return msg - is Craig on Chat is another subflow). Seems to be working fine and a very powerful way around re-use issues, and the docs say it's fine to use in and between both subflows and flows.