GetRunningWorkflowTasksCollection

Gets a collection of running workflow tasks associated with the specified user, site, and SharePoint list.

Syntax

public UserTaskCollection GetRunningWorkflowTasksCollection(
	string userlogin,
	string teamsiteUrl,
	string listName
)

Parameters

userlogin
Type: System.String

Optional. The name of the user or group for which to get running workflow tasks. If a value is not specified, running workflow tasks are retrieved for all users.

teamsiteUrl
Type: System.String

Optional. The absolute or relative URL of the SharePoint team site for which to get running workflow tasks. If a value is not specified, the site for the current user context is used.

listName
Type: System.String

Optional. The name of the SharePoint list for which to get running workflow tasks for reusable or list workflows. If a value is not specified, all running workflow tasks for site, reusable, and list workflows are retrieved.

Returns

Type: UserTaskCollection

A collection of UserTask objects, each of which represents a running workflow task.

Remarks

If a team site is specified in teamsiteUrl, this method retrieves running workflow tasks

Example: Getting all running workflow tasks for the current site

The following example demonstrates how to use this operation to get all running workflow tasks for the current site. The request deliberately omits the parameters for the method, so that running workflow tasks are retrieved for:

Request

The following SOAP request attempts to retrieve all running workflow tasks for the current site.

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:nin="http://nintex.com">
   <soap:Header/>
   <soap:Body>
      <nin:GetRunningWorkflowTasksCollection>
      </nin:GetRunningWorkflowTasksCollection>
   </soap:Body>
</soap:Envelope>

Response

The following SOAP request returns a collection of running workflow tasks. In this case, the collection contains two running workflow tasks for list workflows, each assigned to a different 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>
      <GetRunningWorkflowTasksCollectionResponse xmlns="http://nintex.com">
         <GetRunningWorkflowTasksCollectionResult>
            <UserTask>
               <SharePointTaskId>4</SharePointTaskId>
               <HumanWorkflowID>4</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:29:32.453</EntryTime>
               <WorkflowName>TestFlexiTaskWorkflow</WorkflowName>
               <WorkflowInstaceId>3f263a9f-71d9-43a6-a261-df3a5aad116e</WorkflowInstaceId>
               <TaskName>Request approval</TaskName>
               <TaskType>Approval</TaskType>
            </UserTask>
            <UserTask>
               <SharePointTaskId>5</SharePointTaskId>
               <HumanWorkflowID>5</HumanWorkflowID>
               <AssignedTo>
                  <OtherEmailAddress/>
                  <UserID>i:0#.w|testdomain\differentuser</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>
         </GetRunningWorkflowTasksCollectionResult>
      </GetRunningWorkflowTasksCollectionResponse>
   </soap:Body>
</soap:Envelope>

See Also

Concepts

Workflow tasks

Operations

Processing workflow task responses

Reference

ProcessFlexiTaskResponse2

ProcessTaskResponse3

Web Service Reference