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
FieldsModifier and TypeFieldDescriptionprotected Stringprotected CommandExecutorprotected HistoricProcessInstanceQueryprotected List<AbstractProcessInstanceModificationCommand>protected Stringprotected ProcessInstanceQueryprotected booleanprotected boolean -
Constructor Summary
ConstructorsConstructorDescriptionModificationBuilderImpl(CommandExecutor commandExecutor, String processDefinitionId) -
Method Summary
Modifier and TypeMethodDescriptioncancelAllForActivity(String activityId) Submits the instruction:cancelAllForActivity(String activityId, boolean cancelCurrentActiveActivityInstances) Submits the instruction:voidexecute()Execute the modification synchronously.voidexecute(boolean writeUserOperationLog) Execute the modification asynchronously as batch.historicProcessInstanceQuery(HistoricProcessInstanceQuery historicProcessInstanceQuery) booleanbooleanprocessInstanceIds(String... processInstanceIds) processInstanceIds(List<String> processInstanceIds) processInstanceQuery(ProcessInstanceQuery processInstanceQuery) setAnnotation(String annotation) Provides annotation for the current modification.voidsetAnnotationInternal(String annotation) voidsetInstructions(List<AbstractProcessInstanceModificationCommand> instructions) voidsetProcessDefinitionId(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
-
historicProcessInstanceQuery
-
processInstanceIds
-
instructions
-
processDefinitionId
-
skipCustomListeners
protected boolean skipCustomListeners -
skipIoMappings
protected boolean skipIoMappings -
annotation
-
-
Constructor Details
-
ModificationBuilderImpl
-
-
Method Details
-
startBeforeActivity
Description copied from interface:InstantiationBuilderSubmits 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:
startBeforeActivityin interfaceInstantiationBuilder<ModificationBuilder>- Parameters:
activityId- the activity to instantiate
-
startAfterActivity
Description copied from interface:InstantiationBuilderSubmits 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:
startAfterActivityin interfaceInstantiationBuilder<ModificationBuilder>- Parameters:
activityId- the activity for which the outgoing flow should be executed
-
startTransition
Description copied from interface:InstantiationBuilderSubmits 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:
startTransitionin interfaceInstantiationBuilder<ModificationBuilder>- Parameters:
transitionId- the sequence flow to execute
-
cancelAllForActivity
Description copied from interface:ModificationBuilderSubmits 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:
cancelAllForActivityin interfaceModificationBuilder- Parameters:
activityId- the activity for which all instances should be cancelled
-
cancelAllForActivity
public ModificationBuilder cancelAllForActivity(String activityId, boolean cancelCurrentActiveActivityInstances) Description copied from interface:ModificationBuilderSubmits 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:
cancelAllForActivityin interfaceModificationBuilder- Parameters:
activityId- the activity for which all instances should be cancelled
-
processInstanceIds
- Specified by:
processInstanceIdsin interfaceModificationBuilder- Parameters:
processInstanceIds- the process instance ids to modify.
-
processInstanceIds
- Specified by:
processInstanceIdsin interfaceModificationBuilder- Parameters:
processInstanceIds- the process instance ids to modify.
-
processInstanceQuery
- Specified by:
processInstanceQueryin interfaceModificationBuilder- Parameters:
processInstanceQuery- a query which selects the process instances to modify. Query results are restricted to process instances for which the user hasPermissions.READpermission.
-
historicProcessInstanceQuery
public ModificationBuilder historicProcessInstanceQuery(HistoricProcessInstanceQuery historicProcessInstanceQuery) - Specified by:
historicProcessInstanceQueryin interfaceModificationBuilder- Parameters:
historicProcessInstanceQuery- a query which selects the process instances to modify. It is advised to include the `unfinished` filter in the historicProcessInstanceQuery as finished instances cause failures for the modification. Query results are restricted to process instances for which the user hasPermissions.READ_HISTORYpermission.
-
skipCustomListeners
Description copied from interface:ModificationBuilderSkips custom execution listeners when creating/removing activity instances during modification- Specified by:
skipCustomListenersin interfaceModificationBuilder
-
skipIoMappings
Description copied from interface:ModificationBuilderSkips io mappings when creating/removing activity instances during modification- Specified by:
skipIoMappingsin interfaceModificationBuilder
-
setAnnotation
Description copied from interface:ModificationBuilderProvides annotation for the current modification.- Specified by:
setAnnotationin interfaceModificationBuilder
-
execute
public void execute(boolean writeUserOperationLog) -
execute
public void execute()Description copied from interface:ModificationBuilderExecute the modification synchronously.- Specified by:
executein interfaceModificationBuilder
-
executeAsync
Description copied from interface:ModificationBuilderExecute the modification asynchronously as batch. The returned batch can be used to track the progress of the modification.- Specified by:
executeAsyncin interfaceModificationBuilder- Returns:
- the batch which executes the modification asynchronously.
-
getCommandExecutor
-
getProcessInstanceQuery
-
getHistoricProcessInstanceQuery
-
getProcessInstanceIds
-
getProcessDefinitionId
-
setProcessDefinitionId
-
getInstructions
-
setInstructions
-
isSkipCustomListeners
public boolean isSkipCustomListeners() -
isSkipIoMappings
public boolean isSkipIoMappings() -
getAnnotation
-
setAnnotationInternal
-