diff options
author | Kuleshov, Elena <evn@att.com> | 2020-11-19 18:06:15 -0500 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@att.com> | 2020-11-19 18:06:15 -0500 |
commit | 223aed1447650c9fe4c0b8c3402622171abdfce4 (patch) | |
tree | d15e7a597018256a03a01295c2aa300d2995c936 /bpmn/so-bpmn-tasks/src/main/java/org | |
parent | b029a27f327851e73ceff94595cbb1e099da8998 (diff) |
incorrect filtering of config bbs on
Fix configuration BB setup for replaceInstance cases
Fix configuration BB setup for replaceInstance cases
Formatting fixes for workflowAction.
Issue-ID: SO-3396
Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com>
Change-Id: Ia08e5d9c9057d2b991fb33fa89bfd833afc50d12
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/main/java/org')
-rw-r--r-- | bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java index 5e281cff87..554385d043 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java @@ -450,14 +450,18 @@ public class WorkflowActionBBTasks { if (requestAction.equalsIgnoreCase("replaceInstance") || requestAction.equalsIgnoreCase("replaceInstanceRetainAssignments")) { List<ExecuteBuildingBlock> configBBs = flowsToExecute.stream() - .filter(item -> !item.getBuildingBlock().getBpmnFlowName().matches(CONFIGURATION_PATTERN)) + .filter(item -> item.getBuildingBlock().getBpmnFlowName().matches(CONFIGURATION_PATTERN)) .collect(Collectors.toList()); - for (ExecuteBuildingBlock bb : configBBs) { - bb.getConfigurationResourceKeys().setCvnfcCustomizationUUID(modelCustomizationId); - bb.getConfigurationResourceKeys().setVnfcName(vnfc.getVnfcName()); + if (configBBs != null && configBBs.size() > 0) { + for (ExecuteBuildingBlock bb : configBBs) { + if (bb.getConfigurationResourceKeys() != null) { + bb.getConfigurationResourceKeys().setCvnfcCustomizationUUID(modelCustomizationId); + bb.getConfigurationResourceKeys().setVnfcName(vnfc.getVnfcName()); + } + } + execution.setVariable("flowsToExecute", flowsToExecute); + execution.setVariable(COMPLETED, false); } - execution.setVariable("flowsToExecute", flowsToExecute); - execution.setVariable(COMPLETED, false); } else { CvnfcConfigurationCustomization fabricConfig = catalogDbClient.getCvnfcCustomization( serviceModelUUID, vnfCustomizationUUID, vfModuleCustomizationUUID, modelCustomizationId); |