public class ProcessInstantiationBuilderImpl extends Object implements ProcessInstantiationBuilder
Modifier and Type | Field and Description |
---|---|
protected String |
businessKey |
protected String |
caseInstanceId |
protected CommandContext |
commandContext |
protected CommandExecutor |
commandExecutor |
protected ProcessInstanceModificationBuilderImpl |
modificationBuilder |
protected String |
processDefinitionId |
protected String |
processDefinitionKey |
Constructor and Description |
---|
ProcessInstantiationBuilderImpl(CommandContext commandContext,
String processDefinitionId,
String processDefinitionKey) |
ProcessInstantiationBuilderImpl(CommandExecutor commandExecutor,
String processDefinitionId,
String processDefinitionKey) |
ProcessInstantiationBuilderImpl(String processDefinitionId,
String processDefinitionKey) |
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
|
ProcessInstance |
execute()
Start the process instance by executing all instructions in the order they are submitted.
|
ProcessInstance |
execute(boolean skipCustomListeners,
boolean skipIoMappings)
Start the process instance by executing all instructions in the order they are submitted.
|
String |
getBusinessKey() |
String |
getCaseInstanceId() |
ProcessInstanceModificationBuilderImpl |
getModificationBuilder() |
String |
getProcessDefinitionId() |
String |
getProcessDefinitionKey() |
ProcessInstantiationBuilder |
setVariable(String name,
Object value)
Adds a variable to be set when the current instruction is executed.
|
ProcessInstantiationBuilder |
setVariableLocal(String name,
Object value)
Adds a local variable to be set when the current instruction is executed.
|
ProcessInstantiationBuilder |
setVariables(Map<String,Object> variables)
Adds all variables to be set when the current instruction is executed
|
ProcessInstantiationBuilder |
setVariablesLocal(Map<String,Object> variables)
Adds all local variables to be set when the current 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:
|
protected CommandExecutor commandExecutor
protected CommandContext commandContext
protected String processDefinitionId
protected String processDefinitionKey
protected String businessKey
protected String caseInstanceId
protected ProcessInstanceModificationBuilderImpl modificationBuilder
public ProcessInstantiationBuilderImpl(String processDefinitionId, String processDefinitionKey)
public ProcessInstantiationBuilderImpl(CommandExecutor commandExecutor, String processDefinitionId, String processDefinitionKey)
public ProcessInstantiationBuilderImpl(CommandContext commandContext, String processDefinitionId, String processDefinitionKey)
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 ProcessInstance execute()
ProcessInstantiationBuilder
execute
in interface ProcessInstantiationBuilder
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 instructionsskipIoMappings
- specifies whether input/output mappings for tasks should be invoked
throughout the transaction when executing the instructionspublic String getProcessDefinitionId()
public String getProcessDefinitionKey()
public ProcessInstanceModificationBuilderImpl getModificationBuilder()
public String getBusinessKey()
public String getCaseInstanceId()
Copyright © 2018. All rights reserved.