public class ProcessInstanceModificationBuilderImpl extends Object implements ProcessInstanceModificationInstantiationBuilder
Modifier and Type | Field and Description |
---|---|
protected CommandContext |
commandContext |
protected CommandExecutor |
commandExecutor |
protected List<AbstractProcessInstanceModificationCommand> |
operations |
protected String |
processInstanceId |
protected org.camunda.bpm.engine.variable.VariableMap |
processVariables |
protected boolean |
skipCustomListeners |
protected boolean |
skipIoMappings |
Constructor and Description |
---|
ProcessInstanceModificationBuilderImpl() |
ProcessInstanceModificationBuilderImpl(CommandContext commandContext,
String processInstanceId) |
ProcessInstanceModificationBuilderImpl(CommandExecutor commandExecutor,
String processInstanceId) |
ProcessInstanceModificationBuilderImpl(String processInstanceId) |
protected CommandExecutor commandExecutor
protected CommandContext commandContext
protected String processInstanceId
protected boolean skipCustomListeners
protected boolean skipIoMappings
protected List<AbstractProcessInstanceModificationCommand> operations
protected org.camunda.bpm.engine.variable.VariableMap processVariables
public ProcessInstanceModificationBuilderImpl(CommandExecutor commandExecutor, String processInstanceId)
public ProcessInstanceModificationBuilderImpl(CommandContext commandContext, String processInstanceId)
public ProcessInstanceModificationBuilderImpl(String processInstanceId)
public ProcessInstanceModificationBuilderImpl()
public ProcessInstanceModificationBuilder cancelActivityInstance(String activityInstanceId)
ProcessInstanceModificationBuilder
Submits 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.
cancelActivityInstance
in interface ProcessInstanceModificationBuilder
activityInstanceId
- the id of the activity instance to cancelpublic ProcessInstanceModificationBuilder cancelTransitionInstance(String transitionInstanceId)
ProcessInstanceModificationBuilder
Submits the instruction:
Cancel a transition instance (i.e. an async continuation) in a process.
cancelTransitionInstance
in interface ProcessInstanceModificationBuilder
transitionInstanceId
- the id of the transition instance to cancelpublic ProcessInstanceModificationBuilder cancelAllForActivity(String activityId)
ProcessInstanceModificationBuilder
Submits 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 ProcessInstanceModificationBuilder
activityId
- the activity for which all instances should be cancelledpublic ProcessInstanceModificationInstantiationBuilder startBeforeActivity(String activityId)
InstantiationBuilder
Submits 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)
ProcessInstanceModificationBuilder
Submits 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 ProcessInstanceModificationBuilder
activityId
- the activity to instantiateancestorActivityInstanceId
- the ID of an existing activity instance under which the new
activity instance should be createdpublic ProcessInstanceModificationInstantiationBuilder 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<ProcessInstanceModificationInstantiationBuilder>
activityId
- the activity for which the outgoing flow should be executedpublic ProcessInstanceModificationInstantiationBuilder startAfterActivity(String activityId, String ancestorActivityInstanceId)
ProcessInstanceModificationBuilder
ProcessInstanceModificationBuilder.startTransition(String,String)
and always instantiates
the single outgoing sequence flow of the given activity. Does not consider asyncAfter.startAfterActivity
in interface ProcessInstanceModificationBuilder
activityId
- the activity for which the outgoing flow should be executedpublic ProcessInstanceModificationInstantiationBuilder startTransition(String transitionId)
InstantiationBuilder
Submits 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)
ProcessInstanceModificationBuilder
Submits 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 ProcessInstanceModificationBuilder
transitionId
- 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)
ActivityInstantiationBuilder
setVariable
in interface ActivityInstantiationBuilder<ProcessInstanceModificationInstantiationBuilder>
public ProcessInstanceModificationInstantiationBuilder setVariableLocal(String name, Object value)
ActivityInstantiationBuilder
setVariableLocal
in interface ActivityInstantiationBuilder<ProcessInstanceModificationInstantiationBuilder>
public ProcessInstanceModificationInstantiationBuilder setVariables(Map<String,Object> variables)
ActivityInstantiationBuilder
setVariables
in interface ActivityInstantiationBuilder<ProcessInstanceModificationInstantiationBuilder>
public ProcessInstanceModificationInstantiationBuilder setVariablesLocal(Map<String,Object> variables)
ActivityInstantiationBuilder
setVariablesLocal
in interface ActivityInstantiationBuilder<ProcessInstanceModificationInstantiationBuilder>
public void execute()
ProcessInstanceModificationBuilder
execute
in interface ProcessInstanceModificationBuilder
public void execute(boolean skipCustomListeners, boolean skipIoMappings)
execute
in interface ProcessInstanceModificationBuilder
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 CommandExecutor getCommandExecutor()
public CommandContext getCommandContext()
public String getProcessInstanceId()
public List<AbstractProcessInstanceModificationCommand> getModificationOperations()
public boolean isSkipCustomListeners()
public boolean isSkipIoMappings()
public void setSkipCustomListeners(boolean skipCustomListeners)
public void setSkipIoMappings(boolean skipIoMappings)
public org.camunda.bpm.engine.variable.VariableMap getProcessVariables()
Copyright © 2018. All rights reserved.