Geeks With Blogs
Stephanie Grima C#, ASP.NET and my life.

 

The two types of workflows which exist out of the box in Visual Studio are:

  • Sequential Workflow
  • State Machine Workflow

Below, find the differences between them, so that when you are thinking of implementing a workflow, you would use the one that fits the most:

State-Machine workflows:

  1. State-machine workflows are workflows which are driven by particular events. Example:
    • OnTaskChanged
    • OnTaskCreated
    • OnTaskDeleted
    • OnWorkflowActivated etc
  2. In order to move to another event, the workflow needs to meet another state.
    • If a task is created, the workflow stays on that event until another even is called, for example the user decides to edit the task (on task changed)
  3. The control of the workflow is decided by the user, according to what events he calls, the workflow will execute.
  4. The workflow doesn't really have to end. It can stay in the same state for weeks for example.

Sequential workflows:

  1. Sequential workflow is known to be very predictable. It works like a flowchart -  Example:
    • The workflow works until the user approves or denies the file in order to continue. When ALL users approve/deny it will go to the next time
  2. This kind of workflow is used when there is only one way to complete the task.
  3. The workflow controls the processes of what happens throughout the workflow.
Posted on Friday, October 31, 2008 10:49 PM SharePoint , My Opinions | Back to top


Comments on this post: [SharePoint] State Machine Workflow vs. Sequential Workflow

# re: [SharePoint] State Machine Workflow vs. Sequential Workflow
Requesting Gravatar...
I worked a bit on a sequential workflow and I'm wondering if the approach of state machine workflows is similar to that of the sequential one?

I got stuck on the rollbacktask activity in my sequential workflow and I decided to go the state machine route to hopefully avoid it.

I'm looking forward to your reply. Thanks
Left by Itumeleng Ramothata on Sep 01, 2009 4:15 AM

# re: [SharePoint] State Machine Workflow vs. Sequential Workflow
Requesting Gravatar...
i have a business scenraio like this. please suggest me which workflow can i use , SPD/VS/OOB ones.


Thier are 3 groups G1,G2, G3
doc lib has status S - S1 , S2, S3

when a document added in doc library by G1 user
A task has to be created for G2 (G2 will add aatchment & update metadata) & Approve.
then goes to G3
Reject then goes to G1 for review(workflow should nt end here)
Same G3 will attach & update metadata & approve G1 or reject G2
G1 will attach & update metadata, G1 only close the workflow


Please recommend does this stand in which type of workflow
Sequntial or State machine.

Only one Single Task should be created & assigned G1, G2, G3

Users can view previuos comments & attachments also

Left by PrashanthSpark on Nov 30, 2009 11:23 PM

# re: [SharePoint] State Machine Workflow vs. Sequential Workflow
Requesting Gravatar...
hi me too having this doubt...pls reply....


i have a business scenraio like this. please suggest me which workflow can i use , SPD/VS/OOB ones.


Thier are 3 groups G1,G2, G3
doc lib has status S - S1 , S2, S3

when a document added in doc library by G1 user
A task has to be created for G2 (G2 will add aatchment & update metadata) & Approve.
then goes to G3
Reject then goes to G1 for review(workflow should nt end here)
Same G3 will attach & update metadata & approve G1 or reject G2
G1 will attach & update metadata, G1 only close the workflow


Please recommend does this stand in which type of workflow
Sequntial or State machine.

Only one Single Task should be created & assigned G1, G2, G3

Users can view previuos comments & attachments also
Left by aravind on Jun 22, 2010 4:55 AM

# re: [SharePoint] State Machine Workflow vs. Sequential Workflow
Requesting Gravatar...
aravind, that sounds like a Sequential Workflow to me since here is only one flow of tasks as per your description.
Left by stack on Jul 19, 2010 10:33 AM

# re: [SharePoint] State Machine Workflow vs. Sequential Workflow
Requesting Gravatar...
Can i do the same workflow in both sequential and state machine technique?


Thanks
Bijaya
http://www.fewlines4biju.com
Left by Bijay on Aug 26, 2010 2:44 PM

# re: [SharePoint] State Machine Workflow vs. Sequential Workflow
Requesting Gravatar...
thank for share
Left by Long Van on Apr 21, 2011 7:00 PM

# re: [SharePoint] State Machine Workflow vs. Sequential Workflow
Requesting Gravatar...
Hi..

Thax for your knowledge. it's good
Left by Bhawana on May 19, 2011 1:52 AM

# re: [SharePoint] State Machine Workflow vs. Sequential Workflow
Requesting Gravatar...
what................ a..........technology
Left by amanheer on Nov 19, 2011 4:40 AM

Your comment:
 (will show your gravatar)


Copyright © Steffi | Powered by: GeeksWithBlogs.net