camunda-bpm-platform icon indicating copy to clipboard operation
camunda-bpm-platform copied to clipboard

Set removal time batch operation useless when configuring history level to none

Open ThorbenLindhauer opened this issue 2 years ago • 3 comments

This issue was imported from JIRA:

Field Value
JIRA Link CAM-14931
Reporter @tasso94
Has restricted visibility comments true

Environment (Required on creation):

Any still supported Camunda 7 version.

Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):

  • High amounts of history were produced in the past
  • Producing history is temporarily disabled by changing the history level to NONE
    • Reason: performance of process execution is degraded due to high amounts of history data
  • A removal time should be assigned to the history data to clean it up
  • The batch operation to set a removal time to historic process instances doesn't work since the history level is configured to NONE

Steps to reproduce (Required on creation):

  • Configure the history level to FULL
  • Start a process instance
  • Configure the history level to NONE
  • Perform the batch operation "Set removal time to process instances" on the historic process instance

Observed Behavior (Required on creation):

The removal time is not set.

Expected behavior (Required on creation):

Removal time is set.

Root Cause (Required on prioritization):

The historic process instance query returns an empty list when the history level is configured to NONE <1>.

Solution Ideas (Optional):

  1. Introduce a new built-in history level that doesn't produce history but allows to perform queries.
  • Cons
    • Cockpit might not be usable since history queries take a very long to return
  1. Register a custom history level that doesn't produce history but allows to perform queries.
  • Cons
    • User needs to write custom code
  1. Prevent disabling history queries for batch operations needed for history cleanup.
  • Cons
    • There might be other scenarios in which querying for history data is beneficial that cannot be achieved with this solution

Hints (optional):

<1> https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/persistence/entity/HistoricProcessInstanceManager.java#L106

Links:

ThorbenLindhauer avatar Oct 07 '22 11:10 ThorbenLindhauer

Related support tickets

  • https://jira.camunda.com/browse/SUPPORT-14712
  • https://jira.camunda.com/browse/SUPPORT-16802

garima-camunda avatar Dec 11 '23 10:12 garima-camunda

Here is another support ticket https://jira.camunda.com/browse/SUPPORT-19568 where customer could not use Batch Operation in Cockpit to delete "running process instances" because history level was set as "none". ( please see this screenshot)

@toco-cam , @tasso94 - fyi

garima-camunda avatar Jan 24 '24 10:01 garima-camunda

@tasso94 will take care of this and schedule it for a later patch (> 7.20.5)

toco-cam avatar Jan 24 '24 15:01 toco-cam