Unexpected behaviour with link call

I'm not sure if I'm missing something or if it's a bug so I'd ask before opening an issue.

This simple example show the issue.
If the link out node is set to Send to all connected link nodes the flow doesn't works and it's always throwing a timeout error.
The only way to have it run is to set the link out node to Return to calling link node
image

[{"id":"b8edcaf033d3751c","type":"link in","z":"e1f44cc40f36d3a0","name":"Link In Test","links":[],"x":170,"y":780,"wires":[["ea8171f04afbcc02"]],"l":true},{"id":"ea8171f04afbcc02","type":"link out","z":"e1f44cc40f36d3a0","name":"Link Out Test","mode":"link","links":[],"x":530,"y":780,"wires":[],"l":true},{"id":"13b7d6bd600d7fbd","type":"inject","z":"e1f44cc40f36d3a0","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":900,"wires":[["a2b252ddf5afe8c5"]]},{"id":"a2b252ddf5afe8c5","type":"link call","z":"e1f44cc40f36d3a0","name":"","links":["b8edcaf033d3751c"],"timeout":"1","x":350,"y":900,"wires":[["8f56d94a93a51a14"]]},{"id":"8f56d94a93a51a14","type":"debug","z":"e1f44cc40f36d3a0","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":530,"y":900,"wires":[]}]

Is it working as intended? Where can I find some documentation about its rationale?

You need to set the link out to return mode.

image

Think of it this way...

  • the link call is a Subroutine call
  • the link-in is a Subroutine Definition
  • the Link Out (set for return mode) is the Subroutine Return.

Where it is useful : Consider you had a flow or function that turned your payoad array into an object with named properties - BUT - you needed to do this on several flow tabs - you could create a "subroutine" (link in, lin out) and call it (link call) from multiple places and it will only return to the caller.

2 Likes

Thank you for your explanation.

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