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

All Known Implementing Classes:
TypedTaskManagerQueryService

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
 ProcessInstanceRow getProcessInstanceById(long id)
          Retrieves a process instance according to the specified id
 java.util.List getProcessVariables(java.lang.String processName)
          Retrieves a java.util.List of process variable definitions.
 java.util.List getProcessVariables(java.lang.String processName, java.lang.Boolean includeCommonVariables, java.lang.Boolean includeSearchable)
          Retrieves a java.util.List of process variable definitions.
 java.util.List getProcessVariableValues(long taskId)
          Retrieves a java.util.List of process variable definitions and values.
 TaskFilter newTaskFilter()
          Creates a new TaskFilter object.
 java.util.List processInstanceList(java.lang.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.
 java.util.List processList()
          Retrieves a java.util.List of process names in which the logged-in user has participated.
 java.util.List processSearch(ProcessSearchFilter filter)
          Retrieves a java.util.List of process instances according to the specified search criteria set in the ProcessSearchFilter object.
 java.util.List taskHistory(long taskId)
          Retrieves a list of Assignment objects, each representing a participant assigned to the task.
 java.util.List taskList(TaskFilter filter)
          Retrieves a java.util.List of tasks.
 java.util.List taskListUnsecure(TaskFilter filter)
          Retrieves a java.util.List of tasks without checking the user ACL.
 java.util.List taskSearch(TaskSearchFilter filter)
          Retrieves a java.util.List of task-related data.
 java.util.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

java.util.List getProcessVariables(java.lang.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.

getProcessVariables

java.util.List getProcessVariables(java.lang.String processName,
                                   java.lang.Boolean includeCommonVariables,
                                   java.lang.Boolean includeSearchable)
                                   throws TaskQueryServiceException
Retrieves a java.util.List of process variable definitions.

This method is used to retrieve a list of visible, or optionally searchable, process variables found in the specified process. If a variable is not set as visible and the includeSearchable parm is false, then the variable will not be returned. If a variable is not visable and the includeSearchable parm is true, then the variable will only be returned if it is set as searchable. 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.
includeCommonVariables - Indicator to control the inclusion of the Common Process Variables in the results.
includeSearchable - Indicator to control the inclusion of searchable only variables in the results.
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

java.util.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

java.util.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

java.util.List processInstanceList(java.lang.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

java.util.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

java.util.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

java.util.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.

taskListUnsecure

java.util.List taskListUnsecure(TaskFilter filter)
                                throws TaskQueryServiceException
Retrieves a java.util.List of tasks without checking the user ACL. This will only honour an in-VM call.

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

java.util.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

java.util.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

getProcessInstanceById

ProcessInstanceRow getProcessInstanceById(long id)
                                          throws TaskQueryServiceException
Retrieves a process instance according to the specified id

Parameters:
id - The process instance id.
Returns:
A ProcessInstanceRow of process instance.
Throws:
TaskQueryServiceException