Share via


The .NET 4 Platform Update and WF4 State Machine

 Update: This went live 4/18/2011, and there are more details here: Microsoft .NET Framework 4 Platform Update 1

On March 25th at his Tech-Ed India keynote Jason Zander announced some great new resources for developers.  Our team has been working hard on these releases and I’m happy to share with you that on April 25th 18th (released early!) the Multi-Targeting Pack for Microsoft .NET Framework 4 Platform Update 1 (KB2495638) will be available for download.

There are two options for downloading the platform update.

Windows Workflow Foundation - State Machine (.NET Framework Platform Update 1)

  • New State Machine workflow model - builds upon WF runtime and add in new workflow style for event-driven processes - Events (or "Triggers") cause "Transitions" between known "States"
  • New API and Visual Studio-based designer - enables simplified authoring of State Machine styled flow control
  • Fully supported on .NET Framework 4 (replaces CodePlex based solution available today)
  • New enhancements over existing CodePlex solution
    • Entry/Exit actions on State, Conditional and default Transitions with Transition action, scoped variables in StateMachine, and improved Tracking support
    • Designer enhancements ease the authoring experience with Auto Connect , Auto Insert and aggregated State and Transition views that aid configuration and navigation

We also have a great new Hands on Lab for State Machine to get you started so why not take an afternoon to learn how you can add the State Machine activity to your solutions. Also if you plan on using extensions from Microsoft.Activities or our unit testing framework Microsoft.Activities.UnitTesting be sure to download version 1.8 which includes binaries built for Platform Update 1.

How to Create a State Machine Workflow

After installing .NET Framework Platform Update 1, you will see new Target Framework available in Visual Studio in your project properties.  Just select one of the Platform Update 1 target framework profiles.

image

Then create a workflow and you will be happy to see some new activities in your WF4 toolbox.

image

Windows Communication Foundation -  RIA 1.1 (Included in .NET Framework 4 SP1)

And in case you missed it, the WCF RIA team shipped a great new release last month as well.

  • Enhanced support for Windows Azure and SQL Azure - Simplified building cloud RIA applications thru new Business Application Template for Windows Azure Platform.  DomainService also now supports both SQL Azure and Windows Azure Tables.
  • Custom code-generator extensibility and T4-based code generator - code generation is now abstracted away and implemented via a MEF-based mechanism for you to bring your own code generator; plus a new Text Template (T4) based code generator.
  • End-to-end support for complex types - now allows entity members and invoke operation parameters of complex types.  Support for complex types covers serialization/deserialization, code generation, metadata addition, edit sessions, change tracking and deep validation.
  • Additional customer-requested enhancements including sharing entity types across multiple DomainServices and ViewModel-friendly DataSource.
  • Localization - now localized into 9 additional languages, matching the same list of languages supported by Visual Studio 2010

And of course, we have more great new releases on the way so keep watching this space for more details.

Comments

  • Anonymous
    April 23, 2011
    Thanks for release Statemachine, it is very nice to have this powerful tool.

  • Anonymous
    June 19, 2011
    Hi Ron, I have installed the Plaform update 1 on my development machine and it worked perfectly. Then I installed the Runtime update to our QA server (Win 2008 R2) and deployed my WF Service project tagged with targetFramework="4.0.1". When I access the service, I get the error: " The 'targetFramework' attribute in the <compilation> element of the Web.config file is used only to target version 4.0 and later of the .NET Framework (for example, '<compilation targetFramework="4.0">'). The 'targetFramework' attribute currently references a version that is later than the installed version of the .NET Framework. Specify a valid target version of the .NET Framework, or install the required version of the .NET Framework." There's not much resource about this online so not sure where to go from here. I have tried to re-install the update and even restart the server, to no avail. At this point, I cannot really start using the state machine feature, which is sad. Thanks Patrick

  • Anonymous
    June 19, 2011
    Hi Patrick - check this post for a workaround blogs.msdn.com/.../net-framework-platform-update-1-supported-runtime-config.aspx