From b3897d1aba740d95185f3c2c7016b7d674f12711 Mon Sep 17 00:00:00 2001 From: "Kalkere Ramesh, Sharan (sk720x)" Date: Mon, 10 Dec 2018 12:00:37 -0500 Subject: requestid retrieval and validation in bpmn Change-Id: I4d30a784eed5dd68f9ee7c2b6833d72cbf0eccfa Issue-ID: SO-1311 Signed-off-by: Kalkere Ramesh, Sharan (sk720x) --- .../src/test/java/org/onap/so/bpmn/common/WorkflowTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bpmn/mso-infrastructure-bpmn') diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java index 4e45aafc9e..d24e953196 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java @@ -892,7 +892,7 @@ public abstract class WorkflowTest { .processDefinitionKey(processKey); } - if(processInstanceQuery.count() <= 1){ + if(processInstanceQuery.count() == 1 || processInstanceQuery.count() == 0){ processInstance = processInstanceQuery.singleResult(); }else{ //TODO There shouldnt be more than one in the list but seems to be happening, need to figure out why happening and best way to get correct one from list @@ -901,6 +901,7 @@ public abstract class WorkflowTest { processInstance = processList.get((processList.size() - 1)); } + if (processInstance != null) { value = runtimeService .getVariable(processInstance.getId(), variable); -- cgit 1.2.3-korg