SPWorkflowManager.RemoveWorkflowFromListItem Method

Removes the specified workflow instance from the list item to which it was attached.

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

Syntax

'Declaration
Public Sub RemoveWorkflowFromListItem ( _
    workflow As SPWorkflow _
)
'Usage
Dim instance As SPWorkflowManager
Dim workflow As SPWorkflow

instance.RemoveWorkflowFromListItem(workflow)
public void RemoveWorkflowFromListItem(
    SPWorkflow workflow
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

workflow is null .

Remarks

Removing a workflow instance deletes it entirely. The workflow instance does not remain as a canceled workflow.

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