org.ow2.bonita.facade
Interface RuntimeReadOnlyAPI

All Known Subinterfaces:
RuntimeAPI
All Known Implementing Classes:
RuntimeAPIImpl, RuntimeReadOnlyAPIImpl

public interface RuntimeReadOnlyAPI

Getters for tasks and variables. User's Todo and Work lists operations.

Author:
Marc Blachon, Guillaume Porcher, Charles Souillard, Miguel Valdes, Pierre Vigneras

Method Summary
 java.util.Collection<org.ow2.bonita.services.record.TaskRecord> getTaskList(org.ow2.bonita.util.Constants.TaskState taskState)
          Obtain the user tasks with state either READY or EXECUTING or SUSPENDED for the given instance.
 java.util.Collection<org.ow2.bonita.services.record.TaskRecord> getTaskList(java.lang.String instanceId, org.ow2.bonita.util.Constants.TaskState taskState)
          Obtain the user tasks with state either READY or EXECUTING or SUSPENDED for the given instance.
 java.lang.Object getVariable(java.lang.String instanceId, java.lang.String variableId)
          Obtain a process variable for the given instance and variable .
 java.lang.Object getVariable(java.lang.String instanceId, java.lang.String activityId, java.lang.String variableId)
          Obtain a variable for the given activity and instance.
 java.util.Map<java.lang.String,java.lang.Object> getVariableDefinitions(java.lang.String processId)
          Obtain the variable definitions of the process for the given process.
 java.util.Map<java.lang.String,java.lang.Object> getVariableDefinitions(java.lang.String processId, 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> getVariables(java.lang.String instanceId)
          Obtain the process variables for the given instance.
 java.util.Map<java.lang.String,java.lang.Object> getVariables(java.lang.String instanceId, java.lang.String activityId)
          Obtain the activity variables (including global process and local activity variables) for the given instance and activity.
 

Method Detail

getTaskList

java.util.Collection<org.ow2.bonita.services.record.TaskRecord> getTaskList(java.lang.String instanceId,
                                                                            org.ow2.bonita.util.Constants.TaskState taskState)
                                                                            throws InstanceNotFoundException
Obtain the user tasks with state either READY or EXECUTING or SUSPENDED for the given instance. if the state is READY the task could have been assigned or not. if the state is EXECUTING or SUSPENDED the task has been assigned.

Parameters:
instanceId - the instance id.
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 id.
BonitaInternalException - if an other exception occurs.

getTaskList

java.util.Collection<org.ow2.bonita.services.record.TaskRecord> getTaskList(org.ow2.bonita.util.Constants.TaskState taskState)
Obtain the user tasks with state either READY or EXECUTING or SUSPENDED for the given instance. if the state is READY the task could have been assigned or not. if the state is EXECUTING or SUSPENDED the task has been assigned.

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.

getVariable

java.lang.Object getVariable(java.lang.String instanceId,
                             java.lang.String activityId,
                             java.lang.String variableId)
                             throws InstanceNotFoundException,
                                    ActivityNotFoundException,
                                    VariableNotFoundException
Obtain a variable for the given activity and instance. This variable could be local to the activity or global to the process.

Parameters:
instanceId - the instance id.
activityId - the activity id.
variableId - the variable id.
Returns:
the variable object.
Throws:
InstanceNotFoundException - if no instance record is found with the given instance id.
ActivityNotFoundException - if no activity record is found with the given activity id.
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(java.lang.String instanceId,
                                                              java.lang.String activityId)
                                                              throws ActivityNotFoundException
Obtain the activity variables (including global process and local activity variables) for the given instance and activity.

Parameters:
instanceId - the instance id.
activityId - the activity id.
Returns:
the map of activity variables where key is the variable id and value is the variable object.
Throws:
ActivityNotFoundException - if no activity record is found with the given activity id.
BonitaInternalException - if an other exception occurs.

getVariable

java.lang.Object getVariable(java.lang.String instanceId,
                             java.lang.String variableId)
                             throws InstanceNotFoundException,
                                    VariableNotFoundException
Obtain a process variable for the given instance and variable .

Parameters:
instanceId - the instance id.
variableId - the variable id.
Returns:
the variable object.
Throws:
InstanceNotFoundException - if no instance record is found with the given instance id.
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(java.lang.String instanceId)
                                                              throws InstanceNotFoundException
Obtain the process variables for the given instance.

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

getVariableDefinitions

java.util.Map<java.lang.String,java.lang.Object> getVariableDefinitions(java.lang.String processId,
                                                                        java.lang.String activityId)
                                                                        throws ProcessNotFoundException,
                                                                               ActivityNotFoundException
Obtain variable definitions (including global process and local activity variables)for the given process and activity.

Parameters:
processId - the process Id.
activityId - the activity id.
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 id.
ActivityNotFoundException - if no activity record is found with the given activity id.
BonitaInternalException - if an other exception occurs.

getVariableDefinitions

java.util.Map<java.lang.String,java.lang.Object> getVariableDefinitions(java.lang.String processId)
                                                                        throws ProcessNotFoundException
Obtain the variable definitions of the process for the given process.

Parameters:
processId - 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 record is found with the given process id.
BonitaInternalException - if an other exception occurs.