Skip to content

Commit a32e315

Browse files
committed
Merge branch 'release/0.4.3'
2 parents 3848ed7 + cb2141b commit a32e315

File tree

38 files changed

+235
-88
lines changed

38 files changed

+235
-88
lines changed

api/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>dev.bpm-crafters.process-engine-api</groupId>
66
<artifactId>process-engine-api-root</artifactId>
7-
<version>0.4.2</version>
7+
<version>0.4.3</version>
88
</parent>
99

1010
<artifactId>process-engine-api</artifactId>

bom/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>dev.bpm-crafters.process-engine-api</groupId>
66
<artifactId>process-engine-api-root</artifactId>
7-
<version>0.4.2</version>
7+
<version>0.4.3</version>
88
</parent>
99

1010
<artifactId>process-engine-api-bom</artifactId>

engine-adapter/adapter-commons-spring-boot-starter/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>dev.bpm-crafters.process-engine-api</groupId>
77
<artifactId>process-engine-api-root</artifactId>
8-
<version>0.4.2</version>
8+
<version>0.4.3</version>
99
<relativePath>../../pom.xml</relativePath>
1010
</parent>
1111

engine-adapter/adapter-commons/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>dev.bpm-crafters.process-engine-api</groupId>
77
<artifactId>process-engine-api-root</artifactId>
8-
<version>0.4.2</version>
8+
<version>0.4.3</version>
99
<relativePath>../../pom.xml</relativePath>
1010
</parent>
1111

engine-adapter/adapter-testing/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>dev.bpm-crafters.process-engine-api</groupId>
88
<artifactId>process-engine-api-root</artifactId>
9-
<version>0.4.2</version>
9+
<version>0.4.3</version>
1010
<relativePath>../../pom.xml</relativePath>
1111
</parent>
1212

engine-adapter/adapter-testing/src/main/kotlin/dev/bpmcrafters/processengineapi/test/BaseGivenWhenStage.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class BaseGivenWhenStage : Stage<BaseGivenWhenStage>() {
9797
taskId = userTaskId!!,
9898
payloadSupplier = { emptyMap() }
9999
)
100-
)
100+
).get()
101101
}
102102

103103
fun `complete the external task`() = step {
@@ -108,7 +108,7 @@ class BaseGivenWhenStage : Stage<BaseGivenWhenStage>() {
108108
taskId = externalTaskId!!,
109109
payloadSupplier = { emptyMap() }
110110
)
111-
)
111+
).get()
112112
}
113113

114114
fun `unsubscribe user task subscription`() = step { unsubscribeTask() }
@@ -121,15 +121,15 @@ class BaseGivenWhenStage : Stage<BaseGivenWhenStage>() {
121121
taskType = taskType,
122122
taskDescriptionKey = taskDescriptionKey,
123123
action = taskHandler,
124-
termination = {} // nothing to do
124+
termination = { this.externalTaskId = null } // wait until the termination delivers success
125125
)
126126
).get()
127127

128128
private fun unsubscribeTask() = processTestHelper.getTaskSubscriptionApi().unsubscribe(
129129
UnsubscribeFromTaskCmd(
130130
taskSubscription
131131
)
132-
)
132+
).get()
133133

134134

135135
}

engine-adapter/camunda-platform-7-embedded-core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>dev.bpm-crafters.process-engine-api</groupId>
77
<artifactId>process-engine-api-root</artifactId>
8-
<version>0.4.2</version>
8+
<version>0.4.3</version>
99
<relativePath>../../pom.xml</relativePath>
1010
</parent>
1111

engine-adapter/camunda-platform-7-embedded-core/src/main/kotlin/dev/bpmcrafters/processengineapi/adapter/c7/embedded/task/delivery/job/EmbeddedTaskDeliveryJobHandler.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class EmbeddedTaskDeliveryJobHandler(
6060
}
6161

6262
TYPE_SERVICE -> {
63-
val serviceTask = commandContext.fetchAndLockExternalTask(configuration.executionId, workerId, lockTimeInSeconds)
63+
val serviceTask = commandContext.fetchAndLockExternalTask(configuration.executionId, workerId, lockTimeInSeconds * 1000)
6464
logger.debug { "PROCESS-ENGINE-C7-EMBEDDED-023: Delivering external service task for execution ${configuration.executionId}, with task ${serviceTask.id}" }
6565
subscriptions.firstOrNull { subscription -> subscription.matches(serviceTask) }?.let { activeSubscription ->
6666
try {

engine-adapter/camunda-platform-7-embedded-core/src/main/kotlin/dev/bpmcrafters/processengineapi/adapter/c7/embedded/task/delivery/pull/EmbeddedPullServiceTaskDelivery.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ class EmbeddedPullServiceTaskDelivery(
2525
private val workerId: String,
2626
private val subscriptionRepository: SubscriptionRepository,
2727
private val maxTasks: Int,
28-
private val lockDuration: Long,
29-
private val retryTimeout: Long,
28+
private val lockDurationInSeconds: Long,
29+
private val retryTimeoutInSeconds: Long,
3030
private val retries: Int,
3131
private val executorService: ExecutorService
3232
) : ExternalServiceTaskDelivery, RefreshableDelivery {
@@ -59,7 +59,7 @@ class EmbeddedPullServiceTaskDelivery(
5959
} catch (e: Exception) {
6060
val jobRetries: Int = lockedTask.retries ?: retries
6161
logger.error { "PROCESS-ENGINE-C7-EMBEDDED-033: failing delivering task ${lockedTask.id}: ${e.message}" }
62-
externalTaskService.handleFailure(lockedTask.id, workerId, e.message, jobRetries - 1, retryTimeout)
62+
externalTaskService.handleFailure(lockedTask.id, workerId, e.message, jobRetries - 1, retryTimeoutInSeconds * 1000)
6363
subscriptionRepository.deactivateSubscriptionForTask(taskId = lockedTask.id)
6464
logger.error { "PROCESS-ENGINE-C7-EMBEDDED-034: successfully failed delivering task ${lockedTask.id}: ${e.message}" }
6565
}
@@ -77,9 +77,9 @@ class EmbeddedPullServiceTaskDelivery(
7777
.distinctBy { it.taskDescriptionKey }
7878
.forEach { subscription ->
7979
this
80-
.topic(subscription.taskDescriptionKey, lockDuration)
80+
.topic(subscription.taskDescriptionKey, lockDurationInSeconds * 1000)
8181
.enableCustomObjectDeserialization()
82-
// FIXME -> consider complex tent filtering
82+
// FIXME -> consider complex tenant filtering
8383
}
8484
return this
8585
}

engine-adapter/camunda-platform-7-embedded-core/src/test/kotlin/dev/bpmcrafters/processengineapi/adapter/c7/embedded/process/C7EmbeddedProcessTestHelper.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ class C7EmbeddedProcessTestHelper(private val processEngine: ProcessEngine) : Pr
3434
workerId = WORKER_ID,
3535
subscriptionRepository = subscriptionRepository,
3636
maxTasks = 100,
37-
lockDuration = 10L,
38-
retryTimeout = 10L,
37+
lockDurationInSeconds = 10L,
38+
retryTimeoutInSeconds = 10L,
3939
retries = 3,
4040
executorService = Executors.newFixedThreadPool(3)
4141
)

0 commit comments

Comments
 (0)