From a77f10e3b4656f4bbb2ec52196b52272062142f1 Mon Sep 17 00:00:00 2001 From: Patrick Schalk Date: Fri, 6 Oct 2023 11:05:58 +0200 Subject: [PATCH] Upgrade to camunda 7.20 / Spring Boot 3 #57 --- .../batch/core/CustomBatchCreateJobsHandler.java | 15 +++++++++++++++ extension/pom.xml | 2 +- pom.xml | 12 ++++++------ 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/extension/core/src/main/java/org/camunda/community/batch/core/CustomBatchCreateJobsHandler.java b/extension/core/src/main/java/org/camunda/community/batch/core/CustomBatchCreateJobsHandler.java index e0c006a..c9fa02d 100644 --- a/extension/core/src/main/java/org/camunda/community/batch/core/CustomBatchCreateJobsHandler.java +++ b/extension/core/src/main/java/org/camunda/community/batch/core/CustomBatchCreateJobsHandler.java @@ -1,6 +1,7 @@ package org.camunda.community.batch.core; import org.camunda.bpm.engine.impl.batch.*; +import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl; import org.camunda.bpm.engine.impl.context.Context; import org.camunda.bpm.engine.impl.jobexecutor.JobDeclaration; import org.camunda.bpm.engine.impl.persistence.entity.ByteArrayEntity; @@ -10,6 +11,7 @@ import java.io.Serializable; import java.util.List; +import java.util.Map; public abstract class CustomBatchCreateJobsHandler implements BatchJobHandler { @@ -89,6 +91,18 @@ public CustomBatchConfiguration readConfiguration(final byte[] serializedConf return configurationHelper().readConfiguration(serializedConfiguration); } + @Override + public int calculateInvocationsPerBatchJob(String batchType, CustomBatchConfiguration configuration) { + ProcessEngineConfigurationImpl engineConfig = Context.getProcessEngineConfiguration(); + Map invocationsPerBatchJobByBatchType = engineConfig.getInvocationsPerBatchJobByBatchType(); + Integer invocationCount = invocationsPerBatchJobByBatchType.get(batchType); + if (invocationCount != null) { + return invocationCount; + } else { + return engineConfig.getInvocationsPerBatchJob(); + } + } + public CustomBatchConfigurationHelper configurationHelper() { return configurationHelper; } @@ -96,4 +110,5 @@ public CustomBatchConfigurationHelper configurationHelper() { public CustomBatchConfigurationHelper createConfigurationHelper() { return CustomBatchConfigurationDownwardCompatibleWrapper.of(CustomBatchConfigurationJsonHelper.of()); } + } diff --git a/extension/pom.xml b/extension/pom.xml index 503e4f1..e9b00f9 100644 --- a/extension/pom.xml +++ b/extension/pom.xml @@ -12,7 +12,7 @@ pom - 4.13.1 + 4.13.2 2.18.3 1.2 diff --git a/pom.xml b/pom.xml index ff4f7a9..246ed1b 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ org.camunda.community community-hub-release-parent - 1.3.1 + 1.4.3 @@ -22,7 +22,7 @@ - 1.8 + 11 UTF-8 ${encoding} @@ -31,16 +31,16 @@ org.camunda.community.batch org.camunda.community.batch.example - 7.18.0 - 2.0.1 + 7.20.0 + 2.0.9 3.12.0 2.9.1 ${camunda.version} - 2.7.3 + 3.1.1 - 2.2.220 + 2.2.224 reversealphabetical