Fix ConfigAssignVnfBB and ConfigDeployVnfBB 47/89147/6
authorAlexis de Talhouët <adetalhouet89@gmail.com>
Mon, 3 Jun 2019 13:58:07 +0000 (09:58 -0400)
committerAlexis de Talhouët <adetalhouet89@gmail.com>
Mon, 3 Jun 2019 19:49:22 +0000 (19:49 +0000)
Change-Id: If5a175ee26e279cf71e38c996a75fa627e5e2c00
Issue-ID: SO-1981
Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
adapters/mso-catalog-db-adapter/src/main/resources/db/migration/R__MacroData.sql
bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ConfigAssignVnfBB.bpmn
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigAssignVnf.java

index 2183d3b..3d19b3a 100644 (file)
@@ -806,3 +806,8 @@ VALUES
 ('VnfInPlaceSoftwareUpdate', 'NO_VALIDATE', 'CUSTOM');
 
 UPDATE northbound_request_ref_lookup SET SERVICE_TYPE = '*' WHERE SERVICE_TYPE = NULL;
+
+INSERT INTO building_block_detail(BUILDING_BLOCK_NAME, RESOURCE_TYPE, TARGET_ACTION)
+VALUES
+('ConfigAssignVnfBB', 'NO_VALIDATE', 'CUSTOM'),
+('ConfigDeployVnfBB', 'NO_VALIDATE', 'CUSTOM');
index 9892fbd..11d77bf 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1ahlzqg" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="2.0.1">
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1ahlzqg" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.9.0">
   <bpmn:process id="ConfigAssignVnfBB" name="ConfigAssignVnfBB" isExecutable="true">
     <bpmn:startEvent id="StartEvent_1">
       <bpmn:outgoing>SequenceFlow_0gmfit3</bpmn:outgoing>
@@ -23,7 +23,7 @@
       <bpmn:outgoing>SequenceFlow_1mkhog2</bpmn:outgoing>
     </bpmn:serviceTask>
     <bpmn:sequenceFlow id="SequenceFlow_05qembo" sourceRef="Task_0bhf6tp" targetRef="CallActivity_1gfzi2g" />
-    <bpmn:serviceTask id="Task_0bhf6tp" name="PreProcess Abstract CDS Processing" camunda:expression="${ConfigAssignVnf.PreProcessAbstractCDSProcessing(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
+    <bpmn:serviceTask id="Task_0bhf6tp" name="PreProcess Abstract CDS Processing" camunda:expression="${ConfigAssignVnf.preProcessAbstractCDSProcessing(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
       <bpmn:incoming>SequenceFlow_0gmfit3</bpmn:incoming>
       <bpmn:outgoing>SequenceFlow_05qembo</bpmn:outgoing>
     </bpmn:serviceTask>
@@ -34,7 +34,7 @@
     </bpmn:exclusiveGateway>
     <bpmn:sequenceFlow id="SequenceFlow_0cvsnuu" sourceRef="CallActivity_1gfzi2g" targetRef="ExclusiveGateway_13q340y" />
     <bpmn:sequenceFlow id="SequenceFlow_07tqu82" name="success" sourceRef="ExclusiveGateway_13q340y" targetRef="Task_1hs1mn0">
-      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{execution.getVariable("CDSStatus").equals("Success")}</bpmn:conditionExpression>
+      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{execution.getVariable("CDSStatus").equals("Success")}]]></bpmn:conditionExpression>
     </bpmn:sequenceFlow>
     <bpmn:endEvent id="EndEvent_0mnaj50">
       <bpmn:incoming>SequenceFlow_15gxql1</bpmn:incoming>
         <dc:Bounds x="507" y="187" width="36" height="36" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_0gmfit3_di" bpmnElement="SequenceFlow_0gmfit3">
-        <di:waypoint x="543" y="205" />
-        <di:waypoint x="614" y="205" />
+        <di:waypoint xsi:type="dc:Point" x="543" y="205" />
+        <di:waypoint xsi:type="dc:Point" x="614" y="205" />
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNShape id="EndEvent_0lgvk82_di" bpmnElement="EndEvent_0lgvk82">
         <dc:Bounds x="1307" y="187" width="36" height="36" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_1mkhog2_di" bpmnElement="SequenceFlow_1mkhog2">
-        <di:waypoint x="1218" y="205" />
-        <di:waypoint x="1307" y="205" />
+        <di:waypoint xsi:type="dc:Point" x="1218" y="205" />
+        <di:waypoint xsi:type="dc:Point" x="1307" y="205" />
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNShape id="CallActivity_1gfzi2g_di" bpmnElement="CallActivity_1gfzi2g">
         <dc:Bounds x="788" y="165" width="100" height="80" />
@@ -66,8 +66,8 @@
         <dc:Bounds x="1118" y="165" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_05qembo_di" bpmnElement="SequenceFlow_05qembo">
-        <di:waypoint x="714" y="205" />
-        <di:waypoint x="788" y="205" />
+        <di:waypoint xsi:type="dc:Point" x="714" y="205" />
+        <di:waypoint xsi:type="dc:Point" x="788" y="205" />
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNShape id="ServiceTask_01mv1si_di" bpmnElement="Task_0bhf6tp">
         <dc:Bounds x="614" y="165" width="100" height="80" />
         <dc:Bounds x="978" y="180" width="50" height="50" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_0cvsnuu_di" bpmnElement="SequenceFlow_0cvsnuu">
-        <di:waypoint x="888" y="205" />
-        <di:waypoint x="978" y="205" />
+        <di:waypoint xsi:type="dc:Point" x="888" y="205" />
+        <di:waypoint xsi:type="dc:Point" x="978" y="205" />
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_07tqu82_di" bpmnElement="SequenceFlow_07tqu82">
-        <di:waypoint x="1028" y="205" />
-        <di:waypoint x="1118" y="205" />
+        <di:waypoint xsi:type="dc:Point" x="1028" y="205" />
+        <di:waypoint xsi:type="dc:Point" x="1118" y="205" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1053" y="187" width="41" height="14" />
         </bpmndi:BPMNLabel>
@@ -90,8 +90,8 @@
         <dc:Bounds x="985" y="327" width="36" height="36" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_15gxql1_di" bpmnElement="SequenceFlow_15gxql1">
-        <di:waypoint x="1003" y="230" />
-        <di:waypoint x="1003" y="327" />
+        <di:waypoint xsi:type="dc:Point" x="1003" y="230" />
+        <di:waypoint xsi:type="dc:Point" x="1003" y="327" />
       </bpmndi:BPMNEdge>
     </bpmndi:BPMNPlane>
   </bpmndi:BPMNDiagram>
index 8a24330..b2058b2 100644 (file)
@@ -20,6 +20,7 @@
 
 package org.onap.so.bpmn.infrastructure.flowspecific.tasks;
 
+import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 import org.onap.so.bpmn.common.BuildingBlockExecution;
@@ -68,7 +69,8 @@ public class ConfigAssignVnf {
             ServiceInstance serviceInstance =
                     extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID);
 
-            Map<String, Object> userParams = execution.getGeneralBuildingBlock().getRequestContext().getUserParams();
+            List<Map<String, Object>> userParams =
+                    execution.getGeneralBuildingBlock().getRequestContext().getRequestParameters().getUserParams();
 
             ConfigAssignPropertiesForVnf configAssignPropertiesForVnf = new ConfigAssignPropertiesForVnf();
             configAssignPropertiesForVnf.setServiceInstanceId(serviceInstance.getServiceInstanceId());
@@ -79,8 +81,10 @@ public class ConfigAssignVnf {
             configAssignPropertiesForVnf.setVnfId(vnf.getVnfId());
             configAssignPropertiesForVnf.setVnfName(vnf.getVnfName());
 
-            for (Map.Entry<String, Object> entry : userParams.entrySet()) {
-                configAssignPropertiesForVnf.setUserParam(entry.getKey(), entry.getValue());
+            for (Map<String, Object> params : userParams) {
+                for (Map.Entry<String, Object> entry : params.entrySet()) {
+                    configAssignPropertiesForVnf.setUserParam(entry.getKey(), entry.getValue());
+                }
             }
 
             ConfigAssignRequestVnf configAssignRequestVnf = new ConfigAssignRequestVnf();