Represents a persistence service that uses a SQL database to store workflow state information.
Assembly: System.Workflow.Runtime (in System.Workflow.Runtime.dll)
Initializes a new instance of theclass by using the specified parameters.
Initializes a new instance of theclass by using the database connection string.
|SqlWorkflowPersistenceService(String, Boolean, TimeSpan, TimeSpan)|
Initializes a new instance of theclass using a database connection string and other parameters.
Gets and sets a value that specifies whether theretries committing a work batch.
Gets the length of the loading interval.
Gets the service instance identifier.
Determines whether the specified object is equal to the current object.(Inherited from Object.)
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)
Retrieves instance descriptions of all persisted workflows.
Serves as the default hash function. (Inherited from Object.)
Retrieves the specified completed scope from the database.(Overrides WorkflowPersistenceService.LoadCompletedContextActivity(Guid, Activity).)
Retrieves a list of ids for workflows with expired timers.
Retrieves the specified workflow instance state from the database.(Overrides WorkflowPersistenceService.LoadWorkflowInstanceState(Guid).)
Starts a new timer and recovers running workflow instances.(Overrides WorkflowRuntimeService.OnStarted().)
Saves the state of the specified completed scope.(Overrides WorkflowPersistenceService.SaveCompletedContextActivity(Activity).)
Saves the specified workflow instance state.(Overrides WorkflowPersistenceService.SaveWorkflowInstanceState(Activity, Boolean).)
Starts the WorkflowRuntimeService.Start().).(Overrides
Stops the service and the timer. (Overrides WorkflowRuntimeService.Stop().)
Returns a string that represents the current object.(Inherited from Object.)
Returns a value that indicates whether the workflow is unloaded when it is in an idle state.(Overrides WorkflowPersistenceService.UnloadOnIdle(Activity).)
Unlocks access to the specified workflow instance state.(Overrides WorkflowPersistenceService.UnlockWorkflowInstanceState(Activity).)
Writes an ICollection of serialized state objects to the database.
Completes the work batch and releases any resources.
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.
Theclass 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.
Thesupports 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.
Available since 3.0
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.