aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks/src/main
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2020-07-01 20:36:59 +0000
committerGerrit Code Review <gerrit@onap.org>2020-07-01 20:36:59 +0000
commit2507d0553146ff8c61e6361fa9bfcc8794f6447a (patch)
treee5573bc8f715b1f82aca40fa52eedfb4afbbe034 /bpmn/so-bpmn-tasks/src/main
parent69607bdb19821409e8e12b2e44ad4eaed67bf75c (diff)
parent525416ca5d9fd84be3e2d5693f242455dbb83a39 (diff)
Merge "Preserve placement of Config BBs"
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.java60
1 files changed, 42 insertions, 18 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 8a4058bf01..9200d99fe1 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
@@ -222,18 +222,6 @@ public class WorkflowAction {
cloudOwner, serviceType);
}
Resource resourceKey = getResourceKey(sIRequest, resourceType);
- if (isConfiguration(orchFlows) && !requestAction.equalsIgnoreCase(CREATEINSTANCE)) {
- List<ExecuteBuildingBlock> configBuildingBlocks = getConfigBuildingBlocks(
- new ConfigBuildingBlocksDataObject().setsIRequest(sIRequest).setOrchFlows(orchFlows)
- .setRequestId(requestId).setResourceKey(resourceKey).setApiVersion(apiVersion)
- .setResourceId(resourceId).setRequestAction(requestAction).setaLaCarte(true)
- .setVnfType(vnfType).setWorkflowResourceIds(workflowResourceIds)
- .setRequestDetails(requestDetails).setExecution(execution));
-
- flowsToExecute.addAll(configBuildingBlocks);
- }
- orchFlows = orchFlows.stream().filter(item -> !item.getFlowName().contains(FABRIC_CONFIGURATION))
- .collect(Collectors.toList());
if ((requestAction.equalsIgnoreCase(REPLACEINSTANCE)
|| requestAction.equalsIgnoreCase(REPLACEINSTANCERETAINASSIGNMENTS))
@@ -245,12 +233,48 @@ public class WorkflowAction {
.setResourceId(resourceId).setRequestAction(requestAction).setaLaCarte(true)
.setVnfType(vnfType).setWorkflowResourceIds(workflowResourceIds)
.setRequestDetails(requestDetails).setExecution(execution));
- }
- for (OrchestrationFlow orchFlow : orchFlows) {
- ExecuteBuildingBlock ebb = buildExecuteBuildingBlock(orchFlow, requestId, resourceKey,
- apiVersion, resourceId, requestAction, true, vnfType, workflowResourceIds,
- requestDetails, false, null, null, false);
- flowsToExecute.add(ebb);
+ for (OrchestrationFlow orchFlow : orchFlows) {
+ if (orchFlow.getFlowName().contains(CONFIGURATION)) {
+ List<OrchestrationFlow> configOrchFlows = new ArrayList<OrchestrationFlow>();
+ configOrchFlows.add(orchFlow);
+ List<ExecuteBuildingBlock> configBuildingBlocks =
+ getConfigBuildingBlocks(new ConfigBuildingBlocksDataObject()
+ .setsIRequest(sIRequest).setOrchFlows(configOrchFlows)
+ .setRequestId(requestId).setResourceKey(resourceKey)
+ .setApiVersion(apiVersion).setResourceId(resourceId)
+ .setRequestAction(requestAction).setaLaCarte(true).setVnfType(vnfType)
+ .setWorkflowResourceIds(workflowResourceIds)
+ .setRequestDetails(requestDetails).setExecution(execution));
+ flowsToExecute.addAll(configBuildingBlocks);
+ } else {
+ ExecuteBuildingBlock ebb = buildExecuteBuildingBlock(orchFlow, requestId, resourceKey,
+ apiVersion, resourceId, requestAction, true, vnfType, workflowResourceIds,
+ requestDetails, false, null, null, false);
+ flowsToExecute.add(ebb);
+ }
+ }
+ } else {
+ if (isConfiguration(orchFlows) && !requestAction.equalsIgnoreCase(CREATEINSTANCE)) {
+ List<ExecuteBuildingBlock> configBuildingBlocks =
+ getConfigBuildingBlocks(new ConfigBuildingBlocksDataObject().setsIRequest(sIRequest)
+ .setOrchFlows(orchFlows).setRequestId(requestId).setResourceKey(resourceKey)
+ .setApiVersion(apiVersion).setResourceId(resourceId)
+ .setRequestAction(requestAction).setaLaCarte(true).setVnfType(vnfType)
+ .setWorkflowResourceIds(workflowResourceIds)
+ .setRequestDetails(requestDetails).setExecution(execution));
+
+ flowsToExecute.addAll(configBuildingBlocks);
+ }
+ orchFlows =
+ orchFlows.stream().filter(item -> !item.getFlowName().contains(FABRIC_CONFIGURATION))
+ .collect(Collectors.toList());
+
+ for (OrchestrationFlow orchFlow : orchFlows) {
+ ExecuteBuildingBlock ebb = buildExecuteBuildingBlock(orchFlow, requestId, resourceKey,
+ apiVersion, resourceId, requestAction, true, vnfType, workflowResourceIds,
+ requestDetails, false, null, null, false);
+ flowsToExecute.add(ebb);
+ }
}
} else {
boolean foundRelated = false;