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

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)
scafell11Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

leopoldeCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
scafell11Author Commented:
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
scafell11Author Commented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SharePoint

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.