Package org.activiti.engine.runtime
Interface ProcessInstanceBuilder
- All Known Implementing Classes:
ProcessInstanceBuilderImpl
Helper for starting new ProcessInstance.
An instance can be obtained through
RuntimeService.createProcessInstanceBuilder().
processDefinitionId or processDefinitionKey should be set before calling start() to start a process instance.-
Method Summary
Modifier and TypeMethodDescriptionbusinessKey(String businessKey) Set the businessKey of process instancecreate()Create the process instancelinkedProcessInstanceId(String linkedProcessInstanceId) Sets the linked process Instance IDlinkedProcessInstanceType(String linkedProcessInstanceType) Sets the root process Instance typemessageName(String messageName) Set the message name that needs to be used to look up the process definition that needs to be used to start the process instance.Set the name of process instanceprocessDefinitionId(String processDefinitionId) Set the id of the process definitionprocessDefinitionKey(String processDefinitionKey) Set the key of the process definition, latest version of the process definition with the given key.start()Start the process instanceSet the tenantId of process instancetransientVariable(String variableName, Object value) Adds a transient variable to the process instancetransientVariables(Map<String, Object> transientVariables) Sets the transient variablesAdds a variable to the process instanceSets the process variables
-
Method Details
-
processDefinitionId
Set the id of the process definition -
processDefinitionKey
Set the key of the process definition, latest version of the process definition with the given key. If processDefinitionId was set this will be ignored -
messageName
Set the message name that needs to be used to look up the process definition that needs to be used to start the process instance. -
name
Set the name of process instance -
businessKey
Set the businessKey of process instance -
tenantId
Set the tenantId of process instance -
variables
Sets the process variables -
variable
Adds a variable to the process instance -
transientVariables
Sets the transient variables -
transientVariable
Adds a transient variable to the process instance -
linkedProcessInstanceId
Sets the linked process Instance ID -
linkedProcessInstanceType
Sets the root process Instance type -
start
ProcessInstance start()Start the process instance- Throws:
ActivitiIllegalArgumentException- if processDefinitionKey and processDefinitionId are nullActivitiObjectNotFoundException- when no process definition is deployed with the given processDefinitionKey or processDefinitionId
-
create
ProcessInstance create()Create the process instance- Throws:
ActivitiIllegalArgumentException- if processDefinitionKey and processDefinitionId are nullActivitiObjectNotFoundException- when no process definition is deployed with the given processDefinitionKey or processDefinitionId
-