History Cleanup: Set Removal Time for already completed Process Instances

Hi everyone,

the execution of the history clean up jobs worked for me. However, I have process instances that have already been terminated and are therefore not assigned a removal time.

Therefore I understood that this works via the REST API “Set Removal Time”:
Result: In the engine database I find batch jobs (ACT_HI_BATCH) and also a seed-job is created in the ACT_RU_JOB table. However, I see as a response of the REST request that no jobs are created.

REST API Response:

  1. Do you know any advice?
  2. How do I formulate queries using the “historicProcessInstanceQuery” attribute in the REST operation “Set Removal Time”?
    ** Are the properties used here as they are defined as fields in the class “HistoricProcessInstanceQueryImpl” (Java API)?
    ** Here two different examples would be helpful for me.

My Camunda setup:

  • Camunda version 7.14 (Community Edition)
  • Apache Tomcat
  • bpmn-platform.xml (Excerpt):
          <property name="history">full</property>
          <property name="databaseSchemaUpdate">true</property>
          <property name="authorizationEnabled">true</property>
          <property name="jobExecutorDeploymentAware">true</property>
        <property name="jobExecutorActivate">true</property>
        <property name="historyCleanupStrategy">removalTimeBased</property>
        <property name="historyRemovalTimeStrategy">end</property>
          <property name="historyCleanupBatchWindowStartTime">00:01</property>
        <property name="historyCleanupBatchWindowEndTime">23:59</property>
       <property name="historyTimeToLive">P1D</property>

Thanks for your support in advance!

1 Like

@LSchoenfeld any progress in this task?