[英]How to Clean Up the Camunda History
My application runs with Camunda 7.7
.我的应用程序使用Camunda 7.7
运行。 Until now, all the data was saved in the Camunda tables (ACT_XXX)- they become big.到目前为止,所有数据都保存在 Camunda 表 (ACT_XXX) 中——它们变得很大。 So now I want to clean up the tables and configure Camunda such, that the data is clean up after 14 days.所以现在我想清理表并配置 Camunda,以便在 14 天后清理数据。
Until now I tries to set the TTL to 1 day (easier to test!)到目前为止,我尝试将 TTL 设置为 1 天(更容易测试!)
List<ProcessDefinition> processDefinitions = processEngine.getRepositoryService()
.createProcessDefinitionQuery()
.deploymentId(deployment.getId()).list();
for (ProcessDefinition processDefinition : processDefinitions) {
processEngine.getRepositoryService()
.updateProcessDefinitionHistoryTimeToLive(
processDefinition.getId(), 1);
}
and the clean up window during the afternoon:和下午的清理窗口:
configuration.setHistoryCleanupBatchWindowStartTime("15:00");
configuration.setHistoryCleanupBatchWindowEndTime("16:00");
This, this does not work.这,这行不通。 Can someone help?有人可以帮忙吗?
In my case, when running with Spring Boot, it just works by defining the following properties:在我的例子中,当使用 Spring Boot 运行时,它只是通过定义以下属性来工作:
camunda:
bpm:
generic-properties:
properties:
historyCleanupBatchWindowStartTime: "00:01"
historyCleanupBatchWindowEndTime: "23:59"
historyCleanupStrategy: endTimeBased
To be sure, can you check colum REMOVAL_TIME on objects you need to delete?可以肯定的是,您可以在需要删除的对象上检查列 REMOVAL_TIME 吗? It should be populated automatically by the engine if you set ttl on process definition.如果您在流程定义上设置 ttl,它应该由引擎自动填充。
Ps I'm running 7.11.0 Ps 我正在运行 7.11.0
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.