?
Solved

How can I define the order in which Sharepoint 2007 workflows run?

Posted on 2011-10-27
3
Medium Priority
?
656 Views
Last Modified: 2012-05-12
Hi, I have set up a number of workflows which run automatically when a new list item is added in a Sharepoint 2007 list (WSS 3.0). I created these workflows in Sharepoint Designer 2007. The problem is that in order to work collectively, they need to run in a particular order. I can't seem to find a way to make them run in a particular order. I have tried putting 1, 2, 3 etc. at the beginning of the workflow name, but this doesn't seem to work. They seem to run in a slightly different order each time. This means that certain fields sometimes don't get populated, as they are waiting on other fields to get populated first.

I attach a screenshot of the workflows page for a particular list item. As you can see I have tried to force the order with 1, 2, 3 etc. but you can see at the bottom that they have run in a different order. Is there anyway to force the order?

Many thanks for any help you can give,

Matthew. Screenshot of workflows for a particular list item in Sharepoint 2007 (WSS 3.0)
0
Comment
Question by:scafell11
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
leopolde earned 2000 total points
ID: 37038133
I don't think there is any option to control the order of the workflows.

Is there any particular reason to have them as separate workflows?  I ask this question because one option I would consider is consolidating the 5 workflows in one, so you can control the exact order in which actions are going to happen.

If there is a need to have them separate, I then would consider adding a hidden column to the list that can have a value from 1 to 6, and 1 as the default.  This column would mark which workflow is supposed to work at any given point.  When it is 1, then only workflow 1 can act, and change the value to 2 when it finishes, and so on.

For this to work you need to include a condition at the beginning of each workflow that asks if the hidden column indicates it is their "turn" to work.  If not, they should finish at once.  You also need one step at the end of each workflow that changes the value of the hidden column to the next number.  When the value is 6, then all work has been done, no workflow should act.

I hope this "top of the mind" idea works for you with some additional refinement.
0
 

Author Comment

by:scafell11
ID: 37041849
Thanks leopolde,

I have tried the fix with the hidden column. As you suggested, the default column value is 1. I set the first workflow to "Wait for Workflow ID to equal 1" and then at the end to "Set Workflow ID to 2". I then set the second workflow to "Wait for Workflow ID to equal 2" and then at the end to "Set Workflow ID to 3" and so on. It seems to work!

Many thanks for your help.
0
 

Author Closing Comment

by:scafell11
ID: 37041856
Thanks leopolde,

I have tried the fix with the hidden column. As you suggested, the default column value is 1. I set the first workflow to "Wait for Workflow ID to equal 1" and then at the end to "Set Workflow ID to 2". I then set the second workflow to "Wait for Workflow ID to equal 2" and then at the end to "Set Workflow ID to 3" and so on. It seems to work!

Many thanks for your help.
0

Featured Post

Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft SharePoint Foundation 2010 and Microsoft SharePoint Server 2010 do not offer the option to configure the location of the SharePoint diagnostic trace log files during installation.  This can, however, be configured through Central Administr…
SharePoint Designer 2010 has tools and commands to do everything that can be done with web parts in the browser, and then some – except uploading a web part straight into a page that is edited in SPD. So, can it be done? Scenario For a recent pr…
Screencast - Getting to Know the Pipeline
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

750 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question