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.
Comments
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 !
We added your nice (as usual) article to the WF Section of NetFXGuide.
Best,
NetFXGuide.com
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?
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.
Thanks,
Rahul Jain
Great example topic too because every engineer is familiar with all the states of a bug.
Thanks
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).
This is very usefull article, can you please send me the source code.
Thanks and Regards
Can you please check the link, it is not working.
Thanks and Regards,
Kalyan
this is a very useful article for WF. thank you very much for writing and sharing such a valuable article.
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........
http://odetocode.com/download/workflowprojects.zip
This link not working. where I can download source code for this article?. Please help me.
http://odetocode.com/download/workflowprojects.zip
This link not working. where I can download source code for this article?. Please help me.
I have some problem with sequention workflow. could you please help.
Hi,
I am deploying my workflow on custom list. this workflow runs on custom content type which is inheritaing from windows task content type.
but when I am trying to run this workflow it is showing error , till add & I run Sharepoing inbuild workflow. like approval or something else workflow.
why my workflow is dependent on sharepoint in-build workflow. ??
Help please.
tx
Labhesh
can u give me the full code of this example.
State Machine are explained so plenty.
Only one question...
How can you do to inheritance event driven to certain States and not all? (that was you did in the last part of example)
In our project the host is asp.net website.
when i try to call more than one methods(communication by local service)
under one button click event ,error occurs like below
Event "Insert" on interface type "statemachine.Interface1" for
instance id "8dfec02f-7395-4f9c-b3a6-a410cddaefb9" cannot be delivered.
Is it possible to call more than one methods in one click event?
Great article. Is there a way I can download the code? The link does not seem to work. The Bug class implementation is missing, so I was wondering if this is part of the code download.
Regards,
Really helped me to dive into WF State Machines.
http://odetocode.com/download/workflowprojects.zip
The link provided is not working, can you please provide me the source code link..
Regards,
Suresh
I tried understanding WF before an year. I wasn't able to do so then. This article made me so confident today that I'm gonna have this WF stuff in my current project and I am gonna handle it.
Thanx a bunch.....