Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
 UnlockWorkflowInstanceState Method
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.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)
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.

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.

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
}

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
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Example is very useful      Guillermo Martelli ... Stanley Roark   |   Edit   |   Show History
NOT!!!
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker