Package org.activiti.engine.runtime
Interface ProcessInstanceBuilder
-
- All Known Implementing Classes:
ProcessInstanceBuilderImpl
@Internal public interface ProcessInstanceBuilder
Helper for starting new ProcessInstance. An instance can be obtained throughRuntimeService.createProcessInstanceBuilder(). processDefinitionId or processDefinitionKey should be set before callingstart()to start a process instance.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ProcessInstanceBuilderbusinessKey(String businessKey)Set the businessKey of process instanceProcessInstancecreate()Create the process instanceProcessInstanceBuildermessageName(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.ProcessInstanceBuildername(String processInstanceName)Set the name of process instanceProcessInstanceBuilderprocessDefinitionId(String processDefinitionId)Set the id of the process definitionProcessInstanceBuilderprocessDefinitionKey(String processDefinitionKey)Set the key of the process definition, latest version of the process definition with the given key.ProcessInstancestart()Start the process instanceProcessInstanceBuildertenantId(String tenantId)Set the tenantId of process instanceProcessInstanceBuildertransientVariable(String variableName, Object value)Adds a transient variable to the process instanceProcessInstanceBuildertransientVariables(Map<String,Object> transientVariables)Sets the transient variablesProcessInstanceBuildervariable(String variableName, Object value)Adds a variable to the process instanceProcessInstanceBuildervariables(Map<String,Object> variables)Sets the process variables
-
-
-
Method Detail
-
processDefinitionId
ProcessInstanceBuilder processDefinitionId(String processDefinitionId)
Set the id of the process definition
-
processDefinitionKey
ProcessInstanceBuilder processDefinitionKey(String 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
ProcessInstanceBuilder messageName(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.
-
name
ProcessInstanceBuilder name(String processInstanceName)
Set the name of process instance
-
businessKey
ProcessInstanceBuilder businessKey(String businessKey)
Set the businessKey of process instance
-
tenantId
ProcessInstanceBuilder tenantId(String tenantId)
Set the tenantId of process instance
-
variables
ProcessInstanceBuilder variables(Map<String,Object> variables)
Sets the process variables
-
variable
ProcessInstanceBuilder variable(String variableName, Object value)
Adds a variable to the process instance
-
transientVariables
ProcessInstanceBuilder transientVariables(Map<String,Object> transientVariables)
Sets the transient variables
-
transientVariable
ProcessInstanceBuilder transientVariable(String variableName, Object value)
Adds a transient variable to the process instance
-
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
-
-