Package org.camunda.bpm.engine.runtime
Interface ModificationBuilder
- All Superinterfaces:
InstantiationBuilder<ModificationBuilder>
- All Known Implementing Classes:
ModificationBuilderImpl
-
Method Summary
Modifier and TypeMethodDescriptioncancelAllForActivity
(String activityId) Submits the instruction:cancelAllForActivity
(String activityId, boolean cancelCurrentActiveActivityInstances) Submits the instruction:void
execute()
Execute the modification synchronously.Execute the modification asynchronously as batch.historicProcessInstanceQuery
(HistoricProcessInstanceQuery historicProcessInstanceQuery) processInstanceIds
(String... processInstanceIds) processInstanceIds
(List<String> processInstanceIds) processInstanceQuery
(ProcessInstanceQuery processInstanceQuery) setAnnotation
(String annotation) Provides annotation for the current modification.Skips custom execution listeners when creating/removing activity instances during modificationSkips io mappings when creating/removing activity instances during modificationMethods inherited from interface org.camunda.bpm.engine.runtime.InstantiationBuilder
startAfterActivity, startBeforeActivity, startTransition
-
Method Details
-
cancelAllForActivity
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
- Parameters:
activityId
- the activity for which all instances should be cancelled
-
cancelAllForActivity
ModificationBuilder cancelAllForActivity(String activityId, boolean cancelCurrentActiveActivityInstances) 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
- Parameters:
activityId
- the activity for which all instances should be cancelledcancelCurrentActiveActivityInstances
-
-
processInstanceIds
- Parameters:
processInstanceIds
- the process instance ids to modify.
-
processInstanceIds
- Parameters:
processInstanceIds
- the process instance ids to modify.
-
processInstanceQuery
- 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
ModificationBuilder skipCustomListeners()Skips custom execution listeners when creating/removing activity instances during modification -
skipIoMappings
ModificationBuilder skipIoMappings()Skips io mappings when creating/removing activity instances during modification -
setAnnotation
Provides annotation for the current modification. -
execute
void execute()Execute the modification synchronously.- Throws:
AuthorizationException
- if the user has not all of the following permissions- if the user has no
Permissions.UPDATE
permission onResources.PROCESS_INSTANCE
or noPermissions.UPDATE_INSTANCE
permission onResources.PROCESS_DEFINITION
- if the user has no
BadUserRequestException
- When the affected instances count exceeds the maximum results limit. A maximum results limit can be specified with the process engine configuration propertyqueryMaxResultsLimit
(defaultInteger.MAX_VALUE
). Please use the batch operationexecuteAsync()
instead.
-
executeAsync
Batch executeAsync()Execute the modification asynchronously as batch. The returned batch can be used to track the progress of the modification.- Returns:
- the batch which executes the modification asynchronously.
- Throws:
AuthorizationException
- if the user has not all of the following permissions
-
historicProcessInstanceQuery
ModificationBuilder historicProcessInstanceQuery(HistoricProcessInstanceQuery historicProcessInstanceQuery) - 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_HISTORY
permission.
-