Bagikan melalui


Configure Service: Workflow Persistence Tab

Use the Workflow Persistence tab in the Configure Service dialog box to enable or disable persisting workflow service instances to a persistence store. Select the SQL Server Workflow Persistence option to enable persisting service instances to a SQL Server database. Select the Custom or None option to use an instance store other than a SQL Server database or to not to use the persistence feature at all.

When you associate a SQL Server persistence provider with a service, you must specify a connection string for the provider to connect to a SQL Server 2008 or 2005 persistence database. You can configure advanced SQL persistence features such as keeping instances in the persistence store after their completion and encoding instance state information using the GZip algorithm using the Advanced Persistence Settings dialog box that you can launch by clicking the Advanced button.

Important

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

Dialog Fields

Field

Description

Custom or None

Select this option to associate an instance store other than a SQL Server database with the service or to not to use the persistence feature at all.

SQL Server Workflow Persistence

Select this check box to enable persisting instance state information to a SQL Server 2008 or 2005 persistence database. You must specify a value for the SQL Server store field when you select this option.

If you do not have net.pipe protocol enabled for the application containing the service and you switch from Custom or None option to SQL Server Workflow Persistence option and the configuration dialog box is for the application, virtual directory, or service levels, you will see the following warning message in a message box.

Warning

Workflow persistence 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 OK on the message box, select instance store from the drop-down list, and then click OK or Apply on the Configure Service dialog box, the net.pipe protocol is enabled for the application. To verify that the net.pipe protocol is enabled for the application, right-click the application name, point to Manage Application, and click Advanced Settings, and confirm that net.pipe protocol is listed in the Enabled Protocols field.

You will also see the following warning message at the top of the tab in the preceding scenario.

Warning

Workflow persistence is not fully functional because the net.pipe protocol is missing from the application’s list of enabled protocols

You also see this warning message if you disable net.pipe protocol on the application after you enabled SQL persistence for the service, open the Configure Service dialog box and switch to the Workflow Persistence tab.

If you do not have net.pipe binding enabled for the Web site containing the service and you switch from Custom or None option to SQL Server Workflow Persistence option and the configuration dialog box is for the site level, you will see the following warning message at the top of the tab.

Warning

Workflow persistence is not functional because the net.pipe protocol binding is not enabled for this web site

To enable net.pipe binding for the Web site, perform the following steps:

  1. Right click the site name, and click Edit Bindings.

  2. In the Site Bindings dialog box, click Add.

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

  4. Click OK to close the Site Bindings dialog box.

Similarly, you will see the following warning message at the server level at the top of the tab.

Warning

Workflow persistence might not be functional. For applications that require persistence, ensure that the net.pipe protocol is included in the list of enabled protocols, and ensure that net.pipe binding is included in the list of the bindings on the site.

SQL Server store

Select the instance store that you want the SQL persistence provider to use. The instance stores in the drop-down list are defined either locally at the selected level or inherited from the higher levels (application, site, root Web.config, or machine.config) in the IIS configuration hierarchy. An instance store defined in the configuration file points to a connection string that the SQL persistence provider uses to connect to a SQL Server 2008 or 2005 persistence database.

Tip

If you do not see any SQL instance store in the drop-down list, you will need to create a SQL instance store. You can create and initialize a SQL instance store by using the steps described in the “Configuring Persistence Stores” section below.

Advanced

Click this button to launch Advanced Persistence Settings dialog box, which allows you to configure advanced persistence related settings.

Configuring Persistence Stores

You can configure persistence stores by running AppFabric configuration wizard by running a configuration wizard either immediately after successfully running the setup wizard, or by executing the configuration wizard from the Start menu after initial installation. The following procedure provides steps to configure instance stores using the configuration wizard.

Note

Many of the steps that are performed in the configuration wizard can be performed manually by executing an Application Server Extensions configuration cmdlet.

  1. Open the Windows Server AppFabric Configuration Wizard by clicking Start, clicking All Programs, clicking Windows Server AppFabric, and then clicking Configure AppFabric.

  2. On the Before You Begin page, click Next.

  3. On the Customer Experience Improvement Program page, click Next.

  4. On the Configure Hosting Services page, use the table below to configure persistence stores, and then click Next.

    Control Description

    Set persistence configuration

    Select to select the Workflow Management service account, and to select and configure the persistence provider.

    AppFabric Workflow Management service account

    Displays the Windows logon account for the Workflow Management service. The default is NT Authority\Local Service. You cannot enter the service account in this text box, but must do so in the Select User dialog box that you access by clicking Browse.

    Note

    The security identifier (SID) of the Workflow Management service is a member of the Administrators group, and, therefore, the WMS has administrative access to the persistence database.

    Change

    If you click the Browse button for the Workflow Management service account, you will be able to select the user credential for system services. You can select a built-in account or enter a custom user name and password. In the Select User dialog box, select the account that you want to use for the service, and then click OK.

    Persistence provider

    Select the provider that will give access to the persistence store. All valid data providers registered on the local machine.config file will be displayed in this list.

    Important

    In this release, the only persistence data provider that you can select is sqlStoreProvider.

    Configure

    Click to set the configuration for the persistence provider.

    How to install additional Persistence providers

    You can add a persistence provider to the list of providers that you can select in the Persistence provider drop-down box. Click this link to get help on how to add a provider.

  5. If you clicked Configure for the SQL persistence provider (sqlStoreProvider) in the Configure Hosting Services page, the Windows Server AppFabric Persistence Store Configuration dialog box will be displayed. The following table describes the controls in this dialog box. Use this table to configure the persistence provider, and then click OK to return to the Configure Hosting Services page. Verify that the store was initialized and registered successfully.

    Control Description

    Register persistence store registration in root web.config

    Check to register the persistence store identified by the connection string, by adding or updating its configuration to the root Web.config file. This includes the ApplicationServerWorkflowInstanceStoreConnectionString and its related SQL Store Instance entry.

    You can check this check box even if Initialize persistence store is not checked. Do so if the database is already created and initialized, or to point to the database even if it is not initialized.

    Note

    This checkbox is disabled if the Hosting Administration tools are installed, but the Hosting Services feature is not installed.

    Initialize persistence store

    Check to initialize the persistence database identified in the connection string, as required before it can be used. Initialization creates the database schema and the structure based upon that schema. If the database does not exist, it will be created, and then initialized.

    If this check box is checked, but Register persistence store registration to root web.config is not checked, then the database will be created, if necessary, and initialized, but it will not be available for use from this computer.

    Note

    For the database to be created, you must have permissions to create databases on the destination server.

    Connection string

    String specifying the server and database used to save persistence events.

    In the Server field, enter the name of the computer that the database is on.

    In the Database field, enter the name of the database to be created for persistence data, or select an existing database from the list.

    Note

    For this release, you can only select the connection string for the SQL persistence provider. Its name by default is ApplicationServerWorkflowInstanceStoreConnectionString and cannot be changed. The connection string name is registered in the root Web.config file. You can change the server and database in this dialog box.

    Security Configuration

    Select Windows authentication or SQL Server authentication. Windows Integrated Security is selected by default and the groups are populated with the default built-in groups.

    For Windows authentication, to change the administrators, readers, or users, click Browse and use the standard Select User or Group dialog box to enter a different value. You can change the value for administrators, observers, or writers only if Initialize persistence store is selected.

  6. After you have clicked OK in the Configure SQL Persistence Store dialog box, you will receive a popup indicating that you need to verify that the Workflow Management service identity is a member of the Persistence Database Administrators role. For more information, see the Securing Hosting and Persistence topic.

  7. After setting the persistence configuration, click Next on the Configure Hosting Services page to display the Configure Caching Service page, and proceed to the “Configure Caching Service” section of this topic.

  8. On the Configure Caching Service page, click Next.

  9. On the Configure AppFabric Cache Node page, click Next.

  10. On the Configure Application page, clear Start Internet Information Services (IIS) Manager , and then click Finish to close the configuration wizard.

The fields in the Workflow Persistence tab correspond to the sqlWorkflowInstanceStore element and the connectionStringName attribute on the sqlWorkflowInstanceStore element. If the SQL Server Workflow Persistence option is checked, the sqlWorkflowInstanceStore element is added to the service <behavior> element associated with the service in the configuration file. The connectionStringName attribute on the sqlWorkflowInstanceStore element is set to the connection string that the instance store you select from the SQL Server Store drop-down list. If you change the setting from SQL Workflow Persistence to Custom or None, the sqlWorkflowInstanceStore element is removed from the configuration file.

In the following sample configuration, the persistence feature is enabled for the service s1 by the sqlWorkflowInstanceStore element in the behavior element associated the service s1.

<behaviors>
    <serviceBehaviors>
        <behavior name="TutorialServiceConfiguration">
            <sqlWorkflowInstanceStore connectionStringName="DefaultSqlWorkflowInstanceStoreConnectionString" hostLockRenewalPeriod="00:00:30" instanceEncodingOption="None" instanceCompletionAction="DeleteAll" instanceLockedExceptionAction="NoRetry" />        </behavior>
   </serviceBehaviors>
</behaviors>

The instance stores that you create when you install AppFabric are defined in the root Web.config file. You can create entries for custom instance stores in configuration files as well. This tab gets the name of the connection string that the instance store you select for the SQL Server store filed points to and uses that connection string in the sqlWorkflowInstanceStore element that it adds.

    <microsoft.applicationServer>
        <persistence>
            <instanceStores>
                <add name="defaultSqlPersistenceStore" provider="SqlPersistenceStoreProvider" connectionStringName="DefaultSqlWorkflowInstanceStoreConnectionString" />
            </instanceStores>
        </persistence>
    </microsoft.applicationServer>

In This Section

  1. Advanced Persistence Settings Dialog Box