Share via


Configure Service: Workflow Host Management Tab

Use the Workflow Host Management tab in the Configure Service dialog box to configure following hosting features for a service.

Important

This tab is available for workflow (WF) services only; it is not available for WCF code-based services.

Dialog Fields

Field

Description

Enable instance control

Select this checkbox to enable controlling instances of this service. If you do not have the net.pipe protocol enabled for the application containing the service, you will see the following warning message at the top of the tab.

Warning

“Instance control is not functional because the net.pipe protocol is missing from the application’s list of enabled protocols”

You will also see a message box with the following text when you select the Enable instance control option and the net.pipe protocol is not enabled on the application containing the service.

Warning

Instance control requires the net.pipe protocol to be enabled on the application. Do you wish to enable net.pipe when changes are applied?

If you click Yes and apply the settings, the net.pipe protocol is enabled on the application. Alternatively, you can manually enable the net.pipe protocol for the application by following the steps described below.

  1. In the IIS Manager, right-click the name of the application containing the service.

  2. Point to Manage Application and then click Advanced Settings to launch.

  3. In the Advanced Settings dialog box Add a , (comma) character followed by net.pipe to the value of the Enabled Protocols field.

  4. Click OK to close the Advanced Settings dialog box and then click Close to close the Site Bindings dialog box.

You also need to have the net.pipe binding enabled for the Web site that contains the service. To enable net.pipe binding at a site level:

  1. Right-click the site name in IIS Manager, and click Edit Bindings to launch the Site Bindings dialog box.

  2. If you do not see net.pipe binding in the Site Bindings dialog box, click Add to launch the Add Site Binding dialog box.

  3. In the Add Site Binding dialog box, select net.pipe for the Type field and type * for the Binding field.

  4. Click OK to close the Add Site Binding dialog box and then click Close to close the Site Bindings dialog box.

Unload instances when idle

Select this checkbox to have workflow service instances that are in idle state for a certain period of time to be unloaded from memory and to be persisted into the persistence database.

Unload timeout (in seconds)

Specify how long a workflow service instance can be in idle state before the host unloads the instance from memory and persists the instance state information into the persistence database. The default value for this parameter is 60 seconds. If the value is set to 0, the host aggressively persists and unloads an instance as soon as the instance becomes idle. The maximum allowed value is TimeSpan.MaxValue.

Persist instances when idle

Select this check box to have state information of workflow service instances that are in idle state for a certain period of time to be persisted into the persistence database. The instances are not unloaded from memory in this scenario. The default value for this property is TimeSpan.MaxValue.

Persist timeout (in seconds)

Specify how long a workflow service instance can be in idle state before the host persists the instance into the persistence database. You can specify a value for this field only if the Persist on idle option is checked. The default value for this parameter is TimeSpan.MaxValue seconds. When the value of this parameter is set to TimeSpan.MaxValue, the runtime never persists workflow instances when they are idle. If the value is set to 0, the host aggressively persists an instance as soon as the instance becomes idle. Also, if both Persist on Idle and Unload on Idle, the Persist timeout value needs to be less than the Unload timeout value, or the instance will not be persisted.

Action on unhandled exception

Specify what action the host should take when an instance experiences an unhandled exception. The allowed values are: Abandon, AbandonAndSuspend, Terminate, and Cancel. The default value is Abandon. The following list provides you with the descriptions for these options.

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

  • 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 cancels the workflow service instance causing all the cancellation handlers to be invoked so that a workflow terminates in a graceful manner, and sets the state of the instance in the persistence database to “Completed (Cancelled)”.

The fields in the Workflow Host Management tab correspond to the following elements and attributes in the configuration file.

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

The following list contains XML elements or attributes that are associated with the user interface elements in this dialog box.

UI Element XML Element or Attribute Comments

Enable instance control

workflowInstanceManagment element

When this option is checked, the workflowInstanceManagement element is added to the behavior element associated with the service if the element does not already exist. When this option is unchecked, the workflowInstanceManagement element is removed.

Tip

The authorizedWindowsGroup attribute on the workflowInstanceManagement element is set to AS_Administrators group. This tab does not allow you to change the value for this attribute. To assign a different Windows group to this role, change the value of this attribute in the configuration file directly.

Unload instances when idle

workflowIdle element

When this option is checked, the workflowIdle element is added to the behavior element associated with the service if the workflowIdle element does not already exist. When this option is unchecked, the workflowIdle element is removed if the Persist on idle option is unchecked; if the Persist on idle option is checked, the workflowIdle element is kept and the value of the timeToUnload attribute is set to TimeSpan.MaxValue.

Unload timeout (in seconds)

timeToUnload attribute on workflowIdle element

The value of the timeToUnload attribute of the workflowIdle element is set to the value specified for this field.

Persist instances when idle

workflowIdle element

When this option is checked, the workflowIdle element is added if the element does not exist already in the behavior element associated with the service, the <workflowIdle> element is added and the value of the timeToPersist attribute on workflowIdle is set to the value specified for the Persist timeout field and the value of the timeToUnload attribute is set to TimeSpan.MaxValue. When this option is unchecked, the workflowIdle element is removed if the value of the unloadOnIdle option is not checked; if the unloadOnIdle option is checked, the workflowIdle element is kept and the value of the timeToPersist attribute is set to TimeSpan.MaxValue seconds.

Persist timeout (in seconds)

timeToPersist attribute on the workflowIdle element

The value of the timeToPersist attribute of the workflowIdle element is set to the value specified for the Persist timeout (in seconds) field.

Action on unhandled exception

action attribute on the workflowUnhandledException element

When you select a value for this field, the workflowUnhandledException element is added if the element does not already exist in the configuration file and the value of the action attribute on the element is set to the value you specify for this field.