public class ProcessInstantiationBuilderImpl extends Object implements ProcessInstantiationBuilder
Modifier and Type | Field and Description |
---|---|
protected String |
businessKey |
protected String |
caseInstanceId |
protected CommandExecutor |
commandExecutor |
protected boolean |
isProcessDefinitionTenantIdSet |
protected ProcessInstanceModificationBuilderImpl |
modificationBuilder |
protected String |
processDefinitionId |
protected String |
processDefinitionKey |
protected String |
processDefinitionTenantId |
protected String |
tenantId |
Modifier | Constructor and Description |
---|---|
protected |
ProcessInstantiationBuilderImpl(CommandExecutor commandExecutor) |
Modifier and Type | Method and Description |
---|---|
ProcessInstantiationBuilder |
businessKey(String businessKey)
Set the business key for the process instance
|
ProcessInstantiationBuilder |
caseInstanceId(String caseInstanceId)
Associate a case instance with the process instance
|
static ProcessInstantiationBuilder |
createProcessInstanceById(CommandExecutor commandExecutor,
String processDefinitionId) |
static ProcessInstantiationBuilder |
createProcessInstanceByKey(CommandExecutor commandExecutor,
String processDefinitionKey) |
ProcessInstance |
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.
|
String |
getBusinessKey() |
String |
getCaseInstanceId() |
ProcessInstanceModificationBuilderImpl |
getModificationBuilder() |
String |
getProcessDefinitionId() |
String |
getProcessDefinitionKey() |
String |
getProcessDefinitionTenantId() |
String |
getTenantId() |
Map<String,Object> |
getVariables() |
boolean |
isProcessDefinitionTenantIdSet() |
ProcessInstantiationBuilder |
processDefinitionTenantId(String tenantId)
Specify the id of the tenant the process definition belongs to.
|
ProcessInstantiationBuilder |
processDefinitionWithoutTenantId()
Specify that the process definition belongs to no tenant.
|
void |
setModificationBuilder(ProcessInstanceModificationBuilderImpl modificationBuilder) |
ProcessInstantiationBuilder |
setVariable(String name,
Object value)
If an instruction is submitted before then the variable is set when the
instruction is executed.
|
ProcessInstantiationBuilder |
setVariableLocal(String name,
Object value)
If an instruction is submitted before then the local variable is set when
the instruction is executed.
|
ProcessInstantiationBuilder |
setVariables(Map<String,Object> variables)
If an instruction is submitted before then all variables are set when the
instruction is executed.
|
ProcessInstantiationBuilder |
setVariablesLocal(Map<String,Object> variables)
If an instruction is submitted before then all local variables are set when
the instruction is executed.
|
ProcessInstantiationBuilder |
startAfterActivity(String activityId)
Submits an instruction that behaves like
InstantiationBuilder.startTransition(String) and always instantiates
the single outgoing sequence flow of the given activity. |
ProcessInstantiationBuilder |
startBeforeActivity(String activityId)
Submits the instruction:
|
ProcessInstantiationBuilder |
startTransition(String transitionId)
Submits the instruction:
|
ProcessInstantiationBuilder |
tenantId(String tenantId) |
protected CommandExecutor commandExecutor
protected String processDefinitionId
protected String processDefinitionKey
protected String businessKey
protected String caseInstanceId
protected String tenantId
protected String processDefinitionTenantId
protected boolean isProcessDefinitionTenantIdSet
protected ProcessInstanceModificationBuilderImpl modificationBuilder
protected ProcessInstantiationBuilderImpl(CommandExecutor commandExecutor)
public ProcessInstantiationBuilder startBeforeActivity(String activityId)
InstantiationBuilder
Submits the instruction:
Start before the specified activity.
In particular:
startBeforeActivity
in interface InstantiationBuilder<ProcessInstantiationBuilder>
activityId
- the activity to instantiatepublic ProcessInstantiationBuilder startAfterActivity(String activityId)
InstantiationBuilder
InstantiationBuilder.startTransition(String)
and always instantiates
the single outgoing sequence flow of the given activity. Does not consider asyncAfter.startAfterActivity
in interface InstantiationBuilder<ProcessInstantiationBuilder>
activityId
- the activity for which the outgoing flow should be executedpublic ProcessInstantiationBuilder startTransition(String transitionId)
InstantiationBuilder
Submits the instruction:
Start a sequence flow.
In particular:
startTransition
in interface InstantiationBuilder<ProcessInstantiationBuilder>
transitionId
- the sequence flow to executepublic ProcessInstantiationBuilder setVariable(String name, Object value)
ActivityInstantiationBuilder
setVariable
in interface ActivityInstantiationBuilder<ProcessInstantiationBuilder>
public ProcessInstantiationBuilder setVariableLocal(String name, Object value)
ActivityInstantiationBuilder
setVariableLocal
in interface ActivityInstantiationBuilder<ProcessInstantiationBuilder>
public ProcessInstantiationBuilder setVariables(Map<String,Object> variables)
ActivityInstantiationBuilder
setVariables
in interface ActivityInstantiationBuilder<ProcessInstantiationBuilder>
public ProcessInstantiationBuilder setVariablesLocal(Map<String,Object> variables)
ActivityInstantiationBuilder
setVariablesLocal
in interface ActivityInstantiationBuilder<ProcessInstantiationBuilder>
public ProcessInstantiationBuilder businessKey(String businessKey)
ProcessInstantiationBuilder
businessKey
in interface ProcessInstantiationBuilder
public ProcessInstantiationBuilder caseInstanceId(String caseInstanceId)
ProcessInstantiationBuilder
caseInstanceId
in interface ProcessInstantiationBuilder
public ProcessInstantiationBuilder tenantId(String tenantId)
public ProcessInstantiationBuilder processDefinitionTenantId(String tenantId)
ProcessInstantiationBuilder
key
and not by id
.processDefinitionTenantId
in interface ProcessInstantiationBuilder
public ProcessInstantiationBuilder processDefinitionWithoutTenantId()
ProcessInstantiationBuilder
key
and not by id
.processDefinitionWithoutTenantId
in interface ProcessInstantiationBuilder
public ProcessInstance execute()
ProcessInstantiationBuilder
execute
in interface ProcessInstantiationBuilder
{@link #executeWithVariablesInReturn()}.
public ProcessInstance execute(boolean skipCustomListeners, boolean skipIoMappings)
ProcessInstantiationBuilder
execute
in interface ProcessInstantiationBuilder
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.{@link #executeWithVariablesInReturn(boolean, boolean)}.
public ProcessInstanceWithVariables executeWithVariablesInReturn()
ProcessInstantiationBuilder
executeWithVariablesInReturn
in interface ProcessInstantiationBuilder
public ProcessInstanceWithVariables executeWithVariablesInReturn(boolean skipCustomListeners, boolean skipIoMappings)
ProcessInstantiationBuilder
executeWithVariablesInReturn
in interface ProcessInstantiationBuilder
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.public String getProcessDefinitionId()
public String getProcessDefinitionKey()
public ProcessInstanceModificationBuilderImpl getModificationBuilder()
public String getBusinessKey()
public String getCaseInstanceId()
public String getTenantId()
public String getProcessDefinitionTenantId()
public boolean isProcessDefinitionTenantIdSet()
public void setModificationBuilder(ProcessInstanceModificationBuilderImpl modificationBuilder)
public static ProcessInstantiationBuilder createProcessInstanceById(CommandExecutor commandExecutor, String processDefinitionId)
public static ProcessInstantiationBuilder createProcessInstanceByKey(CommandExecutor commandExecutor, String processDefinitionKey)
Copyright © 2019. All rights reserved.