public class ProcessInstanceModificationBuilderImpl extends Object implements ProcessInstanceModificationInstantiationBuilder
| Modifier and Type | Field and Description |
|---|---|
protected String |
annotation |
protected CommandContext |
commandContext |
protected CommandExecutor |
commandExecutor |
protected boolean |
externallyTerminated |
protected String |
modificationReason |
protected List<AbstractProcessInstanceModificationCommand> |
operations |
protected String |
processInstanceId |
protected VariableMap |
processVariables |
protected boolean |
skipCustomListeners |
protected boolean |
skipIoMappings |
| Constructor and Description |
|---|
ProcessInstanceModificationBuilderImpl() |
ProcessInstanceModificationBuilderImpl(CommandContext commandContext,
String processInstanceId) |
ProcessInstanceModificationBuilderImpl(CommandContext commandContext,
String processInstanceId,
String modificationReason) |
ProcessInstanceModificationBuilderImpl(CommandExecutor commandExecutor,
String processInstanceId) |
ProcessInstanceModificationBuilderImpl(String processInstanceId) |
| Modifier and Type | Method and Description |
|---|---|
ProcessInstanceModificationBuilder |
cancelActivityInstance(String activityInstanceId)
Submits the instruction:
|
ProcessInstanceModificationBuilder |
cancelAllForActivity(String activityId)
Submits the instruction:
|
ProcessInstanceModificationBuilder |
cancellationSourceExternal(boolean external)
A canceled process instance receives a termination state to indicate the
source of the cancellation call.
|
ProcessInstanceModificationBuilder |
cancelTransitionInstance(String transitionInstanceId)
Submits the instruction:
|
void |
execute()
Execute all instructions.
|
void |
execute(boolean skipCustomListeners,
boolean skipIoMappings) |
void |
execute(boolean writeUserOperationLog,
boolean skipCustomListeners,
boolean skipIoMappings) |
Batch |
executeAsync()
Execute all instructions asynchronously.
|
Batch |
executeAsync(boolean skipCustomListeners,
boolean skipIoMappings) |
String |
getAnnotation() |
CommandContext |
getCommandContext() |
CommandExecutor |
getCommandExecutor() |
protected AbstractInstantiationCmd |
getCurrentInstantiation() |
List<AbstractProcessInstanceModificationCommand> |
getModificationOperations() |
String |
getModificationReason() |
String |
getProcessInstanceId() |
VariableMap |
getProcessVariables() |
boolean |
isExternallyTerminated() |
boolean |
isSkipCustomListeners() |
boolean |
isSkipIoMappings() |
ProcessInstanceModificationBuilder |
setAnnotation(String annotation)
Provides annotation for the current modification.
|
void |
setAnnotationInternal(String annotation) |
void |
setModificationOperations(List<AbstractProcessInstanceModificationCommand> operations) |
void |
setModificationReason(String modificationReason) |
void |
setSkipCustomListeners(boolean skipCustomListeners) |
void |
setSkipIoMappings(boolean skipIoMappings) |
ProcessInstanceModificationInstantiationBuilder |
setVariable(String name,
Object value)
If an instruction is submitted before then the variable is set when the
instruction is executed.
|
ProcessInstanceModificationInstantiationBuilder |
setVariableLocal(String name,
Object value)
If an instruction is submitted before then the local variable is set when
the instruction is executed.
|
ProcessInstanceModificationInstantiationBuilder |
setVariables(Map<String,Object> variables)
If an instruction is submitted before then all variables are set when the
instruction is executed.
|
ProcessInstanceModificationInstantiationBuilder |
setVariablesLocal(Map<String,Object> variables)
If an instruction is submitted before then all local variables are set when
the instruction is executed.
|
ProcessInstanceModificationInstantiationBuilder |
startAfterActivity(String activityId)
Submits an instruction that behaves like
InstantiationBuilder.startTransition(String) and always instantiates
the single outgoing sequence flow of the given activity. |
ProcessInstanceModificationInstantiationBuilder |
startAfterActivity(String activityId,
String ancestorActivityInstanceId)
Submits an instruction that behaves like
ProcessInstanceModificationBuilder.startTransition(String,String) and always instantiates
the single outgoing sequence flow of the given activity. |
ProcessInstanceModificationInstantiationBuilder |
startBeforeActivity(String activityId)
Submits the instruction:
|
ProcessInstanceModificationInstantiationBuilder |
startBeforeActivity(String activityId,
String ancestorActivityInstanceId)
Submits the instruction:
|
ProcessInstanceModificationInstantiationBuilder |
startTransition(String transitionId)
Submits the instruction:
|
ProcessInstanceModificationInstantiationBuilder |
startTransition(String transitionId,
String ancestorActivityInstanceId)
Submits the instruction:
|
protected CommandExecutor commandExecutor
protected CommandContext commandContext
protected String processInstanceId
protected String modificationReason
protected boolean skipCustomListeners
protected boolean skipIoMappings
protected boolean externallyTerminated
protected String annotation
protected List<AbstractProcessInstanceModificationCommand> operations
protected VariableMap processVariables
public ProcessInstanceModificationBuilderImpl(CommandExecutor commandExecutor, String processInstanceId)
public ProcessInstanceModificationBuilderImpl(CommandContext commandContext, String processInstanceId)
public ProcessInstanceModificationBuilderImpl(CommandContext commandContext, String processInstanceId, String modificationReason)
public ProcessInstanceModificationBuilderImpl(String processInstanceId)
public ProcessInstanceModificationBuilderImpl()
public ProcessInstanceModificationBuilder cancelActivityInstance(String activityInstanceId)
ProcessInstanceModificationBuilderSubmits the instruction:
Cancel an activity instance in a process. If this instance has child activity instances (e.g. in a subprocess instance), these children, their grandchildren, etc. are cancelled as well.
Process instance cancellation will propagate upward, removing any parent process instances that are only waiting on the cancelled process to complete.
cancelActivityInstance in interface ProcessInstanceModificationBuilderactivityInstanceId - the id of the activity instance to cancelpublic ProcessInstanceModificationBuilder cancelTransitionInstance(String transitionInstanceId)
ProcessInstanceModificationBuilderSubmits the instruction:
Cancel a transition instance (i.e. an async continuation) in a process.
cancelTransitionInstance in interface ProcessInstanceModificationBuildertransitionInstanceId - the id of the transition instance to cancelpublic ProcessInstanceModificationBuilder cancelAllForActivity(String activityId)
ProcessInstanceModificationBuilderSubmits the instruction:
Cancel all instances of the given activity in an arbitrary order, which are:
Therefore behaves like ProcessInstanceModificationBuilder.cancelActivityInstance(String) for each individual
activity instance and like ProcessInstanceModificationBuilder.cancelTransitionInstance(String) for each
individual transition instance.
The cancellation order of the instances is arbitrary
cancelAllForActivity in interface ProcessInstanceModificationBuilderactivityId - the activity for which all instances should be cancelledpublic ProcessInstanceModificationBuilder cancellationSourceExternal(boolean external)
ProcessInstanceModificationBuilderA canceled process instance receives a termination state to indicate the source of the cancellation call. The state can have the following values:
EXTERNALLY_TERMINATED: the cancellation was triggered by
an external source. (e.g. REST call, external application)INTERNALLY_TERMINATED: the cancellation was triggered
internally. (e.g. by the engine)cancellationSourceExternal in interface ProcessInstanceModificationBuilderexternal - was the cancellation triggered by an external source?
true for EXTERNALLY_TERMINATED,
false for INTERNALLY_TERMINATED.public ProcessInstanceModificationInstantiationBuilder startBeforeActivity(String activityId)
InstantiationBuilderSubmits the instruction:
Start before the specified activity.
In particular:
startBeforeActivity in interface InstantiationBuilder<ProcessInstanceModificationInstantiationBuilder>activityId - the activity to instantiatepublic ProcessInstanceModificationInstantiationBuilder startBeforeActivity(String activityId, String ancestorActivityInstanceId)
ProcessInstanceModificationBuilderSubmits the instruction:
Start before the specified activity. Instantiate the given activity as a descendant of the given ancestor activity instance.
In particular:
startBeforeActivity in interface ProcessInstanceModificationBuilderactivityId - the activity to instantiateancestorActivityInstanceId - the ID of an existing activity instance under which the new
activity instance should be createdpublic ProcessInstanceModificationInstantiationBuilder startAfterActivity(String activityId)
InstantiationBuilderInstantiationBuilder.startTransition(String) and always instantiates
the single outgoing sequence flow of the given activity. Does not consider asyncAfter.startAfterActivity in interface InstantiationBuilder<ProcessInstanceModificationInstantiationBuilder>activityId - the activity for which the outgoing flow should be executedpublic ProcessInstanceModificationInstantiationBuilder startAfterActivity(String activityId, String ancestorActivityInstanceId)
ProcessInstanceModificationBuilderProcessInstanceModificationBuilder.startTransition(String,String) and always instantiates
the single outgoing sequence flow of the given activity. Does not consider asyncAfter.startAfterActivity in interface ProcessInstanceModificationBuilderactivityId - the activity for which the outgoing flow should be executedpublic ProcessInstanceModificationInstantiationBuilder startTransition(String transitionId)
InstantiationBuilderSubmits the instruction:
Start a sequence flow.
In particular:
startTransition in interface InstantiationBuilder<ProcessInstanceModificationInstantiationBuilder>transitionId - the sequence flow to executepublic ProcessInstanceModificationInstantiationBuilder startTransition(String transitionId, String ancestorActivityInstanceId)
ProcessInstanceModificationBuilderSubmits the instruction:
Start the specified sequence flow. Instantiate the given sequence flow as a descendant of the given ancestor activity instance.
In particular:
startTransition in interface ProcessInstanceModificationBuildertransitionId - the sequence flow to executeancestorActivityInstanceId - the ID of an existing activity instance under which the new
transition should be executedprotected AbstractInstantiationCmd getCurrentInstantiation()
public ProcessInstanceModificationInstantiationBuilder setVariable(String name, Object value)
ActivityInstantiationBuildersetVariable in interface ActivityInstantiationBuilder<ProcessInstanceModificationInstantiationBuilder>public ProcessInstanceModificationInstantiationBuilder setVariableLocal(String name, Object value)
ActivityInstantiationBuildersetVariableLocal in interface ActivityInstantiationBuilder<ProcessInstanceModificationInstantiationBuilder>public ProcessInstanceModificationInstantiationBuilder setVariables(Map<String,Object> variables)
ActivityInstantiationBuildersetVariables in interface ActivityInstantiationBuilder<ProcessInstanceModificationInstantiationBuilder>public ProcessInstanceModificationInstantiationBuilder setVariablesLocal(Map<String,Object> variables)
ActivityInstantiationBuildersetVariablesLocal in interface ActivityInstantiationBuilder<ProcessInstanceModificationInstantiationBuilder>public ProcessInstanceModificationBuilder setAnnotation(String annotation)
ProcessInstanceModificationBuildersetAnnotation in interface ProcessInstanceModificationBuilderpublic void execute()
ProcessInstanceModificationBuilderexecute in interface ProcessInstanceModificationBuilderpublic void execute(boolean skipCustomListeners,
boolean skipIoMappings)
execute in interface ProcessInstanceModificationBuilderskipCustomListeners - 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 void execute(boolean writeUserOperationLog,
boolean skipCustomListeners,
boolean skipIoMappings)
public Batch executeAsync()
ProcessInstanceModificationBuilderexecuteAsync in interface ProcessInstanceModificationBuilderpublic Batch executeAsync(boolean skipCustomListeners, boolean skipIoMappings)
executeAsync in interface ProcessInstanceModificationBuilderskipCustomListeners - 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 CommandExecutor getCommandExecutor()
public CommandContext getCommandContext()
public String getProcessInstanceId()
public List<AbstractProcessInstanceModificationCommand> getModificationOperations()
public void setModificationOperations(List<AbstractProcessInstanceModificationCommand> operations)
public boolean isSkipCustomListeners()
public boolean isSkipIoMappings()
public boolean isExternallyTerminated()
public void setSkipCustomListeners(boolean skipCustomListeners)
public void setSkipIoMappings(boolean skipIoMappings)
public VariableMap getProcessVariables()
public String getModificationReason()
public void setModificationReason(String modificationReason)
public String getAnnotation()
public void setAnnotationInternal(String annotation)
Copyright © 2021. All rights reserved.