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
Modifier and TypeMethodDescriptionbusinessKey
(String businessKey) Set the business key for the process instancecaseInstanceId
(String caseInstanceId) Associate a case instance with the process instanceexecute()
Start the process instance.execute
(boolean skipCustomListeners, boolean skipIoMappings) Start the process instance.Start the process instance.executeWithVariablesInReturn
(boolean skipCustomListeners, boolean skipIoMappings) Start the process instance.processDefinitionTenantId
(String tenantId) Specify the id of the tenant the process definition belongs to.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 Details
-
processDefinitionTenantId
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
Set the business key for the process instance -
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:
-
#executeWithVariablesInReturn().
-
execute
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(boolean, boolean).
-
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.
-