Skip to content

Commit

Permalink
Merge branch 'release/3.8.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
zambrovski committed Mar 24, 2023
2 parents 82bab59 + 60f92b7 commit dcfbd1e
Show file tree
Hide file tree
Showing 39 changed files with 114 additions and 53 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>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-parent</artifactId>
<version>3.8.1</version>
<version>3.8.2</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>

Expand Down
16 changes: 8 additions & 8 deletions bom/parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-root</artifactId>
<version>3.8.1</version>
<version>3.8.2</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand All @@ -28,11 +28,11 @@

<awaitability.version>4.2.0</awaitability.version>
<mockito-kotlin.version>4.1.0</mockito-kotlin.version>
<jgiven.version>1.2.4</jgiven.version>
<jgiven.version>1.2.5</jgiven.version>

<pattern.class.itest>**/*ITest.*</pattern.class.itest>
<pattern.package.itest>**/itest/**/*.*</pattern.package.itest>
<jgiven-kotlin.version>1.2.4.0</jgiven-kotlin.version>
<jgiven-kotlin.version>1.2.5.0</jgiven-kotlin.version>
</properties>

<modules>
Expand Down Expand Up @@ -363,7 +363,7 @@
<!-- java compiler -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<version>3.11.0</version>
<configuration>
<encoding>UTF-8</encoding>
<source>${java.version}</source>
Expand Down Expand Up @@ -401,7 +401,7 @@
<!-- resources -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.0</version>
<version>3.3.1</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
Expand Down Expand Up @@ -552,7 +552,7 @@

<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<version>3.0.0</version>
<configuration>
<useSystemClassLoader>false</useSystemClassLoader>
<runOrder>random</runOrder>
Expand All @@ -573,7 +573,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.2</version>
<version>3.0.0</version>
<executions>
<execution>
<goals>
Expand All @@ -597,7 +597,7 @@
<plugin>
<groupId>org.jetbrains.dokka</groupId>
<artifactId>dokka-maven-plugin</artifactId>
<version>1.7.20</version>
<version>1.8.10</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand Down
2 changes: 1 addition & 1 deletion bom/taskpool-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-parent</artifactId>
<version>3.8.1</version>
<version>3.8.2</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion core/bus-jackson/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-parent</artifactId>
<version>3.8.1</version>
<version>3.8.2</version>
<relativePath>../../bom/parent/pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion core/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.polyflow</groupId>
<artifactId>polyflow-datapool-parent</artifactId>
<version>3.8.1</version>
<version>3.8.2</version>
</parent>

<artifactId>polyflow-datapool-api</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core/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.polyflow</groupId>
<artifactId>polyflow-datapool-parent</artifactId>
<version>3.8.1</version>
<version>3.8.2</version>
</parent>

<artifactId>polyflow-datapool-core</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core/datapool/datapool-event/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-datapool-parent</artifactId>
<version>3.8.1</version>
<version>3.8.2</version>
</parent>

<artifactId>polyflow-datapool-event</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core/datapool/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-parent</artifactId>
<version>3.8.1</version>
<version>3.8.2</version>
<relativePath>../../bom/parent/pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion core/taskpool/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-parent</artifactId>
<version>3.8.1</version>
<version>3.8.2</version>
<relativePath>../../bom/parent/pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion core/taskpool/taskpool-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-taskpool-parent</artifactId>
<version>3.8.1</version>
<version>3.8.2</version>
</parent>

<artifactId>polyflow-taskpool-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,10 @@ data class UpdateAttributeTaskCommand(
* Optional task priority.
*/
val priority: Int?,

/**
* True if no properties of the task have actually changed.
*/
val unchanged: Boolean = false
) : TaskIdentityWithPayloadAndCorrelations, EngineTaskCommand


Expand Down
2 changes: 1 addition & 1 deletion core/taskpool/taskpool-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-taskpool-parent</artifactId>
<version>3.8.1</version>
<version>3.8.2</version>
</parent>

<artifactId>polyflow-taskpool-core</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core/taskpool/taskpool-event/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-taskpool-parent</artifactId>
<version>3.8.1</version>
<version>3.8.2</version>
</parent>

<artifactId>polyflow-taskpool-event</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion integration/camunda-bpm/engine-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-integration-camunda-bpm-engine-parent</artifactId>
<version>3.8.1</version>
<version>3.8.2</version>
</parent>

<artifactId>polyflow-camunda-bpm-engine-client</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion integration/camunda-bpm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-parent</artifactId>
<version>3.8.1</version>
<version>3.8.2</version>
<relativePath>../../bom/parent/pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion integration/camunda-bpm/springboot-autoconfigure/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-integration-camunda-bpm-engine-parent</artifactId>
<version>3.8.1</version>
<version>3.8.2</version>
</parent>

<artifactId>polyflow-camunda-bpm-springboot-autoconfigure</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion integration/camunda-bpm/springboot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-integration-camunda-bpm-engine-parent</artifactId>
<version>3.8.1</version>
<version>3.8.2</version>
</parent>

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

<artifactId>polyflow-camunda-bpm-taskpool-collector</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ fun DelegateTask.toUpdateCommand(applicationName: String) = UpdateAttributeTaskC
priority = this.priority,
taskDefinitionKey = this.taskDefinitionKey,
businessKey = this.execution.businessKey,
sourceReference = this.sourceReference(applicationName)
sourceReference = this.sourceReference(applicationName),
unchanged = this is TaskEntity && this.propertyChanges.isEmpty()
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ class TaskEventCollectorService(
@EventListener(condition = "#task.eventName.equals('update')")
fun update(task: DelegateTask): UpdateAttributeTaskCommand? =
if (task is TaskEntity) {
if (task.isAssigneeChange() || !task.hasChangedProperties()) {
// this is already handled by assignment event, or it is an empty fired during taskService call of candidate update.
if (task.isAssigneeChange()) {
// this is already handled by assignment event
null
} else {
task.toUpdateCommand(camundaTaskpoolCollectorProperties.applicationName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ class TestDriver(
fun updateTaskCommand(
variables: VariableMap = DEFAULT_VARIABLES,
instanceBusinessKey: String = BUSINESS_KEY,
correlations: VariableMap = newCorrelations()
correlations: VariableMap = newCorrelations(),
unchanged: Boolean = false
) =
BpmnAwareTests.task(BpmnAwareTests.taskQuery().initializeFormKeys()).let { task ->
UpdateAttributeTaskCommand(
Expand All @@ -137,7 +138,8 @@ class TestDriver(
enriched = true,
businessKey = instanceBusinessKey,
payload = variables,
correlations = correlations
correlations = correlations,
unchanged = unchanged
)
}

Expand Down Expand Up @@ -173,4 +175,4 @@ class TestDriver(
BpmnAwareTests.assertThat(instance).isNotNull
BpmnAwareTests.assertThat(instance).isStarted
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,39 @@ internal class TaskCollectorITest {
verifyNoMoreInteractions(commandListGateway)
}

@Test
fun `updates attributes via API with update listener when task is unchanged`() {

// deploy
driver.deployProcess(
createUserTaskProcess(
taskListeners = listOf(
"update" to "#{changeTaskAttributes}"
)
)
)

// start
val instance = driver.startProcessInstance()
driver.assertProcessInstanceWaitsInUserTask(instance)
verify(commandListGateway).sendToGateway(listOf(createTaskCommand()))

// trigger the update event on the task
runtimeService.setVariable(instance.processInstanceId, "bla", "blubb")
taskService.saveTask(task())

val updateCommand = updateTaskCommand(
variables = Variables.createVariables().apply {
putAll(DEFAULT_VARIABLES)
putValue("bla", "blubb")
},
unchanged = true
)
verify(commandListGateway).sendToGateway(listOf(updateCommand))

verifyNoMoreInteractions(commandListGateway)
}

/**
* The process is started and wait in a user task.
* The update command is send after the TX commit.
Expand Down
2 changes: 1 addition & 1 deletion integration/camunda-bpm/taskpool-job-sender/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-integration-camunda-bpm-engine-parent</artifactId>
<version>3.8.1</version>
<version>3.8.2</version>
</parent>

<artifactId>polyflow-camunda-bpm-taskpool-job-sender</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion integration/common/datapool-sender/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-integration-common-parent</artifactId>
<version>3.8.1</version>
<version>3.8.2</version>
</parent>

<artifactId>polyflow-datapool-sender</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion integration/common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-parent</artifactId>
<version>3.8.1</version>
<version>3.8.2</version>
<relativePath>../../bom/parent/pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion integration/common/tasklist-url-resolver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-integration-common-parent</artifactId>
<version>3.8.1</version>
<version>3.8.2</version>
</parent>

<artifactId>polyflow-tasklist-url-resolver</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion integration/common/taskpool-sender/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-integration-common-parent</artifactId>
<version>3.8.1</version>
<version>3.8.2</version>
</parent>

<artifactId>polyflow-taskpool-sender</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import io.holunda.camunda.taskpool.api.task.CamundaTaskEventType.Companion.ATTRI
import io.holunda.camunda.taskpool.api.task.CamundaTaskEventType.Companion.CANDIDATE_USER_ADD
import io.holunda.camunda.taskpool.api.task.CamundaTaskEventType.Companion.CANDIDATE_USER_DELETE
import io.holunda.camunda.taskpool.api.task.CamundaTaskEventType.Companion.COMPLETE
import io.holunda.camunda.taskpool.api.task.CamundaTaskEventType.Companion.CREATE
import io.holunda.camunda.taskpool.api.task.CamundaTaskEventType.Companion.DELETE

/**
Expand Down Expand Up @@ -63,6 +62,7 @@ class SimpleEngineTaskCommandIntentDetector(
}
// updates of the listener are accepted
is UpdateAttributeTaskCommand -> engineTaskCommands.filter { it.eventName == ATTRIBUTES_LISTENER_UPDATE }
is UpdateAssignmentTaskCommand -> engineTaskCommands.filter { it is UpdateAttributeTaskCommand && it.unchanged}
else -> listOf()
}
}
2 changes: 1 addition & 1 deletion integration/common/variable-serializer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.holunda.polyflow</groupId>
<artifactId>polyflow-integration-common-parent</artifactId>
<version>3.8.1</version>
<version>3.8.2</version>
</parent>

<artifactId>polyflow-variable-serializer</artifactId>
Expand Down
Loading

0 comments on commit dcfbd1e

Please sign in to comment.