I have a NiFi flow where the flowfile will go through the flow toward the ExecuteStreamCommandprocessor to execute a python script to do some process. The file that run in the flow have a name format as a date (MMdd_HHmm) for example:0505_1015.csv0505_1030.csv0505_1045.csv and so on. But in my flow I need each file to run in order(if those are in the flow at the same time) so it is not first in first out but file that are in the flow which name that has less date and time need to run and go into the processor first.
So, from the example, if 0505_1015.csv0505_1030.csv0505_1045.csvare currently in the flow waiting to run in the next processor. 0505_1015.csv will get into the processor first then after it finish running, 0505_1030.csv will be execute in the processor.
I have read something about EnforceOrder and prioritizer but still I cannot figure how to do this.