TechEd EMEA 2009 – Session “Deep Dive in Windows Workflow Foundation 4.0” – Part 1/4

  Just last week was in Berlin, Germany the TechEd EMEA 2009 event and in that event  had a session called “Deep Dive in Windows Workflow Foundation 4.0”. This was a level 300 session and not 400 as the name could make you think, but this way we could achieve more people in terms of breadth.

   In order to provide all of those that were in the session with more information and some summary of what we’ve seen and also the Demo Scripts for all that was made during the presentation I’ve prepared a 4 part series of posts that will help them, and also those who weren’t able to attend it because the room was full or simply because they hadn’t the opportunity to get to the Event.

    This 4 part series will be:

- Part 1: Changes from WF 4.0 Beta 1 to Beta 2

- Part 2: Flowchart

- Part 3 : Correlation

- Part 4: Migration from State Machine to Flowchart

    So let’s start this part 1 with the Changes made from WF 4.0 Beta 1 to Beta 2, since the Beta 2 was release just 3 weeks ago this seemed to me a very interesting topic just to place ourselves in the same page.

    So basically we can divide the changes into the following parts:

  • Activity Hierarchy
    • Beta 1

   ActivityHierarchyBeta1

      • The base of the Workflows was always a WorkflowElement class, and everything would inherit from that class and so we would have different approaches for the several types of Workflows, like Flowchart and Sequential.
    • Beta 2

        ActivityHierarchyBeta2

      • In this new version the key changes were:
        • WorkflowElement goes away, and is replaced with Activity.  Activity is the root type for all units of execution within the world of WF. This means that we now look at workflows in a different perspective, that is that the types or workflows are just activities that can be composed and use in conjunction with one another, and this will make the real Workflow.
        • Addition of ActivityWithResult which is the base for the Expression activities
        • Addition of AsyncCodeActivity.  We got a lot of feedback that people liked what we were doing integrating asynchronous programming within activities but that there was still a fair amount of work in order to hook those up.  AsyncCodeActivity is some nice sugar that makes it pretty easy to write an activity that takes advantage APIs that surface a Begin/End pair using the asynchronous programming model.

 

  • Runtime and Hosting
    • CachedMetadata
      • improved for activity authors to write code within to validate the activity tree. 
      • One stop shop for customizing behaviors that were previously spread through methods like:
        • OnGetArguments()
        • GetConstraints()
        • GetActivities()
    • ActivityAction
      • Introducing DelegateArguments to pass data into and out of an ActivityAction. 
      • In Beta 1, this required using an object of type Variable<T> that was assigned to a property named Argument
    • Persistence and Durable Timer and Tracking
      • ‘Under the Hood’ category, the team has made improvements to Persistance, Durable timer and tracking which should provide a better runtime experience for the WF4 developer.
    • Dynamic Update
      • Last on the runtime front, dynamic update was a feature that had made its debut in Beta 1, but was removed again between Beta 1 and Beta 2 - and will not be present in the RTM release
    • WorkflowInstance renamed

 

  • Activities
    • Correlation
      • ParametersContent
        • XPath can now be generated from ParametersContent
      • CorrelationInitializers
        • CorrCorrelationQuery and AdditionalCorrelations have been merged into a collection called CorrelationInitializers.  
      • CorrelationScope
        • Reduced the need for CorrelationHandles all over the place by improving the CorrelationScope and having an implicit correlation handle.
    • Parameters support
      • Parameters activities
        • Removal of Parameters Activities and merging that into the Send and Receive activities. 
      • Content
        • You can now use the Content property to support MessageContent (primarily for untyped Message or MessageContract ) and ParametersContent (which is for the more RPC style list of name value pairs).
    • Refactored Semantics on Error Handling Activities
      • Refactored the semantics around the error handling activities to behave similar to a “throw” in a C# catch block. The most visible aspect of this change is the addition of the Rethrow activity.
    • InvokePowershell
      • Lastly, the InvokePowershell activity is no longer shipped as part of the .NET Framework. Fear note, for it is not gone; it has been moved to the SDK samples, joining other quite useful activities.
      • One point worth to mention about the PowerShell activity in the SDK is that includes activity code + designer code
    • Added a TerminateWorkflow activity in Beta2 (it’s in the runtime category)

 

  • Interop Activity
    • Key Component in WF4
      • The Interop activity is a key component for WF4 workflows, Leverages Activities built in WF3
      • Interop Activity allows you to continue to leverage activities built in WF3. 
    • Improvements
      • Validations and Transactions are handled within the Interop activity to more fully support WF3 activities
    • Whenever using the Interop activity, if you have persistence in the workflow/activities that is used in the interop, that the Persistence and Monitoring databases that will be used is the 4.0 version, since this way we leverage the use of both versions, and  only need one to provide that capability.

 

  • Designer
    • Expand in place support
      • This makes it easy expand an activity within the canvas without having to drill into it.  This also lets you collapse activities when you don’t want to see all of the detail
    • Imports designer
      • No more fully qualified type names within expressions
    • Text of flowchart lines for FlowDecision and FlowSwitch
      • This is a nice usability / readability fix for the Flowchart, making it easier to see which cases and conditions the lines leading from decision shapes are for.
    • The rehosting was made really powerful, and in the WCF and WF Samples from the SDK there’s a WorkflowSimulator that makes the ReHosting and also provide visual information about the running state of the workflow. This is really interesting in terms of providing the our customers the capability to define the Business easily.

 

All these information were based on the team blog that appears here http://blogs.msdn.com/endpoint/.

No Comments