Hey there!
Noob here with a question to which I can’t seem to find an answer via forum search: I have a workflow calling an API on different endpoints resulting in multiple branches. At the end of each branch, there is a check against a database to see if something has been inserted that needs to be enriched with data from other sources.
Is there a way to run this check at the end of each node but have it only defined once? Like a function call? When I use a merge node for example, it always waits for all input branches to finish. But I would prefer it to run as soon as one of its inputs delivers a result. I think this might be unwanted behavior (at least it seems like all solutions and examples out there do it differently), but my curiosity is sparked:
- Is this somehow a bad idea? (I know about the “always output data” switch – but it is not that the other nodes don’t output data, but about them possibly not finishing at all.)
- Is it possible without going the sub-workflow route which seems overly complicated to maintain and debug?
- There is a “wait for all inputs to arrive” option in the merge node when configuring it to “choose branch” – but it’s the only option in the dropdown and cannot be deactivated. Does this work as intended?
- Is there an alternative to the merge node I don’t know about which suits better to my “problem”?
Thanks for your help and inspiration!