SqlWorkflowInstanceStore SqlWorkflowInstanceStore SqlWorkflowInstanceStore SqlWorkflowInstanceStore Class

Definition

Derives from the abstract InstanceStore class of the persistence functionality and provides implementation to allow saving instance state information to and loading instance state information from an SQL Server 2005 or SQL Server 2008 database.

public ref class SqlWorkflowInstanceStore sealed : System::Runtime::DurableInstancing::InstanceStore
public sealed class SqlWorkflowInstanceStore : System.Runtime.DurableInstancing.InstanceStore
type SqlWorkflowInstanceStore = class
    inherit InstanceStore
Public NotInheritable Class SqlWorkflowInstanceStore
Inherits InstanceStore
Inheritance
SqlWorkflowInstanceStoreSqlWorkflowInstanceStoreSqlWorkflowInstanceStoreSqlWorkflowInstanceStore

Examples

The following code sample demonstrates creating a SqlWorkflowInstanceStore. This example is from the Persistence Participants sample.

Remarks

SqlWorkflowInstanceStore uses the NetDataContractSerializer to serialize complex types; all types used in workflows to be persisted with this instance store must be serializable using NetDataContractSerializer.

Constructors

SqlWorkflowInstanceStore() SqlWorkflowInstanceStore() SqlWorkflowInstanceStore() SqlWorkflowInstanceStore()

Initializes a new instance of the SqlWorkflowInstanceStore class.

SqlWorkflowInstanceStore(String) SqlWorkflowInstanceStore(String) SqlWorkflowInstanceStore(String) SqlWorkflowInstanceStore(String)

Initializes a new instance of the SqlWorkflowInstanceStore class by using the connectionString parameter.

Properties

ConnectionString ConnectionString ConnectionString ConnectionString

Gets or sets a connection string with parameters that are used to connect to an underlying persistence database.

DefaultInstanceOwner DefaultInstanceOwner DefaultInstanceOwner DefaultInstanceOwner

Gets or sets the default instance owner.

(Inherited from InstanceStore)
EnqueueRunCommands EnqueueRunCommands EnqueueRunCommands EnqueueRunCommands

Gets or set a value that indicates whether Run commands are enqueued. This property is used internally by the SQL Workflow Instance Store and it should not be used in your applications.

HostLockRenewalPeriod HostLockRenewalPeriod HostLockRenewalPeriod HostLockRenewalPeriod

Specifies the time period within which the host renews its lock on a workflow service instance.

InstanceCompletionAction InstanceCompletionAction InstanceCompletionAction InstanceCompletionAction

Specifies the action to be taken after a workflow instance completes. Possible values are "DeleteNothing" and "DeleteAll". The default value is "DeleteAll". If the property is set to "DeleteNothing", the persistence provider keeps all the instance data and metadata in the persistence database after the workflow instance completes. If the property is set to "DeleteAll", the persistence provider deletes all the instance data and metadata after the workflow instance completes.

InstanceEncodingOption InstanceEncodingOption InstanceEncodingOption InstanceEncodingOption

Specifies a value that indicates whether the instance data must be compressed.

InstanceLockedExceptionAction InstanceLockedExceptionAction InstanceLockedExceptionAction InstanceLockedExceptionAction

Specifies the action to be taken when the persistence provider catches an InstanceLockedException.

MaxConnectionRetries MaxConnectionRetries MaxConnectionRetries MaxConnectionRetries

Gets or sets the maximum number of SQL connection retries. The default value is 4.

RunnableInstancesDetectionPeriod RunnableInstancesDetectionPeriod RunnableInstancesDetectionPeriod RunnableInstancesDetectionPeriod

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.

Methods

BeginExecute(InstanceHandle, InstancePersistenceCommand, TimeSpan, AsyncCallback, Object) BeginExecute(InstanceHandle, InstancePersistenceCommand, TimeSpan, AsyncCallback, Object) BeginExecute(InstanceHandle, InstancePersistenceCommand, TimeSpan, AsyncCallback, Object) BeginExecute(InstanceHandle, InstancePersistenceCommand, TimeSpan, AsyncCallback, Object)

Asynchronously executes persistence commands such as LoadWorkflowCommand and SaveWorkflowCommand.

(Inherited from InstanceStore)
BeginTryCommand(InstancePersistenceContext, InstancePersistenceCommand, TimeSpan, AsyncCallback, Object) BeginTryCommand(InstancePersistenceContext, InstancePersistenceCommand, TimeSpan, AsyncCallback, Object) BeginTryCommand(InstancePersistenceContext, InstancePersistenceCommand, TimeSpan, AsyncCallback, Object) BeginTryCommand(InstancePersistenceContext, InstancePersistenceCommand, TimeSpan, AsyncCallback, Object)

A persistence provider implements this method, which determines whether a particular persistence command can be executed. If the command can be executed, executes the command asynchronously.

(Inherited from InstanceStore)
BeginWaitForEvents(InstanceHandle, TimeSpan, AsyncCallback, Object) BeginWaitForEvents(InstanceHandle, TimeSpan, AsyncCallback, Object) BeginWaitForEvents(InstanceHandle, TimeSpan, AsyncCallback, Object) BeginWaitForEvents(InstanceHandle, TimeSpan, AsyncCallback, Object)

Begins an asynchronous operation to listen for any events raised by the instance store for a specific instance handle.

(Inherited from InstanceStore)
CreateInstanceHandle() CreateInstanceHandle() CreateInstanceHandle() CreateInstanceHandle()

Creates an instance handle.

(Inherited from InstanceStore)
CreateInstanceHandle(Guid) CreateInstanceHandle(Guid) CreateInstanceHandle(Guid) CreateInstanceHandle(Guid)

Creates an instance handle. If the DefaultInstanceOwner is set, the value is automatically bound as the new handle’s instance owner. The instance identifier passed as a parameter is automatically bound as the new handle’s instance.

(Inherited from InstanceStore)
CreateInstanceHandle(InstanceOwner) CreateInstanceHandle(InstanceOwner) CreateInstanceHandle(InstanceOwner) CreateInstanceHandle(InstanceOwner)

Creates an instance handle. If the instance owner passed as a parameter is not null, the value is automatically bound as the new handle’s instance owner. (Otherwise, no instance owner is bound, even if DefaultInstanceOwner is set.)

(Inherited from InstanceStore)
CreateInstanceHandle(InstanceOwner, Guid) CreateInstanceHandle(InstanceOwner, Guid) CreateInstanceHandle(InstanceOwner, Guid) CreateInstanceHandle(InstanceOwner, Guid)

Creates an instance handle. If the instance owner passed as a parameter is not null, the value is automatically bound as the new handle’s instance owner. (Otherwise, no instance owner is bound, even if DefaultInstanceOwner is set.) The instance identifier passed as a parameter is automatically bound as the new handle’s instance.

(Inherited from InstanceStore)
EndExecute(IAsyncResult) EndExecute(IAsyncResult) EndExecute(IAsyncResult) EndExecute(IAsyncResult)

Ends the asynchronous operation.

(Inherited from InstanceStore)
EndTryCommand(IAsyncResult) EndTryCommand(IAsyncResult) EndTryCommand(IAsyncResult) EndTryCommand(IAsyncResult)

Ends an asynchronous operation.

(Inherited from InstanceStore)
EndWaitForEvents(IAsyncResult) EndWaitForEvents(IAsyncResult) EndWaitForEvents(IAsyncResult) EndWaitForEvents(IAsyncResult)

Ends the asynchronous operation initiated by the BeginWaitForEvents(InstanceHandle, TimeSpan, AsyncCallback, Object) method.

(Inherited from InstanceStore)
Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
Execute(InstanceHandle, InstancePersistenceCommand, TimeSpan) Execute(InstanceHandle, InstancePersistenceCommand, TimeSpan) Execute(InstanceHandle, InstancePersistenceCommand, TimeSpan) Execute(InstanceHandle, InstancePersistenceCommand, TimeSpan)

Executes a persistence command synchronously. Examples of persistence commands are: LoadWorkflowCommand and SaveWorkflowCommand.

(Inherited from InstanceStore)
GetEvents(InstanceOwner) GetEvents(InstanceOwner) GetEvents(InstanceOwner) GetEvents(InstanceOwner)

Gets all the signaled events bound to an InstanceOwner object.

(Inherited from InstanceStore)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetInstanceOwners() GetInstanceOwners() GetInstanceOwners() GetInstanceOwners()

Gets each InstanceOwner object that is bound to a valid instance handle or has not been garbage collected.

(Inherited from InstanceStore)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
OnFreeInstanceHandle(InstanceHandle, Object) OnFreeInstanceHandle(InstanceHandle, Object) OnFreeInstanceHandle(InstanceHandle, Object) OnFreeInstanceHandle(InstanceHandle, Object)

Invoked when an instance handle is freed.

(Inherited from InstanceStore)
OnNewInstanceHandle(InstanceHandle) OnNewInstanceHandle(InstanceHandle) OnNewInstanceHandle(InstanceHandle) OnNewInstanceHandle(InstanceHandle)

Invoked when a new instance handle is created.

(Inherited from InstanceStore)
Promote(String, IEnumerable<XName>, IEnumerable<XName>) Promote(String, IEnumerable<XName>, IEnumerable<XName>) Promote(String, IEnumerable<XName>, IEnumerable<XName>) Promote(String, IEnumerable<XName>, IEnumerable<XName>)

Associates the specified properties with a workflow instance so that you can query for instances based on specific values for these properties. These properties that can be used in external queries can be of simple types (for example: Int64, String, and so on) or of a serialized binary type (byte[]). Binary properties are typically used to store tracking data.

ResetEvent(InstancePersistenceEvent, InstanceOwner) ResetEvent(InstancePersistenceEvent, InstanceOwner) ResetEvent(InstancePersistenceEvent, InstanceOwner) ResetEvent(InstancePersistenceEvent, InstanceOwner)

Resets the signaled event and removes the event from the signaled events list maintained by the instance owner.

(Inherited from InstanceStore)
SignalEvent(InstancePersistenceEvent, InstanceOwner) SignalEvent(InstancePersistenceEvent, InstanceOwner) SignalEvent(InstancePersistenceEvent, InstanceOwner) SignalEvent(InstancePersistenceEvent, InstanceOwner)

An instance store invokes this method to signal an event. A workflow host that subscribes for this persistence event receives it and takes an appropriate action.

(Inherited from InstanceStore)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)
TryCommand(InstancePersistenceContext, InstancePersistenceCommand, TimeSpan) TryCommand(InstancePersistenceContext, InstancePersistenceCommand, TimeSpan) TryCommand(InstancePersistenceContext, InstancePersistenceCommand, TimeSpan) TryCommand(InstancePersistenceContext, InstancePersistenceCommand, TimeSpan)

A persistence provider implements this method, which determines whether a particular persistence command can be executed and if the command can be executed executes it asynchronously.

(Inherited from InstanceStore)
WaitForEvents(InstanceHandle, TimeSpan) WaitForEvents(InstanceHandle, TimeSpan) WaitForEvents(InstanceHandle, TimeSpan) WaitForEvents(InstanceHandle, TimeSpan)

A workflow host typically invokes this method to wait for an event to be signaled.

(Inherited from InstanceStore)

Applies to