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 EnforceOrder
processor to control the order of flowfiles reaching to MergeContent
processor.
UpdateAttribute
processor add the sequence number to the flowfile.Example:
sequence number
compared to flowfile1 then feed the success
connection to MergeContent
processor, 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 order
processor.
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 UpdateAttribute
processors like group_name
as gn then use same attribute name in Group Identifier property value as ${group_name}
Connect Skipped and Wait
connections to EnforceOrder processor it self.
UpdateAttributeConfigs:
Please use this template as reference and upload it to your NiFi instance check out how the flow has been running.