Represents a persistence service that uses a SQL database to store workflow state information.
Assembly: System.Workflow.Runtime (in System.Workflow.Runtime.dll)
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 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.