Condividi tramite


SPWorkflowManager.GetWorkflowTasks Method (SPListItem, SPWorkflow)

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

Syntax

'Declaration
Public Function GetWorkflowTasks ( _
    item As SPListItem, _
    workflow As SPWorkflow _
) As SPWorkflowTaskCollection
'Usage
Dim instance As SPWorkflowManager
Dim item As SPListItem
Dim workflow As SPWorkflow
Dim returnValue As SPWorkflowTaskCollection

returnValue = instance.GetWorkflowTasks(item, _
    workflow)
public SPWorkflowTaskCollection GetWorkflowTasks(
    SPListItem item,
    SPWorkflow workflow
)

Parameters

Return Value

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

Remarks

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

See Also

Reference

SPWorkflowManager Class

SPWorkflowManager Members

GetWorkflowTasks Overload

Microsoft.SharePoint.Workflow Namespace

Other Resources

Workflows in SharePoint Foundation

Workflow Development for SharePoint Foundation

Workflow Object Model Overview in SharePoint Foundation