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
 org.ow2.bonita.facade.runtime.ActivityInstance<org.ow2.bonita.facade.runtime.ActivityBody> getActivityInstance(org.ow2.bonita.facade.uuid.ActivityInstanceUUID activityUUID)
          Returns the record of the activity with the given activity UUID.
 java.util.Set<org.ow2.bonita.facade.runtime.ActivityInstance<org.ow2.bonita.facade.runtime.ActivityBody>> getActivityInstances(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID)
          Returns all records of activity for the given process instance UUID.
 java.util.Set<org.ow2.bonita.facade.runtime.ActivityInstance<org.ow2.bonita.facade.runtime.ActivityBody>> getActivityInstances(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID, java.lang.String activityId)
          Returns records for all iterations and multi-instantiations that should happend for the given process instance UUID and activity Id.
 java.lang.Object getActivityInstanceVariable(org.ow2.bonita.facade.uuid.ActivityInstanceUUID activityUUID, java.lang.String variableId)
          Obtains a variable defined as local to the activity for the given activity UUID and variable Id.
 java.util.Map<java.lang.String,java.lang.Object> getActivityInstanceVariables(org.ow2.bonita.facade.uuid.ActivityInstanceUUID activityUUID)
          Obtains the variables defined as local to the activity for the given activity UUID.
 org.ow2.bonita.facade.runtime.ProcessInstance getProcessInstance(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID)
          Returns the record of the instance with the given UUID.
 java.util.Set<org.ow2.bonita.facade.runtime.ProcessInstance> getProcessInstances()
          Returns all records of instance.
 java.util.Set<org.ow2.bonita.facade.runtime.ProcessInstance> getProcessInstances(org.ow2.bonita.facade.uuid.ProcessDefinitionUUID processUUID)
          Returns all records of instance for the given process processDefinitionUUID.
 java.lang.Object getProcessInstanceVariable(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID, java.lang.String variableId)
          Obtains a process variable for the given process instance UUID and variable Id.
 java.util.Map<java.lang.String,java.lang.Object> getProcessInstanceVariables(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID)
          Obtains the process variables for the given process instance UUID.
 org.ow2.bonita.facade.runtime.ActivityInstance<org.ow2.bonita.facade.runtime.TaskInstance> getTask(org.ow2.bonita.facade.uuid.TaskUUID taskUUID)
          Returns the record of the task with the given task UUID.
 java.util.Collection<org.ow2.bonita.facade.runtime.ActivityInstance<org.ow2.bonita.facade.runtime.TaskInstance>> getTaskList(org.ow2.bonita.facade.runtime.ActivityState taskState)
          Obtains the user tasks with state either READY or EXECUTING or SUSPENDED or FINISHED for the authenticated user.
 java.util.Collection<org.ow2.bonita.facade.runtime.ActivityInstance<org.ow2.bonita.facade.runtime.TaskInstance>> getTaskList(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID, org.ow2.bonita.facade.runtime.ActivityState taskState)
          Obtains the user tasks with state either READY or EXECUTING or SUSPENDED or FINISHED for the given instance and the authenticated user.
 java.util.Collection<org.ow2.bonita.facade.runtime.ActivityInstance<org.ow2.bonita.facade.runtime.TaskInstance>> getTaskList(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID, java.lang.String userId, org.ow2.bonita.facade.runtime.ActivityState taskState)
          Obtains the tasks with state either READY or EXECUTING or SUSPENDED or FINISHED for the given instance and for the given user.
 java.util.Collection<org.ow2.bonita.facade.runtime.ActivityInstance<org.ow2.bonita.facade.runtime.TaskInstance>> getTaskList(java.lang.String userId, org.ow2.bonita.facade.runtime.ActivityState taskState)
           Obtains the user tasks with state either READY or EXECUTING or SUSPENDED or FINISHED for the given user.
 java.util.Set<org.ow2.bonita.facade.runtime.ActivityInstance<org.ow2.bonita.facade.runtime.TaskInstance>> getTasks(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID)
          Returns all records of task for the given process instance UUID.
 java.lang.Object getVariable(org.ow2.bonita.facade.uuid.ActivityInstanceUUID activityUUID, java.lang.String variableId)
          Obtains a variable for the given activity and variable Id.
 java.util.Map<java.lang.String,java.lang.Object> getVariables(org.ow2.bonita.facade.uuid.ActivityInstanceUUID activityUUID)
          Obtains the activity variables (including global process and local activity variables) for the given activity UUID.
 

Method Detail

getProcessInstances

java.util.Set<org.ow2.bonita.facade.runtime.ProcessInstance> getProcessInstances()
Returns all records of instance.
An empty set is returned if no instance is found.

Returns:
a set containing all instance records.
Throws:
BonitaInternalException - if an exception occurs.

getProcessInstance

org.ow2.bonita.facade.runtime.ProcessInstance getProcessInstance(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.

getProcessInstances

java.util.Set<org.ow2.bonita.facade.runtime.ProcessInstance> getProcessInstances(org.ow2.bonita.facade.uuid.ProcessDefinitionUUID processUUID)
                                                                                 throws ProcessNotFoundException
Returns all records of instance for the given process processDefinitionUUID.
An empty set is returned if no instance is found.

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.

getActivityInstance

org.ow2.bonita.facade.runtime.ActivityInstance<org.ow2.bonita.facade.runtime.ActivityBody> getActivityInstance(org.ow2.bonita.facade.uuid.ActivityInstanceUUID activityUUID)
                                                                                                               throws ActivityNotFoundException
Returns the record of the activity with the given activity UUID.

Parameters:
activityUUID - the activity UUID.
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.

getActivityInstances

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

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

getActivityInstances

java.util.Set<org.ow2.bonita.facade.runtime.ActivityInstance<org.ow2.bonita.facade.runtime.ActivityBody>> getActivityInstances(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID,
                                                                                                                               java.lang.String activityId)
                                                                                                                               throws InstanceNotFoundException,
                                                                                                                                      ActivityNotFoundException
Returns records for all iterations and multi-instantiations that should happend for the given process instance UUID and activity Id.
An empty set is returned if no instance is found.

Parameters:
instanceUUID - the instance UUID.
activityId - the activity Id (as specified into the XPDL file).
Returns:
the unordered set containing activity records.
Throws:
InstanceNotFoundException - if no instance has been found with the given instance UUID.
BonitaInternalException - if an exception occurs.
ActivityNotFoundException

getTask

org.ow2.bonita.facade.runtime.ActivityInstance<org.ow2.bonita.facade.runtime.TaskInstance> 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<org.ow2.bonita.facade.runtime.ActivityInstance<org.ow2.bonita.facade.runtime.TaskInstance>> getTasks(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID)
                                                                                                                   throws InstanceNotFoundException
Returns all records of task for the given process 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<org.ow2.bonita.facade.runtime.ActivityInstance<org.ow2.bonita.facade.runtime.TaskInstance>> getTaskList(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID,
                                                                                                                             org.ow2.bonita.facade.runtime.ActivityState taskState)
                                                                                                                             throws InstanceNotFoundException
Obtains the user tasks with state either READY or EXECUTING or SUSPENDED or FINISHED for the given instance and the authenticated user.

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<org.ow2.bonita.facade.runtime.ActivityInstance<org.ow2.bonita.facade.runtime.TaskInstance>> getTaskList(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID,
                                                                                                                             java.lang.String userId,
                                                                                                                             org.ow2.bonita.facade.runtime.ActivityState taskState)
                                                                                                                             throws InstanceNotFoundException
Obtains the tasks with state either READY or EXECUTING or SUSPENDED or FINISHED for the given instance and for the given user.
If the task has been assigned to a user, only this user can get the task into the returned list. Otherwise all the users that believe to the candidate list can get the task.

Parameters:
instanceUUID - the instance UUID.
userId - the userId for which the tasks are searched.
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<org.ow2.bonita.facade.runtime.ActivityInstance<org.ow2.bonita.facade.runtime.TaskInstance>> getTaskList(org.ow2.bonita.facade.runtime.ActivityState taskState)
Obtains the user tasks with state either READY or EXECUTING or SUSPENDED or FINISHED for the authenticated user.
If the task has been assigned to a user, only this user can get the task into the returned list.
Otherwise all the users that believe to the candidate list can get the task.

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.

getTaskList

java.util.Collection<org.ow2.bonita.facade.runtime.ActivityInstance<org.ow2.bonita.facade.runtime.TaskInstance>> getTaskList(java.lang.String userId,
                                                                                                                             org.ow2.bonita.facade.runtime.ActivityState taskState)

Obtains the user tasks with state either READY or EXECUTING or SUSPENDED or FINISHED for the given user.
If the task has been assigned to a user, only this user can get the task into the returned list.
Otherwise all the users that believe to the candidate list can get the task.

Parameters:
userId - the userId for which the tasks are searched.
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.

getActivityInstanceVariable

java.lang.Object getActivityInstanceVariable(org.ow2.bonita.facade.uuid.ActivityInstanceUUID activityUUID,
                                             java.lang.String variableId)
                                             throws ActivityNotFoundException,
                                                    VariableNotFoundException
Obtains a variable defined as local to the activity for the given activity UUID and variable Id. The activity should either be executed or currently pointed by the a process execution.

Parameters:
activityUUID - the activity UUID.
variableId - the value of the Id attribute of the DataField element defined into the XPDL file.
Returns:
the variable object (can be: an Enumeration, a plain String, a Boolean, a Date, a Long or a Double).
Throws:
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.

getActivityInstanceVariables

java.util.Map<java.lang.String,java.lang.Object> getActivityInstanceVariables(org.ow2.bonita.facade.uuid.ActivityInstanceUUID activityUUID)
                                                                              throws ActivityNotFoundException
Obtains the variables defined as local to the activity for the given activity UUID.
An empty map is returned if no variable is found.

Parameters:
activityUUID - the activity UUID.
Returns:
the map of activity variables where key is the variable id and value is the variable object (can be: an Enumeration, a plain String, a Boolean, a Date, a Long or a Double)).
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.

getVariable

java.lang.Object getVariable(org.ow2.bonita.facade.uuid.ActivityInstanceUUID activityUUID,
                             java.lang.String variableId)
                             throws ActivityNotFoundException,
                                    VariableNotFoundException
Obtains a variable for the given activity and variable Id. 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:
activityUUID - the activity UUID.
variableId - the value of the Id attribute of the DataField element defined into the XPDL file.
Returns:
the variable object (can be: an Enumeration, a plain String, a Boolean, a Date, a Long or a Double).
Throws:
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.

getVariables

java.util.Map<java.lang.String,java.lang.Object> getVariables(org.ow2.bonita.facade.uuid.ActivityInstanceUUID activityUUID)
                                                              throws InstanceNotFoundException,
                                                                     ActivityNotFoundException
Obtains the activity variables (including global process and local activity variables) for the given activity UUID.
An empty map is returned if no variable is found.

Parameters:
activityUUID - the activity UUID.
Returns:
the map of activity variables where key is the variable id and value is the variable object (can be: an Enumeration, a plain String, a Boolean, a Date, a Long or a Double).
Throws:
ActivityNotFoundException - if this activity is not pointed by a process execution and the execution informations for this activity has not been recorded.
InstanceNotFoundException - if no recorded informations is found with the given instance UUID.
BonitaInternalException - if an other exception occurs.

getProcessInstanceVariable

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

Parameters:
instanceUUID - the instance UUID.
variableId - the variable id.
Returns:
the variable object (can be: an Enumeration, a plain String, a Boolean, a Date, a Long or a Double).
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.

getProcessInstanceVariables

java.util.Map<java.lang.String,java.lang.Object> getProcessInstanceVariables(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID)
                                                                             throws InstanceNotFoundException
Obtains the process variables for the given process instance UUID. 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.


Copyright © 2009 OW2 Consortium. All Rights Reserved.