Package org.camunda.bpm.engine.impl
Class ModificationBuilderImpl
java.lang.Object
org.camunda.bpm.engine.impl.ModificationBuilderImpl
- All Implemented Interfaces:
InstantiationBuilder<ModificationBuilder>
,ModificationBuilder
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
protected CommandExecutor
protected List<AbstractProcessInstanceModificationCommand>
protected String
protected ProcessInstanceQuery
protected boolean
protected boolean
-
Constructor Summary
ConstructorDescriptionModificationBuilderImpl
(CommandExecutor commandExecutor, String processDefinitionId) -
Method Summary
Modifier and TypeMethodDescriptioncancelAllForActivity
(String activityId) Submits the instruction:cancelAllForActivity
(String activityId, boolean cancelCurrentActiveActivityInstances) Submits the instruction:void
execute()
Execute the modification synchronously.void
execute
(boolean writeUserOperationLog) Execute the modification asynchronously as batch.boolean
boolean
processInstanceIds
(String... processInstanceIds) processInstanceIds
(List<String> processInstanceIds) processInstanceQuery
(ProcessInstanceQuery processInstanceQuery) setAnnotation
(String annotation) Provides annotation for the current modification.void
setAnnotationInternal
(String annotation) void
setInstructions
(List<AbstractProcessInstanceModificationCommand> instructions) void
setProcessDefinitionId
(String processDefinitionId) Skips custom execution listeners when creating/removing activity instances during modificationSkips io mappings when creating/removing activity instances during modificationstartAfterActivity
(String activityId) Submits an instruction that behaves likeInstantiationBuilder.startTransition(String)
and always instantiates the single outgoing sequence flow of the given activity.startBeforeActivity
(String activityId) Submits the instruction:startTransition
(String transitionId) Submits the instruction:
-
Field Details
-
commandExecutor
-
processInstanceQuery
-
processInstanceIds
-
instructions
-
processDefinitionId
-
skipCustomListeners
protected boolean skipCustomListeners -
skipIoMappings
protected boolean skipIoMappings -
annotation
-
-
Constructor Details
-
ModificationBuilderImpl
-
-
Method Details
-
startBeforeActivity
Description copied from interface:InstantiationBuilder
Submits the instruction:
Start before the specified activity.
In particular:
- In the parent activity hierarchy, determine the closest existing ancestor activity instance
- Instantiate all parent activities up to the ancestor's activity
- Instantiate and execute the given activity (respects the asyncBefore attribute of the activity)
- Specified by:
startBeforeActivity
in interfaceInstantiationBuilder<ModificationBuilder>
- Parameters:
activityId
- the activity to instantiate
-
startAfterActivity
Description copied from interface:InstantiationBuilder
Submits an instruction that behaves likeInstantiationBuilder.startTransition(String)
and always instantiates the single outgoing sequence flow of the given activity. Does not consider asyncAfter.- Specified by:
startAfterActivity
in interfaceInstantiationBuilder<ModificationBuilder>
- Parameters:
activityId
- the activity for which the outgoing flow should be executed
-
startTransition
Description copied from interface:InstantiationBuilder
Submits the instruction:
Start a sequence flow.
In particular:
- In the parent activity hierarchy, determine the closest existing ancestor activity instance
- Instantiate all parent activities up to the ancestor's activity
- Execute the given transition (does not consider sequence flow conditions)
- Specified by:
startTransition
in interfaceInstantiationBuilder<ModificationBuilder>
- Parameters:
transitionId
- the sequence flow to execute
-
cancelAllForActivity
Description copied from interface:ModificationBuilder
Submits the instruction:
Cancel all instances of the given activity in an arbitrary order, which are:
- activity instances of that activity
- transition instances entering or leaving that activity
The cancellation order of the instances is arbitrary
- Specified by:
cancelAllForActivity
in interfaceModificationBuilder
- Parameters:
activityId
- the activity for which all instances should be cancelled
-
cancelAllForActivity
public ModificationBuilder cancelAllForActivity(String activityId, boolean cancelCurrentActiveActivityInstances) Description copied from interface:ModificationBuilder
Submits the instruction:
Cancel all instances of the given activity in an arbitrary order, which are:
- activity instances of that activity
- transition instances entering or leaving that activity
The cancellation order of the instances is arbitrary
- Specified by:
cancelAllForActivity
in interfaceModificationBuilder
- Parameters:
activityId
- the activity for which all instances should be cancelled
-
processInstanceIds
- Specified by:
processInstanceIds
in interfaceModificationBuilder
- Parameters:
processInstanceIds
- the process instance ids to modify.
-
processInstanceIds
- Specified by:
processInstanceIds
in interfaceModificationBuilder
- Parameters:
processInstanceIds
- the process instance ids to modify.
-
processInstanceQuery
- Specified by:
processInstanceQuery
in interfaceModificationBuilder
- Parameters:
processInstanceQuery
- a query which selects the process instances to modify. Query results are restricted to process instances for which the user hasPermissions.READ
permission.
-
skipCustomListeners
Description copied from interface:ModificationBuilder
Skips custom execution listeners when creating/removing activity instances during modification- Specified by:
skipCustomListeners
in interfaceModificationBuilder
-
skipIoMappings
Description copied from interface:ModificationBuilder
Skips io mappings when creating/removing activity instances during modification- Specified by:
skipIoMappings
in interfaceModificationBuilder
-
setAnnotation
Description copied from interface:ModificationBuilder
Provides annotation for the current modification.- Specified by:
setAnnotation
in interfaceModificationBuilder
-
execute
public void execute(boolean writeUserOperationLog) -
execute
public void execute()Description copied from interface:ModificationBuilder
Execute the modification synchronously.- Specified by:
execute
in interfaceModificationBuilder
-
executeAsync
Description copied from interface:ModificationBuilder
Execute the modification asynchronously as batch. The returned batch can be used to track the progress of the modification.- Specified by:
executeAsync
in interfaceModificationBuilder
- Returns:
- the batch which executes the modification asynchronously.
-
getCommandExecutor
-
getProcessInstanceQuery
-
getProcessInstanceIds
-
getProcessDefinitionId
-
setProcessDefinitionId
-
getInstructions
-
setInstructions
-
isSkipCustomListeners
public boolean isSkipCustomListeners() -
isSkipIoMappings
public boolean isSkipIoMappings() -
getAnnotation
-
setAnnotationInternal
-