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
Syntax
'Declaration
Public Function GetItemTasks ( _
item As SPListItem, _
filter As SPWorkflowFilter _
) As SPWorkflowTaskCollection
'Usage
Dim instance As SPWorkflowManager
Dim item As SPListItem
Dim filter As SPWorkflowFilter
Dim returnValue As SPWorkflowTaskCollection
returnValue = instance.GetItemTasks(item, _
filter)
public SPWorkflowTaskCollection GetItemTasks(
SPListItem item,
SPWorkflowFilter filter
)
Parameters
item
Type: Microsoft.SharePoint.SPListItemThe list item for which you want to return workflow tasks.
filter
Type: Microsoft.SharePoint.Workflow.SPWorkflowFilterThe 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.
Remarks
This method gets the workflow tasks for the list item specified by the item parameter that satisfy the criteria specified by the filter parameter.
See Also
Reference
Microsoft.SharePoint.Workflow Namespace
Other Resources
Workflows in SharePoint Foundation