State Machines In Windows Workflow

A new article on OdeToCode: State Machines In Windows Workflow. State machines have been a powerful abstraction in software for many years. Using a state machine in Windows Workflow means we get all the tracking, persistence, and meta-data support the workflow runtume offers, which is quite a bonus.

The state machine designer

Print | posted @ Sunday, September 24, 2006 5:46 PM

Comments on this entry:

Gravatar # re: State Machines In Windows Workflow
by Lars Klitgaard at 9/27/2006 1:39 PM

This walkthrough was extremely informative to me. I am a novice programmer currently looking into .NET 3.0 to see what it can do for me when creating the new application, I am heading for.
This explanation has a clear goal and cuts all the technical details and extreme usage scenarios away and only describes the basic therminology and behavior from a common-known, simple example - and it does it at a speed and level so even I feal confident with it.
Good job !
  
Gravatar # re: State Machines In Windows Workflow
by Francesco at 9/27/2006 2:52 PM

Hi Scott,

We added your nice (as usual) article to the WF Section of NetFXGuide.

Best,
NetFXGuide.com
  
Gravatar # re: State Machines In Windows Workflow
by Pete at 10/8/2006 3:00 PM

Can I get the code associated with this article (please)?
  
Gravatar # re: State Machines In Windows Workflow
by scott at 10/9/2006 11:19 AM

Pete: Send me an email (scott at odetocode.com)
  
Gravatar # re: State Machines In Windows Workflow
by Jay at 10/10/2006 10:19 AM

Scott, this is nice one. I have a query similar on this line, if you can guide me.

I have already running a bug tracking system which is non windows workflow based.

If I want to implement such bug tracking system using windows workflow, how should I handle my earlier bugs which have their own states (e.g. Open/ Resolved/ Need more clarification/ Closed) while creating this workflow based bug tracking system?
  
Gravatar # re: State Machines In Windows Workflow
by scott at 10/10/2006 2:56 PM

Jay:

You can force a state using the StateMachineInstance class. After you start the workflow, create a new instance (StateMachineWorkflowInstance instance =
new StateMachineWorkflowInstance(runtime, instanceID)) and use the SetState method. It's like an administrative override.
  
Gravatar # re: State Machines In Windows Workflow
by Rahul Jain at 11/2/2006 2:52 PM

This article is really kool man :)


Thanks,
Rahul Jain
  
Gravatar # re: State Machines In Windows Workflow
by George at 11/7/2006 9:59 PM

This was a great summary !!!
Great example topic too because every engineer is familiar with all the states of a bug.

Thanks
  
Gravatar # re: State Machines In Windows Workflow
by Mswlogo at 11/10/2006 11:11 PM

Scott,

After looking a little more closely I'm a bit confused why you call the last part of your article Hierarchical State Machines. If it was truely hierarchical how would one introduce yet a third level. It appears to allow you to inherit one level of event handling from a base "group of events", and that's it. It's definitely useful, but I don't think it's called hierarchical state machines.

I'd like to understand how hierarchical state machines could be built with WF (if it's even possible).
  
Gravatar # re: State Machines In Windows Workflow
by Harlan at 10/16/2009 7:26 AM

Excellent!
  
Gravatar # re: State Machines In Windows Workflow
by GCoder at 11/17/2009 4:38 PM

Do you have the source code for the article?
  
Gravatar # re: State Machines In Windows Workflow
by scott at 11/17/2009 9:36 PM

http://odetocode.com/download/workflowprojects.zip
  
Gravatar # re: State Machines In Windows Workflow
by Kalyan at 12/9/2009 3:40 AM

Hi,

This is very usefull article, can you please send me the source code.

Thanks and Regards
  
Gravatar # re: State Machines In Windows Workflow
by Kalyan at 12/9/2009 6:24 AM

Hi Scott,

Can you please check the link, it is not working.

Thanks and Regards,
Kalyan
  
Gravatar # re: State Machines In Windows Workflow
by ruwanthaka at 12/15/2009 1:12 AM

yes, looks like it's not working!
  
Gravatar # re: State Machines In Windows Workflow
by Tiju at 12/22/2009 5:39 AM

good job.
  
Gravatar # re: State Machines In Windows Workflow
by Sandeep at 1/19/2010 7:15 AM

Hi Scott,
this is a very useful article for WF. thank you very much for writing and sharing such a valuable article.
  
Gravatar # re: State Machines In Windows Workflow
by Om at 1/31/2010 6:10 AM

Hi,
I was looking from last few months,what are uses of WWF and how to implement it. but only this artical answered all my quries regarding Workflow.
Great work........
  

Your comment:

Title:
Name:
Email:
Website:
 
Italic Underline Blockquote Hyperlink
 
 
Please add 6 and 3 and type the answer here: