Merge Variables node not prioritising the top input where there are duplicates

Note: there was an earlier report of this bug and it was acknowledged as such but that was almost a year ago and there’s no fix for what seems a pretty fundamental problem with flow variables. It would be good to have an update from staff on this. Original report: Conflict handling in Merge Variables node

Its description reads “Note, if there are the same variables defined in different inputs, a special conflict handling is applied: The top most flow variable input port will take priority and override values on conflicting variable names.” However, this isn’t happening for me, running 5.2.1 on MacOS 14.2.1. Instead, which instance of the same variable name becomes the dominant one is determined by some other factor. This problem also exists with the legacy merge variables node - I’ve tried both.

Hi @mtshaw -

Let me ask internally about what’s going on here. There is a ticket associated with the issue (AP-19172) but let me see if I can find out more.

Hi @mtshaw,

I just checked Merge Variables node in 5.2.1 and the behavior seems to be exactly as described its the node description.

Note, if there are the same variables defined in different inputs, a special conflict handling is applied: The top most flow variable input port will take priority and override values on conflicting variable names. Otherwise, the priority order goes from the bottom to the top port. For example, port 3 will take priority over port 2. However, the first port will always take priority over all other ports.

Yes, this may not be the most straightforward node operation - but I cannot find a counter example for when this does not hold. If you have one, please let us know, so we can follow up on this.

Kind regards,
Leon

1 Like