Export (0) Print
Expand All

SqlWorkflowInstanceStore Class

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.

System::Object
  System.Runtime.DurableInstancing::InstanceStore
    System.Activities.DurableInstancing::SqlWorkflowInstanceStore

Namespace:  System.Activities.DurableInstancing
Assembly:  System.Activities.DurableInstancing (in System.Activities.DurableInstancing.dll)

public ref class SqlWorkflowInstanceStore sealed : public InstanceStore

The SqlWorkflowInstanceStore type exposes the following members.

  NameDescription
Public methodSqlWorkflowInstanceStore()Initializes a new instance of the SqlWorkflowInstanceStore class.
Public methodSqlWorkflowInstanceStore(String)Initializes a new instance of the SqlWorkflowInstanceStore class by using the connectionString parameter.
Top

  NameDescription
Public propertyConnectionStringGets or sets a connection string with parameters that are used to connect to an underlying persistence database.
Public propertyDefaultInstanceOwnerGets or sets the default instance owner. (Inherited from InstanceStore.)
Public propertyEnqueueRunCommandsGets 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.
Public propertyHostLockRenewalPeriodSpecifies the time period within which the host renews its lock on a workflow service instance.
Public propertyInstanceCompletionActionSpecifies 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.
Public propertyInstanceEncodingOptionSpecifies a value that indicates whether the instance data must be compressed.
Public propertyInstanceLockedExceptionActionSpecifies the action to be taken when the persistence provider catches an InstanceLockedException.
Public propertyMaxConnectionRetries
Public propertyRunnableInstancesDetectionPeriodSpecifies 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.
Top

  NameDescription
Public methodBeginExecuteAsynchronously executes persistence commands such as LoadWorkflowCommand and SaveWorkflowCommand. (Inherited from InstanceStore.)
Protected methodBeginTryCommandA 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.)
Public methodBeginWaitForEventsBegins an asynchronous operation to listen for any events raised by the instance store for a specific instance handle. (Inherited from InstanceStore.)
Public methodCreateInstanceHandle()Creates an instance handle. (Inherited from InstanceStore.)
Public methodCreateInstanceHandle(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.)
Public methodCreateInstanceHandle(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.)
Public methodCreateInstanceHandle(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.)
Public methodEndExecuteEnds the asynchronous operation. (Inherited from InstanceStore.)
Protected methodEndTryCommandEnds an asynchronous operation. (Inherited from InstanceStore.)
Public methodEndWaitForEventsEnds the asynchronous operation initiated by the BeginWaitForEvents(InstanceHandle, TimeSpan, AsyncCallback, Object) method. (Inherited from InstanceStore.)
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Public methodExecuteExecutes a persistence command synchronously. Examples of persistence commands are: LoadWorkflowCommand and SaveWorkflowCommand. (Inherited from InstanceStore.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Protected methodGetEventsGets all the signaled events bound to an InstanceOwner object. (Inherited from InstanceStore.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Protected methodGetInstanceOwnersGets each InstanceOwner object that is bound to a valid instance handle or has not been garbage collected. (Inherited from InstanceStore.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodOnFreeInstanceHandleInvoked when an instance handle is freed. (Inherited from InstanceStore.)
Protected methodOnNewInstanceHandleInvoked when a new instance handle is created. (Inherited from InstanceStore.)
Public methodPromoteAssociates 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.
Protected methodResetEventResets the signaled event and removes the event from the signaled events list maintained by the instance owner. (Inherited from InstanceStore.)
Protected methodSignalEventAn 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.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Protected methodTryCommandA 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.)
Public methodWaitForEventsA workflow host typically invokes this method to wait for an event to be signaled. (Inherited from InstanceStore.)
Top

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

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

ADD
Show:
© 2014 Microsoft