Take a survey

Developing Applications Using APIs > Managing Processes and Tasks > Retrieving Tasks Assigned to Users > Retrieving tasks assigned to users using the Java API

Retrieving tasks assigned to users using the Java API
To retrieve tasks assigned to a user by using the Java API, perform the following steps:
1.
Include client JAR files, such as adobe-taskmanager-client-sdk.jar, in your Java project’s class path. (See Including LiveCycle ES library files.)
2.
Create a ServiceClientFactory object that contains connection properties. (See Setting connection properties.)
Create a TaskManagerQueryService object by invoking the TaskManagerClientFactory object’s static getQueryManager method and passing the ServiceClientFactory object.
3.
Create a TaskFilter object by invoking the TaskManagerQueryService object’s newTaskFilter method.
Create a StatusFilter object by invoking the TaskFilter object’s newStatusFilter method.
Specify the status of the tasks to search for by invoking the StatusFilter object’s addStatus method and passing a static data member that belongs to StatusFilter. For example, pass StatusFilter.assigned to retrieve tasks that are assigned to a specific user.
Invoke the TaskFilter object’s setStatusFiltering method and pass the StatusFilter object.
4.
Search for tasks by invoking the TaskManagerQueryServiceService object’s taskList method and passing the TaskFilter object. This method returns a java.util.List object where each element is a TaskRow object that represents a task that conforms to the specified search criteria.
5.
Create a java.util.Iterator object by invoking the java.util.List object’s iterator method. This object enables you to iterate through the java.util.List instance to retrieve tasks.
Iterate through the java.util.List object to determine if there are tasks. If so, each element is a TaskRow instance.
Retrieve information about a task by invoking an appropriate method that belongs to the TaskRow object. For example, to get the task identifier value, invoke the TaskRow object’s getTaskId method. For information about the TaskRow object, see LiveCycle ES Java API Reference.
View Quick Start

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/sdkHelp/retrievingUserTasks.137.3.html