Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

SPWorkflowManager.GetWorkflowTasks Method (SPListItem, Guid)

Returns a collection of all tasks belonging to the specified workflow instance.

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

public SPWorkflowTaskCollection GetWorkflowTasks(
	SPListItem item,
	Guid workflowInstanceId


Type: Microsoft.SharePoint.SPListItem

The list item on which the workflow is running.

Type: System.Guid

The ID of the workflow instance for which you want the task collection returned.

Return Value

Type: Microsoft.SharePoint.Workflow.SPWorkflowTaskCollection
An SPWorkflowTaskCollection object that represent the collection of workflow tasks.

This method gets the workflow tasks associated with the workflow with the ID specified by the workflowInstanceId parameter running on the list item specified by the item parameter.

© 2015 Microsoft