Workflow & Workflow Manager 1.0: What’s New, What’s Coming

Sign in to queue

The Discussion

  • User profile image


    Contract-First concept looks very interesting.
    Please correct me here: it appeared from the demo that the Contract-First workflow service is statefull - you were able to call different methods on the workflow service and get different results. When the WCF test client invokes a service, how does WCF test client pass a session id (or workflow instance id) to the workflow service to identify the workflow instance that this message applies to? Technically, I could have several workflow instances running on the same workflow service at the same time. I'd expect WCF tester client to somehow identify which workflow instance it tries to invoke...

    Could you post code sample for the Contract-First example with a walk through that explains what happens under the cover of the workflow service as it gets invoked via WCF tester?


  • User profile image

    Hi Alex,

    Sure, I put the simple demo code up on with a brief description of how it works:

    To answer your questions: yes, workflow services are most typically stateful services.  In .NET 4, we introduced the concept of content-based correlation with workflow services, which allows you to choose a particular piece of data in your input messages to determine which instance the host should load.  In this example, I used both the 'gameMoniker' parameter (for the JoinGame messages) and the players' names (for the subsequent messages).

    Hope that helps,

    -- Dave

Add Your 2 Cents