diff --git a/modules/flowable-http-common/src/main/java/org/flowable/http/common/impl/ExpressionUtils.java b/modules/flowable-http-common/src/main/java/org/flowable/http/common/impl/ExpressionUtils.java index 0a6f5797a68..ab09b8803ec 100644 --- a/modules/flowable-http-common/src/main/java/org/flowable/http/common/impl/ExpressionUtils.java +++ b/modules/flowable-http-common/src/main/java/org/flowable/http/common/impl/ExpressionUtils.java @@ -16,6 +16,7 @@ import java.util.Collections; import java.util.HashSet; import java.util.Set; +import java.util.stream.Stream; import org.flowable.common.engine.api.FlowableException; import org.flowable.common.engine.api.delegate.Expression; @@ -75,7 +76,7 @@ public static String getStringFromField(final Expression expression, final Varia } public static Set getStringSetFromField(final String field) { - String[] codes = field.split(","); + String[] codes = field.split("\\s*,\\s*"); Set codeSet = new HashSet<>(Arrays.asList(codes)); Collections.addAll(codeSet, codes); return codeSet; diff --git a/modules/flowable-http/src/test/java/org/flowable/http/bpmn/HttpServiceTaskTest.java b/modules/flowable-http/src/test/java/org/flowable/http/bpmn/HttpServiceTaskTest.java index 69911ff0bb3..53e1f479418 100644 --- a/modules/flowable-http/src/test/java/org/flowable/http/bpmn/HttpServiceTaskTest.java +++ b/modules/flowable-http/src/test/java/org/flowable/http/bpmn/HttpServiceTaskTest.java @@ -434,7 +434,15 @@ public void testHttpGet5XX() { response.put("get500ResponseStatusCode", 500); response.put("get500ResponseReason", get500ResponseReason()); assertKeysEquals(process.getId(), response); - continueProcess(process); + + Execution execution = runtimeService.createExecutionQuery() + .processInstanceId(process.getId()) + .onlyChildExecutions() + .singleResult(); + assertThat(execution).isNotNull(); + assertThat(execution.getActivityId()).isEqualTo("waitAfterError"); + runtimeService.trigger(execution.getId()); + assertProcessEnded(process.getId()); } protected String get500ResponseReason() { diff --git a/modules/flowable-http/src/test/resources/org/flowable/http/bpmn/HttpServiceTaskTest.testHttpGet5XX.bpmn20.xml b/modules/flowable-http/src/test/resources/org/flowable/http/bpmn/HttpServiceTaskTest.testHttpGet5XX.bpmn20.xml index 67842d0baad..34698d1f4dd 100644 --- a/modules/flowable-http/src/test/resources/org/flowable/http/bpmn/HttpServiceTaskTest.testHttpGet5XX.bpmn20.xml +++ b/modules/flowable-http/src/test/resources/org/flowable/http/bpmn/HttpServiceTaskTest.testHttpGet5XX.bpmn20.xml @@ -35,6 +35,13 @@ + + + + + + + @@ -50,17 +57,37 @@ - - - + + + + + + + + + + + + + + + + + + - - - + + + - - - + + +