diff options
author | Steve Smokowski <ss835w@att.com> | 2020-10-27 12:32:37 +0000 |
---|---|---|
committer | Steve Smokowski <ss835w@att.com> | 2020-10-27 12:32:37 +0000 |
commit | aaec67060a5973ccf2ef263cb928e3a7e8d36b6a (patch) | |
tree | 6b8774ff5aa799e7baa1ee6b4d3eda8cbfbe8b30 /bpmn/so-bpmn-tasks/src/main/java/org/onap | |
parent | eeaf0330f835b237812bbbf26ca5bba3c44f4671 (diff) |
Revert "PNF service instantiation using building blocks fails"
This reverts commit eeaf0330f835b237812bbbf26ca5bba3c44f4671.
Reason for revert: <revert change to preform testing>
Change-Id: I866ca90e763bfeca73e4a734bb47102f69fecf79
Issue-ID: SO-3322
Signed-off-by: Smokowski, Steve <ss835w@att.com>
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/main/java/org/onap')
2 files changed, 6 insertions, 20 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 0cb8fb2ccd..43a85051be 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 @@ -103,6 +103,7 @@ public class WorkflowActionBBTasks { (List<ExecuteBuildingBlock>) execution.getVariable("flowsToExecute"); execution.setVariable("MacroRollback", false); + flowManipulatorListenerRunner.modifyFlows(flowsToExecute, new DelegateExecutionImpl(execution)); int currentSequence = (int) execution.getVariable(G_CURRENT_SEQUENCE); ExecuteBuildingBlock ebb = flowsToExecute.get(currentSequence); @@ -113,12 +114,6 @@ public class WorkflowActionBBTasks { execution.setVariable(G_CURRENT_SEQUENCE, currentSequence); } - public void runFlowManipulator(DelegateExecution execution) { - List<ExecuteBuildingBlock> flowsToExecute = - (List<ExecuteBuildingBlock>) execution.getVariable("flowsToExecute"); - flowManipulatorListenerRunner.modifyFlows(flowsToExecute, new DelegateExecutionImpl(execution)); - } - public void updateFlowStatistics(DelegateExecution execution) { try { int currentSequence = (int) execution.getVariable(G_CURRENT_SEQUENCE); diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/SkipCDSBuildingBlockListener.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/SkipCDSBuildingBlockListener.java index 42aab4c16e..2119ced951 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/SkipCDSBuildingBlockListener.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/SkipCDSBuildingBlockListener.java @@ -52,8 +52,6 @@ public class SkipCDSBuildingBlockListener implements FlowManipulator { private Set<String> pnfActions = new HashSet<>(Arrays.asList("config-assign", "config-deploy", "PnfConfigAssign", "PnfConfigDeploy")); - private static final String COMPLETED = "completed"; - @Override public boolean shouldRunFor(String currentBBName, boolean isFirst, BuildingBlockExecution execution) { @@ -72,7 +70,6 @@ public class SkipCDSBuildingBlockListener implements FlowManipulator { public void run(List<ExecuteBuildingBlock> flowsToExecute, ExecuteBuildingBlock currentBB, BuildingBlockExecution execution) { String customizationUUID = currentBB.getBuildingBlock().getKey(); - int flowsToExecuteSize = flowsToExecute.size(); if (Strings.isEmpty(customizationUUID)) { return; @@ -88,7 +85,7 @@ public class SkipCDSBuildingBlockListener implements FlowManipulator { vnfResourceCustomizations); if (null != vrc) { boolean skipConfigVNF = vrc.isSkipPostInstConf(); - currentSequenceSkipCheck(execution, skipConfigVNF, flowsToExecuteSize); + currentSequenceSkipCheck(execution, skipConfigVNF); } } @@ -100,7 +97,7 @@ public class SkipCDSBuildingBlockListener implements FlowManipulator { if (null != vfc) { boolean skipVfModule = vfc.isSkipPostInstConf(); - currentSequenceSkipCheck(execution, skipVfModule, flowsToExecuteSize); + currentSequenceSkipCheck(execution, skipVfModule); } } else if (currentBB.getBuildingBlock().getBpmnScope().equalsIgnoreCase("PNF") @@ -110,7 +107,7 @@ public class SkipCDSBuildingBlockListener implements FlowManipulator { if (null != pnfResourceCustomization) { boolean skipConfigPNF = pnfResourceCustomization.isSkipPostInstConf(); - currentSequenceSkipCheck(execution, skipConfigPNF, flowsToExecuteSize); + currentSequenceSkipCheck(execution, skipConfigPNF); } } } @@ -121,16 +118,10 @@ public class SkipCDSBuildingBlockListener implements FlowManipulator { } - private void currentSequenceSkipCheck(BuildingBlockExecution execution, boolean skipModule, - int flowsToExecuteSize) { + private void currentSequenceSkipCheck(BuildingBlockExecution execution, boolean skipModule) { if (skipModule) { int currentSequence = execution.getVariable(BBConstants.G_CURRENT_SEQUENCE); - currentSequence++; - if (currentSequence >= flowsToExecuteSize) { - execution.setVariable(COMPLETED, true); - } else { - execution.setVariable(BBConstants.G_CURRENT_SEQUENCE, currentSequence); - } + execution.setVariable(BBConstants.G_CURRENT_SEQUENCE, currentSequence + 1); } } |