共用方式為


WorkflowPersistenceService.UnlockWorkflowInstanceState(Activity) 方法

定義

在衍生類別中覆寫時,解除鎖定工作流程執行個體狀態。

protected public:
 abstract void UnlockWorkflowInstanceState(System::Workflow::ComponentModel::Activity ^ rootActivity);
protected internal abstract void UnlockWorkflowInstanceState (System.Workflow.ComponentModel.Activity rootActivity);
abstract member UnlockWorkflowInstanceState : System.Workflow.ComponentModel.Activity -> unit
Protected Friend MustOverride Sub UnlockWorkflowInstanceState (rootActivity As Activity)

參數

rootActivity
Activity

工作流程執行個體的根活動。

範例

下列範例示範 UnlockWorkflowInstanceState 方法的實作。 這個範例來自 FilePersistenceService.cs 檔案中的<自訂持續性服務>範例。 如需詳細資訊,請參閱 自訂持續性服務範例

// Unlock the workflow instance state.
// Instance state locking is necessary when multiple runtimes share instance persistence store
protected override void UnlockWorkflowInstanceState(Activity state)
{
    //File locking is not supported in this sample
}
' unlock workflow instance state.  
' instance state locking is necessary when multiple runtimes share instance persistence store
Protected Overrides Sub UnlockWorkflowInstanceState(ByVal rootActivity As System.Workflow.ComponentModel.Activity)
    ' File locking is not supported in this sample
End Sub

備註

此方法是抽象的,所以它不包含有關鎖定與解除鎖定的預設實作。

實作自訂持續性服務時,如果想要實作鎖定配置,您將需要覆寫此方法,並且在以解除鎖定參數的值為基礎的 SaveWorkflowInstanceState 方法中提供鎖定-解除鎖定機制。

適用於