SPWorkflowManager.GetItemTasks Method (SPListItem, SPWorkflowFilter)

Returns a filtered collection of workflow tasks for the specified list item.

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

public SPWorkflowTaskCollection GetItemTasks(
	SPListItem item,
	SPWorkflowFilter filter


Type: Microsoft.SharePoint.SPListItem

The list item for which you want to return workflow tasks.

Type: Microsoft.SharePoint.Workflow.SPWorkflowFilter

The filter criteria to apply to the workflow collection, such as to whom the workflow is assigned, and the workflow state.

Return Value

Type: Microsoft.SharePoint.Workflow.SPWorkflowTaskCollection
An SPWorkflowTaskCollection object that represents the workflow tasks for the item.

This method gets the workflow tasks for the list item specified by the item parameter that satisfy the criteria specified by the filter parameter.