summaryrefslogtreecommitdiffstats
path: root/bpmn/mso-infrastructure-bpmn
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/mso-infrastructure-bpmn')
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java3
1 files changed, 2 insertions, 1 deletions
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);