AppFabric "WF Instance History" empty for a workflow hosted in IIS

242 views Asked by At

While playing with the AppFabric dashboard for monitoring a WCF Workflow Service Application (.NET 4.5, Windows 7, SQL 2012) I've noticed that the "WF Instance History" is completely empty. However, both "WCF Call History" and "Persisted WF Instances" get updated. I ran some workflow instances from start to finish. How do I enable this?

I've tried the following:

  • made sure that SQL Agent Service is running
  • made sure that NT AUTHORITY\LOCAL SERVICE (AppFabric Services account) can log in to SQL Server - previously I've seen issues with this in the event log
  • had a look into the WfEventsTable - it is empty as opposed to WcfEventsTable
  • EtwTrackingParticipant seems to be configured (as it was added automatically, not sure about that...) - here is my complete web.config:

<appSettings>
    <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
</appSettings>
<system.web>
    <compilation debug="true" strict="false" explicit="true" targetFramework="4.5">
    </compilation>
    <httpRuntime targetFramework="4.5" />
</system.web>
<system.serviceModel>
    <extensions>
        <behaviorExtensions>
            <add name="stateTracking" type="Microsoft.Activities.Extensions.ServiceModel.StateMachineTrackingElement, Microsoft.Activities.Extensions"/>
            <add name="workflowServiceTrace" type="Microsoft.Activities.Extensions.Diagnostics.WorkflowServiceTraceElement, Microsoft.Activities.Extensions" />
        </behaviorExtensions>
    </extensions>
    <behaviors>
        <serviceBehaviors>
            <behavior>
                <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
                <serviceDebug includeExceptionDetailInFaults="false" />
                <etwTracking profileName="HealthMonitoring_Tracking_Participant" />
                <sqlWorkflowInstanceStore instanceCompletionAction="DeleteAll" instanceEncodingOption="None" instanceLockedExceptionAction="NoRetry" connectionStringName="ApplicationServerWorkflowInstanceStoreConnectionString" hostLockRenewalPeriod="00:00:30" runnableInstancesDetectionPeriod="00:00:05" />
                <stateTracking />
                <workflowServiceTrace />
            </behavior>
        </serviceBehaviors>
    </behaviors>
    <protocolMapping>
        <add binding="basicHttpsBinding" scheme="https" />
    </protocolMapping>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
    <diagnostics etwProviderId="5540df62-131b-43f9-9ee7-e811ce1ede3c">
        <endToEndTracing propagateActivity="false" messageFlowTracing="false" />
    </diagnostics>
</system.serviceModel>
<system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />
</system.webServer>
<microsoft.applicationServer>
    <monitoring>
        <default enabled="true" connectionStringName="ApplicationServerMonitoringConnectionString" monitoringLevel="HealthMonitoring" />
    </monitoring>
</microsoft.applicationServer>

Can somebody point me into the right direction?

1

There are 1 answers

1
Ken W On

Can you take a look to see whether there is a way you can update the SqlWorkflowInstanceStore.InstanceCompletionAction Property to "DeleteNothing". The default value is "DeleteAll".

Take a look for the details here https://msdn.microsoft.com/en-us/library/system.activities.durableinstancing.sqlworkflowinstancestore.instancecompletionaction(v=vs.110).aspx