aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks/src/main
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2020-10-23 16:56:12 +0000
committerGerrit Code Review <gerrit@onap.org>2020-10-23 16:56:12 +0000
commit68a78b3427721686cc8d283ae4e9ae5831f4f051 (patch)
treec430ec9dd7b96f2cd4fab0dd66b900df6b466de9 /bpmn/so-bpmn-tasks/src/main
parent1ab809dc66569ae9db7fb94b861c0852d095428d (diff)
parente628d4da23a6961dfce0689ef599ec3e4df685e6 (diff)
Merge "pnf service instantiation fix - IndexOutOfBoundsException"
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/main')
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
index d9ad245e76..7c4f735577 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
@@ -30,6 +30,7 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
+import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Optional;
@@ -1663,8 +1664,11 @@ public class WorkflowAction {
execution.setVariable(BBConstants.G_ISTOPLEVELFLOW, northBoundRequest.getIsToplevelflow());
}
List<OrchestrationFlow> flows = northBoundRequest.getOrchestrationFlowList();
- if (flows == null)
+ if (flows == null) {
flows = new ArrayList<>();
+ } else {
+ flows.sort(Comparator.comparingInt(OrchestrationFlow::getSequenceNumber));
+ }
for (OrchestrationFlow flow : flows) {
if (!flow.getFlowName().contains("BB") && !flow.getFlowName().contains("Activity")) {
List<OrchestrationFlow> macroQueryFlows =