diff --git a/modules/flowable-spring-boot/flowable-spring-boot-samples/flowable-spring-boot-sample-jpa-all/src/main/resources/processes/doge.bpmn20.xml b/modules/flowable-spring-boot/flowable-spring-boot-samples/flowable-spring-boot-sample-jpa-all/src/main/resources/processes/doge.bpmn20.xml index 52f2103926b..49b7edec1c9 100644 --- a/modules/flowable-spring-boot/flowable-spring-boot-samples/flowable-spring-boot-sample-jpa-all/src/main/resources/processes/doge.bpmn20.xml +++ b/modules/flowable-spring-boot/flowable-spring-boot-samples/flowable-spring-boot-sample-jpa-all/src/main/resources/processes/doge.bpmn20.xml @@ -3,7 +3,7 @@ - + diff --git a/modules/flowable-spring-boot/flowable-spring-boot-samples/flowable-spring-boot-sample-jpa-all/src/test/java/org/flowable/test/spring/boot/JpaApplicationTest.java b/modules/flowable-spring-boot/flowable-spring-boot-samples/flowable-spring-boot-sample-jpa-all/src/test/java/org/flowable/test/spring/boot/JpaApplicationTest.java index 1d0bed07697..3af07ff3dd6 100644 --- a/modules/flowable-spring-boot/flowable-spring-boot-samples/flowable-spring-boot-sample-jpa-all/src/test/java/org/flowable/test/spring/boot/JpaApplicationTest.java +++ b/modules/flowable-spring-boot/flowable-spring-boot-samples/flowable-spring-boot-sample-jpa-all/src/test/java/org/flowable/test/spring/boot/JpaApplicationTest.java @@ -93,10 +93,6 @@ public void photosArePersistedAsJpaEntities() { ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("dogeProcess", variables); - List waitingExecutions = runtimeService.createExecutionQuery().activityId("wait").list(); - assertThat(waitingExecutions) - .hasSize(2); - Map processInstanceVariables = runtimeService.getVariables(processInstance.getId()); assertThat(processInstanceVariables).containsOnlyKeys("photos"); List processPhotos = (List) processInstanceVariables.get("photos"); @@ -107,11 +103,13 @@ public void photosArePersistedAsJpaEntities() { "two" ); - for (Execution waitingExecution : waitingExecutions) { + Execution waitingExecution = runtimeService.createExecutionQuery().activityId("wait").singleResult(); + while (waitingExecution != null) { Photo executionPhoto = runtimeService.getVariable(waitingExecution.getId(), "photo", Photo.class); assertThat(executionPhoto).isNotNull(); assertThat(executionPhoto.getLabel()).isIn("one", "two"); runtimeService.trigger(waitingExecution.getId()); + waitingExecution = runtimeService.createExecutionQuery().activityId("wait").singleResult(); } Task reviewTask = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult();