When overridden in a derived class, unlocks the workflow instance state.
Namespace:
System.Workflow.Runtime.Hosting
Assembly:
System.Workflow.Runtime (in System.Workflow.Runtime.dll)
Visual Basic (Declaration)
Protected Friend MustOverride Sub UnlockWorkflowInstanceState ( _
rootActivity As Activity _
)
Dim rootActivity As Activity
Me.UnlockWorkflowInstanceState(rootActivity)
protected internal abstract void UnlockWorkflowInstanceState(
Activity rootActivity
)
protected public:
virtual void UnlockWorkflowInstanceState(
Activity^ rootActivity
) abstract
protected internal abstract function UnlockWorkflowInstanceState(
rootActivity : Activity
)
This method is abstract, so it does not contain a default implementation on locking and unlocking.
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.
The following example demonstrates an implementation of the UnlockWorkflowInstanceState method. This example is from the Custom Persistence Service sample, from the FilePersistenceService.cs file. For more information, see Custom Persistence Service 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
// 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
}
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.
.NET Framework
Supported in: 3.5, 3.0
Reference