Page 1 of 1
processing order
Posted: Fri Sep 20, 2024 11:33 am
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.
Re: processing order
Posted: Fri Sep 20, 2024 11:47 am
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.
Re: processing order
Posted: Fri Sep 20, 2024 2:45 pm
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.
Re: processing order
Posted: Fri Sep 20, 2024 3:46 pm
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
