locked
IIS Workflow persistance without AppFabric RRS feed

  • Question

  • My question is about automatic resuming/hydrating persisted workflows that are hosted in IIS7.
    Is that impossible to achieve out-of-the-box without installing AppFabric (I have not succeeded)?

    Some people have said that AppFabric is required, but then, how is it possible that IIS7 alone cannot handle the resuming of persisted workflows, while it works perfectly using the VS2010 Development Web Server/Cassini? Does the VS Dev server have builtin AppFabric-logic or what?

    I have seen some discussions touching this topic, but never got any clear answers.

    Regards
    Anders

    Wednesday, November 10, 2010 10:02 AM

Answers

  • Hi, Anders

    ->"Some people have said that AppFabric is required, but then, how is it possible that IIS7 alone cannot handle the resuming of persisted workflows,"
    You don't have to install Appfabic to have this feature. IIS7 install with .Net Framework 4.0 is good enough to run a WF4 Service.
    After you add the sqlWorkflowInstanceStore node into the web.config file. workflow can be persisted and resumed automatically, even after the w3wp.exe is crashed.

      <system.serviceModel>
        <behaviors>     
          <serviceBehaviors>
            <behavior>
              <serviceMetadata httpGetEnabled="true"/>
              <serviceDebug includeExceptionDetailInFaults="true"/>
              <sqlWorkflowInstanceStore
                    connectionString="Data Source=.\sqlexpress;Initial Catalog=WF4PersistenceDB;Integrated Security=True"
                    instanceCompletionAction="DeleteAll"
                    instanceLockedExceptionAction="BasicRetry"
                    hostLockRenewalPeriod="00:00:05"              
                    />
    ....
    Of cause, before adding the configuration, you should have setup the persistence store.

    Hope this helps
    regards

    This posting is provided "AS IS" with no warranties, and confers no rights. Microsoft Online Community Support. My Blog:http://xhinker.com "Microsoft Windows Workflow Foundation 4.0 Cookbook"
    • Marked as answer by Andrew_Zhu Wednesday, November 17, 2010 9:07 AM
    Friday, November 12, 2010 7:42 AM
  • Crash recovery requires AppFabric to work correctly with IIS, as do durable timers.

     

    AppFabric ships WorkflowManagementService, and one of it's roles it to activate applications in IIS that have ready to run instances.

    • Marked as answer by Andrew_Zhu Wednesday, November 17, 2010 9:07 AM
    Friday, November 12, 2010 6:00 PM
  • AppFabric installs the Workflow Invoker Service that regularly looks in the persistence store for workflow instances that are orphaned due to a crash. This service, which reinvokes workflow instances on the last persistence point after the IIS was stopped and started again, is not available when AppFabric is not installed.

    • Marked as answer by Andrew_Zhu Wednesday, November 17, 2010 9:07 AM
    Sunday, November 14, 2010 9:05 AM

All replies

  • There should be no problems with persisting and loading workflow services in IIS7- What specific issues are you running into?

    You can also host workflow services in WPA if you'd like to use other protocols apart from HTTP-

    Wednesday, November 10, 2010 6:52 PM
  • Hi, Anders

    ->"Some people have said that AppFabric is required, but then, how is it possible that IIS7 alone cannot handle the resuming of persisted workflows,"
    You don't have to install Appfabic to have this feature. IIS7 install with .Net Framework 4.0 is good enough to run a WF4 Service.
    After you add the sqlWorkflowInstanceStore node into the web.config file. workflow can be persisted and resumed automatically, even after the w3wp.exe is crashed.

      <system.serviceModel>
        <behaviors>     
          <serviceBehaviors>
            <behavior>
              <serviceMetadata httpGetEnabled="true"/>
              <serviceDebug includeExceptionDetailInFaults="true"/>
              <sqlWorkflowInstanceStore
                    connectionString="Data Source=.\sqlexpress;Initial Catalog=WF4PersistenceDB;Integrated Security=True"
                    instanceCompletionAction="DeleteAll"
                    instanceLockedExceptionAction="BasicRetry"
                    hostLockRenewalPeriod="00:00:05"              
                    />
    ....
    Of cause, before adding the configuration, you should have setup the persistence store.

    Hope this helps
    regards

    This posting is provided "AS IS" with no warranties, and confers no rights. Microsoft Online Community Support. My Blog:http://xhinker.com "Microsoft Windows Workflow Foundation 4.0 Cookbook"
    • Marked as answer by Andrew_Zhu Wednesday, November 17, 2010 9:07 AM
    Friday, November 12, 2010 7:42 AM
  • Crash recovery requires AppFabric to work correctly with IIS, as do durable timers.

     

    AppFabric ships WorkflowManagementService, and one of it's roles it to activate applications in IIS that have ready to run instances.

    • Marked as answer by Andrew_Zhu Wednesday, November 17, 2010 9:07 AM
    Friday, November 12, 2010 6:00 PM
  • AppFabric installs the Workflow Invoker Service that regularly looks in the persistence store for workflow instances that are orphaned due to a crash. This service, which reinvokes workflow instances on the last persistence point after the IIS was stopped and started again, is not available when AppFabric is not installed.

    • Marked as answer by Andrew_Zhu Wednesday, November 17, 2010 9:07 AM
    Sunday, November 14, 2010 9:05 AM
  • Hi,

    WF4 service host in IIS7(no Appfabric installed) can be persisted and resume automatically, for example, resume automatically from a delay. If you want workflow service auto recovery from a crash, then, you need the Appfabric. Appfabric is a enhanced WF4 service/WCF host and will provide you many useful/powerful features.

    Regards
    This posting is provided "AS IS" with no warranties, and confers no rights. Microsoft Online Community Support. My Blog:http://xhinker.com "Microsoft Windows Workflow Foundation 4.0 Cookbook"
    Wednesday, November 17, 2010 9:06 AM