public class ModificationBuilderImpl extends Object implements ModificationBuilder
Modifier and Type | Field and Description |
---|---|
protected String |
annotation |
protected CommandExecutor |
commandExecutor |
protected List<AbstractProcessInstanceModificationCommand> |
instructions |
protected String |
processDefinitionId |
protected List<String> |
processInstanceIds |
protected ProcessInstanceQuery |
processInstanceQuery |
protected boolean |
skipCustomListeners |
protected boolean |
skipIoMappings |
Constructor and Description |
---|
ModificationBuilderImpl(CommandExecutor commandExecutor,
String processDefinitionId) |
Modifier and Type | Method and Description |
---|---|
ModificationBuilder |
cancelAllForActivity(String activityId)
Submits the instruction:
|
ModificationBuilder |
cancelAllForActivity(String activityId,
boolean cancelCurrentActiveActivityInstances)
Submits the instruction:
|
void |
execute()
Execute the modification synchronously.
|
void |
execute(boolean writeUserOperationLog) |
Batch |
executeAsync()
Execute the modification asynchronously as batch.
|
String |
getAnnotation() |
CommandExecutor |
getCommandExecutor() |
List<AbstractProcessInstanceModificationCommand> |
getInstructions() |
String |
getProcessDefinitionId() |
List<String> |
getProcessInstanceIds() |
ProcessInstanceQuery |
getProcessInstanceQuery() |
boolean |
isSkipCustomListeners() |
boolean |
isSkipIoMappings() |
ModificationBuilder |
processInstanceIds(List<String> processInstanceIds) |
ModificationBuilder |
processInstanceIds(String... processInstanceIds) |
ModificationBuilder |
processInstanceQuery(ProcessInstanceQuery processInstanceQuery) |
ModificationBuilder |
setAnnotation(String annotation)
Provides annotation for the current modification.
|
void |
setAnnotationInternal(String annotation) |
void |
setInstructions(List<AbstractProcessInstanceModificationCommand> instructions) |
void |
setProcessDefinitionId(String processDefinitionId) |
ModificationBuilder |
skipCustomListeners()
Skips custom execution listeners when creating/removing activity instances during modification
|
ModificationBuilder |
skipIoMappings()
Skips io mappings when creating/removing activity instances during modification
|
ModificationBuilder |
startAfterActivity(String activityId)
Submits an instruction that behaves like
InstantiationBuilder.startTransition(String) and always instantiates
the single outgoing sequence flow of the given activity. |
ModificationBuilder |
startBeforeActivity(String activityId)
Submits the instruction:
|
ModificationBuilder |
startTransition(String transitionId)
Submits the instruction:
|
protected CommandExecutor commandExecutor
protected ProcessInstanceQuery processInstanceQuery
protected List<AbstractProcessInstanceModificationCommand> instructions
protected String processDefinitionId
protected boolean skipCustomListeners
protected boolean skipIoMappings
protected String annotation
public ModificationBuilderImpl(CommandExecutor commandExecutor, String processDefinitionId)
public ModificationBuilder startBeforeActivity(String activityId)
InstantiationBuilder
Submits the instruction:
Start before the specified activity.
In particular:
startBeforeActivity
in interface InstantiationBuilder<ModificationBuilder>
activityId
- the activity to instantiatepublic ModificationBuilder 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<ModificationBuilder>
activityId
- the activity for which the outgoing flow should be executedpublic ModificationBuilder startTransition(String transitionId)
InstantiationBuilder
Submits the instruction:
Start a sequence flow.
In particular:
startTransition
in interface InstantiationBuilder<ModificationBuilder>
transitionId
- the sequence flow to executepublic ModificationBuilder cancelAllForActivity(String activityId)
ModificationBuilder
Submits the instruction:
Cancel all instances of the given activity in an arbitrary order, which are:
The cancellation order of the instances is arbitrary
cancelAllForActivity
in interface ModificationBuilder
activityId
- the activity for which all instances should be cancelledpublic ModificationBuilder cancelAllForActivity(String activityId, boolean cancelCurrentActiveActivityInstances)
ModificationBuilder
Submits the instruction:
Cancel all instances of the given activity in an arbitrary order, which are:
The cancellation order of the instances is arbitrary
cancelAllForActivity
in interface ModificationBuilder
activityId
- the activity for which all instances should be cancelledpublic ModificationBuilder processInstanceIds(List<String> processInstanceIds)
processInstanceIds
in interface ModificationBuilder
processInstanceIds
- the process instance ids to modify.public ModificationBuilder processInstanceIds(String... processInstanceIds)
processInstanceIds
in interface ModificationBuilder
processInstanceIds
- the process instance ids to modify.public ModificationBuilder processInstanceQuery(ProcessInstanceQuery processInstanceQuery)
processInstanceQuery
in interface ModificationBuilder
processInstanceQuery
- a query which selects the process instances to modify.
Query results are restricted to process instances for which the user has Permissions.READ
permission.public ModificationBuilder skipCustomListeners()
ModificationBuilder
skipCustomListeners
in interface ModificationBuilder
public ModificationBuilder skipIoMappings()
ModificationBuilder
skipIoMappings
in interface ModificationBuilder
public ModificationBuilder setAnnotation(String annotation)
ModificationBuilder
setAnnotation
in interface ModificationBuilder
public void execute(boolean writeUserOperationLog)
public void execute()
ModificationBuilder
execute
in interface ModificationBuilder
public Batch executeAsync()
ModificationBuilder
executeAsync
in interface ModificationBuilder
public CommandExecutor getCommandExecutor()
public ProcessInstanceQuery getProcessInstanceQuery()
public String getProcessDefinitionId()
public void setProcessDefinitionId(String processDefinitionId)
public List<AbstractProcessInstanceModificationCommand> getInstructions()
public void setInstructions(List<AbstractProcessInstanceModificationCommand> instructions)
public boolean isSkipCustomListeners()
public boolean isSkipIoMappings()
public String getAnnotation()
public void setAnnotationInternal(String annotation)
Copyright © 2019. All rights reserved.