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 Details

    • byQuery

      Selects historic process instances by the given query.
      Parameters:
      historicProcessInstanceQuery - to be evaluated.
      Returns:
      the builder.
    • byIds

      SetRemovalTimeToHistoricProcessInstancesBuilder byIds(String... historicProcessInstanceIds)
      Selects historic decision instances by the given ids.
      Parameters:
      historicProcessInstanceIds - supposed to be affected.
      Returns:
      the builder.
    • 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 is null, the hierarchy is ignored. This is the case for instances that were started with a version prior 7.10.
      Returns:
      the builder.
    • updateInChunks

      Handles removal time updates in chunks, taking into account the defined size in removalTimeUpdateChunkSize in the process engine configuration. The size of the chunks can also be overridden per call with the chunkSize(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 the ProcessSetRemovalTimeJobHandler.MAX_CHUNK_SIZE. Only has an effect if updateInChunks() 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 no CREATE_BATCH_SET_REMOVAL_TIME or no permission CREATE permission is granted on Resources.BATCH.