ProcessEngineConfiguration

Could you help me, I am trying to set up clearing old data in the table, but when trying to deploy, I get an error.

ENGINE-08040 Cannot find setter for property ‘historyTimeToLive’ on class ‘org.camunda.bpm.engine.impl.cfg.StandaloneProcessEngineConfiguration’

<?xml version="1.0" encoding="UTF-8"?>

default org.camunda.bpm.engine.impl.cfg.StandaloneProcessEngineConfiguration java:jdbc/ProcessEngine
<properties>
  <property name="jobExecutorActivate">true</property>
  <property name="history">full</property>
  <property name="databaseSchemaUpdate">true</property>
  <property name="authorizationEnabled">true</property>
  <property name="jobExecutorDeploymentAware">false</property>
  <property name="historyCleanupBatchWindowStartTime">01:55</property>
  <property name="historyCleanupBatchWindowEndTime">03:30</property>
  <property name="batchOperationHistoryTimeToLive">P1D</property>
  <property name="historyTimeToLive">P1D</property>
</properties>

<plugins>
  <!-- plugin enabling Process Application event listener support -->
  <plugin>
    <class>org.camunda.bpm.application.impl.event.ProcessApplicationEventListenerPlugin</class>
  </plugin>

  <!-- plugin enabling integration of camunda Spin -->
  <plugin>
    <class>org.camunda.spin.plugin.impl.SpinProcessEnginePlugin</class>
  </plugin>

  <!-- plugin enabling connect support -->
  <plugin>
    <class>org.camunda.connect.plugin.impl.ConnectProcessEnginePlugin</class>
  </plugin>

  <plugin>
    <class>org.camunda.bpm.engine.impl.plugin.AdministratorAuthorizationPlugin</class>
    <properties>
      <property name="administratorUserName">admin</property>
    </properties>
  </plugin>
  -->

</plugins>

bpm-platform.xml (3.9 KB)

Hi @11120
Welcome to the forum.
I think the history time to live property must be set for a process definition not the engine itself.
-Niall

Could you please give a link to an example or maybe I’m doing something wrong to clear the tables ACT_HI_* ?

No problem.
So you need to think of the history cleaning in two parts.
On a global, engine level you can set when history cleanup will happen and the engine itself will do the work. But the data that gets removed depends on the setting you’ve given to the individual process definitions.
You can add a time to live for a process definition in a few different ways.

  1. At design time time you can add it to the model:
  2. You can set it individually in cockpit:
  3. You can also set it directly using the REST API.

This would mean that every instance started by that process instance will be removed by the engine once that time expires.

Thank you. I understand this correctly only for new tasks, but what about old records?

I did everything you said, but the old data is still there.

Hello, sorry for the old post resurrection but I think that format (P1Y) is incorrect for that process definition input box. Since I think it only admits a number of days you just need to input an integer (at least for 7.8 version).