|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface RuntimeService
Service which provides access to Deployments,
ProcessDefinitions and ProcessInstances.
| Method Summary | |
|---|---|
void |
activateProcessInstanceById(String processInstanceId)
Activates the process instance with the given id. |
ExecutionQuery |
createExecutionQuery()
Creates a new ExecutionQuery instance,
that can be used to query the executions and process instances. |
ProcessInstanceQuery |
createProcessInstanceQuery()
Creates a new ProcessInstanceQuery instance, that can be used
to query process instances. |
void |
deleteProcessInstance(String processInstanceId,
String deleteReason)
Delete an existing runtime process instance. |
List<String> |
getActiveActivityIds(String executionId)
Finds the activity ids for all executions that are waiting in activities. |
Object |
getVariable(String executionId,
String variableName)
The variable value. |
Object |
getVariableLocal(String executionId,
String variableName)
The variable value for an execution. |
Map<String,Object> |
getVariables(String executionId)
All variables visible from the given execution scope (including parent scopes). |
Map<String,Object> |
getVariables(String executionId,
Collection<String> variableNames)
The variable values for all given variableNames, takes all variables into account which are visible from the given execution scope (including parent scopes). |
Map<String,Object> |
getVariablesLocal(String executionId)
All variable values that are defined in the execution scope, without taking outer scopes into account. |
Map<String,Object> |
getVariablesLocal(String executionId,
Collection<String> variableNames)
The variable values for the given variableNames only taking the given execution scope into account, not looking in outer scopes. |
void |
setVariable(String executionId,
String variableName,
Object value)
Update or create a variable for an execution. |
void |
setVariableLocal(String executionId,
String variableName,
Object value)
Update or create a variable for an execution (not considering parent scopes). |
void |
setVariables(String executionId,
Map<String,? extends Object> variables)
Update or create given variables for an execution (including parent scopes). |
void |
setVariablesLocal(String executionId,
Map<String,? extends Object> variables)
Update or create given variables for an execution (not considering parent scopes). |
void |
signal(String executionId)
Sends an external trigger to an activity instance that is waiting inside the given execution. |
void |
signal(String executionId,
Map<String,Object> processVariables)
Sends an external trigger to an activity instance that is waiting inside the given execution. |
void |
signalEventReceived(String signalName)
Notifies the process engine that a signal event of name 'signalName' has been received. |
void |
signalEventReceived(String signalName,
Map<String,Object> processVariables)
Notifies the process engine that a signal event of name 'signalName' has been received. |
void |
signalEventReceived(String signalName,
String executionId)
Notifies the process engine that a signal event of name 'signalName' has been received. |
void |
signalEventReceived(String signalName,
String executionId,
Map<String,Object> processVariables)
Notifies the process engine that a signal event of name 'signalName' has been received. |
ProcessInstance |
startProcessInstanceById(String processDefinitionId)
Starts a new process instance in the exactly specified version of the process definition with the given id. |
ProcessInstance |
startProcessInstanceById(String processDefinitionId,
Map<String,Object> variables)
Starts a new process instance in the exactly specified version of the process definition with the given id. |
ProcessInstance |
startProcessInstanceById(String processDefinitionId,
String businessKey)
Starts a new process instance in the exactly specified version of the process definition with the given id. |
ProcessInstance |
startProcessInstanceById(String processDefinitionId,
String businessKey,
Map<String,Object> variables)
Starts a new process instance in the exactly specified version of the process definition with the given id. |
ProcessInstance |
startProcessInstanceByKey(String processDefinitionKey)
Starts a new process instance in the latest version of the process definition with the given key. |
ProcessInstance |
startProcessInstanceByKey(String processDefinitionKey,
Map<String,Object> variables)
Starts a new process instance in the latest version of the process definition with the given key |
ProcessInstance |
startProcessInstanceByKey(String processDefinitionKey,
String businessKey)
Starts a new process instance in the latest version of the process definition with the given key. |
ProcessInstance |
startProcessInstanceByKey(String processDefinitionKey,
String businessKey,
Map<String,Object> variables)
Starts a new process instance in the latest version of the process definition with the given key. |
ProcessInstance |
startProcessInstanceByMessage(String messageName)
Signals the process engine that a message is received and starts a new ProcessInstance. |
ProcessInstance |
startProcessInstanceByMessage(String messageName,
Map<String,Object> processVariables)
Signals the process engine that a message is received and starts a new ProcessInstance. |
ProcessInstance |
startProcessInstanceByMessage(String messageName,
String businessKey,
Map<String,Object> processVariables)
Signals the process engine that a message is received and starts a new ProcessInstance. |
void |
suspendProcessInstanceById(String processInstanceId)
Suspends the process instance with the given id. |
| Method Detail |
|---|
ProcessInstance startProcessInstanceByKey(String processDefinitionKey)
processDefinitionKey - key of process definition, cannot be null.
ActivitiException - when no process definition is deployed with the given key.
ProcessInstance startProcessInstanceByKey(String processDefinitionKey,
String businessKey)
ProcessInstanceQuery.processInstanceBusinessKey(String). Providing such a business
key is definitely a best practice.
Note that a business key MUST be unique for the given process definition.
Process instance from different process definition are allowed to have the
same business key.
The combination of processdefinitionKey-businessKey must be unique.
processDefinitionKey - key of process definition, cannot be null.businessKey - a key that uniquely identifies the process instance in the context
or the given process definition.
ActivitiException - when no process definition is deployed with the given key.
ProcessInstance startProcessInstanceByKey(String processDefinitionKey,
Map<String,Object> variables)
processDefinitionKey - key of process definition, cannot be null.variables - the variables to pass, can be null.
ActivitiException - when no process definition is deployed with the given key.
ProcessInstance startProcessInstanceByKey(String processDefinitionKey,
String businessKey,
Map<String,Object> variables)
ProcessInstanceQuery.processInstanceBusinessKey(String). Providing such a business
key is definitely a best practice.
Note that a business key MUST be unique for the given process definition.
Process instance from different process definition are allowed to have the
same business key.
The combination of processdefinitionKey-businessKey must be unique.
processDefinitionKey - key of process definition, cannot be null.variables - the variables to pass, can be null.businessKey - a key that uniquely identifies the process instance in the context or the
given process definition.
ActivitiException - when no process definition is deployed with the given key.ProcessInstance startProcessInstanceById(String processDefinitionId)
processDefinitionId - the id of the process definition, cannot be null.
ActivitiException - when no process definition is deployed with the given key.
ProcessInstance startProcessInstanceById(String processDefinitionId,
String businessKey)
ProcessInstanceQuery.processInstanceBusinessKey(String). Providing such a business
key is definitely a best practice.
Note that a business key MUST be unique for the given process definition.
Process instance from different process definition are allowed to have the
same business key.
processDefinitionId - the id of the process definition, cannot be null.businessKey - a key that uniquely identifies the process instance in the context or the
given process definition.
ActivitiException - when no process definition is deployed with the given key.
ProcessInstance startProcessInstanceById(String processDefinitionId,
Map<String,Object> variables)
processDefinitionId - the id of the process definition, cannot be null.variables - variables to be passed, can be null
ActivitiException - when no process definition is deployed with the given key.
ProcessInstance startProcessInstanceById(String processDefinitionId,
String businessKey,
Map<String,Object> variables)
ProcessInstanceQuery.processInstanceBusinessKey(String). Providing such a business
key is definitely a best practice.
Note that a business key MUST be unique for the given process definition.
Process instance from different process definition are allowed to have the
same business key.
processDefinitionId - the id of the process definition, cannot be null.variables - variables to be passed, can be null
ActivitiException - when no process definition is deployed with the given key.ProcessInstance startProcessInstanceByMessage(String messageName)
Signals the process engine that a message is received and starts a new
ProcessInstance.
Calling this method can have two different outcomes:
ActivitiException
is thrown
messageName - the 'name' of the message as specified as an attribute on the
bpmn20 <message name="messageName" /> element.
ProcessInstance object representing the started process instance
ActivitiExeception - if no subscription to a message with the given name exists
ProcessInstance startProcessInstanceByMessage(String messageName,
Map<String,Object> processVariables)
Signals the process engine that a message is received and starts a new
ProcessInstance.
startProcessInstanceByMessage(String). In addition, this method allows
specifying a the payload of the message as a map of process variables.
messageName - the 'name' of the message as specified as an attribute on the
bpmn20 <message name="messageName" /> element.processVariables - the 'payload' of the message. The variables are added as processes
variables to the started process instance.
ProcessInstance object representing the started process instance
ActivitiExeception - if no subscription to a message with the given name exists
ProcessInstance startProcessInstanceByMessage(String messageName,
String businessKey,
Map<String,Object> processVariables)
Signals the process engine that a message is received and starts a new
ProcessInstance.
startProcessInstanceByMessage(String, Map). In addition, this method allows
specifying a business key.
messageName - the 'name' of the message as specified as an attribute on the
bpmn20 <message name="messageName" /> element.businessKey - the business key which is added to the started process instanceprocessVariables - the 'payload' of the message. The variables are added as processes
variables to the started process instance.
ProcessInstance object representing the started process instance
ActivitiExeception - if no subscription to a message with the given name exists
void deleteProcessInstance(String processInstanceId,
String deleteReason)
processInstanceId - id of process instance to delete, cannot be null.deleteReason - reason for deleting, can be null.
ActivitiException - when no process instance is found with the given id.List<String> getActiveActivityIds(String executionId)
executionId - id of the execution, cannot be null.
ActivitiException - when no execution exists with the given executionId.void signal(String executionId)
executionId - id of execution to signal, cannot be null.
ActivitiException - when no execution is found for the given executionId.
void signal(String executionId,
Map<String,Object> processVariables)
executionId - id of execution to signal, cannot be null.processVariables - a map of process variables
ActivitiException - when no execution is found for the given executionId.Map<String,Object> getVariables(String executionId)
executionId - id of execution, cannot be null.
ActivitiException - when no execution is found for the given executionId.Map<String,Object> getVariablesLocal(String executionId)
getVariablesLocal(String, Collection)
for better performance.
executionId - id of execution, cannot be null.
ActivitiException - when no execution is found for the given executionId.
Map<String,Object> getVariables(String executionId,
Collection<String> variableNames)
executionId - id of execution, cannot be null.variableNames - the collection of variable names that should be retrieved.
ActivitiException - when no execution is found for the given executionId.
Map<String,Object> getVariablesLocal(String executionId,
Collection<String> variableNames)
executionId - id of execution, cannot be null.variableNames - the collection of variable names that should be retrieved.
ActivitiException - when no execution is found for the given executionId.
Object getVariable(String executionId,
String variableName)
executionId - id of execution, cannot be null.variableName - name of variable, cannot be null.
ActivitiException - when no execution is found for the given executionId.
Object getVariableLocal(String executionId,
String variableName)
void setVariable(String executionId,
String variableName,
Object value)
executionId - id of execution to set variable in, cannot be null.variableName - name of variable to set, cannot be null.value - value to set. When null is passed, the variable is not removed,
only it's value will be set to null.
ActivitiException - when no execution is found for the given executionId.
void setVariableLocal(String executionId,
String variableName,
Object value)
executionId - id of execution to set variable in, cannot be null.variableName - name of variable to set, cannot be null.value - value to set. When null is passed, the variable is not removed,
only it's value will be set to null.
ActivitiException - when no execution is found for the given executionId.
void setVariables(String executionId,
Map<String,? extends Object> variables)
executionId - id of the execution, cannot be null.variables - map containing name (key) and value of variables, can be null.
ActivitiException - when no execution is found for the given executionId.
void setVariablesLocal(String executionId,
Map<String,? extends Object> variables)
executionId - id of the execution, cannot be null.variables - map containing name (key) and value of variables, can be null.
ActivitiException - when no execution is found for the given executionId.ExecutionQuery createExecutionQuery()
ExecutionQuery instance,
that can be used to query the executions and process instances.
ProcessInstanceQuery createProcessInstanceQuery()
ProcessInstanceQuery instance, that can be used
to query process instances.
void suspendProcessInstanceById(String processInstanceId)
ActivitiException - if no such processInstance can be found or if the process instance is already in state suspended.void activateProcessInstanceById(String processInstanceId)
ActivitiException - if no such processInstance can be found or if the process instance is already in state active.void signalEventReceived(String signalName)
signalName - the name of the signal event
void signalEventReceived(String signalName,
Map<String,Object> processVariables)
signalName - the name of the signal eventprocessVariables - a map of variables added to the execution(s)
void signalEventReceived(String signalName,
String executionId)
signalName - the name of the signal eventexecutionId - the id of the execution to deliver the signal to
ActivitiException - if no such execution exists or if the execution
has not subscribed to the signal
void signalEventReceived(String signalName,
String executionId,
Map<String,Object> processVariables)
signalName - the name of the signal eventexecutionId - the id of the execution to deliver the signal toprocessVariables - a map of variables added to the execution(s)
ActivitiException - if no such execution exists or if the execution
has not subscribed to the signal
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||