Condividi tramite


SPWorkflowManager.CancelWorkflow Method

Cancels the specified workflow instance.

Namespace:  Microsoft.SharePoint.Workflow
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public Shared Sub CancelWorkflow ( _
    workflow As SPWorkflow _
)
'Usage
Dim workflow As SPWorkflowSPWorkflowManager.CancelWorkflow(workflow)
public static void CancelWorkflow(
    SPWorkflow workflow
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

The workflow to cancel belongs to an SPWeb object that has been deleted.

Remarks

This method cancels the workflow specified by the workflow parameter.

See Also

Reference

SPWorkflowManager Class

SPWorkflowManager Members

Microsoft.SharePoint.Workflow Namespace

Other Resources

Workflows in SharePoint Foundation

Workflow Development for SharePoint Foundation

Workflow Object Model Overview in SharePoint Foundation