GetRunningWorkflowTasksForCurrentUserForListItem

Gets a collection of running workflow tasks for the current user, associated with the specified SharePoint list item.

Syntax

public UserTaskCollection GetRunningWorkflowTasksForCurrentUserForListItem(
	int itemId,
	string listName
)

Parameters

itemId
Type: System.Int32

Required. The identifier of the SharePoint list item.

listName
Type: System.String

Optional. The name of the SharePoint list.

Returns

Type: UserTaskCollection

A collection of UserTask objects, each of which represents a running workflow task for the current user, associated with the specified list item.

Remarks

If the list specified in listName or the list item specified in itemId is not found, an error occurs.

Example

The following example demonstrates how to use this operation to get the running workflow tasks on a list item for the current user.

Request

The following SOAP request attempts to retrieve the running workflow tasks for the list item with an identifier of 3, contained in the TestContacts1 list, 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:GetRunningWorkflowTasksForCurrentUserForListItem>
         <nin:itemId>3</nin:itemId>
         <nin:listName>TestContacts1</nin:listName>
      </nin:GetRunningWorkflowTasksForCurrentUserForListItem>
   </soap:Body>
</soap:Envelope>

Response

The following SOAP response contains the 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>
      <GetRunningWorkflowTasksForCurrentUserForListItemResponse xmlns="http://nintex.com">
         <GetRunningWorkflowTasksForCurrentUserForListItemResult>
            <UserTask>
               <SharePointTaskId>3</SharePointTaskId>
               <HumanWorkflowID>3</HumanWorkflowID>
               <AssignedTo>
                  <OtherEmailAddress/>
                  <UserID>i:0#.w|testdomain\testuser</UserID>
                  <IsDomainGroup>false</IsDomainGroup>
                  <IsSPGroup>false</IsSPGroup>
                  <IsUser>false</IsUser>
               </AssignedTo>
               <Comments/>
               <EntryTime>2015-01-27T18:26:11.06</EntryTime>
               <WorkflowName>TestWorkflow</WorkflowName>
               <WorkflowInstaceId>d7f37b77-2c66-4988-a5d2-cba172505790</WorkflowInstaceId>
               <TaskName>Assign to-do task</TaskName>
               <TaskType>Todo</TaskType>
            </UserTask>
         </GetRunningWorkflowTasksForCurrentUserForListItemResult>
      </GetRunningWorkflowTasksForCurrentUserForListItemResponse>
   </soap:Body>
</soap:Envelope>

See Also

Concepts

Workflow tasks

Operations

Processing workflow task responses

Reference

ProcessFlexiTaskResponse2

ProcessTaskResponse3

Web Service Reference