Skip to content

Commit

Permalink
Merge branch 'release/2.1.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
zambrovski committed Mar 23, 2021
2 parents ed8b1b6 + d900c7e commit 7a97915
Show file tree
Hide file tree
Showing 45 changed files with 76 additions and 60 deletions.
2 changes: 1 addition & 1 deletion bom/datapool-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>camunda-bpm-taskpool</artifactId>
<groupId>io.holunda.taskpool</groupId>
<version>2.1.3</version>
<version>2.1.4</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
4 changes: 2 additions & 2 deletions bom/taskpool-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>camunda-bpm-taskpool</artifactId>
<groupId>io.holunda.taskpool</groupId>
<version>2.1.3</version>
<version>2.1.4</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand All @@ -30,7 +30,7 @@
<dependency>
<groupId>io.holunda.taskpool</groupId>
<artifactId>camunda-bpm-taskpool-collector</artifactId>
<version>2.1.3</version>
<version>2.1.4</version>
</dependency>
<dependency>
<groupId>io.holunda.taskpool</groupId>
Expand Down
2 changes: 1 addition & 1 deletion datapool/datapool-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.holunda.taskpool</groupId>
<artifactId>camunda-bpm-datapool-root</artifactId>
<version>2.1.3</version>
<version>2.1.4</version>
</parent>

<artifactId>camunda-bpm-datapool-api</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion datapool/datapool-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.holunda.taskpool</groupId>
<artifactId>camunda-bpm-datapool-root</artifactId>
<version>2.1.3</version>
<version>2.1.4</version>
</parent>

<artifactId>camunda-bpm-datapool-core</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion datapool/datapool-event/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.holunda.taskpool</groupId>
<artifactId>camunda-bpm-datapool-root</artifactId>
<version>2.1.3</version>
<version>2.1.4</version>
</parent>

<artifactId>camunda-bpm-datapool-event</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion datapool/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.holunda.taskpool</groupId>
<artifactId>camunda-bpm-taskpool</artifactId>
<version>2.1.3</version>
<version>2.1.4</version>
</parent>

<artifactId>camunda-bpm-datapool-root</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.holunda.taskpool</groupId>
<artifactId>camunda-bpm-taskpool</artifactId>
<version>2.1.3</version>
<version>2.1.4</version>
</parent>

<artifactId>camunda-bpm-taskpool-docs</artifactId>
Expand Down
7 changes: 7 additions & 0 deletions docs/src/orchid/resources/changelog/2.1/2.1.4.ad
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
version: 2.1.4
---

== Bugfixes

* Fixed implementation of the task collector data serialization, #303
2 changes: 1 addition & 1 deletion engine/camunda-engine-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.holunda.taskpool</groupId>
<artifactId>camunda-bpm-taskpool-engine-root</artifactId>
<version>2.1.3</version>
<version>2.1.4</version>
</parent>

<artifactId>camunda-bpm-engine-client</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion engine/datapool-collector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.holunda.taskpool</groupId>
<artifactId>camunda-bpm-taskpool-engine-root</artifactId>
<version>2.1.3</version>
<version>2.1.4</version>
</parent>

<artifactId>camunda-bpm-datapool-collector</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion engine/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.holunda.taskpool</groupId>
<artifactId>camunda-bpm-taskpool</artifactId>
<version>2.1.3</version>
<version>2.1.4</version>
</parent>

<artifactId>camunda-bpm-taskpool-engine-root</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion engine/property-taskurl-resolver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.taskpool</groupId>
<artifactId>camunda-bpm-taskpool-engine-root</artifactId>
<version>2.1.3</version>
<version>2.1.4</version>
</parent>

<artifactId>taskpool-property-taskurl-resolver</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion engine/taskpool-collector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.taskpool</groupId>
<artifactId>camunda-bpm-taskpool-engine-root</artifactId>
<version>2.1.3</version>
<version>2.1.4</version>
</parent>

<artifactId>camunda-bpm-taskpool-collector</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
package io.holunda.camunda.taskpool.sender.accumulator

import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import io.holunda.camunda.taskpool.api.business.WithCorrelations
import io.holunda.camunda.taskpool.api.task.*
import io.holunda.camunda.taskpool.configureTaskpoolJacksonObjectMapper
import io.holunda.camunda.variable.serializer.serialize
import kotlin.reflect.KClass


/**
* Sorts commands by their order id and project attribute to one command
* @param objectMapper optional object mapper used for serialization, defaults to jacksonObjectMapper with Kotlin module.
* @param objectMapper optional object mapper used for serialization.
*/
class ProjectingCommandAccumulator(
val objectMapper: ObjectMapper
Expand Down Expand Up @@ -74,7 +76,9 @@ class ProjectingCommandAccumulator(
WithPayload::payload.name,
WithCorrelations::correlations.name
),
projectionErrorDetector = EngineTaskCommandProjectionErrorDetector
projectionErrorDetector = EngineTaskCommandProjectionErrorDetector,
mapper = jacksonMapper(objectMapper = objectMapper),
unmapper = jacksonUnmapper(clazz = command::class.java, objectMapper = objectMapper)
)

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.holunda.camunda.taskpool.sender.accumulator

import com.fasterxml.jackson.core.type.TypeReference
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import io.holunda.camunda.taskpool.configureTaskpoolJacksonObjectMapper
import org.slf4j.LoggerFactory
Expand Down Expand Up @@ -38,8 +39,8 @@ fun <T : Any> projectProperties(
original: T,
details: List<Any> = emptyList(),
propertyOperationConfig: PropertyOperationConfiguration = mapOf(),
mapper: Mapper<T> = jacksonMapper(),
unmapper: Unmapper<T> = jacksonUnmapper(original::class.java),
mapper: Mapper<T>,
unmapper: Unmapper<T>,
ignoredProperties: List<String> = emptyList(),
projectionErrorDetector: ProjectionErrorDetector
): T {
Expand Down Expand Up @@ -100,18 +101,19 @@ fun <T : Any> projectProperties(
/**
* Default Jackson Mapper (object to map).
*/
fun <T> jacksonMapper(): Mapper<T> = {
jacksonObjectMapper()
fun <T> jacksonMapper(objectMapper: ObjectMapper = jacksonObjectMapper()): Mapper<T> = {
objectMapper
.configureTaskpoolJacksonObjectMapper()
.convertValue(it, object : TypeReference<MutableMap<String, Any?>>() {})
}

/**
* Default Jackson Unmapper (map to object).
*/
fun <T> jacksonUnmapper(clazz: Class<T>): Unmapper<T> = {
jacksonObjectMapper()
.configureTaskpoolJacksonObjectMapper().convertValue(it, clazz)
fun <T> jacksonUnmapper(clazz: Class<T>, objectMapper: ObjectMapper = jacksonObjectMapper()): Unmapper<T> = {
objectMapper
.configureTaskpoolJacksonObjectMapper()
.convertValue(it, clazz)
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,23 @@

package io.holunda.camunda.taskpool.sender

import io.holunda.camunda.taskpool.sender.accumulator.ProjectionErrorDetector
import io.holunda.camunda.taskpool.sender.accumulator.PropertyOperation
import io.holunda.camunda.taskpool.sender.accumulator.projectProperties
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import io.holunda.camunda.taskpool.configureTaskpoolJacksonObjectMapper
import io.holunda.camunda.taskpool.sender.accumulator.*
import org.assertj.core.api.Assertions.assertThat
import org.junit.Test
import java.util.*
import kotlin.reflect.KClass

class PropertiesProjectorTest {

private val objectMapper = jacksonObjectMapper().configureTaskpoolJacksonObjectMapper()

@Test
fun `should return the command if details are empty`() {

val model = model("Foo", "My foo model")
val result = projectProperties(model, projectionErrorDetector = object:ProjectionErrorDetector{})
val result = projectProperties(model, projectionErrorDetector = object:ProjectionErrorDetector{}, mapper = jacksonMapper(objectMapper), unmapper = jacksonUnmapper(model::class.java, objectMapper))

assertThat(result).isEqualTo(model)
}
Expand All @@ -25,7 +27,7 @@ class PropertiesProjectorTest {
fun `should replace a detail`() {

val model = model("Foo", "My foo model")
val result = projectProperties(model, listOf(named(name = "new name", id = model.id)), projectionErrorDetector = object:ProjectionErrorDetector{})
val result = projectProperties(model, listOf(named(name = "new name", id = model.id)), projectionErrorDetector = object:ProjectionErrorDetector{}, mapper = jacksonMapper(objectMapper), unmapper = jacksonUnmapper(model::class.java, objectMapper))

assertThat(result).isEqualTo(model.copy(name = "new name"))
}
Expand All @@ -37,7 +39,8 @@ class PropertiesProjectorTest {
val result = projectProperties(model, listOf(
named(name = "wrong name", id = model.id),
named(name = "new name", id = model.id)),
projectionErrorDetector = object:ProjectionErrorDetector{}
projectionErrorDetector = object:ProjectionErrorDetector{},
mapper = jacksonMapper(objectMapper), unmapper = jacksonUnmapper(model::class.java, objectMapper)
)

assertThat(result).isEqualTo(model.copy(name = "new name"))
Expand All @@ -50,7 +53,7 @@ class PropertiesProjectorTest {
val result = projectProperties(model, listOf(
payload(payload = mutableMapOf("zee" to "test"), id = model.id),
named(name = "new name", id = model.id)),
projectionErrorDetector = object:ProjectionErrorDetector{}
projectionErrorDetector = object:ProjectionErrorDetector{}, mapper = jacksonMapper(objectMapper), unmapper = jacksonUnmapper(model::class.java, objectMapper)
)

assertThat(result).isEqualTo(model.copy(name = "new name", enriched = true, payload = mutableMapOf("zee" to "test")))
Expand All @@ -73,7 +76,7 @@ class PropertiesProjectorTest {
}
}
),
projectionErrorDetector = object:ProjectionErrorDetector{}
projectionErrorDetector = object:ProjectionErrorDetector{}, mapper = jacksonMapper(objectMapper), unmapper = jacksonUnmapper(model::class.java, objectMapper)
)

assertThat(result).isEqualTo(model.copy(name = "new name", enriched = true, payload = mutableMapOf("foo" to "bar", "zee" to "test")))
Expand Down Expand Up @@ -103,7 +106,7 @@ class PropertiesProjectorTest {
}
}
),
projectionErrorDetector = object:ProjectionErrorDetector{}
projectionErrorDetector = object:ProjectionErrorDetector{}, mapper = jacksonMapper(objectMapper), unmapper = jacksonUnmapper(model::class.java, objectMapper)
)

// map elements should vanish, kermit remains alone in the list
Expand Down
2 changes: 1 addition & 1 deletion engine/taskpool-engine-springboot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.taskpool</groupId>
<artifactId>camunda-bpm-taskpool-engine-root</artifactId>
<version>2.1.3</version>
<version>2.1.4</version>
</parent>

<artifactId>camunda-bpm-taskpool-engine-springboot-starter</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion engine/variable-serializer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.taskpool</groupId>
<artifactId>camunda-bpm-taskpool-engine-root</artifactId>
<version>2.1.3</version>
<version>2.1.4</version>
</parent>

<artifactId>camunda-bpm-taskpool-variable-serializer</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion examples/components/process-backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.taskpool</groupId>
<artifactId>taskpool-examples-root</artifactId>
<version>2.1.3</version>
<version>2.1.4</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion examples/components/process-forms/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.taskpool</groupId>
<artifactId>taskpool-examples-root</artifactId>
<version>2.1.3</version>
<version>2.1.4</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion examples/components/tasklist-angular/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.taskpool</groupId>
<artifactId>taskpool-examples-root</artifactId>
<version>2.1.3</version>
<version>2.1.4</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion examples/components/tasklist-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.holunda.taskpool</groupId>
<artifactId>taskpool-examples-root</artifactId>
<version>2.1.3</version>
<version>2.1.4</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion examples/components/tasklist-backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.holunda.taskpool</groupId>
<artifactId>taskpool-examples-root</artifactId>
<version>2.1.3</version>
<version>2.1.4</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion examples/components/tasklist-reactive-backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.holunda.taskpool</groupId>
<artifactId>taskpool-examples-root</artifactId>
<version>2.1.3</version>
<version>2.1.4</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion examples/components/users/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>io.holunda.taskpool</groupId>
<artifactId>taskpool-examples-root</artifactId>
<version>2.1.3</version>
<version>2.1.4</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.holunda.taskpool</groupId>
<artifactId>camunda-bpm-taskpool</artifactId>
<version>2.1.3</version>
<version>2.1.4</version>
</parent>

<artifactId>taskpool-examples-root</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.taskpool</groupId>
<artifactId>taskpool-example-scenario-distributed-axon-server</artifactId>
<version>2.1.3</version>
<version>2.1.4</version>
</parent>

<artifactId>example-distributed-axon-server-webapp-application</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.taskpool</groupId>
<artifactId>taskpool-example-cockpit-root</artifactId>
<version>2.1.3</version>
<version>2.1.4</version>
</parent>

<artifactId>taskpool-example-cockpit</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.taskpool</groupId>
<artifactId>taskpool-example-cockpit-root</artifactId>
<version>2.1.3</version>
<version>2.1.4</version>
</parent>

<artifactId>taskpool-example-cockpit-backend</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.taskpool</groupId>
<artifactId>taskpool-example-cockpit-root</artifactId>
<version>2.1.3</version>
<version>2.1.4</version>
</parent>

<artifactId>taskpool-example-cockpit-frontend</artifactId>
Expand Down
Loading

0 comments on commit 7a97915

Please sign in to comment.