com.adobe.idp.taskmanager.dsc.client
Interface TaskManagerQueryService


public interface TaskManagerQueryService

This interface contains the Task Manager Query Service operations. It is used by clients to conduct queries on tasks and process variables.

To create an instance of the TaskManagerQueryService, call TaskManagerClientFactory.getQueryManager().


Method Summary
 List getProcessVariables(String processName)
          Retrieves a java.util.List of process variable definitions.
 List getProcessVariableValues(long taskId)
          Retrieves a java.util.List of process variable definitions and values.
 TaskFilter newTaskFilter()
          Creates a new TaskFilter object.
 List processInstanceList(String processName, boolean returnVariables)
          Retrieves a java.util.List of those process instances in which the currently logged in user has participated, based on the specified process name.
 List processList()
          Retrieves a java.util.List of process names in which the logged-in user has participated.
 List processSearch(ProcessSearchFilter filter)
          Retrieves a java.util.List of process instances according to the specified search criteria set in the ProcessSearchFilter object.
 List taskHistory(long taskId)
          Retrieves a list of Assignment objects, each representing a participant assigned to the task.
 List taskList(TaskFilter filter)
          Retrieves a java.util.List of tasks.
 List taskSearch(TaskSearchFilter filter)
          Retrieves a java.util.List of task-related data.
 List userSearch(UserSearchFilter filter)
          A user search mechanism which will return taskmanager specific data about the end-user, like their OOO status
 

Method Detail

newTaskFilter

TaskFilter newTaskFilter()
Creates a new TaskFilter object.

Returns:
The newly created TaskFilter object.

getProcessVariables

List getProcessVariables(String processName)
                         throws TaskQueryServiceException
Retrieves a java.util.List of process variable definitions.

This method is used to retrieve a list of visible or searchable process variables found in the specified process. If a variable is not set as visible or searchable when defined in the process designer, it will not be added to the result set generated by this method. The list returned is only a list of variable definitions without any values associated with them. The process specified as the parameter must be active in order to return any process variables.

Parameters:
processName - The name of the process containing the process variables to be retrieved.
Returns:
A java.util.List of MultiTypeVariable objects that contain information about the process variable. null is returned if no results are found.

Only simple types of process variables are handled by query service methods. The supported process variables types are:

  • boolean
  • byte
  • date
  • date-time
  • decimal
  • double
  • float
  • int
  • long
  • short
  • string
Throws:
TaskQueryServiceException - if query exceptions occur.

getProcessVariableValues

List getProcessVariableValues(long taskId)
                              throws TaskQueryServiceException
Retrieves a java.util.List of process variable definitions and values.

This method is used to retrieve a list of visible or searchable process variables and values found using the specified task identifier. If a variable is not set as visible or searchable when defined in the Workbench, it will not be added to the result set generated by this method.

Parameters:
taskId - The task identifier.
Returns:
A java.util.List of MultiTypeVariable objects, each of which contains the value of a process variable. null is returned if no results are found.

Only simple types of process variables are handled by query service methods. The supported process variables types are:

  • boolean
  • byte
  • date
  • date-time
  • decimal
  • double
  • float
  • int
  • long
  • short
  • string
Throws:
TaskQueryServiceException - if query exceptions occur.

processList

List processList()
                 throws TaskQueryServiceException
Retrieves a java.util.List of process names in which the logged-in user has participated.

This method is used to retrieve a list of ProcessRow objects for those processes in which the currently logged-in user has participated. Process rows will be unique. Processes will not be duplicated in the list.

Returns:
A java.util.List of ProcessRow objects. null is returned if no results are found.
Throws:
TaskQueryServiceException - if query exceptions occur.

processInstanceList

List processInstanceList(String processName,
                         boolean returnVariables)
                         throws TaskQueryServiceException
Retrieves a java.util.List of those process instances in which the currently logged in user has participated, based on the specified process name.

This method method is used to retrieve a list of ProcessInstanceRow objects for those process instances in which the user has participated.

Parameters:
processName - The name of the process from which to retrieve process instances.
returnVariables - true to retrieve a list of MultiTypeVariable objects, within each ProcessInstanceRow, containing any visible process variables and their values. A value of false means that a null list is returned in each ProcessInstanceRow object.
Returns:
A java.util.List of ProcessInstanceRow objects. null is returned if no results are found.

Only simple types of process variables are handled by query service methods. The supported process variables types are:

  • boolean
  • byte
  • date
  • date-time
  • decimal
  • double
  • float
  • int
  • long
  • short
  • string
Throws:
TaskQueryServiceException - if query exceptions occur.

taskSearch

List taskSearch(TaskSearchFilter filter)
                throws TaskQueryServiceException
Retrieves a java.util.List of task-related data.

This method is used to execute a task-based query. Queries are built using the TaskSearchFilter object, which can be used to filter and define result sets. If no result set is defined in the filter, a default result set will be generated.

When searching for process variables or adding them to a result set, you must specify the service (process) name that you are searching against using the TaskSearchingUtil object found in the TaskSearchFilter object. For example:

TaskSearchFilter filt = new TaskSearchFilter();
((TaskSearchingUtil)filt.getPropertyUtil()).setProcessVariableServiceName("procvar3");

Once the process name is set you can add process variables to a condition or add it to the result set. To do so add the prefix "procVar." to your process variable. If a process variable in called "one", it will become "procVar.one" when used with the TaskSearchFilter object. For example:

filt.addCondition("procVar.two", Operator.EQUALS, new Long(28));
filt.addResultsetAttribute("procVar.one");

Only simple types of process variables are handled by query service methods. The supported process variables types are:

Parameters:
filter - Contains search parameters, and possibly the result set definition for the query.
Returns:
The java.util.List object populated with one or more TaskRow objects. null is returned if no results are found.
Throws:
TaskQueryServiceException - if query exceptions occur.

processSearch

List processSearch(ProcessSearchFilter filter)
                   throws TaskQueryServiceException
Retrieves a java.util.List of process instances according to the specified search criteria set in the ProcessSearchFilter object.

When searching for process variables or adding them to a result set, you must specify the service (process) name that you are searching against using the ProcessSearchFilter object. For example:

ProcessSearchFilter filter = new ProcessSearchFilter();
filter.setServiceName("procvar3");

Once the process name is set you can add process variables to a condition or add it to the result set. To do so add the prefix "procVar." to your process variable. If a process variable in called "one", it will become "procVar.one" when used with the ProcessSearchFilter object. For example:

filter.addCondition("procVar.two", Operator.EQUALS, new Long(28));
filter.addResultsetAttribute("procVar.one");

Only simple types of process variables are handled by query service methods. The supported process variables types are:

Parameters:
filter - The search criteria.
Returns:
A java.util.List of process instances.
Throws:
TaskQueryServiceException

taskList

List taskList(TaskFilter filter)
              throws TaskQueryServiceException
Retrieves a java.util.List of tasks.

The TaskFilter is an object used to determine the results of the query. Passing in a null value for this parameter will retrieve the task list for the current user, which contains a collection of TaskRow objects representing the requested task list.

Parameters:
filter - Contains search parameters for the query.
Returns:
A java.util.List object populated with one or more TaskRow objects.
Throws:
TaskQueryServiceException - if query exceptions occur.

taskHistory

List taskHistory(long taskId)
                 throws TaskQueryServiceException
Retrieves a list of Assignment objects, each representing a participant assigned to the task.

Parameters:
taskId - The task identifier.
Returns:
A java.util.List object populated with 0 or 1 Assignment objects, or null if the task does not exist.

Throws:
TaskQueryServiceException - if query exceptions occur.

userSearch

List userSearch(UserSearchFilter filter)
                throws TaskQueryServiceException
A user search mechanism which will return taskmanager specific data about the end-user, like their OOO status

Parameters:
filter -
Returns:
the list of resultant users
Throws:
TaskQueryServiceException


[an error occurred while processing this directive] [an error occurred while processing this directive]