locked
AppFabric configuration for workflow persistence problem FYI RRS feed

  • Question

  • Symptoms:

    1. Workflows function but are not persisted when they go idle
    2. AppFabric dashboard WF Instance History is empty
    3. AppFabric dashboard WCF Call History displays all RIA and xamlx service calls
    4. No errors are recorded in any logs, no matter how verbose the setting

    in this case, the AppFabric event collection and workflow management services were running with correct privileges, and the SQL Server Agent service was running. After much searching, I found this post: http://cloudin.se/?tag=wf-instance-history which pointed me to the web.config for the workflow service. In my case, the workflow already had a named behavior like this:

        <behaviors>
          <serviceBehaviors>
               <behavior name="NotifyBehavior">
              <serviceMetadata httpGetEnabled="true" />
              <serviceDebug includeExceptionDetailInFaults="true" />
            </behavior>
          </serviceBehaviors>
        </behaviors>
    

    After using the "Configure WCF and WF for Application" applet, a new behavior was added to web.config containing all of the selected settings, but it was added as a separate unnamed behavior. Consequently, it did nothing. After using the applet, the behaviors section looked like this:

     <behaviors>
          <serviceBehaviors>
               <behavior name="NotifyBehavior">
              <serviceMetadata httpGetEnabled="true" />
              <serviceDebug includeExceptionDetailInFaults="true" />
            </behavior>
            <behavior>
                        <etwTracking profileName="Troubleshooting Tracking Profile" />
                        <serviceMetadata httpGetEnabled="true" />
                        <sqlWorkflowInstanceStore instanceCompletionAction="DeleteAll" instanceEncodingOption="None" instanceLockedExceptionAction="BasicRetry" connectionStringName="ApplicationServerWorkflowInstanceStoreConnectionString" hostLockRenewalPeriod="00:00:30" runnableInstancesDetectionPeriod="00:00:05" />
                        <workflowInstanceManagement authorizedWindowsGroup="AS_Administrators" />
                        <workflowUnhandledException action="AbandonAndSuspend" />
                        <workflowIdle timeToPersist="00:00:00" timeToUnload="00:00:00" />
            </behavior>
          </serviceBehaviors>
        </behaviors>
    

    I merged the unnamed behavior settings into the named behavior (and removing duplicates), producing this:

        <behaviors>
          <serviceBehaviors>
            <behavior name="NotifyBehavior">
              <serviceMetadata httpGetEnabled="true" />
              <serviceDebug includeExceptionDetailInFaults="true" />
              <etwTracking profileName="Troubleshooting Tracking Profile" />
              <sqlWorkflowInstanceStore instanceCompletionAction="DeleteAll" instanceEncodingOption="None" instanceLockedExceptionAction="BasicRetry" connectionStringName="ApplicationServerWorkflowInstanceStoreConnectionString" hostLockRenewalPeriod="00:00:30" runnableInstancesDetectionPeriod="00:00:05" />
              <workflowInstanceManagement authorizedWindowsGroup="AS_Administrators" />
              <workflowUnhandledException action="AbandonAndSuspend" />
              <workflowIdle timeToPersist="00:00:00" timeToUnload="00:00:00" />
            </behavior>
          </serviceBehaviors>
        </behaviors>
    

    Which works perfectly! It all makes sense after spending hours and hours examining ETW traces and other false leads...

    Couldn't the configuration applet have detected the issue? That would have saved me a ton of time!

    
    Friday, April 5, 2013 6:32 PM

All replies

  • Hello Jay!

    Have you configured persistence using the AppFabric for Windows Server add-in for IIS manager?

    Best regards,

    Henrik Dahl

    • Proposed as answer by Henrik Dahl Saturday, April 6, 2013 7:48 PM
    • Unproposed as answer by Jay Ward Saturday, April 6, 2013 9:32 PM
    Friday, April 5, 2013 8:16 PM