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

posted on Sunday, September 24, 2006 1:46 PM by scott

Comments

Sunday, September 24, 2006 7:34 PM by Christopher Steen

# Link Listing - September 24, 2006

Web Service Software Factory - Data Access Guidance Package - Code Generation [Via: dhayden ] State...
Wednesday, September 27, 2006 6:39 AM by Lars Klitgaard

# re: State Machines In Windows Workflow

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 !
Wednesday, September 27, 2006 7:52 AM by Francesco

# re: State Machines In Windows Workflow

Hi Scott,

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

Best,
NetFXGuide.com
Sunday, October 08, 2006 8:00 AM by Pete

# re: State Machines In Windows Workflow

Can I get the code associated with this article (please)?
Monday, October 09, 2006 4:19 AM by scott

# re: State Machines In Windows Workflow

Pete: Send me an email (scott at odetocode.com)
Tuesday, October 10, 2006 3:19 AM by Jay

# re: State Machines In Windows Workflow

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?
Tuesday, October 10, 2006 7:56 AM by scott

# re: State Machines In Windows Workflow

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.
Thursday, November 02, 2006 7:52 AM by Rahul Jain

# re: State Machines In Windows Workflow

This article is really kool man :)


Thanks,
Rahul Jain
Tuesday, November 07, 2006 1:59 PM by George

# re: State Machines In Windows Workflow

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

Thanks
Friday, November 10, 2006 3:11 PM by Mswlogo

# re: State Machines In Windows Workflow

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).