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(java.lang.String businessKey)Set the businessKey of process instanceProcessInstanceBuildermessageName(java.lang.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(java.lang.String processInstanceName)Set the name of process instanceProcessInstanceBuilderprocessDefinitionId(java.lang.String processDefinitionId)Set the id of the process definitionProcessInstanceBuilderprocessDefinitionKey(java.lang.String processDefinitionKey)Set the key of the process definition, latest version of the process definition with the given key.ProcessInstancestart()Start the process instanceProcessInstanceBuildertenantId(java.lang.String tenantId)Set the tenantId of process instanceProcessInstanceBuildertransientVariable(java.lang.String variableName, java.lang.Object value)Adds a transient variable to the process instanceProcessInstanceBuildertransientVariables(java.util.Map<java.lang.String,java.lang.Object> transientVariables)Sets the transient variablesProcessInstanceBuildervariable(java.lang.String variableName, java.lang.Object value)Adds a variable to the process instanceProcessInstanceBuildervariables(java.util.Map<java.lang.String,java.lang.Object> variables)Sets the process variables
-
-
-
Method Detail
-
processDefinitionId
ProcessInstanceBuilder processDefinitionId(java.lang.String processDefinitionId)
Set the id of the process definition
-
processDefinitionKey
ProcessInstanceBuilder processDefinitionKey(java.lang.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(java.lang.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(java.lang.String processInstanceName)
Set the name of process instance
-
businessKey
ProcessInstanceBuilder businessKey(java.lang.String businessKey)
Set the businessKey of process instance
-
tenantId
ProcessInstanceBuilder tenantId(java.lang.String tenantId)
Set the tenantId of process instance
-
variables
ProcessInstanceBuilder variables(java.util.Map<java.lang.String,java.lang.Object> variables)
Sets the process variables
-
variable
ProcessInstanceBuilder variable(java.lang.String variableName, java.lang.Object value)
Adds a variable to the process instance
-
transientVariables
ProcessInstanceBuilder transientVariables(java.util.Map<java.lang.String,java.lang.Object> transientVariables)
Sets the transient variables
-
transientVariable
ProcessInstanceBuilder transientVariable(java.lang.String variableName, java.lang.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
-
-