Infosys Microsoft Alliance and Solutions blog

« Rainbow in Cloud!! | Main | Finally, I am also on Kinect »

State Machines are back in business!!!

State Machine workflows were part of .NET Framework 3.5. However, last year with the release .NET Framework 4 Microsoft discontinued "State Machine" workflow type. If you had to model "State Machine" functionality with .NET 4, you can still model it using Flowchart workflow authoring style. However, implementing the event driven state machine examples were that much harder.

Now exactly after a year since .NET Framework 4 release, as part of the .NET Framework 4 update 1 that got released last month, Microsoft has brought back the support for "State Machine" workflow types.
This will bring huge relief to customers who wanted to migrate.NET 3.5 state machine workflows to .NET 4

Some of the related important additions are,
• Support for SQL Azure as Workflow Instance store
• Provides max connection retries property to re-attempt a connect to database
• New activities to model compensation behavior for easy to use by new custom workflow host

For developing applications from Visual Studio 2010 SP1, you can download the install here
Note, you must be running on SP1 of VS2010 for this to work.
If you have server applications running with the .NET Framework 4 and want to update then, you need to install it from here. Steve Danileson has provided good pointers to State Machine Workflow Labs and other important changes here.


It is good to know that state machine workflow is back, but is there a reason to why? Why was it taken off and why brought back in again?

State Machines are back again because lot of customers, architects and developers wanted it back badly and made a lot of noise about it on MSDN and other forums. The reason for noise was difficult to migrate existing .NET 3.5 State Machine workflows to .NET 4 and also difficulties in implementing “event driven - interactive workflows”, although lot of it was possible with Flowchart in .NET 4 but may be not as straight forward as Microsoft community was habituated with it in .NET 3.5
Another important point is to be able to use state machines in Visual Studio. In project properties, target framework, you need to select the “.NET Framework 4 Client Profile Platform update 1 (KB2478063)” for all the State machine specific activities to be available in toolbox.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

Please key in the two words you see in the box to validate your identity as an authentic user and reduce spam.

Subscribe to this blog's feed

Follow us on

Blogger Profiles

Infosys on Twitter