Package org.flowable.engine.impl.runtime
Class ProcessInstanceBuilderImpl
java.lang.Object
org.flowable.engine.impl.runtime.ProcessInstanceBuilderImpl
- All Implemented Interfaces:
ProcessInstanceBuilder
- Author:
- Bassam Al-Sarori, Joram Barrez
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected String
protected String
protected String
protected String
protected FormInfo
protected String
protected boolean
protected String
protected String
protected String
protected String
protected String
protected String
protected String
protected String
protected String
protected String
protected String
protected RuntimeServiceImpl
protected String
protected String
protected String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSet the assignee of the process instance to be created to the given user id.businessKey
(String businessKey) Set the businessKey of process instancebusinessStatus
(String businessStatus) Set the businessStatus of process instancecallbackId
(String callbackId) Sets the callback identifier of the process instance.callbackType
(String callbackType) Sets the callback type of the process instance.Use default tenant as a fallback in the case when process definition was not found by key and tenant idStart the process instance with the given form variables from the givenformInfo
.boolean
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.Set the name of process instanceAllows to set an outcome for a start form.overrideProcessDefinitionTenantId
(String tenantId) Indicator to override the tenant id of the process definition with the provided value.Set the owner of the process instance to be created to the given user id.predefineProcessInstanceId
(String processInstanceId) When starting a process instance from the CMMN engine process task, the process instance id needs to be known beforehand to store entity links and callback references before the process instance is started.processDefinitionId
(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.processDefinitionParentDeploymentId
(String parentDeploymentId) When looking up for a process definition by key it would first lookup for a process definition within the given parent deployment.referenceId
(String referenceId) Sets the reference identifier of the process instance.referenceType
(String referenceType) Sets the reference type of the process instance.stageInstanceId
(String stageInstanceId) Set the optional instance id of the stage this process instance belongs to, if it runs in the context of a CMMN case.start()
Start the process instanceStart the process instance asynchronouslystartEventId
(String startEventId) Set the start event in case of an event registry start event that is triggered to start the process instance.startFormVariable
(String variableName, Object value) Adds one variable from a start form to the process instance.startFormVariables
(Map<String, Object> startFormVariables) Adds variables from a start form to the process instance.Set the tenantId of to lookup the process definitiontransientVariable
(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
-
Field Details
-
runtimeService
-
processDefinitionId
-
processDefinitionKey
-
processDefinitionParentDeploymentId
-
messageName
-
startEventId
-
processInstanceName
-
businessKey
-
businessStatus
-
callbackId
-
callbackType
-
referenceId
-
referenceType
-
stageInstanceId
-
tenantId
-
ownerId
-
assigneeId
-
overrideDefinitionTenantId
-
predefinedProcessInstanceId
-
variables
-
transientVariables
-
startFormVariables
-
outcome
-
extraFormVariables
-
extraFormInfo
-
extraFormOutcome
-
fallbackToDefaultTenant
protected boolean fallbackToDefaultTenant
-
-
Constructor Details
-
ProcessInstanceBuilderImpl
-
-
Method Details
-
processDefinitionId
Description copied from interface:ProcessInstanceBuilder
Set the id of the process definition- Specified by:
processDefinitionId
in interfaceProcessInstanceBuilder
-
processDefinitionParentDeploymentId
Description copied from interface:ProcessInstanceBuilder
When looking up for a process definition by key it would first lookup for a process definition within the given parent deployment. Then it would fallback to the latest process definition with the given key.This is typically needed when the ProcessInstanceBuilder is called for example from the case engine to start a process instance and it needs to look up the process definition in the same deployment as the case.
- Specified by:
processDefinitionParentDeploymentId
in interfaceProcessInstanceBuilder
-
processDefinitionKey
Description copied from interface:ProcessInstanceBuilder
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- Specified by:
processDefinitionKey
in interfaceProcessInstanceBuilder
-
messageName
Description copied from interface:ProcessInstanceBuilder
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.- Specified by:
messageName
in interfaceProcessInstanceBuilder
-
startEventId
Description copied from interface:ProcessInstanceBuilder
Set the start event in case of an event registry start event that is triggered to start the process instance.- Specified by:
startEventId
in interfaceProcessInstanceBuilder
-
name
Description copied from interface:ProcessInstanceBuilder
Set the name of process instance- Specified by:
name
in interfaceProcessInstanceBuilder
-
businessKey
Description copied from interface:ProcessInstanceBuilder
Set the businessKey of process instance- Specified by:
businessKey
in interfaceProcessInstanceBuilder
-
businessStatus
Description copied from interface:ProcessInstanceBuilder
Set the businessStatus of process instance- Specified by:
businessStatus
in interfaceProcessInstanceBuilder
-
callbackId
Description copied from interface:ProcessInstanceBuilder
Sets the callback identifier of the process instance.- Specified by:
callbackId
in interfaceProcessInstanceBuilder
-
callbackType
Description copied from interface:ProcessInstanceBuilder
Sets the callback type of the process instance.- Specified by:
callbackType
in interfaceProcessInstanceBuilder
-
referenceId
Description copied from interface:ProcessInstanceBuilder
Sets the reference identifier of the process instance.- Specified by:
referenceId
in interfaceProcessInstanceBuilder
-
referenceType
Description copied from interface:ProcessInstanceBuilder
Sets the reference type of the process instance.- Specified by:
referenceType
in interfaceProcessInstanceBuilder
-
stageInstanceId
Description copied from interface:ProcessInstanceBuilder
Set the optional instance id of the stage this process instance belongs to, if it runs in the context of a CMMN case.- Specified by:
stageInstanceId
in interfaceProcessInstanceBuilder
-
tenantId
Description copied from interface:ProcessInstanceBuilder
Set the tenantId of to lookup the process definition- Specified by:
tenantId
in interfaceProcessInstanceBuilder
-
overrideProcessDefinitionTenantId
Description copied from interface:ProcessInstanceBuilder
Indicator to override the tenant id of the process definition with the provided value. The tenantId to lookup the process definition should still be provided if needed.- Specified by:
overrideProcessDefinitionTenantId
in interfaceProcessInstanceBuilder
-
predefineProcessInstanceId
Description copied from interface:ProcessInstanceBuilder
When starting a process instance from the CMMN engine process task, the process instance id needs to be known beforehand to store entity links and callback references before the process instance is started.- Specified by:
predefineProcessInstanceId
in interfaceProcessInstanceBuilder
-
owner
Description copied from interface:ProcessInstanceBuilder
Set the owner of the process instance to be created to the given user id.- Specified by:
owner
in interfaceProcessInstanceBuilder
- Parameters:
userId
- the id of the user to become the owner of the process instance- Returns:
- the process instance builder for method chaining
-
assignee
Description copied from interface:ProcessInstanceBuilder
Set the assignee of the process instance to be created to the given user id.- Specified by:
assignee
in interfaceProcessInstanceBuilder
- Parameters:
userId
- the id of the user to become the owner of the process instance- Returns:
- the process instance builder for method chaining
-
variables
Description copied from interface:ProcessInstanceBuilder
Sets the process variables- Specified by:
variables
in interfaceProcessInstanceBuilder
-
variable
Description copied from interface:ProcessInstanceBuilder
Adds a variable to the process instance- Specified by:
variable
in interfaceProcessInstanceBuilder
-
transientVariables
Description copied from interface:ProcessInstanceBuilder
Sets the transient variables- Specified by:
transientVariables
in interfaceProcessInstanceBuilder
-
transientVariable
Description copied from interface:ProcessInstanceBuilder
Adds a transient variable to the process instance- Specified by:
transientVariable
in interfaceProcessInstanceBuilder
-
startFormVariables
Description copied from interface:ProcessInstanceBuilder
Adds variables from a start form to the process instance.- Specified by:
startFormVariables
in interfaceProcessInstanceBuilder
-
startFormVariable
Description copied from interface:ProcessInstanceBuilder
Adds one variable from a start form to the process instance.- Specified by:
startFormVariable
in interfaceProcessInstanceBuilder
-
outcome
Description copied from interface:ProcessInstanceBuilder
Allows to set an outcome for a start form.- Specified by:
outcome
in interfaceProcessInstanceBuilder
-
formVariables
public ProcessInstanceBuilder formVariables(Map<String, Object> formVariables, FormInfo formInfo, String formOutcome) Description copied from interface:ProcessInstanceBuilder
Start the process instance with the given form variables from the givenformInfo
. This is different thanProcessInstanceBuilder.startFormVariables(Map)
and it can be used in addition to that.- Specified by:
formVariables
in interfaceProcessInstanceBuilder
-
fallbackToDefaultTenant
Description copied from interface:ProcessInstanceBuilder
Use default tenant as a fallback in the case when process definition was not found by key and tenant id- Specified by:
fallbackToDefaultTenant
in interfaceProcessInstanceBuilder
-
start
Description copied from interface:ProcessInstanceBuilder
Start the process instance- Specified by:
start
in interfaceProcessInstanceBuilder
-
startAsync
Description copied from interface:ProcessInstanceBuilder
Start the process instance asynchronously- Specified by:
startAsync
in interfaceProcessInstanceBuilder
-
getProcessDefinitionId
-
getProcessDefinitionKey
-
getProcessDefinitionParentDeploymentId
-
getMessageName
-
getStartEventId
-
getProcessInstanceName
-
getBusinessKey
-
getBusinessStatus
-
getCallbackId
-
getCallbackType
-
getReferenceId
-
getReferenceType
-
getStageInstanceId
-
getTenantId
-
getOverrideDefinitionTenantId
-
getPredefinedProcessInstanceId
-
getOwnerId
-
getAssigneeId
-
getVariables
-
getTransientVariables
-
getStartFormVariables
-
getOutcome
-
getExtraFormVariables
-
getExtraFormInfo
-
getExtraFormOutcome
-
isFallbackToDefaultTenant
public boolean isFallbackToDefaultTenant()
-