Skip to content

Commit

Permalink
Upgrade to camunda 7.20 / Spring Boot 3 #57
Browse files Browse the repository at this point in the history
  • Loading branch information
p-wunderlich committed Oct 9, 2023
1 parent f9c5c4c commit a77f10e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -10,6 +11,7 @@

import java.io.Serializable;
import java.util.List;
import java.util.Map;

public abstract class CustomBatchCreateJobsHandler<T extends Serializable> implements BatchJobHandler<CustomBatchConfiguration> {

Expand Down Expand Up @@ -89,11 +91,24 @@ public CustomBatchConfiguration<T> readConfiguration(final byte[] serializedConf
return configurationHelper().readConfiguration(serializedConfiguration);
}

@Override
public int calculateInvocationsPerBatchJob(String batchType, CustomBatchConfiguration configuration) {
ProcessEngineConfigurationImpl engineConfig = Context.getProcessEngineConfiguration();
Map<String, Integer> invocationsPerBatchJobByBatchType = engineConfig.getInvocationsPerBatchJobByBatchType();
Integer invocationCount = invocationsPerBatchJobByBatchType.get(batchType);
if (invocationCount != null) {
return invocationCount;
} else {
return engineConfig.getInvocationsPerBatchJob();
}
}

public CustomBatchConfigurationHelper<T> configurationHelper() {
return configurationHelper;
}

public CustomBatchConfigurationHelper<T> createConfigurationHelper() {
return CustomBatchConfigurationDownwardCompatibleWrapper.of(CustomBatchConfigurationJsonHelper.of());
}

}
2 changes: 1 addition & 1 deletion extension/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<packaging>pom</packaging>

<properties>
<junit.version>4.13.1</junit.version>
<junit.version>4.13.2</junit.version>
<mockito-core.version>2.18.3</mockito-core.version>
<camunda-bpm-assert.version>1.2</camunda-bpm-assert.version>
</properties>
Expand Down
12 changes: 6 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.camunda.community</groupId>
<artifactId>community-hub-release-parent</artifactId>
<version>1.3.1</version>
<version>1.4.3</version>
<relativePath />
</parent>

Expand All @@ -22,7 +22,7 @@
</modules>

<properties>
<java.version>1.8</java.version>
<java.version>11</java.version>

<encoding>UTF-8</encoding>
<project.build.sourceEncoding>${encoding}</project.build.sourceEncoding>
Expand All @@ -31,16 +31,16 @@
<extension.groupId>org.camunda.community.batch</extension.groupId>
<example.groupId>org.camunda.community.batch.example</example.groupId>

<camunda.version>7.18.0</camunda.version>
<slf4j.version>2.0.1</slf4j.version>
<camunda.version>7.20.0</camunda.version>
<slf4j.version>2.0.9</slf4j.version>
<commons-lang3.version>3.12.0</commons-lang3.version>

<gson.version>2.9.1</gson.version>

<camunda-spring-boot.version>${camunda.version}</camunda-spring-boot.version>
<spring-boot.version>2.7.3</spring-boot.version>
<spring-boot.version>3.1.1</spring-boot.version>

<h2.version>2.2.220</h2.version>
<h2.version>2.2.224</h2.version>

<surefire.runOrder>reversealphabetical</surefire.runOrder>
</properties>
Expand Down

0 comments on commit a77f10e

Please sign in to comment.