Click here to Skip to main content
12,557,148 members (40,049 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


3 bookmarked

Create Parallel Task in State Machine Workflow in SharePoint 2010

, 17 Oct 2012 CPOL
Rate this:
Please Sign up or sign in to vote.
Create Parallel Task in State Machine Workflow in SharePoint 2010.

I faced a problem while creating parallel tasks in state machine workflow. My requirement is same as OUT of Box SharePoint approval workflow which allows multiple users to approve the document and when everyone approves the document, document moves to next state which is approved.

All the articles pointed me that this is possible in sequential workflow.

Here is the thread which explains the problem, I am not going to invest much time to explain the problem

I downloaded the code sample available at Microsoft site which is basic state machine workflow. Following is the link.

Modifications to the code are as follows:

  • Add a new state at level 2.
  • In the state initialization, create two tasks with different Correlation token, task ids and task properties.
  • Now add two event driven activity.
  • Keep flags for each parallel task
  • Added OnTaskChanged event driven activity, On Invoked event updated the associated flag to true.
  • Put an IF block and check if all the flags are true, then set state workflow to next state.

I found this easy to implement, though manual code is involved which should be done via a parallel activity. Code can be downloaded from here.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Rohit Shrivastava
India India
No Biography provided

You may also be interested in...


Comments and Discussions

-- There are no messages in this forum --
| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.161026.1 | Last Updated 17 Oct 2012
Article Copyright 2012 by Rohit Shrivastava
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid