对于IIS中托管的工作流,AppFabric“WF实例历史记录”为空

时间:2015-06-11 08:37:05

标签: .net wcf iis workflow-foundation appfabric

在使用AppFabric仪表板监视WCF工作流服务应用程序(.NET 4.5,Windows 7,SQL 2012)时,我注意到“WF实例历史记录”完全为空。但是,“WCF呼叫历史记录”和“持久性WF实例”都会更新。我从头到尾运行了一些工作流实例。我该如何启用它?

我尝试了以下内容:

  • 确保SQL代理服务正在运行
  • 确保NT AUTHORITY \ LOCAL SERVICE(AppFabric Services帐户)可以登录到SQL Server - 之前我在事件日志中看到了这个问题
  • 查看了WfEventsTable - 它是空的而不是WcfEventsTable
  • EtwTrackingParticipant似乎已配置(因为它是自动添加的,不确定...) - 这是我的完整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>

有人能指出我正确的方向吗?

1 个答案:

答案 0 :(得分:0)

您是否可以查看是否有一种方法可以将SqlWorkflowInstanceStore.InstanceCompletionAction属性更新为“DeleteNothing”。默认值为“DeleteAll”。

在这里查看详细信息https://msdn.microsoft.com/en-us/library/system.activities.durableinstancing.sqlworkflowinstancestore.instancecompletionaction(v=vs.110).aspx