From 846d5744a6768c5a02a50cab8cb514ea58d0acc1 Mon Sep 17 00:00:00 2001 From: Hauke Hund Date: Tue, 10 Oct 2023 22:14:29 +0200 Subject: [PATCH 1/2] maven dependency upgrades --- pom.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index 6f1a7228a..dd0d7d41a 100755 --- a/pom.xml +++ b/pom.xml @@ -23,10 +23,10 @@ 2.0.9 2.20.0 - 11.0.16 + 11.0.17 3.1.3 2.1.3 - 6.0.11 + 6.0.12 2.15.2 7.19.0 5.1.0 @@ -134,7 +134,7 @@ org.mockito mockito-core - 5.5.0 + 5.6.0 org.bouncycastle @@ -151,7 +151,7 @@ org.liquibase liquibase-core - 4.23.1 + 4.24.0 org.postgresql @@ -424,7 +424,7 @@ commons-io commons-io - 2.13.0 + 2.14.0 @@ -453,12 +453,12 @@ org.apache.maven maven-core - 3.9.4 + 3.9.5 org.apache.maven maven-plugin-api - 3.9.4 + 3.9.5 org.apache.maven.plugin-tools @@ -501,7 +501,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.5.0 + 3.6.0 org.apache.maven.plugins @@ -516,7 +516,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.5.0 + 3.5.1 org.apache.maven.plugins From ab1831c2fd21f40f1b08a8eb5d3552b1047b350e Mon Sep 17 00:00:00 2001 From: Hauke Hund Date: Tue, 10 Oct 2023 22:15:32 +0200 Subject: [PATCH 2/2] camunda to 7.20 Camunda 7.20. enforces process history time to live values in process models, added code to set a P30D default value if TTL is not specified in the bpmn file. --- .../dsf/bpe/plugin/AbstractProcessPlugin.java | 14 ++++++++++++++ .../camunda/postgres_engine_7.19_to_7.20.sql | 19 +++++++++++++++++++ .../db/db.camunda_engine.changelog-1.3.0.xml | 12 ++++++++++++ .../src/main/resources/db/db.changelog.xml | 2 ++ pom.xml | 2 +- 5 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 dsf-bpe/dsf-bpe-server/src/main/resources/db/camunda/postgres_engine_7.19_to_7.20.sql create mode 100644 dsf-bpe/dsf-bpe-server/src/main/resources/db/db.camunda_engine.changelog-1.3.0.xml 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