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)
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
So if I don’t want history cleaned up I set:
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
As specified in the Update guide, you need to explicitly disable the behaviour via
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:
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."