|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RuntimeAPI
To manage process, process instance and task life cycle operations as well as to set/add/update variables within activity or instance. Default states for process, processes instances, tasks (aka manual activities) are:
States for process
: UNDEPLOYED, DEPLOYEDStates for process instance
: INITIAL, STARTED, FINISHEDStates for task
: INITIAL, READY, EXECUTING, SUSPENDED, FINISHED
TxHook
Method Summary | |
---|---|
void |
assignTask(org.ow2.bonita.facade.uuid.TaskUUID taskUUID)
Launches the execution of both roleMapper and performerAssignment for the given task. |
void |
assignTask(org.ow2.bonita.facade.uuid.TaskUUID taskUUID,
java.util.Set<java.lang.String> candidates)
Forces to replace the candidates set of the given task by the given candidates set. |
void |
assignTask(org.ow2.bonita.facade.uuid.TaskUUID taskUUID,
java.lang.String actorId)
Forces to assign the given task to the given actor id. |
void |
cancelProcessInstance(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID)
Cancel the process instance with the given instance UUID. |
void |
deleteAllProcessInstances(org.ow2.bonita.facade.uuid.ProcessDefinitionUUID processUUID)
Deletes all runtime objects for all instances created with the given process UUID and delete also all there recorded data from the journal. |
void |
deleteProcessInstance(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID)
Deletes all runtime objects for the process instance with the given instance UUID and delete also recorded data from the journal. |
void |
finishTask(org.ow2.bonita.facade.uuid.TaskUUID taskUUID,
boolean taskAssign)
Finishes the task. |
org.ow2.bonita.facade.uuid.ProcessInstanceUUID |
instantiateProcess(org.ow2.bonita.facade.uuid.ProcessDefinitionUUID processUUID)
Creates an instance of the specified process and start the execution. |
org.ow2.bonita.facade.uuid.ProcessInstanceUUID |
instantiateProcess(org.ow2.bonita.facade.uuid.ProcessDefinitionUUID processUUID,
java.util.Map<java.lang.String,java.lang.Object> variables)
Creates an instance of the specified process with the added variable map and start the execution. |
void |
resumeTask(org.ow2.bonita.facade.uuid.TaskUUID taskUUID,
boolean taskAssign)
Resumes the task if the task has SUSPENDED state. |
void |
setActivityInstanceVariable(org.ow2.bonita.facade.uuid.ActivityInstanceUUID activityUUID,
java.lang.String variableId,
java.lang.Object variableValue)
Searches for variable with the given activity UUID and variable Id. |
void |
setProcessInstanceVariable(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID,
java.lang.String variableId,
java.lang.Object variableValue)
Searches for variable with id variableId within the given process instance with ProcessInstanceUUID instanceUUID. |
void |
setVariable(org.ow2.bonita.facade.uuid.ActivityInstanceUUID activityUUID,
java.lang.String variableId,
java.lang.Object variableValue)
Searches for variable with id variableId within the given activity instance with the given UUID. |
void |
startTask(org.ow2.bonita.facade.uuid.TaskUUID taskUUID,
boolean assignTask)
Starts the task. |
void |
suspendTask(org.ow2.bonita.facade.uuid.TaskUUID taskUUID,
boolean assignTask)
Suspends the task if the task has EXECUTING state. |
void |
unassignTask(org.ow2.bonita.facade.uuid.TaskUUID taskUUID)
If this task had a userId set, set it to null. |
Method Detail |
---|
org.ow2.bonita.facade.uuid.ProcessInstanceUUID instantiateProcess(org.ow2.bonita.facade.uuid.ProcessDefinitionUUID processUUID) throws ProcessNotFoundException
processUUID
- the process UUID.
ProcessNotFoundException
- if the process has not been found.
BonitaInternalException
- if an exception occurs.org.ow2.bonita.facade.uuid.ProcessInstanceUUID instantiateProcess(org.ow2.bonita.facade.uuid.ProcessDefinitionUUID processUUID, java.util.Map<java.lang.String,java.lang.Object> variables) throws ProcessNotFoundException, VariableNotFoundException
processUUID
- the process UUID.variables
- variables added to the variables already set within the process definition
the variable object can be: an Enumeration
,
a plain String
, a Boolean
, a Date
, a Long
or a Double
.
ProcessNotFoundException
- if the process has not been found.
BonitaInternalException
- if an exception occurs.
VariableNotFoundException
void startTask(org.ow2.bonita.facade.uuid.TaskUUID taskUUID, boolean assignTask) throws TaskNotFoundException, IllegalTaskStateException
taskUUID
- the task UUID.assignTask
- true to assign the task to the logged user; false to don't assign the task.
TaskNotFoundException
- if the task has not been found.
IllegalTaskStateException
- if the state of the task has not READY state.
BonitaInternalException
- if an exception occurs.void finishTask(org.ow2.bonita.facade.uuid.TaskUUID taskUUID, boolean taskAssign) throws TaskNotFoundException, IllegalTaskStateException
taskUUID
- the task UUID.
TaskNotFoundException
- if the task has not been found.
IllegalTaskStateException
- if the state of the task has not EXECUTING state.
BonitaInternalException
- if an exception occurs.void suspendTask(org.ow2.bonita.facade.uuid.TaskUUID taskUUID, boolean assignTask) throws TaskNotFoundException, IllegalTaskStateException
taskUUID
- the task UUID.
TaskNotFoundException
- if the task has not been found.
IllegalTaskStateException
- if the state of the task has not either READY or EXECUTING state.
BonitaInternalException
- if an exception occurs.void resumeTask(org.ow2.bonita.facade.uuid.TaskUUID taskUUID, boolean taskAssign) throws TaskNotFoundException, IllegalTaskStateException
taskUUID
- the task UUID.
TaskNotFoundException
- if the task has not been found.
IllegalTaskStateException
- if the state of the task has not SUSPENDED state.
BonitaInternalException
- if an other exception occurs.void assignTask(org.ow2.bonita.facade.uuid.TaskUUID taskUUID) throws TaskNotFoundException
taskUUID
- the task UUID.
TaskNotFoundException
- if the task has not been found.
BonitaInternalException
- if an other exception occurs.void assignTask(org.ow2.bonita.facade.uuid.TaskUUID taskUUID, java.lang.String actorId) throws TaskNotFoundException
taskUUID
- the task UUID.actorId
- the actor id.
TaskNotFoundException
- if the task has not been found.void assignTask(org.ow2.bonita.facade.uuid.TaskUUID taskUUID, java.util.Set<java.lang.String> candidates) throws TaskNotFoundException
taskUUID
- the task UUID.candidates
- the set of candidate actors.
TaskNotFoundException
- if the task has not been found.void unassignTask(org.ow2.bonita.facade.uuid.TaskUUID taskUUID) throws TaskNotFoundException
taskUUID
- the task UUID.candidates
- the set of candidate actors.
TaskNotFoundException
- if the task has not been found.void setProcessInstanceVariable(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID, java.lang.String variableId, java.lang.Object variableValue) throws InstanceNotFoundException, VariableNotFoundException
Enumeration
class for variableValue.
instanceUUID
- the instance UUID.variableId
- the variable id.variableValue
- the variable value (can be: an Enumeration
,
a plain String
, a Boolean
, a Date
, a Long
or a Double
).
InstanceNotFoundException
- if the instance has not been found.
VariableNotFoundException
- if the variable has not been found.
BonitaInternalException
- if an exception occurs.void cancelProcessInstance(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID) throws InstanceNotFoundException, UncancellableInstanceException
instanceUUID
- the instance UUID.
InstanceNotFoundException
- if if the instance has not been found.
BonitaInternalException
- if an exception occurs.
UncancellableInstanceException
void setVariable(org.ow2.bonita.facade.uuid.ActivityInstanceUUID activityUUID, java.lang.String variableId, java.lang.Object variableValue) throws ActivityNotFoundException, VariableNotFoundException
Searches for variable with id variableId within the given activity instance
with the given UUID.
If the variable is found within the activity, the given value is set.
If the variable is not found within the activity the search is performed
within the process instance.
If the variable is found within the process instance, the given value is set.
Enumeration
class for variableValue.
activityUUID
- the activity UUID.variableId
- the variable id.variableValue
- the variable value (can be: an Enumeration
,
a plain String
, a Boolean
, a Date
, a Long
or a Double
).
VariableNotFoundException
- if the variable has not been found.
BonitaInternalException
- if an exception occurs.
ActivityNotFoundException
void setActivityInstanceVariable(org.ow2.bonita.facade.uuid.ActivityInstanceUUID activityUUID, java.lang.String variableId, java.lang.Object variableValue) throws ActivityNotFoundException, VariableNotFoundException
Enumeration
class for variableValue.
activityUUID
- the activity UUID.variableId
- the variable id.variableValue
- the variable value(can be: an Enumeration
,
a plain String
, a Boolean
, a Date
, a Long
or a Double
).
ActivityNotFoundException
- if the activity has not been found.
VariableNotFoundException
- if the variable has not been found.
BonitaInternalException
- if an exception occurs.void deleteProcessInstance(org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID) throws InstanceNotFoundException, UndeletableInstanceException
instanceUUID
- the instance UUID.
InstanceNotFoundException
- if if the instance has not been found.
BonitaInternalException
- if an exception occurs.
UndeletableInstanceException
void deleteAllProcessInstances(org.ow2.bonita.facade.uuid.ProcessDefinitionUUID processUUID) throws ProcessNotFoundException, UndeletableInstanceException
processUUID
- the process UUID.
ProcessNotFoundException
- if the process with the given UUID does not exists.
BonitaInternalException
- if an exception occurs.
UndeletableInstanceException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |