You can dynamically retrieve information about tasks such
the user who completed the task, the time and date that it was completed,
and its identifier. By obtaining task information, you can track
its details. For example, you can create a log file that specifies
the user who completes a task and the time at which it was completed.
This topic discusses how to retrieve information about completed tasks.
Summary of stepsTo retrieve task information, perform the following tasks:
Include project files.
Create a TaskManagerQueryService and a TaskManager client
API object.
Specify search criteria
Save file attachments.
Include project filesInclude necessary files into your development
project. If you are creating a client application using Java, then
include the necessary JAR files. If you are using web services,
make sure that you include the proxy files.
Create a TaskManagerQueryService and a TaskManager Client API objectTo
search for task information, create a TaskManagerQueryService and
a TaskManager client API object.
Specify search criteriaTo obtain information about a completed
task, specify the user whom completed the task when setting connection
properties required to invoke LiveCycle operations. That
is, if you want to know what tasks tony blue completed, specify
tonyb when defining connection settings.
You can also obtain
information related to all tasks. For example, you can retrieve all
completed tasks and determine the user who completed them (as opposed
to retrieving tasks assigned to the user specified in the connection
settings). To obtain all tasks, use an administrator account when
defining connection settings. In addition, you can specify other
search criteria such as the process name on which the task is based.
For example, you can retrieve all tasks that are based on a specific
process and then determine the users who completed them.
Hinweis: This topic discusses retrieving all completed
tasks and obtaining information such as the user who completed the
task.
When retrieving all tasks, the result
set may be very large. You can limit the result set using the Java
and web service API.
Perform the searchAfter you define search criteria, you can search
for tasks. All tasks that conform to the search criteria are returned
in a list. You can get the status of each task when deciding whether
you want to retrieve its information. For example, if you are only
interested in obtaining information on completed tasks, ensure that
the status of each task is 100 (which indicates that the task is
completed).
Iterate through the returned tasksIterate through the list that
contains the tasks to determine information about each task. You
can, for example, determine the identifier value of each task.
Retrieve task information using the Java APIRetrieve task information by using the Java API:
Include project files
Include client JAR files,
such as adobe-taskmanager-client-sdk.jar, in your Java project’s
class path.
Create a TaskManagerQueryService and a TaskManager Client
API object
Create a ServiceClientFactory object
that contains connection properties.
Create a TaskManagerQueryService object
by invoking the TaskManagerClientFactory object’s
static getQueryManager method and passing the ServiceClientFactory object.
Create a TaskManager object by invoking
the TaskManagerClientFactory object’s static getTaskManager method
and passing the ServiceClientFactory object.
Specify search criteria
Create a TaskSearchFilter object
by using its constructor.
Specify search criteria by invoking an appropriate method
that belongs to the TaskSearchFilter object. For
example, to specify the process on which a task is based, invoke
the TaskSearchFilter object’s setServiceName method
and pass a string value that specifies the process name.
Invoke the TaskSearchFilter object’s setAdminIgnoreAllAcls method
and pass true to enable all tasks to be returned
(not just the user who is specified in the connection settings).
Perform the search
Search for tasks by invoking the TaskManagerQueryServiceService object’s taskSearch method
and passing the TaskSearchFilter 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.
Hinweis: The TaskSearch method
is a generic way to search for tasks. In contrast, the TaskList method
is meant as a specialized way to retrieve tasks. For example, using
the TaskList method, you can get all tasks that
are assigned to a specific user. (See Retrieving Tasks Assigned to Users.)
Iterate through the returned tasks
Create
a java.util.Iterator object by invoking the java.util.List object’s iterator method.
This object lets you 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.
Get the task identifier value by invoking the TaskRow object’s getTaskId method.
This method returns a long value that specifies the task identifier
value.
Retrieve task information by invoking the TaskManager object’s getTaskInfo method
and passing the task identifier value.
Retrieve task information using the web service APIRetrieve task information by using the web service API:
Include project files
Create a Microsoft
.NET client assembly that consumes the TaskManager service WSDL.
To create a proxy object that lets you invoke its operations by using
Base64 encoding, specify this WSDL definition:
http://localhost:8080/soap/services/TaskManagerService?WSDL
Reference the Microsoft .NET client assembly.
Create a TaskManagerQueryService and a TaskManager Client
API object
Using the Microsoft .NET client assembly,
create a TaskManagerQueryServiceService object
by invoking its default constructor.
Set the TaskManagerQueryServiceService object’s Credentials data
member with a System.Net.NetworkCredential value
that specifies the user name and password value.
Using the Microsoft .NET client assembly, create a TaskManagerServiceService object
by invoking its default constructor.
Set the TaskManagerServiceService object’s Credentials data member
with a System.Net.NetworkCredential value that specifies
the user name and password value.
Specify search criteria
Create a TaskSearchFilter object
by using its constructor.
Specify search criteria by assigning a value to an appropriate
data member that belongs to the TaskSearchFilter object.
For example, to specify the process on which a task is based, assign
a string value that specifies the process name to the TaskSearchFilter object’s serviceName data member.
Assign the value true to the TaskSearchFilter object’s adminIgnoreAllAcls data
member to enable all tasks to be returned (not just the user who
is specified in the connection settings).
Perform the search
Search for tasks by invoking the TaskManagerQueryServiceService object’s taskList method
and passing the TaskFilter object. This method
returns an array of Objects where each element
is a TaskRow object that represents a task that
conforms to the specified search criteria.
Iterate through the returned tasks
Iterate
through the Object array by creating a loop structure and for each element,
cast the element value to a TaskRow instance.
Get the task identifier value by retrieving the value of
the TaskRow object’s taskId data
member.
Retrieve task information by invoking the TaskManager object’s getTaskInfo method
and passing the task identifier value.
|
|
|