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 10, 2023
1 parent 031f613 commit 40b5988
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 9 deletions.
10 changes: 8 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
,====
// camunda batches
image::https://img.shields.io/badge/Community%20Extension-An%20open%20source%20community%20maintained%20project-FF4700[link="https://github.com/camunda-community-hub/community"]
image::https://img.shields.io/badge/Camunda%20Version-7.20-orange.svg[link="https://docs.camunda.org/manual/7.20/"]
image::https://img.shields.io/badge/Lifecycle-Stable-brightgreen[link="https://github.com/Camunda-Community-Hub/community/blob/main/extension-lifecycle.md#stable-"]
image::https://img.shields.io/badge/Compatible%20with-Camunda%20Platform%207-26d07c["Compatible with: Camunda Platform 7"]
// github actions batch
Expand Down Expand Up @@ -38,14 +39,14 @@ Maven Users:
<dependency>
<groupId>org.camunda.community.batch</groupId>
<artifactId>camunda-platform-7-custom-batch-core</artifactId>
<version>1.19.4</version>
<version>1.20.0</version>
</dependency>
```
Gradle Users:
```kotlin
compile("org.camunda.community.batch:camunda-platform-7-custom-batch-core:1.19.4")
compile("org.camunda.community.batch:camunda-platform-7-custom-batch-core:1.20.0")
```
First you have to define an own job handler for working on the single batch data:
Expand Down Expand Up @@ -100,6 +101,11 @@ The seed and monitor jobs receive the same priority as the batch.
## Versions
### 1.20.0
* BREAKING CHANGE: Update to use latest camunda version (7.20) + Spring Boot 3
### 1.19.4
* Update to use latest camunda version (7.19)
Expand Down
4 changes: 2 additions & 2 deletions extension/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ By default, the batch will create 100 jobs, where each job will work on one proc
After this, it will create another 100 jobs and so on, until the work on all instances is finished.
Benefit of this is that the migration will not block anything and that there is not just one big transaction.

Additionally, the cockpit already provides a view to monitor batches. (_https://docs.camunda.org/manual/7.19/webapps/cockpit/batch/monitoring/[See also]_)
Additionally, the cockpit already provides a view to monitor batches. (_https://docs.camunda.org/manual/7.20/webapps/cockpit/batch/monitoring/[See also]_)

For more information regarding Camunda Batch, visit also Camunda's user guide: _https://docs.camunda.org/manual/7.19/user-guide/process-engine/batch/[User Guide]_
For more information regarding Camunda Batch, visit also Camunda's user guide: _https://docs.camunda.org/manual/7.20/user-guide/process-engine/batch/[User Guide]_

## Why This Extension?

Expand Down
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
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@
<extension.groupId>org.camunda.community.batch</extension.groupId>
<example.groupId>org.camunda.community.batch.example</example.groupId>

<camunda.version>7.19.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.9</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 40b5988

Please sign in to comment.