Merge PassThrough to wait for second input


Merge has many modes, and passthrough is one of them. The PassThrough will wait untill the workflow is past the second input before passing through the first input. This is great for controlling execution order. But bad for preventing a branch from operation which is a great application of the merge node.

The idea is:

To add a “Wait for second input” option so that the node will not pass through input 1 until at least one item from input 2 has been received. Turning it into a gate.

My use case:

Input 1 contains important data, input two is a bool a throwback from a switch near the end of in the workflow. If the hypothetical workflow ran all the way to the end and was true it could kick back an event and trigger an an extra leg. If false it would do something else… end in a different way.

I think it would be beneficial to add this because:

Adds more capability when creating advanced flows

Are you willing to work on this?

Yes, but I need some training on the source code before I can consider contributing.

Hi @roofboard

The merge node already has a wait option. Is this what you are after?

@BramKnuever Thanks for the replay.

Actually I did further testing, this may be a bug. I am working up a sample workflow and will post back here with the example. From what I can tell wait is not waiting for an item to be dropped in the workflow from what I can tell wait is only waiting for the execution flow to move past both legs.

Then it outputs data even if there are no items in the number 1 or number 2 items array as pictured above.

Hi @roofboard

I’ve used it in the past to make sure some conditions were met on one of the 2 input and then passing that to this merge node.
So yes, it does accept any input but there should be something there on both inputs for it to trigger.

Ill look at you example when you post it. Feel free to tag me in it, to make sure I get notified.