Set Default History Time To Live For Decision Tables

Hi,

I am using camunda 7.13 community edition and would like to clear out any history older than 30 days. I have configured historyTimeToLive property as follows:

<property name="historyTimeToLive">P30D</property>

When I deploy a new process the process definitions all have a 30 day TTL set:

image

but the decision definition’s TTL are all still null

image

After 30 days there are still history traces from variables created during the decision definitions. I had a look and cannot see any other specific property to set the default TTL specifically for decision definitions.

Documentation reference: Process Engine Configuration | docs.camunda.org

Does anyone perhaps know how one would be able to set a default TTL for decision definitions?

Hi @some-camunda-user,

you can set the time to live on the decision tables as well: https://docs.camunda.org/manual/7.14/reference/dmn/decision-table/.

The screenshots shows the input field in the property panel.

There is also a REST endpoint to set them after the deployment: https://docs.camunda.org/manual/7.14/reference/rest/decision-definition/put-history-time-to-live/.

Hope this helps, Ingo

Hi @Ingo_Richtsmeier,

Thanks I have noticed this but what I would like to do is apply a default TTL for them system wide without manually configuring it for each decision table similar to how the historyTimeToLive property does it for the process definitions.

Hi @some-camunda-user,

if I am not mistaken, the historyTimeToLive handles this for process/decision/case definitions that do not define a TTL themselves. This is also documented in the History Cleanup Configuration.

Please note that this will not be applied to already deployed decision definitions.
There is a REST API endpoint that allows to change the TTL for deployed decision definitions:

Hope that helps clearing up things.

Best,
Tobias

Hi @tmetzke,

Thanks for the reply. What I am noticing is even if I deploy a new decision table without a TTL it has no effect, almost as if the logic does not apply to decision tables. If I upload a process definition without a TTL it does however get set. Could this possibly be a bug? I am deploying my decision tables and process definitions within the same .war file but the decision tables TTL doesn’t get set at all, only the process definitions TTL get set.

Hi @some-camunda-user,

I am not aware of an issue with the TTL in decision tables like this.
Could you upload a simple example that reliably reproduces this (either a ZIP, WAR, or a link to a project that is hosted somewhere publicly accessible)?

Best,
Tobias

Hi @tmetzke,

Sure, please see details below:

  1. Download camunda 7.13.0 from camunda’s website: https://downloads.camunda.cloud/release/camunda-bpm/tomcat/7.13/camunda-bpm-tomcat-7.13.0.zip

  2. Replace the server/apache-tomcat-9.0.33/conf/bpm-platform.xml with the one in the zip file below.

  3. Either build the maven project using mvn clean install from the root of the extracted zip file contents to create a new .war deployment or use the existing pre-built test-1.0.0.war from the target folder from the zip.

  4. Copy the test-1.0.0.war file to the webapps directory of camunda: /server/apache-tomcat-9.0.33/webapps

  5. Start camunda, I normally use ./catalina.sh run command from tomcat’s server/apache-tomcat-9.0.33/bin directoryso I can monitor the logs for a successful deployment.

  6. The deployment contains 1 process definition and 1 decision definition (test_process.bpmn and test_decision.dmn) stored under the resources directory.

  7. Login to camunda’s cockpit using the default demo:demo credentials and navigate to the process definition:

here you can see the TTL is 30 days.

  1. Navigate to the decision definition:

Notice the TTL is null.

I thought this might have been a camunda 7.13.0 issue but this also occurs with 7.14.0 (the latest version on the download site)

I couldn’t upload the zip but you can download it from here: https://we.tl/t-k3Nf9bnk3h

Thanks @some-camunda-user, I will give it a try and let you know.
Might become next Monday though.

Best,
Tobias

No problem at all. Thanks for responding so quick on the forums.

Hi @some-camunda-user,

I did a very quick test (using Camunda Run with a configured historyTimeToLive and a simple BPMN and DMN definition) to see if it is a general issue.

I can confirm that this is not picked up by the decision definition. I would classify this as a bug.
If you don’t mind, you can file a bug report at our Issue Tracker. You could reuse the description of the scenario you have here and maybe also hint at my minimal setup. Please also share a link to the forum topic, this will help in making progress faster.

Thanks again for identifying this issue and moving it forward, this will help to improve the product a lot! :slight_smile:

Best,
Tobias

Hi @tmetzke,

Thank you for confirming. The jira ticket reference for this issue is as follows: https://jira.camunda.com/browse/CAM-13082

Thanks @some-camunda-user, we will have a look as soon as possible, you can track the further progress in the ticket. :slight_smile: