Configuring Workflow Host Management

AppFabric includes extensions to IIS Manager and Windows PowerShell cmdlets that enable you to configure workflow hosting-related features. The following list describes some of the hosting-related tasks that you can perform by using these tools:

  • Enable or disable controlling workflow service instances.

  • Enable or disable unloading workflow service instances from memory if the instance is idle for a certain period of time that you can configure.

  • Enable or disable persisting workflow service instances into an instance store if the instance is idle for a certain period of time that you can configure.

  • Specify what action a persistence provider should take when an instance experiences an unhandled exception. The possible values are:

    • Abandon. The service host aborts the workflow service instance in memory. The state of the instance in the store remains “Active”. The Workflow Management Service recovers the abandoned workflow instance from the last persistence point saved in the instance store.

    • Abandon and suspend. The service host aborts the workflow service instance in memory and sets the state of the instance in the persistence database to “Suspended”. A suspended instance can be resumed or terminated later by using IIS Manager. These instances are not recovered by the Workflow Management Service automatically.

    • Terminate. The service host aborts the workflow service instance in memory, and sets the state of the instance in the persistence database to “Completed (Terminated)”. A terminated instance cannot be resumed later.

    • Cancel. The service host gracefully cancels the workflow service instance, causing all the cancellation handlers to be invoked so that the workflow terminates in a graceful manner, and sets the state of the instance in the persistence database to “Completed (Cancelled)”.

Whether you use the IIS Manager UI or cmdlets, you are basically changing the values of hosting configuration parameters in the configuration file associated at the specified or selected scope in the IIS hierarchy (server, site, application, and service). The following sample shows configuration elements and attributes associated with the hosting configuration parameters.

<serviceBehaviors>
    <behavior name="SampleServiceBehavior">
        <workflowInstanceManagement authorizedWindowsGroup="AS_Administrators" />
        <workflowIdle timeToUnload="00:01:00" timeToPersist="00:00:20" />
        <workflowUnhandledException action="AbandonAndSuspend" />
    </behavior>
</serviceBehaviors>

The IIS Manager extensions and AppFabric cmdlets also enable you to specify hosting-related settings at a server, site, or application scope that a service can inherit. To understand in general about configurations and inheritance of default settings from higher scopes, see Configuration Process in AppFabric.

In this Section

See Also

Concepts

Hosting Concepts

  2012-09-12