summaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks/src/main
diff options
context:
space:
mode:
authorSunilB <sb00577584@techmahindra.com>2019-04-15 19:52:11 +0530
committerSunilB <sb00577584@techmahindra.com>2019-04-15 19:52:11 +0530
commitc5d5e14f506a9be6e93003b88f0aed42e5030ebf (patch)
tree60d31ce74dd80deb4df0e82b4fb81a1eadfb1796 /bpmn/so-bpmn-tasks/src/main
parent9c0663079469cb5a42c96ff990385c23be2f361e (diff)
Conditional Macro Action Selection
Update orchestration_flow_reference table and changes in WorkflowActionBBTasks to Conditionally trigger ConfigAssignVnfBB And ConfigDeployVnfBB building block. Change-Id: I1bdb8a77223aef6855e4e1c9aa80dd026892e6f6 Issue-ID: SO-1702 Signed-off-by: sunilb <sb00577584@techmahindra.com>
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/WorkflowActionBBTasks.java20
1 files changed, 20 insertions, 0 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 4514d24c54..f0a102dfeb 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
@@ -37,6 +37,7 @@ import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetupUtils;
import org.onap.so.client.aai.AAIObjectType;
import org.onap.so.client.exception.ExceptionBuilder;
import org.onap.so.db.catalog.beans.CvnfcConfigurationCustomization;
+import org.onap.so.db.catalog.beans.VnfResourceCustomization;
import org.onap.so.db.catalog.client.CatalogDbClient;
import org.onap.so.db.request.beans.InfraActiveRequests;
import org.onap.so.db.request.client.RequestsDbClient;
@@ -83,6 +84,25 @@ public class WorkflowActionBBTasks {
execution.setVariable("MacroRollback", false);
int currentSequence = (int) execution.getVariable(G_CURRENT_SEQUENCE);
ExecuteBuildingBlock ebb = flowsToExecute.get(currentSequence);
+
+ if (ebb.getBuildingBlock().getBpmnFlowName().equals("ConfigAssignVnfBB")
+ || ebb.getBuildingBlock().getBpmnFlowName().equals("ConfigDeployVnfBB")) {
+ String serviceInstanceId = ebb.getWorkflowResourceIds().getServiceInstanceId();
+ String vnfCustomizationUUID = ebb.getBuildingBlock().getKey();
+
+ List<VnfResourceCustomization> vnfResourceCustomizations =
+ catalogDbClient.getVnfResourceCustomizationByModelUuid(serviceInstanceId);
+ if (vnfResourceCustomizations != null && vnfResourceCustomizations.size() >= 1) {
+ VnfResourceCustomization vrc = catalogDbClient.findVnfResourceCustomizationInList(vnfCustomizationUUID,
+ vnfResourceCustomizations);
+ boolean skipConfigVNF = vrc.isSkipPostInstConf();
+ if (skipConfigVNF) {
+ currentSequence++;
+ ebb = flowsToExecute.get(currentSequence);
+ }
+ }
+ }
+
boolean homing = (boolean) execution.getVariable("homing");
boolean calledHoming = (boolean) execution.getVariable("calledHoming");
if (homing && !calledHoming) {