共用方式為


WaitForDocumentUnlockActivity.Execute Method

Pauses the workflow until a specified document is unlocked.

Namespace:  Microsoft.SharePoint.WorkflowActions
Assembly:  Microsoft.SharePoint.WorkflowActions (in Microsoft.SharePoint.WorkflowActions.dll)

Syntax

'Declaration
Protected Overrides Function Execute ( _
    executionContext As ActivityExecutionContext _
) As ActivityExecutionStatus
'Usage
Dim executionContext As ActivityExecutionContext
Dim returnValue As ActivityExecutionStatus

returnValue = Me.Execute(executionContext)
protected override ActivityExecutionStatus Execute(
    ActivityExecutionContext executionContext
)

Parameters

Return Value

Type: System.Workflow.ComponentModel.ActivityExecutionStatus
The status of the activity.

Remarks

The workflow runtime calls this override to pause the workflow until a specified document is unlocked.

If the item with which the workflow is associated is a document and is locked, this override specifies a timer, registers an event handler for the OnItemCheckedIn event, and registers an event handler for the OnItemUncheckedOut event to ensure that the DoUpdate(ActivityExecutionContext) method is called when the document is unlocked.

This method throws an InvalidOperationException if executionContext is null , the context under which the WaitForDocumenUnlockActivity is null , the associated SPList value is not set, or the associated SPListItem value is not set.

See Also

Reference

WaitForDocumentUnlockActivity Class

WaitForDocumentUnlockActivity Members

Microsoft.SharePoint.WorkflowActions Namespace