Hi Team,
I had set the below configurations in the code for cleaning up the existing process instances and new process instances.
config.setHistoryCleanupStrategy(“removalTimeBased”);
config.setHistoryRemovalTimeStrategy(“end”);
config.setBatchOperationHistoryTimeToLive(“P548D”);
config.setHistoryCleanupBatchWindowStartTime(“18:00”);
config.setHistoryCleanupBatchWindowEndTime(“22:00”);
config.setHistoryCleanupBatchSize(100);
And calling the rest service /history/process-instance/set-removal-time with below request.
{
“clearedRemovalTime”: true,
“hierarchical”: true,
“historicProcessInstanceQuery”: {
“unfinished”: true
}
}
Below is the code
HistoricProcessInstanceQuery query =
this.historyService.createHistoricProcessInstanceQuery();
Batch batch = historyService.setRemovalTimeToHistoricProcessInstances()
//.absoluteRemovalTime(new Date()) // sets an absolute removal time
.clearedRemovalTime() // resets the removal time to null
//.calculatedRemovalTime() // calculation based on the engine's configuration
.byQuery(query)
.byIds("693206dd-11e9-b7cb-be5e0f7575b7", "...")
// .hierarchical() // sets a removal time across the hierarchy
.executeAsync();
It is working for Absolute Time and not working for Calculated Time. It should set the removal time as end time + TTL. Can you please help me to resolve the issue.
Regards,
Thanuja.