Note: This API is now obsolete.
Represents a persistence service that uses a SQL database to store workflow state information.
Assembly: System.Workflow.Runtime (in System.Workflow.Runtime.dll)
Thetype exposes the following members.
|SqlWorkflowPersistenceService(NameValueCollection)||Initializes a new instance of the class by using the specified parameters.|
|SqlWorkflowPersistenceService(String)||Initializes a new instance of the class by using the database connection string.|
|SqlWorkflowPersistenceService(String, Boolean, TimeSpan, TimeSpan)||Initializes a new instance of the class using a database connection string and other parameters.|
|EnableRetries||Gets and sets a value that specifies whether the retries committing a work batch.|
|LoadingInterval||Gets the length of the loading interval.|
|Runtime||Gets the WorkflowRuntime for this service. (Inherited from WorkflowRuntimeService.)|
|ServiceInstanceId||Gets the service instance identifier.|
|State||Gets the state of the WorkflowRuntimeService. (Inherited from WorkflowRuntimeService.)|
|Equals(Object)||Determines whether the specified object is equal to the current object. (Inherited from Object.)|
|Finalize||Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)|
|GetAllWorkflows||Retrieves instance descriptions of all persisted workflows.|
|GetHashCode||Serves as a hash function for a particular type. (Inherited from Object.)|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|LoadCompletedContextActivity||Retrieves the specified completed scope from the database. (Overrides WorkflowPersistenceService.LoadCompletedContextActivity(Guid, Activity).)|
|LoadExpiredTimerWorkflowIds||Retrieves a list of ids for workflows with expired timers.|
|LoadWorkflowInstanceState||Retrieves the specified workflow instance state from the database. (Overrides WorkflowPersistenceService.LoadWorkflowInstanceState(Guid).)|
|MemberwiseClone||Creates a shallow copy of the current Object. (Inherited from Object.)|
|OnStarted||Starts a new timer and recovers running workflow instances. (Overrides WorkflowRuntimeService.OnStarted().)|
|OnStopped||When overridden in a derived class, represents the method that will be called when the workflow runtime engine raises the WorkflowRuntime.Stopped event. (Inherited from WorkflowRuntimeService.)|
|RaiseServicesExceptionNotHandledEvent||Raises the WorkflowRuntime.ServicesExceptionNotHandled event. (Inherited from WorkflowRuntimeService.)|
|SaveCompletedContextActivity||Saves the state of the specified completed scope. (Overrides WorkflowPersistenceService.SaveCompletedContextActivity(Activity).)|
|SaveWorkflowInstanceState||Saves the specified workflow instance state. (Overrides WorkflowPersistenceService.SaveWorkflowInstanceState(Activity, Boolean).)|
|Start||Starts the . (Overrides WorkflowRuntimeService.Start().)|
|Stop||Stops the service and the timer. (Overrides WorkflowRuntimeService.Stop().)|
|ToString||Returns a string that represents the current object. (Inherited from Object.)|
|UnloadOnIdle||Returns a value that indicates whether the workflow is unloaded when it is in an idle state. (Overrides WorkflowPersistenceService.UnloadOnIdle(Activity).)|
|UnlockWorkflowInstanceState||Unlocks access to the specified workflow instance state. (Overrides WorkflowPersistenceService.UnlockWorkflowInstanceState(Activity).)|
|IPendingWork.Commit||Writes an ICollection of serialized state objects to the database.|
|IPendingWork.Complete||Completes the work batch and releases any resources.|
|IPendingWork.MustCommit||Returns a value that indicates whether the collection of serialized state objects should be written to the database.|
This material discusses types and namespaces that are obsolete. For more information, see Deprecated Types in Windows Workflow Foundation 4.5.
The class represents a fully-functional persistence service. You can use this service out-of-box to persist and retrieve workflow state information about a workflow instance when requested to by the workflow runtime engine.
The participates in the workflow transaction batching functionality provided by the WorkflowCommitWorkBatchService. That is, it adds objects that represent pending writes to the SQL database to the WorkBatch and implements the IPendingWork interface.
The supports locking of workflow instances. This feature is used when several workflow runtimes share the same database. A column in the SQL database table is used to mark a workflow instance as locked whenever it is being used by a workflow runtime. The does not load a workflow instance that is marked as "in use" by another runtime. Typically these locks are released when the workflow instance is persisted, for example, on idle, completion, or termination. The locks can also be released automatically after a period of inactivity. This period of inactivity can be set using the constructor of the class. It can also be set through the configuration file.
For more information about persistence services in general, see the WorkflowPersistenceService class.
Workflow instances can contain timers, for example, if they have a DelayActivity. For workflows that contain timers, the records the time when the workflow's next timer expires. The periodically polls the database, looking for workflows whose timers have expired. The frequency of the polling interval can be set using the constructor or using a configuration file.
When using both the SqlTrackingService and the in a workflow application, it is recommended to use a single database for both persistence and tracking.
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.