GetRunningWorkflowTasks
Gets a collection of running workflow tasks from reusable or list workflows, associated with the specified file in a SharePoint document library.
Syntax
public UserTaskCollection GetRunningWorkflowTasks( string fileUrl )
Parameters
- fileUrl
- Type: System.String
Optional. The absolute or relative URL of the file on which to get running workflow tasks from reusable or list workflows. If a relative URL is specified, the URL must be relative to the current SharePoint website.
Note: Although the parameter is optional, an error occurs if a value is not specified.
Returns
Type: UserTaskCollection
A collection of UserTask objects, each of which represents a running workflow task for the specified file.
Example
The following example demonstrates how to use this operation to get a collection of running workflow tasks for a file in a SharePoint document library.
Request
The following SOAP request attempts to get the running workflow tasks from reusable and list workflows associated with the specified file.
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:nin="http://nintex.com">
<soap:Header/>
<soap:Body>
<nin:GetRunningWorkflowTasks>
<nin:fileUrl>/Shared%20Documents/TestDocument.txt</nin:fileUrl>
</nin:GetRunningWorkflowTasks>
</soap:Body>
</soap:Envelope>
Response
The following SOAP response returns a collection of running workflow tasks for the file.
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetRunningWorkflowTasksResponse xmlns="http://nintex.com">
<GetRunningWorkflowTasksResult>
<UserTask>
<SharePointTaskId>5</SharePointTaskId>
<HumanWorkflowID>5</HumanWorkflowID>
<AssignedTo>
<OtherEmailAddress/>
<UserID>i:0#.w|testdomain\testuser</UserID>
<IsDomainGroup>false</IsDomainGroup>
<IsSPGroup>false</IsSPGroup>
<IsUser>false</IsUser>
</AssignedTo>
<Comments/>
<EntryTime>2015-01-27T22:38:21.02</EntryTime>
<WorkflowName>TestDocFlexiTaskWorkflow</WorkflowName>
<WorkflowInstaceId>e60bae97-46cd-44b0-87cb-371974f08fc3</WorkflowInstaceId>
<TaskName>Assign Flexi task</TaskName>
<TaskType>MultiOutcome</TaskType>
</UserTask>
</GetRunningWorkflowTasksResult>
</GetRunningWorkflowTasksResponse>
</soap:Body>
</soap:Envelope>
See Also
Concepts
Operations
Processing workflow task responses