Edit

Share via


SqlWorkflowPersistenceService.SaveWorkflowInstanceState Method

Definition

Saves the specified workflow instance state.

protected public:
 override void SaveWorkflowInstanceState(System::Workflow::ComponentModel::Activity ^ rootActivity, bool unlock);
protected internal override void SaveWorkflowInstanceState (System.Workflow.ComponentModel.Activity rootActivity, bool unlock);
override this.SaveWorkflowInstanceState : System.Workflow.ComponentModel.Activity * bool -> unit
Protected Friend Overrides Sub SaveWorkflowInstanceState (rootActivity As Activity, unlock As Boolean)

Parameters

rootActivity
Activity

The root activity of the workflow instance.

unlock
Boolean

true if the workflow instance should not be locked; false if the workflow instance should be locked.

Remarks

rootActivity is serialized and written to the WorkBatch. The out-of-box SqlWorkflowPersistenceService implements locking of the workflow instance state. The user must configure the instanceOwnershipDuration parameter in the constructor. This value decides the time interval during which the instance can be locked by a host. If multiple hosts share the same persistence service and database, and another host tries to load the instance during this interval, a WorkflowOwnershipException occurs. For more information, see the WorkflowPersistenceService class.

Applies to