I have set the “History Time to Live” in Modeler History Configuration to PD30. However, it appears that this setting is not taking effect, as the finished process instances are not being deleted from the history table. This is creating significant challenges in managing database storage.
I expected this configuration to automate the deletion of finished process instances, relieving me from having to do it manually. Can you please help me understand why this is not working as expected and how I can resolve this issue?
Hi Roddy, I have not defined the clean-up window so far. I will try to set it using REST API and inform you about the results. Thank you very much for your advice!
Hi Roddy, I am trying to define a clean-up window using REST API, but for my Camuda version (7.12.0), it is impossible. As far as I know, I can do it in application.yml file or SpringProcessEngineConfiguration class only. Is it true?
Hey, yes, history window config is part of the process engine configuration. Not sure for 7.12.0 specifically, but the config params/details in general are documented here:
However, I discovered that only 110 finished instances were deleted. I also find in the config that the maximum number is 500. Why did the engine only delete 110 instances? As I understand in the manual approach I can delete more instances in one rest call. Is the manual cleanup approach better than the automatic one?
How many finished instances were you expecting to be cleaned up?
The max 500 configuration is per execution of the cleanup job. Multiple cleanup jobs can be scheduled by the scheduler in the cleanup window if there are >500 items eligible for cleaning. These jobs are constrained by the time window and also they are scheduled as lower priority than other jobs that the runtime might be running so it is possible they can be interrupted. This could be an issue if your engine is busy during the cleanup window.
I’d look at the logs of the cleanup jobs to see if there is anything there that explains what you are seeing.
Also, if you have older historic data then is it possible that no TTL defined? (if you are using the “removal time” cleanup strategy, which is the default, then it requires a TTL to be defined to calculate the removal time). Also, there are some limitations with this cleanup strategy for data created pre-7.10 as I understand it from the documentation:
My understanding is that using the API to trigger cleanup will end up at the same implementation - you are just manually triggering the scheduling of the same job that would have been scheduled by the cleanup strategy on your behalf.
Hopefully you are able to experiment with these features in a non-prod environment until you fully understand the behaviour you are seeing.