diff --git a/dsf-bpe/dsf-bpe-server/src/main/java/dev/dsf/bpe/plugin/AbstractProcessPlugin.java b/dsf-bpe/dsf-bpe-server/src/main/java/dev/dsf/bpe/plugin/AbstractProcessPlugin.java index 37116b2de..5cec5ce37 100644 --- a/dsf-bpe/dsf-bpe-server/src/main/java/dev/dsf/bpe/plugin/AbstractProcessPlugin.java +++ b/dsf-bpe/dsf-bpe-server/src/main/java/dev/dsf/bpe/plugin/AbstractProcessPlugin.java @@ -158,6 +158,8 @@ Resource getResource() private static final String PROCESS_ID_PATTERN_STRING = "^(?[a-zA-Z0-9-]+)_(?[a-zA-Z0-9-]+)$"; private static final Pattern PROCESS_ID_PATTERN = Pattern.compile(PROCESS_ID_PATTERN_STRING); + private static final String DEFAULT_PROCESS_HISTORY_TIME_TO_LIVE = "P30D"; + private final D processPluginDefinition; private final A processPluginApi; private final boolean draft; @@ -679,6 +681,18 @@ file, getDefinitionName(), getDefinitionVersion(), VERSION_PLACEHOLDER_PATTERN_S property.setCamundaName(MODEL_ATTRIBUTE_PROCESS_API_VERSION); property.setCamundaValue(getProcessPluginApiVersion()); + + if (process.getCamundaHistoryTimeToLiveString() == null + || process.getCamundaHistoryTimeToLiveString().isBlank()) + { + if (isDraft()) + logger.info("Setting process history time to live for process {} from {} to {}", + process.getId(), jarFile.toString(), DEFAULT_PROCESS_HISTORY_TIME_TO_LIVE); + else + logger.debug("Setting process history time to live for process {} from {} to {}", + process.getId(), jarFile.toString(), DEFAULT_PROCESS_HISTORY_TIME_TO_LIVE); + process.setCamundaHistoryTimeToLiveString(DEFAULT_PROCESS_HISTORY_TIME_TO_LIVE); + } }); return new BpmnFileAndModel(draft, file, model, getJarFile()); diff --git a/dsf-bpe/dsf-bpe-server/src/main/resources/db/camunda/postgres_engine_7.19_to_7.20.sql b/dsf-bpe/dsf-bpe-server/src/main/resources/db/camunda/postgres_engine_7.19_to_7.20.sql new file mode 100644 index 000000000..a5cb12ce8 --- /dev/null +++ b/dsf-bpe/dsf-bpe-server/src/main/resources/db/camunda/postgres_engine_7.19_to_7.20.sql @@ -0,0 +1,19 @@ +-- +-- Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH +-- under one or more contributor license agreements. See the NOTICE file +-- distributed with this work for additional information regarding copyright +-- ownership. Camunda licenses this file to you under the Apache License, +-- Version 2.0; you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +insert into ACT_GE_SCHEMA_LOG +values ('900', CURRENT_TIMESTAMP, '7.20.0'); diff --git a/dsf-bpe/dsf-bpe-server/src/main/resources/db/db.camunda_engine.changelog-1.3.0.xml b/dsf-bpe/dsf-bpe-server/src/main/resources/db/db.camunda_engine.changelog-1.3.0.xml new file mode 100644 index 000000000..969939545 --- /dev/null +++ b/dsf-bpe/dsf-bpe-server/src/main/resources/db/db.camunda_engine.changelog-1.3.0.xml @@ -0,0 +1,12 @@ + + + + + + + + \ No newline at end of file diff --git a/dsf-bpe/dsf-bpe-server/src/main/resources/db/db.changelog.xml b/dsf-bpe/dsf-bpe-server/src/main/resources/db/db.changelog.xml index 20875b04b..00cdc8610 100644 --- a/dsf-bpe/dsf-bpe-server/src/main/resources/db/db.changelog.xml +++ b/dsf-bpe/dsf-bpe-server/src/main/resources/db/db.changelog.xml @@ -13,4 +13,6 @@ + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index dd0d7d41a..a11488905 100755 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ 2.1.3 6.0.12 2.15.2 - 7.19.0 + 7.20.0 5.1.0 2.3