WorkflowPersistenceService.UnlockWorkflowInstanceState(Activity) Método
Definição
Quando substituído em uma classe derivada, desbloqueia o estado da instância de fluxo de trabalho.When overridden in a derived class, unlocks the workflow instance state.
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)
Parâmetros
- rootActivity
- Activity
A atividade raiz da instância do fluxo de trabalho.The root activity of the workflow instance.
Exemplos
O exemplo a seguir demonstra uma implementação do UnlockWorkflowInstanceState método.The following example demonstrates an implementation of the UnlockWorkflowInstanceState method. Este exemplo é do exemplo de serviço de persistência personalizado, do arquivo FilePersistenceService. cs.This example is from the Custom Persistence Service sample, from the FilePersistenceService.cs file. Para obter mais informações, consulte exemplo de serviço de persistência personalizado.For more information, see Custom Persistence Service Sample.
// 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
Comentários
Esse método é abstrato, portanto, não contém uma implementação padrão no bloqueio e no desbloqueio.This method is abstract, so it does not contain a default implementation on locking and unlocking.
Ao implementar um serviço de persistência personalizado, se você quiser implementar um esquema de bloqueio, será necessário substituir esse método e fornecer um mecanismo de desbloqueio de bloqueio no SaveWorkflowInstanceState método com base no valor do parâmetro unlock.While implementing a custom persistence service, if you want to implement a locking scheme you will need to override this method and provide a locking-unlocking mechanism in the SaveWorkflowInstanceState method based on the value of the unlock parameter.