Package org.camunda.bpm.engine.runtime
Interface ProcessInstantiationBuilder
-
- All Superinterfaces:
ActivityInstantiationBuilder<ProcessInstantiationBuilder>
,InstantiationBuilder<ProcessInstantiationBuilder>
- All Known Implementing Classes:
ProcessInstantiationBuilderImpl
public interface ProcessInstantiationBuilder extends ActivityInstantiationBuilder<ProcessInstantiationBuilder>, InstantiationBuilder<ProcessInstantiationBuilder>
- Author:
- Thorben Lindhauer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ProcessInstantiationBuilder
businessKey(java.lang.String businessKey)
Set the business key for the process instanceProcessInstantiationBuilder
caseInstanceId(java.lang.String caseInstanceId)
Associate a case instance with the process instanceProcessInstance
execute()
Start the process instance.ProcessInstance
execute(boolean skipCustomListeners, boolean skipIoMappings)
Start the process instance.ProcessInstanceWithVariables
executeWithVariablesInReturn()
Start the process instance.ProcessInstanceWithVariables
executeWithVariablesInReturn(boolean skipCustomListeners, boolean skipIoMappings)
Start the process instance.ProcessInstantiationBuilder
processDefinitionTenantId(java.lang.String tenantId)
Specify the id of the tenant the process definition belongs to.ProcessInstantiationBuilder
processDefinitionWithoutTenantId()
Specify that the process definition belongs to no tenant.-
Methods inherited from interface org.camunda.bpm.engine.runtime.ActivityInstantiationBuilder
setVariable, setVariableLocal, setVariables, setVariablesLocal
-
Methods inherited from interface org.camunda.bpm.engine.runtime.InstantiationBuilder
startAfterActivity, startBeforeActivity, startTransition
-
-
-
-
Method Detail
-
processDefinitionTenantId
ProcessInstantiationBuilder processDefinitionTenantId(java.lang.String tenantId)
Specify the id of the tenant the process definition belongs to. Can only be used when the definition is referenced bykey
and not byid
.
-
processDefinitionWithoutTenantId
ProcessInstantiationBuilder processDefinitionWithoutTenantId()
Specify that the process definition belongs to no tenant. Can only be used when the definition is referenced bykey
and not byid
.
-
businessKey
ProcessInstantiationBuilder businessKey(java.lang.String businessKey)
Set the business key for the process instance
-
caseInstanceId
ProcessInstantiationBuilder caseInstanceId(java.lang.String caseInstanceId)
Associate a case instance with the process instance
-
execute
ProcessInstance execute()
Start the process instance.- Returns:
- the newly created process instance
- Throws:
AuthorizationException
- if the user has noPermissions.CREATE
permission onResources.PROCESS_INSTANCE
and noPermissions.CREATE_INSTANCE
permission onResources.PROCESS_DEFINITION
.- See Also:
.
-
execute
ProcessInstance execute(boolean skipCustomListeners, boolean skipIoMappings)
Start the process instance.- Parameters:
skipCustomListeners
- specifies whether custom listeners (task and execution) should be invoked when executing the instructions. Only supported for instructions.skipIoMappings
- specifies whether input/output mappings for tasks should be invoked throughout the transaction when executing the instructions. Only supported for instructions.- Returns:
- the newly created process instance
- See Also:
.
-
executeWithVariablesInReturn
ProcessInstanceWithVariables executeWithVariablesInReturn()
Start the process instance. If no instantiation instructions are set then the instance start at the default start activity. Otherwise, all instructions are executed in the order they are submitted. Custom execution and task listeners, as well as task input output mappings are triggered.- Returns:
- the newly created process instance with the latest variables
- Throws:
AuthorizationException
- if the user has noPermissions.CREATE
permission onResources.PROCESS_INSTANCE
and noPermissions.CREATE_INSTANCE
permission onResources.PROCESS_DEFINITION
.
-
executeWithVariablesInReturn
ProcessInstanceWithVariables executeWithVariablesInReturn(boolean skipCustomListeners, boolean skipIoMappings)
Start the process instance. If no instantiation instructions are set then the instance start at the default start activity. Otherwise, all instructions are executed in the order they are submitted.- Parameters:
skipCustomListeners
- specifies whether custom listeners (task and execution) should be invoked when executing the instructions. Only supported for instructions.skipIoMappings
- specifies whether input/output mappings for tasks should be invoked throughout the transaction when executing the instructions. Only supported for instructions.- Returns:
- the newly created process instance with the latest variables
- Throws:
AuthorizationException
- if the user has noPermissions.CREATE
permission onResources.PROCESS_INSTANCE
and noPermissions.CREATE_INSTANCE
permission onResources.PROCESS_DEFINITION
.ProcessEngineException
- ifskipCustomListeners
orskipIoMappings
is set to true but no instructions are submitted. Both options are not supported when the instance starts at the default start activity. Useexecute()
instead.
-
-