I am trying to use the EnforceOrder processor to do a Merge in a determinate order. To do so, this is my flow:

In the updateAttribute, I am generating an attribute to set order I want in the merge. On the one of the left, I am setting the value '1' and on the other, I am setting the value of '2'.
And then the configuration of the EnforceOrder is the nextone:
The problem is that only arrives the flow of the process.order = 1 and is not taking out the number 2. What am I doing wrong?
Cheers


Use
EnforceOrderprocessor to control the order of flowfiles reaching toMergeContentprocessor.UpdateAttributeprocessor add the sequence number to the flowfile.Example:
sequence numbercompared to flowfile1 then feed thesuccessconnection toMergeContentprocessor, By using enforceorder processor we are making sure flowfile2 will be going to Mergecontent processor before flowfile1.Please refer to this and use the enforce-order template to get familiar with the
enforce orderprocessor.UPDATE:
I think the issue is with the EnforceOrder configs,
Group Identifier is configured as
${filename}so if you have two different filenames then processor doesn't wait for both of them.To fix this Keep common attribute in
UpdateAttributeprocessors likegroup_nameas gn then use same attribute name in Group Identifier property value as${group_name}Connect
Skipped and Waitconnections to EnforceOrder processor it self.UpdateAttributeConfigs:
EnforceOrderConfigs:
Please use this template as reference and upload it to your NiFi instance check out how the flow has been running.