Camunda 7.20 History Time To Live cannot be null! Cannot deploy WF created in 7.18

Hi guys

After I switched camunda-bpm-spring-boot-starter-webapp from 7.18 to 7.20 the BPMN developed earlier cannot be deployed because of the exception:
ERROR a.p.e.c.CustomExceptionHandlerResolver.handleValidationExceptions 66 - Handling generic exception:

org.camunda.bpm.engine.ParseException: ENGINE-09005 Could not parse BPMN process. Errors:

  • History Time To Live cannot be null: History Time To Live cannot be null | resource processdef.bpmn | line 3 | column 83

So from now on, historyTimeToLive becomes mandatory??
Is it true that I need to modify previous BPMNs to be able to deploy them to the newer Camunda?
Or is there some property that can set a default behavior (i.e don’t ever delete history)

1 Like

Yes it’s possible to set a default value for your process engine. It depends how you configure your engine.
If you have a camunda.cfg.xml, just add the following in the engine configuration

<property name="historyTimeToLive" value="P1D"/>

If you start it as a spring boot application, you can add it to the application.yaml

camunda:
  bpm:
    generic-properties:
      properties:
        historyTimeToLive: P1D
6 Likes

Thank you!
So if I don’t want history cleaned up I set:
camunda.bpm.generic-properties.properties.historyTimeToLive=P36500D

Apparently, this helped, and now in imported WF definitions the TTL (field act_re_procdef.history_ttl_) is set to 36500
Although it looks like a workaround, imho just having null (as it was before) would be better

I understand you. I think the rationale behind this change is, that you can have huge problems if your history data gets too big.
In most of my projects we have to deal with the cleanup of the history data and we never want the history to stay forever.
For the analysis of long time data Camunda optimize us better suited.
By the way the period you have can also be written as P100Y.

Check more information about the enforced HTTL in the Update guide:

it look like a bug for me, i have this warning even if i dont use history at all

camunda:
    bpm:
        history-level: none

As specified in the Update guide, you need to explicitly disable the behaviour via enforceHistoryTimeToLive property.

1 Like

It seems that you can only use D, not Y (no big deal, anyway, just for clarity).

Using P100Y I get the error: Cannot parse historyTimeToLive: For input string: “P100Y”

Looking at the docs:

historyTimeToLive

String

Defines history time to live for process definitions and decision definitions if no other value is defined. The history time to live defines the number of days using a time specified by the ISO-8601 date format. The function only accepts the notation to define a number of days."

2 Likes

I dont have an camunda.cfg.xml or an application.yaml?!

I have a bpm-plattform.xml
But when i try to add: tomcat will not start

Caused by: org.camunda.bpm.engine.ProcessEngineException: ENGINE-08043 Exception while performing ‘deploy BPM platform’ => ‘Parsing bpm-platform.xml file’: ENGINE-09005 Could not parse BPMN process. Errors:

  • cvc-complex-type.3.2.2: Attribute ‘value’ is not allowed to appear in element ‘property’. | resource file:/opt/camunda/server/apache-tomcat-9.0.75/conf/bpm-platform.xml | line 16 | column 53

how to fix?

Hello @lul

In the bpm-platform.xml the definition for the property looks a bit different:

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