History Clean Up does not delete old process instance

Hi,
we are using Automatic Clean Up since about 2 months, but started it only after about 17 Month of Production.
For all process models we found in the clean up menu is a TTL of 180 days configured and historyCleanupStrategy is set to endTimeBased.

But, when i run
SELECT year(END_TIME_), month(END_TIME_), count(ID_) fROM “CAMUNDA_CI”.“ACT_HI_PROCINST”
group by year(END_TIME_), month(END_TIME_) order by year(END_TIME_), month(END_TIME_)

I always found ProcInstances with EndTime much higher than 180 Days. (For example about 7800 from last year may).

Why are these old Process Instances not deleted?

Nobody any suggestions on this topic?

Is your old table records has a removal_time_ column filled?

No. Removal_Time_ is “<null>” at the process instances, which are still there.

Ah, without removal_time_ no deletion. OK. Thanks for your answer Artem.

So why do we have process_instances without removal time?

Hi @fastjoe23,

the removal time is set, once the history time to live is set on the process model. Only process instances started with a given history time to live get the removal time.

In the Enterprise Edition you can set the removal time with a batch in Cockpit: Batch operation | docs.camunda.org.

In the Community Edition you have to start the batch with the Rest API.

Hope this helps, Ingo

1 Like

Thank you very much, Ingo and Artem. As we are using the Enterprise Edition i am hopeful, we will be able to set removal time.