.NET Framework Class Library
WorkflowPersistenceService..::.UnlockWorkflowInstanceState Method

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)
Syntax

Visual Basic (Declaration)
Protected Friend MustOverride Sub UnlockWorkflowInstanceState ( _
    rootActivity As Activity _
)
Visual Basic (Usage)
Dim rootActivity As Activity

Me.UnlockWorkflowInstanceState(rootActivity)
C#
protected internal abstract void UnlockWorkflowInstanceState(
    Activity rootActivity
)
Visual C++
protected public:
virtual void UnlockWorkflowInstanceState(
    Activity^ rootActivity
) abstract
JScript
protected internal abstract function UnlockWorkflowInstanceState(
    rootActivity : Activity
)

Parameters

rootActivity
Type: System.Workflow.ComponentModel..::.Activity
The root activity of the workflow instance.
Remarks

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.

Examples

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.

Visual Basic
' 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
C#
// 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
}
.NET Framework Security

Platforms

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.
Version Information

.NET Framework

Supported in: 3.5, 3.0
See Also

Reference

Tags :


Community Content

Stanley Roark
Example is very useful
NOT!!!
Tags : complaint

Page view tracker