Skip to content

Commit

Permalink
Merge branch 'release/1.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
jangalinski committed Jul 26, 2020
2 parents e43a140 + def230b commit e817de3
Show file tree
Hide file tree
Showing 84 changed files with 2,802 additions and 5,664 deletions.
5 changes: 5 additions & 0 deletions .codacy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
exclude_paths:
- '.github/**'
- 'docs/**'
- '**/packages.md'
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Please use one of the following templates:

https://github.com/holunda-io/camunda-bpm-data/issues/new/choose
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/1_bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: 'Bug report'
about: 'Report a bug in camunda-bpm-data'
title:
labels: 'type: bug :bug:'
assignees: zambrovski

---

### Steps to reproduce

* camunda-bpm-data version:
* Camunda BPM version:
* JDK version:
* Operating system:
* Complete executable reproducer: (e.g. GitHub Repo)
* Steps: (what exactly are you doing with the above reproducer?)

### Expected behaviour

### Actual behaviour

(In case of exceptions provide full stack trace)
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/2_feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: 'Feature request'
about: 'Suggest a feature for camunda-bpm-data'
title:
labels: 'type: enhancement'
assignees: zambrovski

---

### Scenario

* camunda-bpm-data version:
* Camunda BPM version:
* Description of your use case: (detailed description or executable reproducer, e.g. GitHub repo)

### Current Behaviour

### Wanted Behaviour

### Possible Workarounds
5 changes: 1 addition & 4 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,9 @@ jobs:
- name: Build
run: ./mvnw clean package

- name: Run integration tests
- name: Run integration tests and generate coverage reports
run: ./mvnw -Pitest verify

- name: Create coverage reports
run: ./mvnw jacoco:report-aggregate

- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,9 @@ jobs:
- name: Build
run: ./mvnw clean package

- name: Run integration tests
- name: Run integration tests and generate coverage reports
run: ./mvnw -Pitest verify

- name: Create coverage reports
run: ./mvnw jacoco:report-aggregate

- name: Import GPG Owner Trust
run: echo ${{secrets.GPG_OWNERTRUST}} | base64 --decode | gpg --import-ownertrust

Expand Down
4 changes: 2 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ If you just want to start using the library, put the following dependency into y
</dependency>
----

If you are using Gradle Kotlin DSL add to your `build.gradle`:
If you are using Gradle Kotlin DSL add to your `build.gradle.kts`:
[source,kotlin]
----
implementation("io.holunda.data:camunda-bpm-data:1.0.1")
Expand Down Expand Up @@ -155,7 +155,7 @@ Please put the following dependency into your `pom.xml`:
<dependency>
<groupId>io.holunda.data</groupId>
<artifactId>camunda-bpm-data-test</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
<scope>test</scope>
</dependency>
----
Expand Down
2 changes: 1 addition & 1 deletion docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.data</groupId>
<artifactId>camunda-bpm-data-parent</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>
</parent>

<artifactId>camunda-bpm-data-docs</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion docs/src/orchid/resources/changelog/1.0/1.0.1.ad
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
version: 1.0.0
version: 1.0.1
---

== Bugfixes
Expand Down
9 changes: 9 additions & 0 deletions docs/src/orchid/resources/changelog/1.0/1.0.2.ad
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
version: 1.0.2
---

== Enhancement

* Read/write adapter for CaseService context, see #59
* Supports variables via DelegateCaseExecution
* Implement `CaseServiceVariableMockBuilder` and `CaseServiceVerifier`, see #59
1 change: 1 addition & 0 deletions docs/src/orchid/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ site:
siteName: Camunda BPM Data
siteDescription: Beautiful process data handling for Camunda BPM.
avatar: 'assets/media/favicon.png'
version: 1.0.2

allPages:
components:
Expand Down
10 changes: 5 additions & 5 deletions docs/src/orchid/resources/pages/quick-start.ad
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ In Apache Maven add to your `pom.xml`:
<dependency>
<groupId>io.holunda.data</groupId>
<artifactId>camunda-bpm-data</artifactId>
<version>1.0.1</version>
<version>{{ site:version }}</version>
</dependency>
----

For Gradle Kotlin DSL add to your `build.gradle`:
For Gradle Kotlin DSL add to your `build.gradle.kts`:
[source,kotlin]
----
implementation("io.holunda.data:camunda-bpm-data:1.0.1")
implementation("io.holunda.data:camunda-bpm-data:{{ site:version }}")
----

For Gradle Groovy DSL add to your `build.gradle`:
[source,groovy]
----
implementation 'io.holunda.data:camunda-bpm-data:1.0.1'
implementation 'io.holunda.data:camunda-bpm-data:{{ site:version }}'
----

=== Declare process variable factories
Expand Down Expand Up @@ -128,7 +128,7 @@ Please put the following dependency into your `pom.xml`:
<dependency>
<groupId>io.holunda.data</groupId>
<artifactId>camunda-bpm-data-test</artifactId>
<version>1.0.0</version>
<version>1.0.2</version>
<scope>test</scope>
</dependency>
----
Expand Down
9 changes: 7 additions & 2 deletions docs/src/orchid/resources/wiki/user-guide/features.ad
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ title: Features
* Process Variables
- The library provides a way to construct a generic adapter for every process variable.
- The adapter contains variable type.
- The adapter can be applied in any context (`RuntimeService`, `TaskService`, `DelegateExecution`, `DelegateTask`, `VariableMap`).
- The adapter can be applied in any context (`RuntimeService`, `TaskService`, `CaseService`, `DelegateExecution`, `DelegateTask`, `DelegateCaseExecution`, `VariableMap`).
- The adapter offers methods to read, write, update and remove variable values.
- The adapter works for all types supported by Camunda BPM. This includes primitive types, object and container types ( `List<T>`, `Set<T>`, `Map<K , V>` ).
- The adapter supports global / local variables.
- The adapter support transient variables.
- Fluent API helper are available in order to set, remove or update multiple variables in the same context (`VariableMapBuilder`, `VariableReader` and `GlobalVariableWriter`).

* Process Variable Guards
- Generic support for `VariableGuard` for evaluation of a list of `VariableCondition`s
- Condition to check if variable exists.
Expand All @@ -22,15 +23,19 @@ title: Features
- Condition to check if variable matches condition specified by a custom function.
- `DefaultGuardTaskListener` to construct variable conditions guards easily.
- `DefaultGuardExecutionListener` to construct variable conditions guards easily.

* Anti-Corruption-Layer
- Generic support for `AntiCorruptionLayer` for protection and influence of variable modification in signalling and message correlation.
- Helper methods for the client to wrap variables in a transient carrier.
- Execution listener to handle `VariableGuard`-based conditions and `VariableMapTransformer`-based modifications.
- Task listener to handle `VariableGuard`-based conditions and `VariableMapTransformer`-based modifications.
- Factory methods to create `AntiCorruptionLayer` with a `VariableGuard` (see `CamundaBpmDataACL`)
- Factory methods to create `AntiCorruptionLayer` without a `VariableGuard` (see `CamundaBpmDataMapper`)
* Testing variable access and mocking `RuntimeService` and `TaskService`.

* Testing variable access and mocking `RuntimeService`, `TaskService` and `CaseService`.
- Builder to create Mockito-based behaviour of `RuntimeService` accessing variables.
- Builder to create Mockito-based behaviour of `TaskServiceService` accessing variables.
- Builder to create Mockito-based behaviour of `CaseServiceService` accessing variables.
- Verifier to check correct access to variables in `RuntimeService`
- Verifier to check correct access to variables in `TaskService`
- Verifier to check correct access to variables in `CaseService`
59 changes: 59 additions & 0 deletions example/coverage-report-aggregator/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.holunda.data.example</groupId>
<artifactId>camunda-bpm-data-example-parent</artifactId>
<version>1.0.2</version>
</parent>

<artifactId>camunda-bpm-data-coverage-report</artifactId>
<name>${project.artifactId}</name>
<packaging>pom</packaging>

<properties>
<jacoco.skip>false</jacoco.skip>
</properties>

<dependencies>
<dependency>
<groupId>io.holunda.data</groupId>
<artifactId>camunda-bpm-data</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.holunda.data</groupId>
<artifactId>camunda-bpm-data-test</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.holunda.data.example</groupId>
<artifactId>camunda-bpm-data-integration-test</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>report-aggregate</id>
<phase>verify</phase>
<goals>
<goal>report-aggregate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
40 changes: 36 additions & 4 deletions example/example-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.data.example</groupId>
<artifactId>camunda-bpm-data-example-parent</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>
</parent>

<artifactId>camunda-bpm-data-example-java</artifactId>
Expand Down Expand Up @@ -74,13 +74,45 @@
<artifactId>jackson-module-kotlin</artifactId>
</dependency>

<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<artifactId>groovy</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-datetime</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-jmx</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-json</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-jsr223</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-macro</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-nio</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-templates</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-xml</artifactId>
</dependency>

<!-- Testing -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@
import org.camunda.bpm.engine.TaskService;
import org.camunda.bpm.engine.variable.VariableMap;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;

import java.math.BigDecimal;

Expand All @@ -20,25 +15,25 @@
@RequestMapping("/task/approve-order")
public class ApproveOrderTaskController {

private final TaskService taskService;

public ApproveOrderTaskController(TaskService taskService) {
this.taskService = taskService;
}

@GetMapping("/{taskId}")
public ResponseEntity<ApproveTaskDto> loadTask(@PathVariable("taskId") String taskId) {
final Order order = ORDER.from(taskService, taskId).get();
final BigDecimal orderTotal = ORDER_TOTAL.from(taskService, taskId).get();
return ResponseEntity.ok(new ApproveTaskDto(order, orderTotal));
}

@PostMapping("/{taskId}")
public ResponseEntity<Void> completeTask(@PathVariable("taskId") String taskId, @RequestBody ApproveTaskCompleteDto userInput) {
VariableMap vars = builder()
.set(ORDER_APPROVED, userInput.getApproved())
.build();
taskService.complete(taskId, vars);
return ResponseEntity.noContent().build();
}
private final TaskService taskService;

public ApproveOrderTaskController(TaskService taskService) {
this.taskService = taskService;
}

@GetMapping("/{taskId}")
public ResponseEntity<ApproveTaskDto> loadTask(@PathVariable("taskId") String taskId) {
final Order order = ORDER.from(taskService, taskId).get();
final BigDecimal orderTotal = ORDER_TOTAL.from(taskService, taskId).get();
return ResponseEntity.ok(new ApproveTaskDto(order, orderTotal));
}

@PostMapping("/{taskId}")
public ResponseEntity<Void> completeTask(@PathVariable("taskId") String taskId, @RequestBody ApproveTaskCompleteDto userInput) {
VariableMap vars = builder()
.set(ORDER_APPROVED, userInput.getApproved())
.build();
taskService.complete(taskId, vars);
return ResponseEntity.noContent().build();
}
}
Loading

0 comments on commit e817de3

Please sign in to comment.