R – Are state machines created in Windows Workflow Foundation 3.5 compatible with version 4.0

.net-4.0state-machineworkflow-foundationworkflow-foundation-4

If I have a state machine created in version 3.5 will I be able to upgrade to .NET/Windows Workflow Foundation 4.0, or will I have to re-create the functionality? I heard / read that 4.0 does not support state machines. Finally, if you have a state machine in 3.5, what is your plan for migrating to 4.0?

Best Answer

That a state machine workflow is no longer needed in WF4 is not quite true.

Most, but not all, state machine scenarios are easier to model in a WF4 flowchart. That is the case because most developers used state machine because sequential was not flexible enough. All those cases, and those are probably a majority, are well covered by the flow chart.

However the event driven state machine examples are much harder in WF4. Check the WF4 State Machine Guidance here for more details. And the team at Microsoft has announced they are planning on releasing a state machine for WF4 after the initial version ships with .NET 4.

Related Topic