Share via


Advanced Persistence Settings Dialog Box

Use the Advanced Persistence Settings dialog box to configure advanced persistence features for a workflow service that uses the SQL Workflow Instance Store. The following section describes UI fields in this dialog box.

Dialog Fields

Field

Description

Encode instances (GZip)

Specify whether the instance state information is compressed using the GZip algorithm before the information is saved in the persistence store.

Keep instances after completion.

Specify whether the instance state information is kept in the persistence database after the instance is completed.

Warning

Keeping instances after completion will cause the persistence database to grow rapidly and this will affect the performance of the database. You should configure a database purge policy to delete these records periodically to ensure that the performance of the database is at the level that satisfy your performance needs.

Action on instance lock exception.

Specify what action a service host should take when it receives an InstanceLockedException when the host tries to lock an instance because the instance is currently locked by another host. The options allowed for this field are: None, Basic Retry, and Aggressive Retry. The default value is None. The following list provides you with the descriptions for these three options.

  • None. The service host does not attempt to lock the instance and passes the InstanceLockedException to the caller.

  • Basic Retry. The service host reattempts to lock the instance with an exponentially increasing delay and passes the InstanceLockedException to the caller at the end of the sequence.

  • Aggressive Retry. The service host reattempts to lock the instance with a linear retry interval and passes the exception to the caller at the end of the sequence.

Host lock renewal period (in seconds).

Specify the interval within which a host must renew its lock on instance before the lock expires. If the host does not renew the lock in the specified time period, the instance is unlocked and another host may obtain the lock on the instance.

Runnable instances detection period (in seconds)

Specifies the time period after which the SQL Workflow Instance Store runs a detection task to detect any runnable or activatable workflow instances in the persistence database after the previous detection cycle. The SQL Workflow Instance Store runs an internal task that periodically wakes up and detects runnable or activatable instances in the persistence database.

Setting a shorter interval for this property reduces the time between the expiration of a timer associated with a workflow instance and the signaling of the event and subsequent loading of the instance. However, it also increases the processing load on a host and may not be desirable in scenarios where durable timers and/or host failures are rare. The type of the property is TimeSpan and the value of the property follows the format: hh:mm:ss. The minimum value for this property is 00:00:01. The default value for the property is 00:00:05.

The fields in the Advanced Persistence Settings dialog box correspond to the following elements and attributes in the configuration file.

<behaviors>
    <serviceBehaviors>
        <behavior name="TutorialServiceConfiguration">
            <sqlWorkflowInstanceStore connectionStringName="ApplicationServerWorkflowInstanceStoreConnectionString" hostLockRenewalPeriod="00:00:30" runnableInstancesDetectionPeriod="00:00:05" instanceEncodingOption="None" instanceCompletionAction="DeleteAll" instanceLockedExceptionAction="NoRetry" />
        </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

Encoding instance (GZip)

instanceEncodingOption attribute on the sqlWorkflowInstanceStore element

When the Encode instance (GZip) option is checked and the settings are applied, the instanceEncodingOption attribute is added to the sqlWorkflowInstanceStore element and the attribute value is set to GZip. When this option is unchecked and the settings are applied, the value of the instanceEncodingOption attribute is set to None

Keep instances after completion

instanceCompletionAction attribute on the sqlWorkflowInstanceStore element

When the Keep instances after completion option is checked and the settings are applied, the instanceCompletionAction attribute is added to the sqlWorkflowInstanceStore element and the attribute value is set to DeleteNothing. When the option is unchecked and the settings are applied, the value of the instanceCompletionAction attribute is set to DeleteAll (which is the default value).

Action on instance lock exception

instanceLockedExceptionAction attribute on the sqlWorkflowInstanceStore element

The value of the Action on instance lock exception attribute is set to the value you specify for this field. The value is set to NoRetry if you select None option for this field. For other options, the options and values are the same in this dialog box and in the configuration file.

Host lock renewal period

hostLockRenewalPeriod attribute on the sqlWorkflowInstanceStore element

When you change the value of the Host lock renewal period field and apply the settings, the value of the hostLockRenewalPeriod attribute of the sqlWorkflowInstanceStore element is set to the value you specify for this field.

Runnable instances detection period

runnableInstancesDetectionPeriod attribute on the sqlWorkflowInstanceElement

When you change the value of the Runnable instances detection period field and apply the settings, the value of the runnableInstancesDetectionPeriodattribute of the sqlWorkflowInstanceStore element is set to the value you specify for this field.