GetRunningWorkflowTasksForCurrentUser
Gets a collection of running workflow tasks for the current user, associated with either the current site or the specified file in a SharePoint document library.
Syntax
public UserTaskCollection GetRunningWorkflowTasksForCurrentUser( 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.
To get running workflow tasks from site workflows, do not specify a value for this parameter.
Returns
Type: UserTaskCollection
A collection of UserTask objects, each of which represents a running workflow task for the current user.
Example
The following example demonstrates how to use this operation to get a collection of running workflow tasks for the current user.
Request
The following SOAP request attempts to get the running workflow tasks, from reusable and list workflows associated with the specified file, for the current user.
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:nin="http://nintex.com"> <soap:Header/> <soap:Body> <nin:GetRunningWorkflowTasksForCurrentUser> <nin:fileUrl>/Shared%20Documents/TestDocument.txt</nin:fileUrl> </nin:GetRunningWorkflowTasksForCurrentUser> </soap:Body> </soap:Envelope>
Response
The following SOAP response returns a collection of running workflow tasks for the current user.
<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> <GetRunningWorkflowTasksForCurrentUserResponse xmlns="http://nintex.com"> <GetRunningWorkflowTasksForCurrentUserResult> <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> </GetRunningWorkflowTasksForCurrentUserResult> </GetRunningWorkflowTasksForCurrentUserResponse> </soap:Body> </soap:Envelope>
See Also
Concepts
Operations
Processing workflow task responses