Package org.camunda.bpm.engine.history
Interface SetRemovalTimeToHistoricProcessInstancesBuilder
- All Known Subinterfaces:
SetRemovalTimeSelectModeForHistoricProcessInstancesBuilder
- All Known Implementing Classes:
SetRemovalTimeToHistoricProcessInstancesBuilderImpl
public interface SetRemovalTimeToHistoricProcessInstancesBuilder
Fluent builder to set the removal time to historic process instances and
all associated historic entities.
- Author:
- Tassilo Weidner
-
Method Summary
Modifier and TypeMethodDescriptionSelects historic decision instances by the given ids.byQuery
(HistoricProcessInstanceQuery historicProcessInstanceQuery) Selects historic process instances by the given query.chunkSize
(int chunkSize) Defines the size of the chunks in which removal time updates are processed.Sets the removal time asynchronously as batch.Takes additionally those historic process instances into account that are part of the hierarchy of the given historic process instance.Handles removal time updates in chunks, taking into account the defined size inremovalTimeUpdateChunkSize
in the process engine configuration.
-
Method Details
-
byQuery
SetRemovalTimeToHistoricProcessInstancesBuilder byQuery(HistoricProcessInstanceQuery historicProcessInstanceQuery) Selects historic process instances by the given query.- Parameters:
historicProcessInstanceQuery
- to be evaluated.- Returns:
- the builder.
-
byIds
Selects historic decision instances by the given ids.- Parameters:
historicProcessInstanceIds
- supposed to be affected.- Returns:
- the builder.
-
hierarchical
SetRemovalTimeToHistoricProcessInstancesBuilder hierarchical()Takes additionally those historic process instances into account that are part of the hierarchy of the given historic process instance. If the root process instance id of the given historic process instance isnull
, the hierarchy is ignored. This is the case for instances that were started with a version prior 7.10.- Returns:
- the builder.
-
updateInChunks
SetRemovalTimeToHistoricProcessInstancesBuilder updateInChunks()Handles removal time updates in chunks, taking into account the defined size inremovalTimeUpdateChunkSize
in the process engine configuration. The size of the chunks can also be overridden per call with thechunkSize(int)
option. Enabling this option can lead to multiple executions of the resulting jobs, preventing the database transaction from timing out by limiting the number of rows to update.- Returns:
- the builder.
- Since:
- 7.20
-
chunkSize
Defines the size of the chunks in which removal time updates are processed. The value must be a positive integer value that doesn't exceed theProcessSetRemovalTimeJobHandler.MAX_CHUNK_SIZE
. Only has an effect ifupdateInChunks()
is invoked as well. If undefined, the operation uses the `removalTimeUpdateChunkSize` defined in the process engine configuration.- Returns:
- the builder.
- Since:
- 7.20
-
executeAsync
Batch executeAsync()Sets the removal time asynchronously as batch. The returned batch can be used to track the progress of setting a removal time.- Returns:
- the batch which sets the removal time asynchronously.
- Throws:
BadUserRequestException
- when no historic process instances could be found.AuthorizationException
- when noCREATE_BATCH_SET_REMOVAL_TIME
or no permissionCREATE
permission is granted onResources.BATCH
.
-