processing order

Post Reply
eugenewright
Newbie
Posts: 1
Joined: Wed Sep 11, 2024 9:59 am

processing order

Post by eugenewright »

Is there a way to force Switch to process files based on the file name? For example, I have 5 XML documents 123-1, 123-2, 123-3, 123-4 and 123-5 that need to be processed by a configurator in numerical order. Currently my flow is processing them randomly.
User avatar
tdeschampsBluewest
Member
Posts: 132
Joined: Tue Jun 01, 2021 11:57 am

Re: processing order

Post by tdeschampsBluewest »

Hi,
Processing order in switch can be quite hard to understand.

There is no way to "strictly" enforce an order, but there is way to help you to have a coherent order.

First of all, you'll need to understand Switch Priority.
Priority an be be set in a folder as a property, a number (that could be with variable) between -9999999 and +9999999.
The biggest number will have priority over other job.

Each time there will be different job waiting in front of an element, Switch will choose the highest priority number, and if two job have the same priority, the one waiting for the longest time.


That being said, you could attribute priority depending on the name, then limit the following element to 1 concurrent task (either with hold job element, or with advanced property from the flow).


If you just want to achieve a "First in first out", i strongly suggest you to use "Priority Helper" app, that will automate the calculation of priority within switch.
Do you like the Enfocus Apps developed by Bluewest?
Feel free to leave a comment on the Appstore!
freddyp
Advanced member
Posts: 1130
Joined: Thu Feb 09, 2012 3:53 pm

Re: processing order

Post by freddyp »

If you assemble the XMLs in a job folder first, you can use the app "File Sorter and Spacer" (part of the Folder apps bundle) to get the files out of the folder one by one with an interval.
User avatar
tdeschampsBluewest
Member
Posts: 132
Joined: Tue Jun 01, 2021 11:57 am

Re: processing order

Post by tdeschampsBluewest »

There is no way to "strictly" enforce an order, but there is way to help you to have a coherent order.
freddyp wrote: Fri Sep 20, 2024 2:45 pm If you assemble the XMLs in a job folder first, you can use the app "File Sorter and Spacer" (part of the Folder apps bundle) to get the files out of the folder one by one with an interval.
Except this one :lol:
Do you like the Enfocus Apps developed by Bluewest?
Feel free to leave a comment on the Appstore!
Post Reply