How do I set the order of execution of parallel tasks in a container?
The execution isn't truly random. It appears to be set to a random constant at package creation.
Demo
I set up a dummy package.
Max concurrent executions = 1
sequence container with four script tasks that do a thread.sleep
The tasks always execute in the order 4, 2, 1, 3. Closing/opening the solution makes no difference to the order of parallel execution.
Is there a way i can change the execution order? Do I need to change the guid/id of the object (tried this but it invalidates the xml) or is there an order somewhere else in the XML?
I've found a hack/workaround but it's a bit ugly so I'm wondering if there's a way to do it without adding dummy tasks.
Basically if i create a dummy start task and then drag off "on success" constraints to each of the four threads, the threads will execute in parallel in the order in which i created the constraints
Why do i want to do this? I have a number of parallel tasks in a sequence container where three will take a long time and the rest won't take as long.
I'll minimise the time required for the execution of container by using parallel tasks AND controlling the queue order (longest first). It won't matter whether I have 1 logical cpu or as many logical cpus as i have tasks.
Thanks
Jakub @ Adelaide, Australia