Delete history data after specified time

Hello Team,

My use case is to delete the historic data after persisting it for a week. And, I found below configuration for the same,
ProcessEngine processEngine = ProcessEngineConfiguration
.setHistoryCleaningTimeCycleConfig(“0 0 1 * * ?”)

But I’m using SpringProcessEngineConfiguration instead of ProcessEngineConfiguration and hence I’m unable to use setEnableHistoryCleaning and setHistoryCleaningTimeCycleConfig mthods.

Kindly suggest something.

Ashmita Sinha

The SpringProcessEngineConfiguration extends the ProcessEngineConfigurationImpl class. So it has the method, but you can’t chain the methods like above. If you call the setters separately, it’s possible, e.g.:

springProcessEngineConfiguration.setHistoryCleaningTimeCycleConfig(“0 0 1 * * ?”)