1
votes

Is there a way to control (e.g., prioritize) the order in which SharePoint workflows (not workflow activities, but entire workflows) are being executed?

The set of workflows for a SharePoint list consists of workflows that are either created using SharePoint Designer or are custom workflows installed via WSP. We would like to guarantee that certain workflows (e.g., workflows which compute values for some of the fields) are executed before the rest of the workflow run (e.g., workflows that copy the data).

4

4 Answers

1
votes

If this works for you, you can instead say workflow 1 to run workflow 2.

You can download Start Another Workflow activity to use in your designer workflows.

1
votes

You might be interested in the Codeplex Sharepoint 2010 Admin Pack, which includes the Workflow Organizer - it does exactly what you want: Prioritize Workflows and execute them in a specific order.

0
votes

You could pause (pause activity) your workflow that needs to run after the first. It could be stacked, one waits 5 min, another waits 10, etc. I don't believe the first one will wait for the second one to finish before starting, unless that's a setting somewhere.

I had this problem with a workflow that was using the ID field to create a simple ID "problem_[ID]" and another workflow using that field to create a record in another list. If the creation record ran first, it would either populate with "problem_" or not run. Pausing solved the problem. I would also experiment with whatever workflow was published last, but I didn't want to run the risk of my predecesor publishing a workflow and breaking the system.

0
votes

Add Boolean fields named for each of your workflows such as W2, W3. Assume Workflows are named the same for the sake of this discussion.

They all may try to run at the same time, set two (W2 and W3) to pause 1 minute immediately, allow W1 to run as it will run first. At the end of W1's run, set field W2 to Yes.

Then in W2, set to Wait for field W2 to equal Yes, then allow that workflow to run. At the end of W2's run, set field W2 to No and W3 to Yes.

Then in W3, set to Wait for field W3 to equal Yes, then allow that workflow to run. At the end of W3's run, set field W3 to No.

All workflows will run, but actions will run in the W1 - W2 - W3 order.