This project is read-only.

To track a StateMachine with WorkflowServices

Download Sample WF4 - Tracking State Machine Workflow Service
  1. Add a reference to Microsoft.Activities.Extensions see How do I install Microsoft.Activities.Extensions?
  2. Modify Web.config to add the behavior extensions and behaviors
      <!-- Used for tracking StateMachines -->
      <add name="stateTracking" type="Microsoft.Activities.Extensions.ServiceModel.StateMachineTrackingElement, Microsoft.Activities.Extensions"/>
      <!-- Output tracking to VS Debug Window -->
      <add name="workflowServiceTrace" type="Microsoft.Activities.Extensions.Diagnostics.WorkflowServiceTraceElement, Microsoft.Activities.Extensions" />       
        <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
        <serviceMetadata httpGetEnabled="true"/>
        <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
        <serviceDebug includeExceptionDetailInFaults="false"/>
        <!-- Enable persistence -->
        <sqlWorkflowInstanceStore connectionString="Data Source=.\SQLExpress;Initial Catalog=SampleInstanceStore;Integrated Security=True;Asynchronous Processing=True"/>
        <!-- Enable tracking of state machines -->
        <stateTracking />
        <!-- Output tracking to VS Debug Window -->
        <workflowServiceTrace />
  <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />

Last edited Apr 9, 2012 at 8:43 PM by ronjacobs, version 2


EyadAB May 13, 2012 at 3:49 PM 
just I wanted to point out that it takes 1 minute to see the state change and that becuase of the workflowIdle timeToPersist default(1 minute)
by adding this configuation <workflowIdle timeToPersist="00:00:01"/>
you'll see the changes very quickly after 1 second.