org.ow2.bonita.facade
Interface QueryRuntimeAPI


public interface QueryRuntimeAPI

Getters on workflow recorded data.
Operations in this API applies to main entities managed by Nova Bonita such as:
packages, processes, process instances, activities, tasks.
Returned records are issued from recorded runtime informations (both runtime and archived workflow instances).

Author:
Pierre Vigneras, Charles Souillard
See Also:
RoleMapper, PerformerAssign, Hook

Method Summary
 java.util.Set<ActivityInst<ActivityBody>> getActivities(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID)
          Returns all records of activity for the given instance UUID.
 java.util.Set<ActivityInst<ActivityBody>> getActivities(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID, java.lang.String activityId)
           
 ActivityInst<ActivityBody> getActivity(org.ow2.bonita.facade.uuid.ActivityInstanceUUID activityUUID)
           
 ActivityInst<ActivityBody> getActivity(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID, java.lang.String activityId)
           
 ActivityInst<ActivityBody> getActivity(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID, java.lang.String activityId, java.lang.String iterationId)
          Returns the record of the activity with the given instance processDefinitionUUID and activity processDefinitionUUID.
 java.lang.Object getActivityVariable(org.ow2.bonita.facade.uuid.ActivityInstanceUUID activityUUID, java.lang.String variableId)
           
 java.lang.Object getActivityVariable(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID, java.lang.String activityId, java.lang.String variableId)
          Obtain a variable for the given activity and instance.
 java.lang.Object getActivityVariable(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID, java.lang.String activityId, java.lang.String iterationId, java.lang.String variableId)
           
 java.util.Map<java.lang.String,java.lang.Object> getActivityVariableDefinitions(org.ow2.bonita.facade.uuid.ProcessDefinitionUUID processUUID, java.lang.String activityId)
          Obtain variable definitions (including global process and local activity variables)for the given process and activity.
 java.util.Map<java.lang.String,java.lang.Object> getActivityVariables(org.ow2.bonita.facade.uuid.ActivityInstanceUUID activityUUID)
           
 java.util.Map<java.lang.String,java.lang.Object> getActivityVariables(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID, java.lang.String activityId)
          Obtain the activity variables (including global process and local activity variables) for the given instance and activity.
 java.util.Map<java.lang.String,java.lang.Object> getActivityVariables(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID, java.lang.String activityId, java.lang.String iterationId)
           
 ProcessInst getInstance(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID)
          Returns the record of the instance with the given UUID.
 java.util.Set<ProcessInst> getInstances(org.ow2.bonita.facade.uuid.ProcessDefinitionUUID processUUID)
          Returns all records of instance for the given process processDefinitionUUID.
 java.lang.Object getInstanceVariable(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID, java.lang.String variableId)
          Obtain a process variable for the given instance and variable.
 java.util.Map<java.lang.String,java.lang.Object> getInstanceVariables(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID)
          Obtain the process variables for the given instance.
 java.util.Map<java.lang.String,java.lang.Object> getProcessVariableDefinitions(org.ow2.bonita.facade.uuid.ProcessDefinitionUUID processUUID)
          Obtain the variable definitions of the process for the given process.
 ActivityInst<TaskInst> getTask(org.ow2.bonita.facade.uuid.TaskUUID taskUUID)
          Returns the record of the task with the given task UUID.
 java.util.Collection<ActivityInst<TaskInst>> getTaskList(org.ow2.bonita.util.Constants.TaskState taskState)
           Obtain the user tasks with state either READY or EXECUTING or SUSPENDED or FINISHED for the given instance.
 java.util.Collection<ActivityInst<TaskInst>> getTaskList(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID, org.ow2.bonita.util.Constants.TaskState taskState)
          Obtain the user tasks with state either READY or EXECUTING or SUSPENDED or FINISHED for the given instance.
 java.util.Set<ActivityInst<TaskInst>> getTasks(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID)
          Returns all records of task for the given instance UUID.
 

Method Detail

getInstance

ProcessInst getInstance(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID)
                        throws InstanceNotFoundException
Returns the record of the instance with the given UUID.

Parameters:
instanceUUID - the instance UUID.
Returns:
the record of the instance with the given UUID.
Throws:
InstanceNotFoundException - if no instance has been found with the given instance UUID.
BonitaInternalException - if an exception occurs.

getInstances

java.util.Set<ProcessInst> getInstances(org.ow2.bonita.facade.uuid.ProcessDefinitionUUID processUUID)
                                        throws ProcessNotFoundException
Returns all records of instance for the given process processDefinitionUUID.

Parameters:
processUUID - the process definition UUID.
Returns:
a set containing all instance records.
Throws:
ProcessNotFoundException - if no process has been found with the given process UUID.
BonitaInternalException - if an exception occurs.

getActivity

ActivityInst<ActivityBody> getActivity(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID,
                                       java.lang.String activityId,
                                       java.lang.String iterationId)
                                       throws InstanceNotFoundException,
                                              ActivityNotFoundException
Returns the record of the activity with the given instance processDefinitionUUID and activity processDefinitionUUID.

Parameters:
instanceUUID - the instance processDefinitionUUID.
activityId - the activity Id as specified in the xpdl file.
iterationId - processDefinitionUUID of the iteration
Returns:
the activity record with the given instance UUID and activity id.
Throws:
InstanceNotFoundException - if no instance has been found with the given instance UUID.
ActivityNotFoundException - if no activity has been found with the given activity id.
BonitaInternalException - if an exception occurs.

getActivity

ActivityInst<ActivityBody> getActivity(org.ow2.bonita.facade.uuid.ActivityInstanceUUID activityUUID)
                                       throws ActivityNotFoundException
Throws:
ActivityNotFoundException

getActivity

ActivityInst<ActivityBody> getActivity(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID,
                                       java.lang.String activityId)
                                       throws InstanceNotFoundException,
                                              ActivityNotFoundException,
                                              ActivityInIterationException
Throws:
InstanceNotFoundException
ActivityNotFoundException
ActivityInIterationException

getActivities

java.util.Set<ActivityInst<ActivityBody>> getActivities(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID)
                                                        throws InstanceNotFoundException
Returns all records of activity for the given instance UUID.

Parameters:
instanceUUID - the instance UUID.
Returns:
the list containing activity records.
Throws:
InstanceNotFoundException - if no instance has been found with the given instance UUID.
BonitaInternalException - if an exception occurs.

getActivities

java.util.Set<ActivityInst<ActivityBody>> getActivities(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID,
                                                        java.lang.String activityId)
                                                        throws InstanceNotFoundException,
                                                               ActivityNotFoundException
Throws:
InstanceNotFoundException
ActivityNotFoundException

getTask

ActivityInst<TaskInst> getTask(org.ow2.bonita.facade.uuid.TaskUUID taskUUID)
                               throws TaskNotFoundException
Returns the record of the task with the given task UUID.

Parameters:
taskUUID - the task UUID.
Returns:
the record of the task with the given task UUID.
Throws:
TaskNotFoundException - if no task has been found with the given task UUID.
BonitaInternalException - if an exception occurs.

getTasks

java.util.Set<ActivityInst<TaskInst>> getTasks(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID)
                                               throws InstanceNotFoundException
Returns all records of task for the given instance UUID.

Parameters:
instanceUUID - the instance UUID.
Returns:
a set containing all task records for the instance.
Throws:
InstanceNotFoundException - if no instance has been found with the given instance UUID.
BonitaInternalException - if an exception occurs.

getTaskList

java.util.Collection<ActivityInst<TaskInst>> getTaskList(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID,
                                                         org.ow2.bonita.util.Constants.TaskState taskState)
                                                         throws InstanceNotFoundException

Obtain the user tasks with state either READY or EXECUTING or SUSPENDED or FINISHED for the given instance.

Parameters:
instanceUUID - the instance UUID.
taskState - the state of the task.
Returns:
a collection of task records. If no tasks are found, an empty collection is returned.
Throws:
InstanceNotFoundException - if no instance record is found with the given instance UUID.
BonitaInternalException - if an other exception occurs.

getTaskList

java.util.Collection<ActivityInst<TaskInst>> getTaskList(org.ow2.bonita.util.Constants.TaskState taskState)

Obtain the user tasks with state either READY or EXECUTING or SUSPENDED or FINISHED for the given instance.

Parameters:
taskState - the state of the task.
Returns:
a collection of task records. If no tasks are found, an empty collection is returned.
Throws:
BonitaInternalException - if an other exception occurs.

getActivityVariable

java.lang.Object getActivityVariable(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID,
                                     java.lang.String activityId,
                                     java.lang.String variableId)
                                     throws InstanceNotFoundException,
                                            ActivityNotFoundException,
                                            ActivityInIterationException,
                                            VariableNotFoundException
Obtain a variable for the given activity and instance. This variable could be local to the activity or global to the process. The activity should either be executed or currently pointed by the a process execution.

Parameters:
instanceUUID - the instance UUID.
activityId - the activity id as specified in the xpdl file.
variableId - the variable id as specified in the xpdl file.
Returns:
the variable object.
Throws:
InstanceNotFoundException - if no instance has been found with the given instance UUID.
ActivityNotFoundException - if this activity is not pointed by a process execution and the execution informations for this activity has not been recorded.
VariableNotFoundException - if no variable is found with the given id.
BonitaInternalException - if an other exception occurs.
ActivityInIterationException

getActivityVariable

java.lang.Object getActivityVariable(org.ow2.bonita.facade.uuid.ActivityInstanceUUID activityUUID,
                                     java.lang.String variableId)
                                     throws ActivityNotFoundException,
                                            VariableNotFoundException
Throws:
ActivityNotFoundException
VariableNotFoundException

getActivityVariable

java.lang.Object getActivityVariable(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID,
                                     java.lang.String activityId,
                                     java.lang.String iterationId,
                                     java.lang.String variableId)
                                     throws InstanceNotFoundException,
                                            ActivityNotFoundException,
                                            VariableNotFoundException
Throws:
InstanceNotFoundException
ActivityNotFoundException
VariableNotFoundException

getActivityVariables

java.util.Map<java.lang.String,java.lang.Object> getActivityVariables(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID,
                                                                      java.lang.String activityId)
                                                                      throws ActivityNotFoundException,
                                                                             ActivityInIterationException,
                                                                             InstanceNotFoundException
Obtain the activity variables (including global process and local activity variables) for the given instance and activity. An empty map is returned if no variable is found.

Parameters:
instanceUUID - the instance UUID.
activityId - the activity id as specified in the xpdl file.
Returns:
the map of activity variables where key is the variable id and value is the variable object.
Throws:
ActivityNotFoundException - if this activity is not pointed by a process execution and the execution informations for this activity has not been recorded.
BonitaInternalException - if an other exception occurs.
ActivityInIterationException
InstanceNotFoundException

getActivityVariables

java.util.Map<java.lang.String,java.lang.Object> getActivityVariables(org.ow2.bonita.facade.uuid.ActivityInstanceUUID activityUUID)
                                                                      throws ActivityNotFoundException
Throws:
ActivityNotFoundException

getActivityVariables

java.util.Map<java.lang.String,java.lang.Object> getActivityVariables(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID,
                                                                      java.lang.String activityId,
                                                                      java.lang.String iterationId)
                                                                      throws ActivityNotFoundException,
                                                                             InstanceNotFoundException
Throws:
ActivityNotFoundException
InstanceNotFoundException

getInstanceVariable

java.lang.Object getInstanceVariable(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID,
                                     java.lang.String variableId)
                                     throws InstanceNotFoundException,
                                            VariableNotFoundException
Obtain a process variable for the given instance and variable.

Parameters:
instanceUUID - the instance UUID.
variableId - the variable id.
Returns:
the variable object.
Throws:
InstanceNotFoundException - if no instance has found with the given instance UUID.
VariableNotFoundException - if no variable is found with the given id.
BonitaInternalException - if an other exception occurs.

getInstanceVariables

java.util.Map<java.lang.String,java.lang.Object> getInstanceVariables(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID)
                                                                      throws InstanceNotFoundException
Obtain the process variables for the given instance. An empty map is returned if no process variable is found.

Parameters:
instanceUUID - the instance UUID.
Returns:
the map of process variables where key is the variable id and value is the variable object.
Throws:
InstanceNotFoundException - if no instance has been found with the given instance UUID.
BonitaInternalException - if an other exception occurs.

getActivityVariableDefinitions

java.util.Map<java.lang.String,java.lang.Object> getActivityVariableDefinitions(org.ow2.bonita.facade.uuid.ProcessDefinitionUUID processUUID,
                                                                                java.lang.String activityId)
                                                                                throws ProcessNotFoundException,
                                                                                       ActivityNotFoundException
Obtain variable definitions (including global process and local activity variables)for the given process and activity. An empty map is returned if no variable definition is found.

Parameters:
processUUID - the process UUID.
activityId - the activity id as specified in the xpdl file.
Returns:
the map of variable definitions where key is the variable id and value is the variable object.
Throws:
ProcessNotFoundException - if no process record is found with the given process UUID.
ActivityNotFoundException - if this activity is not pointed by a process execution and the execution informations for this activity has not been recorded.
BonitaInternalException - if an other exception occurs.

getProcessVariableDefinitions

java.util.Map<java.lang.String,java.lang.Object> getProcessVariableDefinitions(org.ow2.bonita.facade.uuid.ProcessDefinitionUUID processUUID)
                                                                               throws ProcessNotFoundException
Obtain the variable definitions of the process for the given process. An empty map is returned if no variable definition is found.

Parameters:
processUUID - the process Id.
Returns:
the map of variable definitions where key is the variable id and value is the variable object.
Throws:
ProcessNotFoundException - if no process has been found with the given process UUID.
BonitaInternalException - if an other exception occurs.