Configure history cleanup for Spring Boot

Hi there,

I try to configure automatic history clean up in a Spring Boot environment. Somewhere in the forum I found the advice to use these settings:

    schema-update: false
    type: postgres
      historyCleanupBatchWindowStartTime: "00:01"
      historyCleanupBatchWindowEndTime: "23:59"

However, the cleanup job is never scheduled. When I issue this query:

select count(*) from act_hi_procinst
where removal_time_ < now();

the result increases. What did I miss?

Thanks in advance,

You may have figured this out already but since the docs are a bit lite on configuring Camunda generic-properties I thought I would post this info. Below is an example of configuring history.

There are a few options for configuring History Cleanup. All the options rely on the process engine configuration of some sort.

See Option 3 to use generic-properties which is what I think will work for your case. Included the other options just in case.

1. You can utilize process.xml or camunda.cfg.xml as described here.

See the following for the config properties that can be set for history cleanup and other engine configuration properties.

2. or you can use code config as described here

In the case of spring-boot you can utilize Component Scanning and @Value annotations to quickly create your own properties and hook this into a yaml config via a process-engine-plugin.

3. use generic-properties


Here are the available configs for the process-engine-configuration

To use generic-properties just find the property in the configuration-properties doc above than add a hyphen “-” between words and remove camel case like historyCleanupStrategy becomes history-cleanup-strategy.

          history-cleanup-strategy: removalTimeBased

Also here are the additional spring-boot properties that you can use in YAML.