Merge "APIH should not update db unless on error"
authorRob Daugherty <rd472p@att.com>
Mon, 10 Dec 2018 13:58:58 +0000 (13:58 +0000)
committerGerrit Code Review <gerrit@onap.org>
Mon, 10 Dec 2018 13:58:58 +0000 (13:58 +0000)
29 files changed:
adapters/mso-catalog-db-adapter/src/main/resources/application.yaml
adapters/mso-openstack-adapters/src/main/java/db/migration/R__CloudConfigMigration.java
adapters/mso-openstack-adapters/src/main/resources/application.yaml
adapters/mso-requests-db-adapter/src/main/resources/application.yaml
bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtil.groovy
bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtilFactory.groovy [new file with mode: 0644]
bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV1.groovy
bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIVfModule.groovy
bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VnfAdapterRestV1.groovy
bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java
bpmn/MSOCommonBPMN/src/main/resources/subprocess/FalloutHandler.bpmn
bpmn/MSOCommonBPMN/src/main/resources/subprocess/SDNCAdapterV1.bpmn
bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtilTest.groovy [new file with mode: 0644]
bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java
bpmn/mso-infrastructure-bpmn/pom.xml
bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java
bpmn/pom.xml
bpmn/so-bpmn-building-blocks/pom.xml
bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy
bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Delete3rdONAPE2EServiceInstance.groovy
bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateNetworkInstance.bpmn
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCRequestTasks.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SdnCommonTasks.java
bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasksTest.java
bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdn/common/SdnCommonTasksTest.java
bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/SDNCClientIT.java
common/src/main/java/org/onap/so/client/HttpClientFactory.java [new file with mode: 0644]
pom.xml

index ff6f237..749a319 100644 (file)
@@ -14,7 +14,6 @@ mso:
     max-pool-size: 50
     queue-capacity: 500
     
-# CatalogDB
 spring:
   datasource:
     jdbc-url: jdbc:mariadb://${DB_HOST}:${DB_PORT}/catalogdb
@@ -34,7 +33,7 @@ spring:
       fail-on-empty-beans: false
 flyway:
   baseline-on-migrate: false
-  jdbc-url:  jdbc:mariadb://${DB_HOST}:${DB_PORT}/catalogdb
+  url: jdbc:mariadb://${DB_HOST}:${DB_PORT}/catalogdb
   user: ${DB_ADMIN_USERNAME}
   password: ${DB_ADMIN_PASSWORD}
   outOfOrder: true
index 6339616..257ad3c 100644 (file)
@@ -67,7 +67,7 @@ public class R__CloudConfigMigration implements JdbcMigration , MigrationInfoPro
         CloudConfig cloudConfig = null;
 
         // Try the override file
-        String configLocation = System.getProperty("spring.config.location");
+        String configLocation = System.getProperty("spring.config.additional-location");
         if (configLocation != null) {
             try (InputStream stream = new FileInputStream(Paths.get(configLocation).normalize().toString())) {
                 cloudConfig = loadCloudConfig(stream);
index 88099be..bc3bfba 100644 (file)
@@ -13,8 +13,7 @@ mso:
     core-pool-size: 50
     max-pool-size: 50
     queue-capacity: 500
-    
-# CatalogDB
+
 spring:
   datasource:
     jdbc-url: jdbc:mariadb://${DB_HOST}:${DB_PORT}/catalogdb
index 4d200d2..af99a86 100644 (file)
@@ -46,7 +46,7 @@ spring:
       role: ACTUATOR
 flyway:
   baseline-on-migrate: false
-  jdbc-url:  jdbc:mariadb://${DB_HOST}:${DB_PORT}/requestdb
+  url:  jdbc:mariadb://${DB_HOST}:${DB_PORT}/requestdb
   user: ${DB_ADMIN_USERNAME}
   password: ${DB_ADMIN_PASSWORD}
 
index 5c935e9..250cdda 100644 (file)
  */
 
 package org.onap.so.bpmn.common.scripts
-import org.camunda.bpm.engine.delegate.BpmnError
+
+
 import org.camunda.bpm.engine.delegate.DelegateExecution
-import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor;
+import org.onap.logging.ref.slf4j.ONAPLogConstants
 import org.onap.so.client.HttpClient
+import org.onap.so.client.HttpClientFactory
 import org.onap.so.logger.MsoLogger
-import org.apache.commons.lang3.StringEscapeUtils
-import java.util.regex.Matcher
-import java.util.regex.Pattern
+import org.onap.so.utils.TargetEntity
 
 import javax.ws.rs.core.MediaType
 import javax.ws.rs.core.Response
-import org.onap.so.utils.TargetEntity
+import java.util.regex.Matcher
+import java.util.regex.Pattern
 
 class ExternalAPIUtil {
 
        String Prefix="EXTAPI_"
 
-       public MsoUtils utils = new MsoUtils()
-
-       ExceptionUtil exceptionUtil = new ExceptionUtil()
-
        private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, ExternalAPIUtil.class)
 
+       private final HttpClientFactory httpClientFactory;
+       private final MsoUtils utils;
+       private final ExceptionUtil exceptionUtil;
+
        public static final String PostServiceOrderRequestsTemplate =
        "{\n" +
        "\t\"externalId\": <externalId>,\n" +
@@ -85,7 +86,10 @@ class ExternalAPIUtil {
     "\t} \n" +
     "}"
 
-       public ExternalAPIUtil() {
+       ExternalAPIUtil(HttpClientFactory httpClientFactory, MsoUtils utils, ExceptionUtil exceptionUtil) {
+               this.httpClientFactory = httpClientFactory
+               this.utils = utils
+               this.exceptionUtil = exceptionUtil
        }
 
 //     public String getUri(DelegateExecution execution, resourceName) {
@@ -137,8 +141,7 @@ class ExternalAPIUtil {
                        msoLogger.debug( "Generated uuid is: " + uuid)
                        msoLogger.debug( "URL to be used is: " + url)
 
-                       URL Url = new URL(url)
-                       HttpClient client = new HttpClient(Url, MediaType.APPLICATION_JSON, TargetEntity.EXTERNAL)
+                       HttpClient client = httpClientFactory.create(new URL(url), MediaType.APPLICATION_JSON, TargetEntity.EXTERNAL)
                        client.addBasicAuthHeader(execution.getVariable("URN_externalapi_auth"), execution.getVariable("URN_mso_msoKey"))
                        client.addAdditionalHeader("X-FromAppId", "MSO")
                        client.addAdditionalHeader(ONAPLogConstants.Headers.REQUEST_ID, uuid)
@@ -166,17 +169,15 @@ class ExternalAPIUtil {
         * @return Response
         *
         */
-       public Response executeExternalAPIPostCall(DelegateExecution execution, String urlString, String payload){
+       public Response executeExternalAPIPostCall(DelegateExecution execution, String url, String payload){
                msoLogger.debug( " ======== Started Execute ExternalAPI Post Process ======== ")
                Response apiResponse = null
                try{
                        String uuid = utils.getRequestID()
                        msoLogger.debug( "Generated uuid is: " + uuid)
-                       msoLogger.debug( "URL to be used is: " + urlString)
-
-                       URL url = new URL(urlString);
+                       msoLogger.debug( "URL to be used is: " + url)
 
-                       HttpClient httpClient = new HttpClient(url, "application/json", TargetEntity.AAI)
+                       HttpClient httpClient = httpClientFactory.create(new URL(url), MediaType.APPLICATION_JSON, TargetEntity.AAI)
                        httpClient.addBasicAuthHeader(execution.getVariable("URN_externalapi_auth"), execution.getVariable("URN_mso_msoKey"))
                        httpClient.addAdditionalHeader("X-FromAppId", "MSO")
                        httpClient.addAdditionalHeader("X-TransactionId", uuid)
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtilFactory.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtilFactory.groovy
new file mode 100644 (file)
index 0000000..e7f4646
--- /dev/null
@@ -0,0 +1,29 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Nokia.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.so.bpmn.common.scripts
+
+import org.onap.so.client.HttpClientFactory
+
+class ExternalAPIUtilFactory {
+
+    ExternalAPIUtil create() {
+        return new ExternalAPIUtil(new HttpClientFactory(), new MsoUtils(), new ExceptionUtil())
+    }
+}
index d7fc6ac..0cefae5 100644 (file)
@@ -207,7 +207,10 @@ class SDNCAdapterRestV1 extends AbstractServiceTaskProcessor {
 
                        URL url = new URL(sdncAdapterUrl);
 
-                       HttpClient httpClient = new HttpClient(url, "application/json", TargetEntity.SDNC_ADAPTER)
+                       HttpClient httpClient = new HttpClient(url, "application/json", TargetEntity.SDNC_ADAPTER)                      
+                       httpClient.addAdditionalHeader("X-ONAP-RequestID", execution.getVariable("mso-request-id"))
+                       httpClient.addAdditionalHeader("X-ONAP-InvocationID", UUID.randomUUID().toString())
+                       httpClient.addAdditionalHeader("X-ONAP-PartnerName", "SO-SDNCAdapter")
                        httpClient.addAdditionalHeader("mso-request-id", execution.getVariable("mso-request-id"))
                        httpClient.addAdditionalHeader("mso-service-instance-id", execution.getVariable("mso-service-instance-id"))
                        httpClient.addAdditionalHeader("Authorization", execution.getVariable(prefix + "basicAuthHeaderValue"))
index 6691a82..354ece9 100644 (file)
@@ -174,14 +174,12 @@ public class UpdateAAIVfModule extends AbstractServiceTaskProcessor {
                                personaModelVersionEntry = updateVfModuleNode(origRequest,  'persona-model-version')
                        }
                        String contrailServiceInstanceFqdnEntry = updateVfModuleNode(origRequest,  'contrail-service-instance-fqdn')
-                       def payload = """
-                                       {       ${orchestrationStatusEntry}
-                                               ${heatStackIdEntry}
-                                               ${personaModelVersionEntry}
-                                               ${contrailServiceInstanceFqdnEntry}
-                                               "vf-module-id": "${vfModuleId}"                                         
-                                       }
-                       """
+                       org.onap.aai.domain.yang.VfModule payload = new org.onap.aai.domain.yang.VfModule();
+                       payload.setVfModuleId(vfModuleId)
+                       payload.setOrchestrationStatus(orchestrationStatusEntry)
+                       payload.setHeatStackId(heatStackIdEntry)
+                       payload.setPersonaModelVersion(personaModelVersionEntry)
+                       payload.setContrailServiceInstanceFqdn(contrailServiceInstanceFqdnEntry)
 
             try {
                 AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnfId, vfModuleId)
@@ -210,16 +208,16 @@ public class UpdateAAIVfModule extends AbstractServiceTaskProcessor {
        private String updateVfModuleNode(String origRequest, String elementName) {
 
                if (!utils.nodeExists(origRequest, elementName)) {
-                       return "" 
+                       return null
                }
                def elementValue = utils.getNodeText(origRequest, elementName)
 
                if (elementValue.equals('DELETE')) {
-                       // Set the element being deleted to null
-                       return """"${elementName}": null,"""
+                       // Set the element being deleted to empty string
+                       return ""
                }
                else {
-                       return """"${elementName}": "${elementValue}","""
+                       return elementValue
                }               
        }
 
index 13cc7f8..1452a9a 100644 (file)
@@ -29,6 +29,8 @@ import org.onap.so.client.HttpClient
 import org.onap.so.logger.MessageEnum
 import org.onap.so.logger.MsoLogger
 import org.onap.so.utils.TargetEntity
+import java.util.UUID
+
 
 
 
@@ -311,7 +313,10 @@ class VnfAdapterRestV1 extends AbstractServiceTaskProcessor {
 
                        HttpClient httpClient = new HttpClient(url, "application/xml", TargetEntity.VNF_ADAPTER)
                        httpClient.addAdditionalHeader("Authorization", execution.getVariable(prefix + "basicAuthHeaderValue"))
-
+                       
+                       httpClient.addAdditionalHeader("X-ONAP-RequestID", execution.getVariable("mso-request-id"))
+                       httpClient.addAdditionalHeader("X-ONAP-InvocationID", UUID.randomUUID().toString())
+                       httpClient.addAdditionalHeader("X-ONAP-PartnerName", "SO-VNFAdapter")
                        Response response;
 
                        if ("GET".equals(vnfAdapterMethod)) {
index c0f1c48..b1e5d0d 100644 (file)
@@ -115,7 +115,7 @@ public class BBInputSetup implements JavaDelegate {
        private BBInputSetupMapperLayer mapperLayer;
        
        @Autowired
-       private CloudInfoFromAAI bbInputSetupHelper;
+       private CloudInfoFromAAI cloudInfoFromAAI;
 
        @Autowired
        private ExceptionBuilder exceptionUtil;
@@ -125,6 +125,10 @@ public class BBInputSetup implements JavaDelegate {
        public BBInputSetupUtils getBbInputSetupUtils() {
                return bbInputSetupUtils;
        }
+       
+       public void setCloudInfoFromAAI(CloudInfoFromAAI cloudInfoFromAAI) {
+               this.cloudInfoFromAAI = cloudInfoFromAAI;
+       }
 
        public void setBbInputSetupUtils(BBInputSetupUtils bbInputSetupUtils) {
                this.bbInputSetupUtils = bbInputSetupUtils;
@@ -987,7 +991,7 @@ public class BBInputSetup implements JavaDelegate {
                ServiceInstance serviceInstance = gBB.getServiceInstance();
                CloudRegion cloudRegion = null;
                if(cloudConfiguration == null) {
-                       Optional<CloudRegion> cloudRegionOp = bbInputSetupHelper.getCloudInfoFromAAI(serviceInstance);
+                       Optional<CloudRegion> cloudRegionOp = cloudInfoFromAAI.getCloudInfoFromAAI(serviceInstance);
                        if(cloudRegionOp.isPresent()) {
                                cloudRegion = cloudRegionOp.get();
                        }
@@ -1040,9 +1044,9 @@ public class BBInputSetup implements JavaDelegate {
                                                vnfModelInfo.setModelCustomizationUuid(vnfModelCustomizationUUID);
                                                this.mapCatalogVnf(vnf, vnfModelInfo, service);
                                                lookupKeyMap.put(ResourceKey.GENERIC_VNF_ID, vnf.getVnfId());
-                                               if (cloudConfiguration != null) {
-                                                       String volumeGroupCustomizationUUID = this.bbInputSetupUtils.getAAIVolumeGroup(cloudConfiguration.getCloudOwner(),
-                                                                       cloudConfiguration.getLcpCloudRegionId(), volumeGroup.getVolumeGroupId())
+                                               if (cloudRegion != null) {
+                                                       String volumeGroupCustomizationUUID = this.bbInputSetupUtils.getAAIVolumeGroup(cloudRegion.getCloudOwner(),
+                                                                       cloudRegion.getLcpCloudRegionId(), volumeGroup.getVolumeGroupId())
                                                                        .getModelCustomizationId();
                                                        ModelInfo volumeGroupModelInfo = new ModelInfo();
                                                        volumeGroupModelInfo.setModelCustomizationId(volumeGroupCustomizationUUID);
index 990863e..6914e75 100644 (file)
@@ -70,6 +70,7 @@ falloutHandler.postProcessResponse(execution)]]></bpmn2:script>
               <camunda:map>
                 <camunda:entry key="content-type">application/soap+xml</camunda:entry>
                 <camunda:entry key="Authorization">#{BasicAuthHeaderValueDB}</camunda:entry>
+                <camunda:entry key="X-ONAP-RequestID">#{FH_request_id}</camunda:entry>
               </camunda:map>
             </camunda:inputParameter>
             <camunda:inputParameter name="payload">
index 2ae2ff7..91c3824 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_l2hJ8CccEeW3d--PaFJMbg" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.13.1" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_l2hJ8CccEeW3d--PaFJMbg" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.7.1" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
   <bpmn2:process id="sdncAdapter" name="SDNC Adapter" isExecutable="true">
     <bpmn2:exclusiveGateway id="isResponseOK" name="is Response Ok?" default="badSynchronousResponse">
       <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
@@ -8,28 +8,29 @@
     </bpmn2:exclusiveGateway>
     <bpmn2:sequenceFlow id="badSynchronousResponse" name="Bad synchronous response" sourceRef="isResponseOK" targetRef="setBadResponse" />
     <bpmn2:sequenceFlow id="goodSynchronousResponse" name="Good synchronous response" sourceRef="isResponseOK" targetRef="resetCallbackRequest">
-      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable("SDNCA_ResponseCode")=='200'}</bpmn2:conditionExpression>
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("SDNCA_ResponseCode")=='200'}]]></bpmn2:conditionExpression>
     </bpmn2:sequenceFlow>
     <bpmn2:scriptTask id="setBadResponse" name="Set Bad Response&#10;&#10;Exception" scriptFormat="groovy">
       <bpmn2:incoming>badSynchronousResponse</bpmn2:incoming>
       <bpmn2:outgoing>Exception</bpmn2:outgoing>
-      <bpmn2:script>import org.onap.so.bpmn.common.scripts.*
+      <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
 
 int responseCode = execution.getVariable("SDNCA_ResponseCode")
 ExceptionUtil exceptionUtil = new ExceptionUtil()
-exceptionUtil.buildWorkflowException(execution, 7000, "Could not communicate with the SDNC Adapter" )</bpmn2:script>
+exceptionUtil.buildWorkflowException(execution, 7000, "Could not communicate with the SDNC Adapter" )]]></bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:sequenceFlow id="Exception" name="Exception" sourceRef="setBadResponse" targetRef="badResponseEndFlow" />
     <bpmn2:serviceTask id="invokeSDNCAdapter" name="Invoke SDNC Adapter" camunda:asyncAfter="true" camunda:class="">
       <bpmn2:extensionElements>
         <camunda:connector>
           <camunda:inputOutput>
-            <camunda:inputParameter name="url">${execution.getVariable("mso.adapters.sdnc.endpoint")}</camunda:inputParameter>
+            <camunda:inputParameter name="url"><![CDATA[${execution.getVariable("mso.adapters.sdnc.endpoint")}]]></camunda:inputParameter>
             <camunda:inputParameter name="method">POST</camunda:inputParameter>
             <camunda:inputParameter name="headers">
               <camunda:map>
                 <camunda:entry key="content-type">application/soap+xml</camunda:entry>
                 <camunda:entry key="Authorization">#{BasicAuthHeaderValue}</camunda:entry>
+                <camunda:entry key="X-ONAP-RequestID">#{mso-request-id}</camunda:entry>
               </camunda:map>
             </camunda:inputParameter>
             <camunda:inputParameter name="payload">${sdncAdapterRequest}</camunda:inputParameter>
@@ -65,20 +66,18 @@ exceptionUtil.buildWorkflowException(execution, 7000, "Could not communicate wit
       </bpmn2:extensionElements>
       <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
-      <bpmn2:script>import org.onap.so.bpmn.common.scripts.*
+      <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
 def sdnc= new SDNCAdapter()
-sdnc.preProcessRequest(execution)
-</bpmn2:script>
+sdnc.preProcessRequest(execution)]]></bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:sequenceFlow id="SequenceFlow_8" sourceRef="processMessage" targetRef="invokeSDNCAdapter" />
     <bpmn2:scriptTask id="returnWorkflowResult" name="Return workflow result" scriptFormat="groovy">
       <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
       <bpmn2:incoming>SequenceFlow_11ah5pw</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
-      <bpmn2:script>import org.onap.so.bpmn.common.scripts.*
+      <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
 def sdnc= new SDNCAdapter()
-sdnc.postProcessResponse(execution)
-</bpmn2:script>
+sdnc.postProcessResponse(execution)]]></bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:sequenceFlow id="SequenceFlow_14" sourceRef="returnWorkflowResult" targetRef="timeoutError" />
     <bpmn2:exclusiveGateway id="timeoutError" name="Did Timeout occur?" default="noTimeoutError">
@@ -88,7 +87,7 @@ sdnc.postProcessResponse(execution)
     </bpmn2:exclusiveGateway>
     <bpmn2:sequenceFlow id="noTimeoutError" name="No Timeout" sourceRef="timeoutError" targetRef="ExclusiveGateway_1" />
     <bpmn2:sequenceFlow id="SequenceFlow_19" name="Timeout" sourceRef="timeoutError" targetRef="endEventException">
-      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable("asynchronousResponseTimeout")==true}</bpmn2:conditionExpression>
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("asynchronousResponseTimeout")==true}]]></bpmn2:conditionExpression>
     </bpmn2:sequenceFlow>
     <bpmn2:subProcess id="SubProcess" name="Wait for asynchronous message" camunda:asyncAfter="true">
       <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
@@ -111,17 +110,17 @@ sdnc.postProcessResponse(execution)
     <bpmn2:scriptTask id="setTimeoutEx" name="Set Timeout&#10;and Stop Listening for Callback" scriptFormat="groovy">
       <bpmn2:incoming>SequenceFlow_0mzs1ze</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_11ah5pw</bpmn2:outgoing>
-      <bpmn2:script>import org.onap.so.bpmn.common.scripts.*
+      <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
 def sdnc= new SDNCAdapter()
-sdnc.setTimeout(execution)</bpmn2:script>
+sdnc.setTimeout(execution)]]></bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:scriptTask id="resetCallbackRequest" name="Reset callback request and set timer value" scriptFormat="groovy">
       <bpmn2:incoming>goodSynchronousResponse</bpmn2:incoming>
       <bpmn2:incoming>SequenceFlow_26</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
-      <bpmn2:script>import org.onap.so.bpmn.common.scripts.*
+      <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
 def sdnc= new SDNCAdapter()
-sdnc.resetCallbackRequest(execution)</bpmn2:script>
+sdnc.resetCallbackRequest(execution)]]></bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="resetCallbackRequest" targetRef="SubProcess" />
     <bpmn2:exclusiveGateway id="ExclusiveGateway_1" name="Check final indicator" default="Done">
@@ -131,14 +130,14 @@ sdnc.resetCallbackRequest(execution)</bpmn2:script>
     </bpmn2:exclusiveGateway>
     <bpmn2:sequenceFlow id="Done" name="Done" sourceRef="ExclusiveGateway_1" targetRef="ResetInterimNotificationFlag" />
     <bpmn2:sequenceFlow id="SequenceFlow_30" name="Not Done" sourceRef="ExclusiveGateway_1" targetRef="ParallelGateway_3">
-      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable("continueListening")==true}</bpmn2:conditionExpression>
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("continueListening")==true}]]></bpmn2:conditionExpression>
     </bpmn2:sequenceFlow>
     <bpmn2:scriptTask id="toggleSuccessIndicator" name="Toggle Success Indicator" scriptFormat="groovy">
       <bpmn2:incoming>SequenceFlow_1w1za5m</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
-      <bpmn2:script>import org.onap.so.bpmn.common.scripts.*
+      <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
 def sdnc= new SDNCAdapter()
-sdnc.toggleSuccessIndicator(execution)</bpmn2:script>
+sdnc.toggleSuccessIndicator(execution)]]></bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:sequenceFlow id="SequenceFlow_17" name="" sourceRef="toggleSuccessIndicator" targetRef="endEventFlow" />
     <bpmn2:endEvent id="endEventFlow" name="End Event Flow">
@@ -168,9 +167,9 @@ sdnc.toggleSuccessIndicator(execution)</bpmn2:script>
       <bpmn2:scriptTask id="assignError" name="Assign Error" scriptFormat="groovy">
         <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
         <bpmn2:outgoing>SequenceFlow_27</bpmn2:outgoing>
-        <bpmn2:script>import org.onap.so.bpmn.common.scripts.*
+        <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
 def sdnc= new SDNCAdapter()
-sdnc.assignError(execution)</bpmn2:script>
+sdnc.assignError(execution)]]></bpmn2:script>
       </bpmn2:scriptTask>
       <bpmn2:sequenceFlow id="SequenceFlow_27" name="" sourceRef="assignError" targetRef="EndEvent_5" />
       <bpmn2:endEvent id="EndEvent_5">
@@ -183,7 +182,7 @@ sdnc.assignError(execution)</bpmn2:script>
       <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
     </bpmn2:exclusiveGateway>
     <bpmn2:sequenceFlow id="SequenceFlow_4" name="Yes" sourceRef="ExclusiveGateway_2" targetRef="SetInterimNotificationFlag">
-      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable("serviceConfigActivate")==true}</bpmn2:conditionExpression>
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("serviceConfigActivate")==true}]]></bpmn2:conditionExpression>
     </bpmn2:sequenceFlow>
     <bpmn2:sequenceFlow id="SequenceFlow_23" name="No" sourceRef="ExclusiveGateway_2" targetRef="EndEvent_1" />
     <bpmn2:endEvent id="EndEvent_1">
@@ -215,7 +214,7 @@ sdnc.assignError(execution)</bpmn2:script>
     <bpmn2:scriptTask id="SetInterimNotificationFlag" name="Set Interim Notification Flag" scriptFormat="groovy">
       <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_193cb6p</bpmn2:outgoing>
-      <bpmn2:script>execution.setVariable("SDNCA_InterimNotify", true)</bpmn2:script>
+      <bpmn2:script><![CDATA[execution.setVariable("SDNCA_InterimNotify", true)]]></bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:sequenceFlow id="SequenceFlow_193cb6p" sourceRef="SetInterimNotificationFlag" targetRef="CallActivity_11xgv33" />
     <bpmn2:endEvent id="EndEvent_18rq0b6">
@@ -225,7 +224,7 @@ sdnc.assignError(execution)</bpmn2:script>
     <bpmn2:scriptTask id="ResetInterimNotificationFlag" name="Reset Interim Notification Flag" scriptFormat="groovy">
       <bpmn2:incoming>Done</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_1w1za5m</bpmn2:outgoing>
-      <bpmn2:script>execution.setVariable("SDNCA_InterimNotify", false)</bpmn2:script>
+      <bpmn2:script><![CDATA[execution.setVariable("SDNCA_InterimNotify", false)]]></bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:sequenceFlow id="SequenceFlow_1w1za5m" sourceRef="ResetInterimNotificationFlag" targetRef="toggleSuccessIndicator" />
   </bpmn2:process>
@@ -264,23 +263,23 @@ sdnc.assignError(execution)</bpmn2:script>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="badSynchronousResponse" sourceElement="_BPMNShape_ExclusiveGateway_29" targetElement="_BPMNShape_ScriptTask_24">
-        <di:waypoint x="544" y="153" />
-        <di:waypoint x="544" y="122" />
-        <di:waypoint x="600" y="122" />
+        <di:waypoint xsi:type="dc:Point" x="544" y="153" />
+        <di:waypoint xsi:type="dc:Point" x="544" y="122" />
+        <di:waypoint xsi:type="dc:Point" x="600" y="122" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="441" y="99" width="164" height="22" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_33" targetElement="_BPMNShape_ScriptTask_3">
-        <di:waypoint x="147" y="179" />
-        <di:waypoint x="194" y="179" />
+        <di:waypoint xsi:type="dc:Point" x="147" y="179" />
+        <di:waypoint xsi:type="dc:Point" x="194" y="179" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="171" y="179" width="0" height="0" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="goodSynchronousResponse" sourceElement="_BPMNShape_ExclusiveGateway_29" targetElement="_BPMNShape_ScriptTask_27">
-        <di:waypoint x="544" y="203" />
-        <di:waypoint x="544" y="246" />
+        <di:waypoint xsi:type="dc:Point" x="544" y="203" />
+        <di:waypoint xsi:type="dc:Point" x="544" y="246" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="459" y="208" width="172" height="22" />
         </bpmndi:BPMNLabel>
@@ -292,24 +291,24 @@ sdnc.assignError(execution)</bpmn2:script>
         <dc:Bounds x="194" y="139" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_3" targetElement="_BPMNShape_ServiceTask_62">
-        <di:waypoint x="294" y="179" />
-        <di:waypoint x="342" y="179" />
+        <di:waypoint xsi:type="dc:Point" x="294" y="179" />
+        <di:waypoint xsi:type="dc:Point" x="342" y="179" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="300" y="153" width="30" height="22" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ServiceTask_68" targetElement="_BPMNShape_ExclusiveGateway_53">
-        <di:waypoint x="1204" y="277" />
-        <di:waypoint x="1248" y="276" />
+        <di:waypoint xsi:type="dc:Point" x="1204" y="277" />
+        <di:waypoint xsi:type="dc:Point" x="1248" y="276" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1211" y="251" width="37" height="22" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ServiceTask_62" targetElement="_BPMNShape_ExclusiveGateway_29">
-        <di:waypoint x="442" y="179" />
-        <di:waypoint x="480" y="179" />
-        <di:waypoint x="480" y="178" />
-        <di:waypoint x="519" y="178" />
+        <di:waypoint xsi:type="dc:Point" x="442" y="179" />
+        <di:waypoint xsi:type="dc:Point" x="480" y="179" />
+        <di:waypoint xsi:type="dc:Point" x="480" y="178" />
+        <di:waypoint xsi:type="dc:Point" x="519" y="178" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="468" y="153" width="37" height="22" />
         </bpmndi:BPMNLabel>
@@ -330,8 +329,8 @@ sdnc.assignError(execution)</bpmn2:script>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_SubProcess_11">
-        <di:waypoint x="998" y="278" />
-        <di:waypoint x="1104" y="277" />
+        <di:waypoint xsi:type="dc:Point" x="998" y="278" />
+        <di:waypoint xsi:type="dc:Point" x="1104" y="277" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1051" y="262.5" width="0" height="0" />
         </bpmndi:BPMNLabel>
@@ -340,8 +339,8 @@ sdnc.assignError(execution)</bpmn2:script>
         <dc:Bounds x="600" y="82" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="Exception" sourceElement="_BPMNShape_ScriptTask_24" targetElement="_BPMNShape_EndEvent_65">
-        <di:waypoint x="700" y="122" />
-        <di:waypoint x="762" y="122" />
+        <di:waypoint xsi:type="dc:Point" x="700" y="122" />
+        <di:waypoint xsi:type="dc:Point" x="762" y="122" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="699" y="99" width="64" height="22" />
         </bpmndi:BPMNLabel>
@@ -350,8 +349,8 @@ sdnc.assignError(execution)</bpmn2:script>
         <dc:Bounds x="941" y="372" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_IntermediateCatchEvent_16">
-        <di:waypoint x="817" y="275" />
-        <di:waypoint x="926" y="275" />
+        <di:waypoint xsi:type="dc:Point" x="817" y="275" />
+        <di:waypoint xsi:type="dc:Point" x="926" y="275" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="872" y="260" width="0" height="0" />
         </bpmndi:BPMNLabel>
@@ -363,16 +362,16 @@ sdnc.assignError(execution)</bpmn2:script>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="noTimeoutError" sourceElement="_BPMNShape_ExclusiveGateway_53" targetElement="_BPMNShape_ExclusiveGateway_54">
-        <di:waypoint x="1273" y="301" />
-        <di:waypoint x="1273" y="359" />
+        <di:waypoint xsi:type="dc:Point" x="1273" y="301" />
+        <di:waypoint xsi:type="dc:Point" x="1273" y="359" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1280" y="324" width="72" height="22" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ExclusiveGateway_53" targetElement="_BPMNShape_ScriptTask_25">
-        <di:waypoint x="1273" y="251" />
-        <di:waypoint x="1273" y="95" />
-        <di:waypoint x="1560" y="95" />
+        <di:waypoint xsi:type="dc:Point" x="1273" y="251" />
+        <di:waypoint xsi:type="dc:Point" x="1273" y="95" />
+        <di:waypoint xsi:type="dc:Point" x="1560" y="95" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1301" y="169.45283018867923" width="39" height="12" />
         </bpmndi:BPMNLabel>
@@ -384,8 +383,8 @@ sdnc.assignError(execution)</bpmn2:script>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="Done" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_ScriptTask_247">
-        <di:waypoint x="1298" y="384" />
-        <di:waypoint x="1386" y="385" />
+        <di:waypoint xsi:type="dc:Point" x="1298" y="384" />
+        <di:waypoint xsi:type="dc:Point" x="1386" y="385" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1322" y="384.219838851959" width="27" height="13" />
         </bpmndi:BPMNLabel>
@@ -394,17 +393,17 @@ sdnc.assignError(execution)</bpmn2:script>
         <dc:Bounds x="494" y="246" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_27" targetElement="_BPMNShape_SubProcess_11">
-        <di:waypoint x="594" y="286" />
-        <di:waypoint x="607" y="286" />
-        <di:waypoint x="607" y="275" />
-        <di:waypoint x="619" y="275" />
+        <di:waypoint xsi:type="dc:Point" x="594" y="286" />
+        <di:waypoint xsi:type="dc:Point" x="607" y="286" />
+        <di:waypoint xsi:type="dc:Point" x="607" y="275" />
+        <di:waypoint xsi:type="dc:Point" x="619" y="275" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="622" y="280.5" width="0" height="0" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_38" bpmnElement="SequenceFlow_30" sourceElement="_BPMNShape_ExclusiveGateway_54" targetElement="_BPMNShape_ParallelGateway_14">
-        <di:waypoint x="1273" y="409" />
-        <di:waypoint x="1273" y="467" />
+        <di:waypoint xsi:type="dc:Point" x="1273" y="409" />
+        <di:waypoint xsi:type="dc:Point" x="1273" y="467" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1273" y="423" width="60" height="22" />
         </bpmndi:BPMNLabel>
@@ -416,8 +415,8 @@ sdnc.assignError(execution)</bpmn2:script>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ExclusiveGateway_55" targetElement="CallActivity_11xgv33_di">
-        <di:waypoint x="1273" y="602" />
-        <di:waypoint x="1273" y="664" />
+        <di:waypoint xsi:type="dc:Point" x="1273" y="602" />
+        <di:waypoint xsi:type="dc:Point" x="1273" y="664" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1237" y="635.9906427957554" width="18" height="13" />
         </bpmndi:BPMNLabel>
@@ -429,8 +428,8 @@ sdnc.assignError(execution)</bpmn2:script>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_ParallelGateway_14">
-        <di:waypoint x="1272" y="516" />
-        <di:waypoint x="1273" y="552" />
+        <di:waypoint xsi:type="dc:Point" x="1272" y="516" />
+        <di:waypoint xsi:type="dc:Point" x="1273" y="552" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1273" y="519" width="0" height="0" />
         </bpmndi:BPMNLabel>
@@ -442,17 +441,17 @@ sdnc.assignError(execution)</bpmn2:script>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_30" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_ExclusiveGateway_55" targetElement="_BPMNShape_EndEvent_96">
-        <di:waypoint x="1298" y="577" />
-        <di:waypoint x="1330" y="577" />
-        <di:waypoint x="1440" y="577" />
+        <di:waypoint xsi:type="dc:Point" x="1298" y="577" />
+        <di:waypoint xsi:type="dc:Point" x="1330" y="577" />
+        <di:waypoint xsi:type="dc:Point" x="1440" y="577" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1309" y="590.5" width="14" height="13" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_33" bpmnElement="SequenceFlow_26" sourceElement="_BPMNShape_ParallelGateway_14" targetElement="_BPMNShape_ScriptTask_27">
-        <di:waypoint x="1248" y="492" />
-        <di:waypoint x="544" y="492" />
-        <di:waypoint x="544" y="326" />
+        <di:waypoint xsi:type="dc:Point" x="1248" y="492" />
+        <di:waypoint xsi:type="dc:Point" x="544" y="492" />
+        <di:waypoint xsi:type="dc:Point" x="544" y="326" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="782" y="467" width="73" height="48" />
         </bpmndi:BPMNLabel>
@@ -461,8 +460,8 @@ sdnc.assignError(execution)</bpmn2:script>
         <dc:Bounds x="1540" y="344" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ScriptTask_247" targetElement="_BPMNShape_EndEvent_64">
-        <di:waypoint x="1640" y="384" />
-        <di:waypoint x="1699" y="384" />
+        <di:waypoint xsi:type="dc:Point" x="1640" y="384" />
+        <di:waypoint xsi:type="dc:Point" x="1699" y="384" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1670" y="369" width="0" height="0" />
         </bpmndi:BPMNLabel>
@@ -486,22 +485,22 @@ sdnc.assignError(execution)</bpmn2:script>
         <dc:Bounds x="326" y="749" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_StartEvent_63" targetElement="_BPMNShape_ScriptTask_249">
-        <di:waypoint x="278" y="789" />
-        <di:waypoint x="326" y="789" />
+        <di:waypoint xsi:type="dc:Point" x="278" y="789" />
+        <di:waypoint xsi:type="dc:Point" x="326" y="789" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="263" y="789" width="90" height="0" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_34" bpmnElement="SequenceFlow_27" sourceElement="_BPMNShape_ScriptTask_249" targetElement="_BPMNShape_EndEvent_213">
-        <di:waypoint x="426" y="789" />
-        <di:waypoint x="482" y="789" />
+        <di:waypoint xsi:type="dc:Point" x="426" y="789" />
+        <di:waypoint xsi:type="dc:Point" x="482" y="789" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="409" y="789" width="90" height="0" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_1eciucn_di" bpmnElement="SequenceFlow_1eciucn">
-        <di:waypoint x="691" y="275" />
-        <di:waypoint x="781" y="275" />
+        <di:waypoint xsi:type="dc:Point" x="691" y="275" />
+        <di:waypoint xsi:type="dc:Point" x="781" y="275" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="736" y="260" width="0" height="0" />
         </bpmndi:BPMNLabel>
@@ -519,17 +518,17 @@ sdnc.assignError(execution)</bpmn2:script>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_0mzs1ze_di" bpmnElement="SequenceFlow_0mzs1ze">
-        <di:waypoint x="800" y="364" />
-        <di:waypoint x="800" y="412" />
-        <di:waypoint x="941" y="412" />
+        <di:waypoint xsi:type="dc:Point" x="800" y="364" />
+        <di:waypoint xsi:type="dc:Point" x="800" y="412" />
+        <di:waypoint xsi:type="dc:Point" x="941" y="412" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="815" y="388" width="0" height="0" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_11ah5pw_di" bpmnElement="SequenceFlow_11ah5pw">
-        <di:waypoint x="1041" y="412" />
-        <di:waypoint x="1154" y="412" />
-        <di:waypoint x="1154" y="317" />
+        <di:waypoint xsi:type="dc:Point" x="1041" y="412" />
+        <di:waypoint xsi:type="dc:Point" x="1154" y="412" />
+        <di:waypoint xsi:type="dc:Point" x="1154" y="317" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1098" y="397" width="0" height="0" />
         </bpmndi:BPMNLabel>
@@ -547,8 +546,8 @@ sdnc.assignError(execution)</bpmn2:script>
         <dc:Bounds x="1223" y="666" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_193cb6p_di" bpmnElement="SequenceFlow_193cb6p">
-        <di:waypoint x="1273" y="746" />
-        <di:waypoint x="1273" y="795" />
+        <di:waypoint xsi:type="dc:Point" x="1273" y="746" />
+        <di:waypoint xsi:type="dc:Point" x="1273" y="795" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1288" y="770.5" width="0" height="0" />
         </bpmndi:BPMNLabel>
@@ -560,8 +559,8 @@ sdnc.assignError(execution)</bpmn2:script>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_1em7gys_di" bpmnElement="SequenceFlow_1em7gys">
-        <di:waypoint x="1273" y="875" />
-        <di:waypoint x="1273" y="920" />
+        <di:waypoint xsi:type="dc:Point" x="1273" y="875" />
+        <di:waypoint xsi:type="dc:Point" x="1273" y="920" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1288" y="897.5" width="0" height="0" />
         </bpmndi:BPMNLabel>
@@ -570,8 +569,8 @@ sdnc.assignError(execution)</bpmn2:script>
         <dc:Bounds x="1386" y="345" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_1w1za5m_di" bpmnElement="SequenceFlow_1w1za5m">
-        <di:waypoint x="1486" y="385" />
-        <di:waypoint x="1540" y="384" />
+        <di:waypoint xsi:type="dc:Point" x="1486" y="385" />
+        <di:waypoint xsi:type="dc:Point" x="1540" y="384" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1513" y="369.5" width="0" height="0" />
         </bpmndi:BPMNLabel>
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtilTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtilTest.groovy
new file mode 100644 (file)
index 0000000..5f428f1
--- /dev/null
@@ -0,0 +1,199 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Nokia.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.so.bpmn.common.scripts
+
+import org.assertj.core.api.AbstractAssert
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.junit.Test
+import org.onap.logging.ref.slf4j.ONAPLogConstants
+import org.onap.so.client.HttpClient
+import org.onap.so.client.HttpClientFactory
+import org.onap.so.utils.TargetEntity
+import org.springframework.http.HttpStatus
+
+import javax.ws.rs.core.MediaType
+import javax.ws.rs.core.Response
+
+import static org.assertj.core.api.Assertions.assertThat
+import static org.assertj.core.api.Assertions.catchThrowableOfType
+import static org.mockito.BDDMockito.given
+import static org.mockito.BDDMockito.then
+import static org.mockito.BDDMockito.willThrow
+import static org.mockito.Mockito.mock
+import static org.mockito.Mockito.times
+
+class ExternalAPIUtilTest {
+
+    private static final String URL = "http://someUrl"
+    private static final String UUID_STR = UUID.nameUUIDFromBytes("deterministic_uuid".getBytes())
+    private static final String BODY_PAYLOAD = "payload"
+
+    @Test
+    void executeExternalAPIGetCall_shouldPerformRestGetCall_withAuthorizationHeaderSet() {
+        // GIVEN
+        Response expectedResponse = createExpectedResponse(HttpStatus.ACCEPTED, BODY_PAYLOAD)
+        HttpClient httpClient = mock(HttpClient.class)
+        given(httpClient.get()).willReturn(expectedResponse)
+        HttpClientFactory httpClientFactory = mock(HttpClientFactory.class)
+        given(httpClientFactory.create(new URL(URL), MediaType.APPLICATION_JSON, TargetEntity.EXTERNAL)).willReturn(httpClient)
+
+        // WHEN
+        ExternalAPIUtil externalAPIUtil = new ExternalAPIUtil(httpClientFactory, new DummyMsoUtils(UUID_STR), new ExceptionUtil())
+        Response apiResponse = externalAPIUtil.executeExternalAPIGetCall(createDelegateExecution(), URL)
+
+        // THEN
+        then(httpClient).should(times(1)).addBasicAuthHeader("value_externalapi_auth", "value_mso_msoKey")
+        then(httpClient).should(times(1)).addAdditionalHeader("X-FromAppId", "MSO")
+        then(httpClient).should(times(1)).addAdditionalHeader(ONAPLogConstants.Headers.REQUEST_ID, UUID_STR)
+        then(httpClient).should(times(1)).addAdditionalHeader("Accept", MediaType.APPLICATION_JSON)
+        ResponseAssert.assertThat(apiResponse)
+                .hasStatusCode(HttpStatus.ACCEPTED)
+                .hasBody(BODY_PAYLOAD)
+    }
+
+    @Test
+    void executeExternalAPIGetCall_shouldHandleExceptionsThrownByGetCall_andRethrowAsBpmnError() {
+        // GIVEN
+        HttpClient httpClient = mock(HttpClient.class)
+        willThrow(new RuntimeException("error occurred")).given(httpClient).get()
+        HttpClientFactory httpClientFactory = mock(HttpClientFactory.class)
+        given(httpClientFactory.create(new URL(URL), MediaType.APPLICATION_JSON, TargetEntity.EXTERNAL)).willReturn(httpClient)
+        DelegateExecution delegateExecution = createDelegateExecution()
+        DummyExceptionUtil exceptionUtil = new DummyExceptionUtil()
+
+        // WHEN
+        ExternalAPIUtil externalAPIUtil = new ExternalAPIUtil(httpClientFactory, new DummyMsoUtils(UUID_STR), exceptionUtil)
+        BpmnError bpmnError = catchThrowableOfType({ -> externalAPIUtil.executeExternalAPIGetCall(delegateExecution, URL)
+        }, BpmnError.class)
+
+        // THEN
+        assertThat(exceptionUtil.getDelegateExecution()).isSameAs(delegateExecution)
+        assertThat(bpmnError.getMessage()).isEqualTo("error occurred")
+        assertThat(bpmnError.getErrorCode()).isEqualTo("9999")
+    }
+
+    @Test
+    void executeExternalAPIPostCall_shouldHandleExceptionsThrownByPostCall_andRethrowAsBpmnError() {
+        // GIVEN
+        HttpClient httpClient = mock(HttpClient.class)
+        willThrow(new RuntimeException("error occurred")).given(httpClient).post(BODY_PAYLOAD)
+        HttpClientFactory httpClientFactory = mock(HttpClientFactory.class)
+        given(httpClientFactory.create(new URL(URL), MediaType.APPLICATION_JSON, TargetEntity.AAI)).willReturn(httpClient)
+        DelegateExecution delegateExecution = createDelegateExecution()
+        DummyExceptionUtil exceptionUtil = new DummyExceptionUtil()
+
+        // WHEN
+        ExternalAPIUtil externalAPIUtil = new ExternalAPIUtil(httpClientFactory, new DummyMsoUtils(UUID_STR), exceptionUtil)
+        BpmnError bpmnError = catchThrowableOfType({ ->
+            externalAPIUtil.executeExternalAPIPostCall(delegateExecution, URL, BODY_PAYLOAD)
+        }, BpmnError.class)
+
+        // THEN
+        assertThat(exceptionUtil.getDelegateExecution()).isSameAs(delegateExecution)
+        assertThat(bpmnError.getMessage()).isEqualTo("error occurred")
+        assertThat(bpmnError.getErrorCode()).isEqualTo("9999")
+    }
+
+    @Test
+    void executeExternalAPIPostCall_shouldPerformRestPostCall_withPayloadAndAuthorizationHeaderSet() {
+        // GIVEN
+        Response expectedResponse = createExpectedResponse(HttpStatus.ACCEPTED, BODY_PAYLOAD)
+        HttpClient httpClient = mock(HttpClient.class)
+        given(httpClient.post(BODY_PAYLOAD)).willReturn(expectedResponse)
+        HttpClientFactory httpClientFactory = mock(HttpClientFactory.class)
+        given(httpClientFactory.create(new URL(URL), MediaType.APPLICATION_JSON, TargetEntity.AAI)).willReturn(httpClient)
+
+        // WHEN
+        ExternalAPIUtil externalAPIUtil = new ExternalAPIUtil(httpClientFactory, new DummyMsoUtils(UUID_STR), new ExceptionUtil())
+        Response apiResponse = externalAPIUtil.executeExternalAPIPostCall(createDelegateExecution(), URL, BODY_PAYLOAD)
+
+        // THEN
+        then(httpClient).should(times(1)).addBasicAuthHeader("value_externalapi_auth", "value_mso_msoKey")
+        then(httpClient).should(times(1)).addAdditionalHeader("X-FromAppId", "MSO")
+        then(httpClient).should(times(1)).addAdditionalHeader("X-TransactionId", UUID_STR)
+        ResponseAssert.assertThat(apiResponse)
+                .hasStatusCode(HttpStatus.ACCEPTED)
+                .hasBody(BODY_PAYLOAD)
+    }
+
+    private Response createExpectedResponse(HttpStatus httpStatus, String body) {
+        Response expectedResponse = mock(Response.class)
+        given(expectedResponse.getStatus()).willReturn(httpStatus.value())
+        given(expectedResponse.getEntity()).willReturn(body)
+        return expectedResponse
+    }
+
+    private DelegateExecution createDelegateExecution() {
+        DelegateExecution delegateExecution = mock(DelegateExecution.class)
+        given(delegateExecution.getVariable("URN_externalapi_auth")).willReturn("value_externalapi_auth")
+        given(delegateExecution.getVariable("URN_mso_msoKey")).willReturn("value_mso_msoKey")
+        return delegateExecution
+    }
+
+    private static class ResponseAssert extends AbstractAssert<ResponseAssert, Response> {
+
+        ResponseAssert(Response response) {
+            super(response, ResponseAssert.class)
+        }
+
+        static ResponseAssert assertThat(Response response) {
+            return new ResponseAssert(response)
+        }
+
+        ResponseAssert hasStatusCode(HttpStatus httpStatus) {
+            assertThat(actual.getStatus()).isEqualTo(httpStatus.value())
+            return this
+        }
+
+        ResponseAssert hasBody(String responseBody) {
+            assertThat(actual.getEntity()).isEqualTo(responseBody)
+            return this
+        }
+    }
+
+    private static class DummyMsoUtils extends MsoUtils {
+
+        private final String uuid
+
+        DummyMsoUtils(String uuid) {
+            this.uuid = uuid
+        }
+
+        String getRequestID() {
+            return uuid
+        }
+    }
+
+    private static class DummyExceptionUtil extends ExceptionUtil {
+
+        private DelegateExecution delegateExecution
+
+        @Override
+        void buildAndThrowWorkflowException(DelegateExecution delegateExecution, int errorCode, String errorMessage) {
+            this.delegateExecution = delegateExecution
+            throw new BpmnError(String.valueOf(errorCode), errorMessage)
+        }
+
+        DelegateExecution getDelegateExecution() {
+            return delegateExecution
+        }
+    }
+}
\ No newline at end of file
index 8399fe1..1654aa0 100644 (file)
@@ -40,6 +40,7 @@ import java.util.Arrays;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Optional;
 
 import org.camunda.bpm.engine.delegate.DelegateExecution;
 import org.junit.Before;
@@ -130,6 +131,9 @@ public class BBInputSetupTest {
        @Mock
        private BBInputSetupUtils SPY_bbInputSetupUtils;
        
+       @Mock
+       private CloudInfoFromAAI SPY_cloudInfoFromAAI;
+       
        @Spy
        private BBInputSetupMapperLayer bbInputSetupMapperLayer; 
        
@@ -137,6 +141,7 @@ public class BBInputSetupTest {
        public void setup(){
                SPY_bbInputSetup.setBbInputSetupUtils(SPY_bbInputSetupUtils);
                SPY_bbInputSetup.setMapperLayer(bbInputSetupMapperLayer);
+               SPY_bbInputSetup.setCloudInfoFromAAI(SPY_cloudInfoFromAAI);
        }
        
        @Test
@@ -2270,19 +2275,22 @@ public class BBInputSetupTest {
                verify(SPY_bbInputSetup, times(1)).mapCatalogVfModule(any(VfModule.class), any(ModelInfo.class),
                                any(Service.class), any(String.class));
 
-               org.onap.aai.domain.yang.CloudRegion aaiCloudRegion = Mockito.mock(org.onap.aai.domain.yang.CloudRegion.class);
+               CloudRegion cloudRegion = new CloudRegion();
+               cloudRegion.setLcpCloudRegionId("cloudRegionId");
+               cloudRegion.setCloudOwner("CloudOwner");
+               doReturn(Optional.of(cloudRegion)).when(SPY_cloudInfoFromAAI).getCloudInfoFromAAI(gBB.getServiceInstance());
                VolumeGroup volumeGroup = new VolumeGroup();
                volumeGroup.setVolumeGroupId("volumeGroupId");
                gBB.getServiceInstance().getVnfs().get(0).getVolumeGroups().add(volumeGroup);
                org.onap.aai.domain.yang.VolumeGroup aaiVolumeGroup = new org.onap.aai.domain.yang.VolumeGroup();
                aaiVolumeGroup.setModelCustomizationId("modelCustId");
-               doReturn(aaiVolumeGroup).when(SPY_bbInputSetupUtils).getAAIVolumeGroup(Defaults.CLOUD_OWNER.toString(),
-                               cloudConfiguration.getLcpCloudRegionId(), volumeGroup.getVolumeGroupId());
+               doReturn(aaiVolumeGroup).when(SPY_bbInputSetupUtils).getAAIVolumeGroup(cloudRegion.getCloudOwner(),
+                               cloudRegion.getLcpCloudRegionId(), volumeGroup.getVolumeGroupId());
 
                executeBB.getBuildingBlock().setBpmnFlowName("UnassignVolumeGroupBB");
                executeBB.getBuildingBlock().setKey("72d9d1cd-f46d-447a-abdb-451d6fb05fa8");
                SPY_bbInputSetup.getGBBMacroExistingService(executeBB, lookupKeyMap,
-                               executeBB.getBuildingBlock().getBpmnFlowName(), gBB, service, requestAction, cloudConfiguration);
+                               executeBB.getBuildingBlock().getBpmnFlowName(), gBB, service, requestAction, null);
                verify(SPY_bbInputSetup, times(3)).mapCatalogVnf(any(GenericVnf.class), any(ModelInfo.class),
                                any(Service.class));
                verify(SPY_bbInputSetup, times(1)).mapCatalogVolumeGroup(isA(VolumeGroup.class), isA(ModelInfo.class),
index e22125b..fb5d010 100644 (file)
                        <artifactId>camunda-bpm-assert</artifactId>
                        <version>2.0-alpha2</version>
                        <scope>test</scope>
-               </dependency>   
+               </dependency>
                <dependency>
-            <groupId>org.assertj</groupId>
-            <artifactId>assertj-core</artifactId>
-            <version>1.7.0</version>
-            <scope>test</scope>
-        </dependency>  
+                       <groupId>org.assertj</groupId>
+                       <artifactId>assertj-core</artifactId>
+                       <version>1.7.0</version>
+                       <scope>test</scope>
+               </dependency>
        </dependencies>
 </project>
index 335f346..4e45aaf 100644 (file)
@@ -56,6 +56,7 @@ import org.camunda.bpm.engine.RuntimeService;
 import org.camunda.bpm.engine.history.HistoricProcessInstance;
 import org.camunda.bpm.engine.history.HistoricVariableInstance;
 import org.camunda.bpm.engine.runtime.ProcessInstance;
+import org.camunda.bpm.engine.runtime.ProcessInstanceQuery;
 import org.camunda.bpm.engine.test.ProcessEngineRule;
 import org.camunda.bpm.engine.variable.impl.VariableMapImpl;
 import org.custommonkey.xmlunit.DetailedDiff;
@@ -884,11 +885,20 @@ public abstract class WorkflowTest {
                                return null;
                        }
 
+                       ProcessInstanceQuery processInstanceQuery = null;
                        if (processInstance == null) {
-                               processInstance = runtimeService
+                               processInstanceQuery = runtimeService
                                        .createProcessInstanceQuery()
-                                       .processDefinitionKey(processKey)
-                                       .singleResult();
+                                       .processDefinitionKey(processKey);
+                       }
+
+                       if(processInstanceQuery.count() <= 1){
+                               processInstance = processInstanceQuery.singleResult();
+                       }else{
+                               //TODO There shouldnt be more than one in the list but seems to be happening, need to figure out why happening and best way to get correct one from list
+                               msoLogger.debug("Process Instance Query returned " + processInstanceQuery.count() + " instance. Getting the last instance in the list");
+                               List<ProcessInstance> processList = processInstanceQuery.list();
+                               processInstance = processList.get((processList.size() - 1));
                        }
 
                        if (processInstance != null) {
@@ -927,7 +937,7 @@ public abstract class WorkflowTest {
        protected boolean injectSDNCRestCallback(String contentType, String content, long timeout) {
                String sdncRequestId = (String) getProcessVariable("SDNCAdapterRestV1",
                        "SDNCAResponse_CORRELATOR", timeout);
-               
+
                if (sdncRequestId == null) {
                        sdncRequestId = (String) getProcessVariable("SDNCAdapterRestV2",
                                "SDNCAResponse_CORRELATOR", timeout);
@@ -1693,7 +1703,7 @@ public abstract class WorkflowTest {
 
        /**
         * Checks to see if the specified process is ended.
-        * 
+        *
         * @param processInstanceId the process Instance Id
         * @return true if the process is ended
         */
@@ -1705,7 +1715,7 @@ public abstract class WorkflowTest {
 
        /**
         * Checks to see if the specified process is ended.
-        * 
+        *
         * @author cb645j
         */
        //TODO combine into 1
index a7b49bc..c66178b 100644 (file)
@@ -64,7 +64,7 @@
                        <dependency>
                                <groupId>org.assertj</groupId>
                                <artifactId>assertj-core</artifactId>
-                               <version>1.7.0</version>
+                               <version>3.11.1</version>
                                <scope>test</scope>
                        </dependency>
                </dependencies>
index 8f1f2bf..4fe02ee 100644 (file)
                        <version>2.0-alpha2</version>
                        <scope>test</scope>
                </dependency>
+               <dependency>
+                       <groupId>org.assertj</groupId>
+                       <artifactId>assertj-core</artifactId>
+                       <version>1.7.0</version>
+                       <scope>test</scope>
+               </dependency>
                <dependency>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-test</artifactId>
index 2ae7686..05fd517 100644 (file)
@@ -23,6 +23,7 @@ package org.onap.so.bpmn.infrastructure.scripts
 import org.json.JSONArray
 import org.json.JSONObject
 import org.json.XML
+import org.onap.so.bpmn.common.scripts.ExternalAPIUtilFactory
 
 import static org.apache.commons.lang3.StringUtils.*
 import groovy.xml.XmlUtil
@@ -381,7 +382,7 @@ public class Create3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
                valueMap.put("serviceName", '"' + serviceName + '"')
                valueMap.put("serviceUuId", '"' + serviceUuId + '"')
 
-               ExternalAPIUtil externalAPIUtil = new ExternalAPIUtil()
+               ExternalAPIUtil externalAPIUtil = new ExternalAPIUtilFactory().create()
 
                // insert CallSource='ExternalAPI' to uuiRequest
                Map<String, String> requestInputsMap = new HashMap<>()
@@ -426,7 +427,7 @@ public class Create3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
                msoLogger.debug("doCreateE2ESIin3rdONAP externalAPIURL is: " + extAPIPath)
                msoLogger.debug("doCreateE2ESIin3rdONAP payload is: " + payload)
 
-               ExternalAPIUtil externalAPIUtil = new ExternalAPIUtil()
+               ExternalAPIUtil externalAPIUtil = new ExternalAPIUtilFactory().create()
                execution.setVariable("ServiceOrderId", "")
 
                Response response = externalAPIUtil.executeExternalAPIPostCall(execution, extAPIPath, payload)
@@ -471,7 +472,7 @@ public class Create3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
                extAPIPath += "/" + execution.getVariable("ServiceOrderId")
                msoLogger.debug("getE2ESIProgressin3rdONAP create externalAPIURL is: " + extAPIPath)
 
-               ExternalAPIUtil externalAPIUtil = new ExternalAPIUtil()
+               ExternalAPIUtil externalAPIUtil = new ExternalAPIUtilFactory().create()
 
                Response response = externalAPIUtil.executeExternalAPIGetCall(execution, extAPIPath)
 
index 078d68b..b718e4a 100644 (file)
@@ -20,6 +20,8 @@
 
 package org.onap.so.bpmn.infrastructure.scripts
 
+import org.onap.so.bpmn.common.scripts.ExternalAPIUtilFactory
+
 import javax.ws.rs.NotFoundException
 import javax.ws.rs.core.Response
 
@@ -249,7 +251,7 @@ public class Delete3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
                valueMap.put("serviceName", "null")
                valueMap.put("serviceUuId", '"' + serviceSpecificationId + '"')
 
-               ExternalAPIUtil externalAPIUtil = new ExternalAPIUtil()
+               ExternalAPIUtil externalAPIUtil = new ExternalAPIUtilFactory().create()
 
                valueMap.put("_requestInputs_",  "")
 
@@ -271,7 +273,7 @@ public class Delete3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
                String extAPIPath = sppartnerUrl + "/service?relatedParty.id=" + globalSubscriberId
                msoLogger.debug("queryServicefrom3rdONAP externalAPIURL is: " + extAPIPath)
 
-               ExternalAPIUtil externalAPIUtil = new ExternalAPIUtil()
+               ExternalAPIUtil externalAPIUtil = new ExternalAPIUtilFactory().create()
 
                Response response = externalAPIUtil.executeExternalAPIGetCall(execution, extAPIPath)
 
@@ -317,7 +319,7 @@ public class Delete3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
                msoLogger.debug("doDeleteE2ESIin3rdONAP externalAPIURL is: " + extAPIPath)
                msoLogger.debug("doDeleteE2ESIin3rdONAP payload is: " + payload)
 
-               ExternalAPIUtil externalAPIUtil = new ExternalAPIUtil()
+               ExternalAPIUtil externalAPIUtil = new ExternalAPIUtilFactory().create()
                execution.setVariable("ServiceOrderId", "")
 
                Response response = externalAPIUtil.executeExternalAPIPostCall(execution, extAPIPath, payload)
@@ -361,7 +363,7 @@ public class Delete3rdONAPE2EServiceInstance extends AbstractServiceTaskProcesso
                extAPIPath += "/" + execution.getVariable("ServiceOrderId")
                msoLogger.debug("getE2ESIProgressin3rdONAP delete externalAPIURL is: " + extAPIPath)
 
-               ExternalAPIUtil externalAPIUtil = new ExternalAPIUtil()
+               ExternalAPIUtil externalAPIUtil = new ExternalAPIUtilFactory().create()
 
                Response response = externalAPIUtil.executeExternalAPIGetCall(execution, extAPIPath)
 
index 2f5fa39..c049eaa 100644 (file)
@@ -1,16 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="2.0.3" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
   <bpmn2:process id="DoCreateNetworkInstance" name="DoCreateNetworkInstance" isExecutable="true">
     <bpmn2:startEvent id="createNetwork_startEvent" name="Start Flow">
       <bpmn2:outgoing>SequenceFlow_1n61wit</bpmn2:outgoing>
     </bpmn2:startEvent>
-    <bpmn2:endEvent id="aai_Error_EndEvent" name="AAI Name Error">
-      <bpmn2:incoming>isReturnCode404_No_SequenceFlow</bpmn2:incoming>
-      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_53" errorRef="Error_2" />
-    </bpmn2:endEvent>
     <bpmn2:inclusiveGateway id="InclusiveGateway">
       <bpmn2:incoming>isNetworkActiveNo_SequenceFlow</bpmn2:incoming>
-      <bpmn2:incoming>isReturnCode404_Yes_SequenceFlow</bpmn2:incoming>
+      <bpmn2:incoming>isAAIQueryNameNo_SequenceFlow</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_21</bpmn2:outgoing>
     </bpmn2:inclusiveGateway>
     <bpmn2:sequenceFlow id="SequenceFlow_21" sourceRef="InclusiveGateway" targetRef="callRESTQueryCloudRegion_ScriptTask" />
       <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming>
       <bpmn2:incoming>isNameSentNo_SequenceFlow</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing>
-      <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+      <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
 def DoCreateNetworkInstance = new DoCreateNetworkInstance()
-DoCreateNetworkInstance.callRESTQueryAAICloudRegion(execution)]]></bpmn2:script>
+DoCreateNetworkInstance.callRESTQueryAAICloudRegion(execution)</bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="callRESTQueryCloudRegion_ScriptTask" targetRef="isSdncRpc1_ExclusiveGateway1" />
     <bpmn2:scriptTask id="prepareSDNCTopoRequest_ScriptTask" name="Prepare Assign SDNC Request" scriptFormat="groovy">
       <bpmn2:incoming>isSdncRpc1No_SequenceFlow1</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_11</bpmn2:outgoing>
-      <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+      <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
 def DoCreateNetworkInstance = new DoCreateNetworkInstance()
 DoCreateNetworkInstance.prepareSDNCRequest(execution)
-]]></bpmn2:script>
+</bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:sequenceFlow id="SequenceFlow_11" name="" sourceRef="prepareSDNCTopoRequest_ScriptTask" targetRef="callAssignSDNCAdapter_CallActivity" />
     <bpmn2:scriptTask id="validateSDNCResponse_ScriptTask" name="Validate SDNC Assign Response" scriptFormat="groovy">
       <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
       <bpmn2:incoming>SequenceFlow_0d93bqw</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
-      <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+      <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
 def DoCreateNetworkInstance = new DoCreateNetworkInstance()
-DoCreateNetworkInstance.validateSDNCResponse(execution)]]></bpmn2:script>
+DoCreateNetworkInstance.validateSDNCResponse(execution)</bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:exclusiveGateway id="isSdncTopoOk_ExclusiveGateway" name="Is SDNC Ok?" default="sdncTopoNo_SequenceFlow">
       <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
@@ -47,7 +43,7 @@ DoCreateNetworkInstance.validateSDNCResponse(execution)]]></bpmn2:script>
     </bpmn2:exclusiveGateway>
     <bpmn2:sequenceFlow id="sdncTopoNo_SequenceFlow" name="No" sourceRef="isSdncTopoOk_ExclusiveGateway" targetRef="sndcError_EndEvent" />
     <bpmn2:sequenceFlow id="sdncTopoYes_SequenceFlow" name="Yes" sourceRef="isSdncTopoOk_ExclusiveGateway" targetRef="callRESTQueryNetworkId_ScriptTask">
-      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_sdncResponseSuccess" ) == true}]]></bpmn2:conditionExpression>
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable("CRENWKI_sdncResponseSuccess" ) == true}</bpmn2:conditionExpression>
     </bpmn2:sequenceFlow>
     <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="validateSDNCResponse_ScriptTask" targetRef="isSdncTopoOk_ExclusiveGateway" />
     <bpmn2:boundaryEvent id="BoundaryEvent_4" name="" attachedToRef="validateSDNCResponse_ScriptTask">
@@ -63,9 +59,9 @@ DoCreateNetworkInstance.validateSDNCResponse(execution)]]></bpmn2:script>
     <bpmn2:scriptTask id="callRESTQueryNetworkId_ScriptTask" name="Call REST Query Network Id In AAI" scriptFormat="groovy">
       <bpmn2:incoming>sdncTopoYes_SequenceFlow</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>
-      <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+      <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
 def DoCreateNetworkInstance = new DoCreateNetworkInstance()
-DoCreateNetworkInstance.callRESTQueryAAINetworkId(execution)]]></bpmn2:script>
+DoCreateNetworkInstance.callRESTQueryAAINetworkId(execution)</bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="callRESTQueryNetworkId_ScriptTask" targetRef="callRESTQueryVpnBinding_ScriptTask" />
     <bpmn2:callActivity id="callAssignSDNCAdapter_CallActivity" name="Call SDNC Assign Adapter V1 " calledElement="sdncAdapter">
@@ -85,9 +81,9 @@ DoCreateNetworkInstance.callRESTQueryAAINetworkId(execution)]]></bpmn2:script>
     <bpmn2:scriptTask id="validateCreatePONetwork_ScriptTask" name="Validate Create PO Network" scriptFormat="groovy">
       <bpmn2:incoming>SequenceFlow_59</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
-      <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+      <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
 def DoCreateNetworkInstance = new DoCreateNetworkInstance()
-DoCreateNetworkInstance.validateCreateNetworkResponse(execution)]]></bpmn2:script>
+DoCreateNetworkInstance.validateCreateNetworkResponse(execution)</bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:exclusiveGateway id="isNetworkActive_ExclusiveGateway" name="Is Network Active?" default="isNetworkActiveNo_SequenceFlow">
       <bpmn2:incoming>isAAIQueryNameYes_SequenceFlow</bpmn2:incoming>
@@ -95,7 +91,7 @@ DoCreateNetworkInstance.validateCreateNetworkResponse(execution)]]></bpmn2:scrip
       <bpmn2:outgoing>isNetworkActiveNo_SequenceFlow</bpmn2:outgoing>
     </bpmn2:exclusiveGateway>
     <bpmn2:sequenceFlow id="isNetworkActiveYes_SequenceFlow" name="Yes" sourceRef="isNetworkActive_ExclusiveGateway" targetRef="ScriptTask_0p3v749">
-      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_orchestrationStatus") == "ACTIVE"}]]></bpmn2:conditionExpression>
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable("CRENWKI_orchestrationStatus") == "ACTIVE"}</bpmn2:conditionExpression>
     </bpmn2:sequenceFlow>
     <bpmn2:sequenceFlow id="isNetworkActiveNo_SequenceFlow" name="No" sourceRef="isNetworkActive_ExclusiveGateway" targetRef="InclusiveGateway" />
     <bpmn2:exclusiveGateway id="isAAIQueryNameOk_ExclusiveGateway" name="Is Query Name&#10; Ok?&#10;" default="isAAIQueryNameNo_SequenceFlow">
@@ -103,20 +99,9 @@ DoCreateNetworkInstance.validateCreateNetworkResponse(execution)]]></bpmn2:scrip
       <bpmn2:outgoing>isAAIQueryNameNo_SequenceFlow</bpmn2:outgoing>
       <bpmn2:outgoing>isAAIQueryNameYes_SequenceFlow</bpmn2:outgoing>
     </bpmn2:exclusiveGateway>
-    <bpmn2:sequenceFlow id="isAAIQueryNameNo_SequenceFlow" name="No" sourceRef="isAAIQueryNameOk_ExclusiveGateway" targetRef="isReturnCode404_ExclusiveGateway" />
+    <bpmn2:sequenceFlow id="isAAIQueryNameNo_SequenceFlow" name="No" sourceRef="isAAIQueryNameOk_ExclusiveGateway" targetRef="InclusiveGateway" />
     <bpmn2:sequenceFlow id="isAAIQueryNameYes_SequenceFlow" name="Yes" sourceRef="isAAIQueryNameOk_ExclusiveGateway" targetRef="isNetworkActive_ExclusiveGateway">
-      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_isAAIqueryNameGood") == true}]]></bpmn2:conditionExpression>
-    </bpmn2:sequenceFlow>
-    <bpmn2:exclusiveGateway id="isReturnCode404_ExclusiveGateway" name="Is Code 404?" default="isReturnCode404_No_SequenceFlow">
-      <bpmn2:incoming>isAAIQueryNameNo_SequenceFlow</bpmn2:incoming>
-      <bpmn2:outgoing>isReturnCode404_No_SequenceFlow</bpmn2:outgoing>
-      <bpmn2:outgoing>isReturnCode404_Yes_SequenceFlow</bpmn2:outgoing>
-    </bpmn2:exclusiveGateway>
-    <bpmn2:sequenceFlow id="isReturnCode404_No_SequenceFlow" name="No" sourceRef="isReturnCode404_ExclusiveGateway" targetRef="aai_Error_EndEvent" />
-    <bpmn2:sequenceFlow id="isReturnCode404_Yes_SequenceFlow" name="Yes" sourceRef="isReturnCode404_ExclusiveGateway" targetRef="InclusiveGateway">
-      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_aaiNameReturnCode" ) == "404"}
-
-]]></bpmn2:conditionExpression>
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable("CRENWKI_isAAIqueryNameGood") == true}</bpmn2:conditionExpression>
     </bpmn2:sequenceFlow>
     <bpmn2:subProcess id="subProcessException_SubProcess" name="Subprocess For Prepare Rollback Data" triggeredByEvent="true">
       <bpmn2:startEvent id="subProcessStart_StartEvent" name="Fault Start">
@@ -130,7 +115,7 @@ DoCreateNetworkInstance.validateCreateNetworkResponse(execution)]]></bpmn2:scrip
         <bpmn2:outgoing>isPONR_No_SequenceFlow</bpmn2:outgoing>
       </bpmn2:exclusiveGateway>
       <bpmn2:sequenceFlow id="isPONR_Yes_SequenceFlow" name="Yes" sourceRef="isPONR_ExclusiveGateway" targetRef="ExclusiveGateway_1umhuft">
-        <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_isPONR") == true}]]></bpmn2:conditionExpression>
+        <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable("CRENWKI_isPONR") == true}</bpmn2:conditionExpression>
       </bpmn2:sequenceFlow>
       <bpmn2:sequenceFlow id="isPONR_No_SequenceFlow" name="No" sourceRef="isPONR_ExclusiveGateway" targetRef="isSDNCActivate_ExclusiveGateway" />
       <bpmn2:exclusiveGateway id="sdncOk_ExclusiveGateway" name="is SDNC Topo Ok?" default="sdncOk_No_ExclusiveGateway">
@@ -139,15 +124,15 @@ DoCreateNetworkInstance.validateCreateNetworkResponse(execution)]]></bpmn2:scrip
         <bpmn2:outgoing>sdncOk_No_ExclusiveGateway</bpmn2:outgoing>
       </bpmn2:exclusiveGateway>
       <bpmn2:sequenceFlow id="sdncOk_Yeso_ExclusiveGateway" name="Yes" sourceRef="sdncOk_ExclusiveGateway" targetRef="isSdncRpc4_ExclusiveGateway4">
-        <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_isSdncRollbackNeeded" ) == true}]]></bpmn2:conditionExpression>
+        <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable("CRENWKI_isSdncRollbackNeeded" ) == true}</bpmn2:conditionExpression>
       </bpmn2:sequenceFlow>
       <bpmn2:sequenceFlow id="sdncOk_No_ExclusiveGateway" name="No" sourceRef="sdncOk_ExclusiveGateway" targetRef="ExclusiveGateway_1qb2vwe" />
       <bpmn2:scriptTask id="prepareSDNCRollbackRequest_ScriptTask" name="Prepare SDNCRollback Request" scriptFormat="groovy">
         <bpmn2:incoming>isSdncRpc4No_SequenceFlow4</bpmn2:incoming>
         <bpmn2:outgoing>SequenceFlow_0lndbvr</bpmn2:outgoing>
-        <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+        <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
 def DoCreateNetworkInstance = new DoCreateNetworkInstance()
-DoCreateNetworkInstance.prepareSDNCRollbackRequest(execution)]]></bpmn2:script>
+DoCreateNetworkInstance.prepareSDNCRollbackRequest(execution)</bpmn2:script>
       </bpmn2:scriptTask>
       <bpmn2:exclusiveGateway id="isSDNCActivate_ExclusiveGateway" name="is SDNC Activate Ok?" default="SequenceFlow_12tlymf">
         <bpmn2:incoming>isPONR_No_SequenceFlow</bpmn2:incoming>
@@ -155,7 +140,7 @@ DoCreateNetworkInstance.prepareSDNCRollbackRequest(execution)]]></bpmn2:script>
         <bpmn2:outgoing>SequenceFlow_12tlymf</bpmn2:outgoing>
       </bpmn2:exclusiveGateway>
       <bpmn2:sequenceFlow id="SequenceFlow_0cly7z2" name="Yes" sourceRef="isSDNCActivate_ExclusiveGateway" targetRef="Task_1imzwi3">
-        <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_isSdncActivateRollbackNeeded" ) == true}]]></bpmn2:conditionExpression>
+        <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable("CRENWKI_isSdncActivateRollbackNeeded" ) == true}</bpmn2:conditionExpression>
       </bpmn2:sequenceFlow>
       <bpmn2:sequenceFlow id="SequenceFlow_12tlymf" name="No" sourceRef="isSDNCActivate_ExclusiveGateway" targetRef="ExclusiveGateway_1bk0tqd" />
       <bpmn2:exclusiveGateway id="isSdncRpc4_ExclusiveGateway4" name="is not &#39;1610&#39; SNDC Call?" default="isSdncRpc4No_SequenceFlow4">
@@ -164,15 +149,15 @@ DoCreateNetworkInstance.prepareSDNCRollbackRequest(execution)]]></bpmn2:script>
         <bpmn2:outgoing>isSdncRpc4No_SequenceFlow4</bpmn2:outgoing>
       </bpmn2:exclusiveGateway>
       <bpmn2:sequenceFlow id="isSdncRpc4Yes_SequenceFlow4" name="Yes" sourceRef="isSdncRpc4_ExclusiveGateway4" targetRef="Task_0q6pzpn">
-        <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("sdncVersion") != '1610'} ]]></bpmn2:conditionExpression>
+        <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable("sdncVersion") != '1610'} </bpmn2:conditionExpression>
       </bpmn2:sequenceFlow>
       <bpmn2:sequenceFlow id="isSdncRpc4No_SequenceFlow4" name="No" sourceRef="isSdncRpc4_ExclusiveGateway4" targetRef="prepareSDNCRollbackRequest_ScriptTask" />
       <bpmn2:scriptTask id="Task_0q6pzpn" name="Prepare RSRC SDNCRollback Request" scriptFormat="groovy">
         <bpmn2:incoming>isSdncRpc4Yes_SequenceFlow4</bpmn2:incoming>
         <bpmn2:outgoing>SequenceFlow_0bwpkkb</bpmn2:outgoing>
-        <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+        <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
 def DoCreateNetworkInstance = new DoCreateNetworkInstance()
-DoCreateNetworkInstance.prepareRpcSDNCRollbackRequest(execution)]]></bpmn2:script>
+DoCreateNetworkInstance.prepareRpcSDNCRollbackRequest(execution)</bpmn2:script>
       </bpmn2:scriptTask>
       <bpmn2:endEvent id="EndEvent_1kpt4kc">
         <bpmn2:incoming>SequenceFlow_1qwubew</bpmn2:incoming>
@@ -180,17 +165,17 @@ DoCreateNetworkInstance.prepareRpcSDNCRollbackRequest(execution)]]></bpmn2:scrip
       <bpmn2:scriptTask id="ScriptTask_0myjg9k" name="Prepare RollbackData" scriptFormat="groovy">
         <bpmn2:incoming>SequenceFlow_15sffxc</bpmn2:incoming>
         <bpmn2:outgoing>SequenceFlow_096tad6</bpmn2:outgoing>
-        <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+        <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
 def DoCreateNetworkInstance = new DoCreateNetworkInstance()
-DoCreateNetworkInstance.prepareRollbackData(execution)]]></bpmn2:script>
+DoCreateNetworkInstance.prepareRollbackData(execution)</bpmn2:script>
       </bpmn2:scriptTask>
       <bpmn2:sequenceFlow id="SequenceFlow_0b8j5rw" sourceRef="Task_1imzwi3" targetRef="ExclusiveGateway_1bk0tqd" />
       <bpmn2:scriptTask id="Task_1imzwi3" name="Prepare RSRC SDNC Activate Rollback Request" scriptFormat="groovy">
         <bpmn2:incoming>SequenceFlow_0cly7z2</bpmn2:incoming>
         <bpmn2:outgoing>SequenceFlow_0b8j5rw</bpmn2:outgoing>
-        <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+        <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
 def DoCreateNetworkInstance = new DoCreateNetworkInstance()
-DoCreateNetworkInstance.prepareRpcSDNCActivateRollback(execution)]]></bpmn2:script>
+DoCreateNetworkInstance.prepareRpcSDNCActivateRollback(execution)</bpmn2:script>
       </bpmn2:scriptTask>
       <bpmn2:callActivity id="CallActivity_1u07hp7" name="DoCreate&#10;NetworkInstanceRollback&#10;" calledElement="DoCreateNetworkInstanceRollback">
         <bpmn2:extensionElements>
@@ -218,9 +203,9 @@ DoCreateNetworkInstance.prepareRpcSDNCActivateRollback(execution)]]></bpmn2:scri
         <bpmn2:incoming>SequenceFlow_0vzsyrd</bpmn2:incoming>
         <bpmn2:incoming>SequenceFlow_17nx822</bpmn2:incoming>
         <bpmn2:outgoing>SequenceFlow_1qwubew</bpmn2:outgoing>
-        <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+        <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
 def DoCreateNetworkInstance = new DoCreateNetworkInstance()
-DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script>
+DoCreateNetworkInstance.postProcessResponse(execution)</bpmn2:script>
       </bpmn2:scriptTask>
       <bpmn2:sequenceFlow id="SequenceFlow_1qwubew" sourceRef="ScriptTask_0w2ekuz" targetRef="EndEvent_1kpt4kc" />
       <bpmn2:exclusiveGateway id="isRollbackOn_ExclusiveGateway" name="Is Rollback On?" default="isRollbackOn_SequenceFlow_No">
@@ -229,7 +214,7 @@ DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script>
         <bpmn2:outgoing>isRollbackOn_SequenceFlow_No</bpmn2:outgoing>
       </bpmn2:exclusiveGateway>
       <bpmn2:sequenceFlow id="isRollbackOn_SequenceFlow_Yes" name="Yes" sourceRef="isRollbackOn_ExclusiveGateway" targetRef="isPONR_ExclusiveGateway">
-        <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_rollbackEnabled") == true && execution.getVariable("CRENWKI_isSdncRollbackNeeded") == true}]]></bpmn2:conditionExpression>
+        <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable("CRENWKI_rollbackEnabled") == true &amp;&amp; execution.getVariable("CRENWKI_isSdncRollbackNeeded") == true}</bpmn2:conditionExpression>
       </bpmn2:sequenceFlow>
       <bpmn2:sequenceFlow id="isRollbackOn_SequenceFlow_No" name="No" sourceRef="isRollbackOn_ExclusiveGateway" targetRef="ExclusiveGateway_1umhuft" />
       <bpmn2:inclusiveGateway id="ExclusiveGateway_1qb2vwe">
@@ -254,24 +239,26 @@ DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script>
       <bpmn2:scriptTask id="ScriptTask_0j3058g" name="Set Exception Flag" scriptFormat="groovy">
         <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
         <bpmn2:outgoing>SequenceFlow_10ttvwn</bpmn2:outgoing>
-        <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+        <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
 def DoCreateNetworkInstance = new DoCreateNetworkInstance()
 DoCreateNetworkInstance.setExceptionFlag(execution)
-]]></bpmn2:script>
+</bpmn2:script>
       </bpmn2:scriptTask>
       <bpmn2:sequenceFlow id="SequenceFlow_10ttvwn" sourceRef="ScriptTask_0j3058g" targetRef="isRollbackOn_ExclusiveGateway" />
-      <bpmn2:textAnnotation id="TextAnnotation_1py1p84">      <bpmn2:text><![CDATA[  
+      <bpmn2:textAnnotation id="TextAnnotation_1py1p84">
+        <bpmn2:text>  
 Include ONLY inputs/varrables: Â 
 rollbackData, as Map
 -rollbackSDNCRequest
 -rollbackActivateSDNCRequest
 -rollbackNetworkRequest
 WorkflowException
- ]]></bpmn2:text>
-</bpmn2:textAnnotation>
+ </bpmn2:text>
+      </bpmn2:textAnnotation>
       <bpmn2:association id="Association_0nketgd" sourceRef="CallActivity_1u07hp7" targetRef="TextAnnotation_1py1p84" />
-      <bpmn2:textAnnotation id="TextAnnotation_0wjpv6r">      <bpmn2:text>PO Network Rollback is created in validation.</bpmn2:text>
-</bpmn2:textAnnotation>
+      <bpmn2:textAnnotation id="TextAnnotation_0wjpv6r">
+        <bpmn2:text>PO Network Rollback is created in validation.</bpmn2:text>
+      </bpmn2:textAnnotation>
       <bpmn2:association id="Association_0eolbkz" sourceRef="ExclusiveGateway_1bk0tqd" targetRef="TextAnnotation_0wjpv6r" />
     </bpmn2:subProcess>
     <bpmn2:serviceTask id="callCreateNetwork_ServiceTask" name="Call Create Network">
@@ -279,8 +266,8 @@ WorkflowException
         <camunda:connector>
           <camunda:inputOutput>
             <camunda:inputParameter name="payload">${CRENWKI_createNetworkRequest}</camunda:inputParameter>
-            <camunda:inputParameter name="url"><![CDATA[${UrnPropertiesReader.getVariable("mso.adapters.network.rest.endpoint", execution)}
-]]></camunda:inputParameter>
+            <camunda:inputParameter name="url">${UrnPropertiesReader.getVariable("mso.adapters.network.rest.endpoint", execution)}
+</camunda:inputParameter>
             <camunda:inputParameter name="headers">
               <camunda:map>
                 <camunda:entry key="Authorization">#{BasicAuthHeaderValuePO}</camunda:entry>
@@ -302,25 +289,25 @@ WorkflowException
     <bpmn2:scriptTask id="callRESTReQueryNetworkID_ScriptTask" name="Call REST ReQuery Network Id in AAI" scriptFormat="groovy">
       <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing>
-      <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+      <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
 def DoCreateNetworkInstance = new DoCreateNetworkInstance()
-DoCreateNetworkInstance.callRESTReQueryAAINetworkId(execution)]]></bpmn2:script>
+DoCreateNetworkInstance.callRESTReQueryAAINetworkId(execution)</bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="callRESTReQueryNetworkID_ScriptTask" targetRef="callRESTUpdateContrailNetwork_ScriptTask" />
     <bpmn2:scriptTask id="callRESTUpdateContrailNetwork_ScriptTask" name="Call REST Update Contrail Network in AAI" scriptFormat="groovy">
       <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_1ipz2ze</bpmn2:outgoing>
-      <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+      <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
 def DoCreateNetworkInstance = new DoCreateNetworkInstance()
-DoCreateNetworkInstance.callRESTUpdateContrailAAINetwork(execution)]]></bpmn2:script>
+DoCreateNetworkInstance.callRESTUpdateContrailAAINetwork(execution)</bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:subProcess id="unexpectedErrors_SubProcess" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
       <bpmn2:scriptTask id="ScriptTask_1" name="Log / Print Unexpected Error" scriptFormat="groovy">
         <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
         <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
-        <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+        <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
 def DoCreateNetworkInstance = new DoCreateNetworkInstance()
-DoCreateNetworkInstance.processJavaException(execution)]]></bpmn2:script>
+DoCreateNetworkInstance.processJavaException(execution)</bpmn2:script>
       </bpmn2:scriptTask>
       <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ScriptTask_1" targetRef="EndEvent_1" />
       <bpmn2:startEvent id="StartEvent_1">
@@ -335,52 +322,52 @@ DoCreateNetworkInstance.processJavaException(execution)]]></bpmn2:script>
     <bpmn2:scriptTask id="callAAIQuery_scriptTask" name="Call REST Query Network Name In AAI" scriptFormat="groovy">
       <bpmn2:incoming>isNameSentYes_SequenceFlow</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
-      <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+      <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
 def DoCreateNetworkInstance = new DoCreateNetworkInstance()
-DoCreateNetworkInstance.callRESTQueryAAINetworkName(execution)]]></bpmn2:script>
+DoCreateNetworkInstance.callRESTQueryAAINetworkName(execution)</bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="callAAIQuery_scriptTask" targetRef="isAAIQueryNameOk_ExclusiveGateway" />
     <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="callGetServiceInstance" targetRef="isNameSent_ExclusiveGateway" />
     <bpmn2:scriptTask id="callRESTQueryVpnBinding_ScriptTask" name="Call REST Query Vpn Binding in AAI" scriptFormat="groovy">
       <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
-      <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+      <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
 def DoCreateNetworkInstance = new DoCreateNetworkInstance()
-DoCreateNetworkInstance.callRESTQueryAAINetworkVpnBinding(execution)]]></bpmn2:script>
+DoCreateNetworkInstance.callRESTQueryAAINetworkVpnBinding(execution)</bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:sequenceFlow id="SequenceFlow_15" name="" sourceRef="callRESTQueryVpnBinding_ScriptTask" targetRef="callRESTQueryNetworkPolicy_ScriptTask" />
     <bpmn2:scriptTask id="callRESTQueryNetworkPolicy_ScriptTask" name="Call REST Query Network Policy in AAI" scriptFormat="groovy">
       <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_38</bpmn2:outgoing>
-      <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+      <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
 def DoCreateNetworkInstance = new DoCreateNetworkInstance()
-DoCreateNetworkInstance.callRESTQueryAAINetworkPolicy(execution)]]></bpmn2:script>
+DoCreateNetworkInstance.callRESTQueryAAINetworkPolicy(execution)</bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:sequenceFlow id="SequenceFlow_38" name="" sourceRef="callRESTQueryNetworkPolicy_ScriptTask" targetRef="callRESTQueryNetworkTableRef_ScriptTask" />
     <bpmn2:scriptTask id="prepareNetworkRequest_ScriptTask" name="Prepare Create Network Request" scriptFormat="groovy">
       <bpmn2:incoming>SequenceFlow_20</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_61</bpmn2:outgoing>
-      <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+      <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
 def DoCreateNetworkInstance = new DoCreateNetworkInstance()
 DoCreateNetworkInstance.prepareCreateNetworkRequest(execution)
-]]></bpmn2:script>
+</bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:sequenceFlow id="SequenceFlow_61" name="" sourceRef="prepareNetworkRequest_ScriptTask" targetRef="callCreateNetwork_ServiceTask" />
     <bpmn2:scriptTask id="callRESTQueryNetworkTableRef_ScriptTask" name="Call REST Query Network TableRef in AAI" scriptFormat="groovy">
       <bpmn2:incoming>SequenceFlow_38</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_20</bpmn2:outgoing>
-      <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+      <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
 def DoCreateNetworkInstance = new DoCreateNetworkInstance()
-DoCreateNetworkInstance.callRESTQueryAAINetworkTableRef(execution)]]></bpmn2:script>
+DoCreateNetworkInstance.callRESTQueryAAINetworkTableRef(execution)</bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:sequenceFlow id="SequenceFlow_20" name="" sourceRef="callRESTQueryNetworkTableRef_ScriptTask" targetRef="prepareNetworkRequest_ScriptTask" />
     <bpmn2:sequenceFlow id="SequenceFlow_1n61wit" sourceRef="createNetwork_startEvent" targetRef="ScriptTask_preprocess" />
     <bpmn2:scriptTask id="ScriptTask_preprocess" name="PreProcess Incoming Request" scriptFormat="groovy">
       <bpmn2:incoming>SequenceFlow_1n61wit</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_0ftylq3</bpmn2:outgoing>
-      <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+      <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
 def DoCreateNetworkInstance = new DoCreateNetworkInstance()
-DoCreateNetworkInstance.preProcessRequest(execution)]]></bpmn2:script>
+DoCreateNetworkInstance.preProcessRequest(execution)</bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:sequenceFlow id="SequenceFlow_0ftylq3" sourceRef="ScriptTask_preprocess" targetRef="callGetServiceInstance" />
     <bpmn2:exclusiveGateway id="isNameSent_ExclusiveGateway" name="is Network Name &#10;Sent?&#10;" default="isNameSentNo_SequenceFlow">
@@ -389,7 +376,7 @@ DoCreateNetworkInstance.preProcessRequest(execution)]]></bpmn2:script>
       <bpmn2:outgoing>isNameSentNo_SequenceFlow</bpmn2:outgoing>
     </bpmn2:exclusiveGateway>
     <bpmn2:sequenceFlow id="isNameSentYes_SequenceFlow" name="Yes" sourceRef="isNameSent_ExclusiveGateway" targetRef="callAAIQuery_scriptTask">
-      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_networkName") != ""}]]></bpmn2:conditionExpression>
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable("CRENWKI_networkName") != ""}</bpmn2:conditionExpression>
     </bpmn2:sequenceFlow>
     <bpmn2:sequenceFlow id="isNameSentNo_SequenceFlow" name="No" sourceRef="isNameSent_ExclusiveGateway" targetRef="callRESTQueryCloudRegion_ScriptTask" />
     <bpmn2:callActivity id="Task_1ipbwbj" name="Call SDNC RSRC Activate&#10; Adapter V1&#10;" calledElement="sdncAdapter">
@@ -408,9 +395,9 @@ DoCreateNetworkInstance.preProcessRequest(execution)]]></bpmn2:script>
     <bpmn2:scriptTask id="Task_1rd6dg6" name="Prepare SDNC RSRC Activate Request" scriptFormat="groovy">
       <bpmn2:incoming>isSdncRpc2Yes_SequenceFlow2</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_13deudk</bpmn2:outgoing>
-      <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+      <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
 def DoCreateNetworkInstance = new DoCreateNetworkInstance()
-DoCreateNetworkInstance.prepareRpcSDNCActivateRequest(execution)]]></bpmn2:script>
+DoCreateNetworkInstance.prepareRpcSDNCActivateRequest(execution)</bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:exclusiveGateway id="ExclusiveGateway_0n0ptg6" name="is SDNC PRC&#10;Activate Ok?&#10;" default="SequenceFlow_18ybfu5">
       <bpmn2:incoming>SequenceFlow_1t03rs2</bpmn2:incoming>
@@ -421,15 +408,15 @@ DoCreateNetworkInstance.prepareRpcSDNCActivateRequest(execution)]]></bpmn2:scrip
     <bpmn2:sequenceFlow id="SequenceFlow_08qibb9" sourceRef="Task_1ipbwbj" targetRef="validateSDNCActivate_Task" />
     <bpmn2:sequenceFlow id="SequenceFlow_1t03rs2" sourceRef="validateSDNCActivate_Task" targetRef="ExclusiveGateway_0n0ptg6" />
     <bpmn2:sequenceFlow id="SequenceFlow_1jia57e" name="Yes" sourceRef="ExclusiveGateway_0n0ptg6" targetRef="Task_0zzobg6">
-      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("CRENWKI_sdncResponseSuccess" ) == true}]]></bpmn2:conditionExpression>
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable("CRENWKI_sdncResponseSuccess" ) == true}</bpmn2:conditionExpression>
     </bpmn2:sequenceFlow>
     <bpmn2:sequenceFlow id="SequenceFlow_18ybfu5" name="No" sourceRef="ExclusiveGateway_0n0ptg6" targetRef="EndEvent_13v46cq" />
     <bpmn2:scriptTask id="validateSDNCActivate_Task" name="Validate SDNCRSRC Activate&#10;Response&#10;" scriptFormat="groovy">
       <bpmn2:incoming>SequenceFlow_08qibb9</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_1t03rs2</bpmn2:outgoing>
-      <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+      <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
 def DoCreateNetworkInstance = new DoCreateNetworkInstance()
-DoCreateNetworkInstance.validateRpcSDNCActivateResponse(execution)]]></bpmn2:script>
+DoCreateNetworkInstance.validateRpcSDNCActivateResponse(execution)</bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:boundaryEvent id="BoundaryEvent_0vb26bm" attachedToRef="validateSDNCActivate_Task">
       <bpmn2:outgoing>SequenceFlow_0s51ns0</bpmn2:outgoing>
@@ -448,7 +435,7 @@ DoCreateNetworkInstance.validateRpcSDNCActivateResponse(execution)]]></bpmn2:scr
     </bpmn2:exclusiveGateway>
     <bpmn2:sequenceFlow id="isSdncRpc1No_SequenceFlow1" name="No" sourceRef="isSdncRpc1_ExclusiveGateway1" targetRef="prepareSDNCTopoRequest_ScriptTask" />
     <bpmn2:sequenceFlow id="isSdncRpc1Yes_SequenceFlow1" name="Yes" sourceRef="isSdncRpc1_ExclusiveGateway1" targetRef="Task_10lubzj">
-      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("sdncVersion") != '1610'} ]]></bpmn2:conditionExpression>
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable("sdncVersion") != '1610'} </bpmn2:conditionExpression>
     </bpmn2:sequenceFlow>
     <bpmn2:callActivity id="Task_0pbtywn" name="Call SDNC RSRC Assign Adapter V1 " calledElement="sdncAdapter">
       <bpmn2:extensionElements>
@@ -471,16 +458,16 @@ DoCreateNetworkInstance.validateRpcSDNCActivateResponse(execution)]]></bpmn2:scr
       <bpmn2:outgoing>isSdncRpc2No_SequenceFlow2</bpmn2:outgoing>
     </bpmn2:exclusiveGateway>
     <bpmn2:sequenceFlow id="isSdncRpc2Yes_SequenceFlow2" name="Yes" sourceRef="isSdncRpc2_ExclusiveGateway2" targetRef="Task_1rd6dg6">
-      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("sdncVersion") != '1610'} ]]></bpmn2:conditionExpression>
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable("sdncVersion") != '1610'} </bpmn2:conditionExpression>
     </bpmn2:sequenceFlow>
     <bpmn2:sequenceFlow id="isSdncRpc2No_SequenceFlow2" name="No" sourceRef="isSdncRpc2_ExclusiveGateway2" targetRef="Task_0zzobg6" />
     <bpmn2:scriptTask id="Task_10lubzj" name="Prepare Assign SDNC RPC Request" scriptFormat="groovy">
       <bpmn2:incoming>isSdncRpc1Yes_SequenceFlow1</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_0j8bxnb</bpmn2:outgoing>
-      <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+      <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
 def DoCreateNetworkInstance = new DoCreateNetworkInstance()
 DoCreateNetworkInstance.prepareRpcSDNCRequest(execution)
-]]></bpmn2:script>
+</bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:endEvent id="EndEvent_1te02c4">
       <bpmn2:incoming>SequenceFlow_1s8b1m1</bpmn2:incoming>
@@ -493,28 +480,29 @@ DoCreateNetworkInstance.prepareRpcSDNCRequest(execution)
       <bpmn2:incoming>SequenceFlow_1jia57e</bpmn2:incoming>
       <bpmn2:incoming>isSdncRpc2No_SequenceFlow2</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_1s8b1m1</bpmn2:outgoing>
-      <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+      <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
 def DoCreateNetworkInstance = new DoCreateNetworkInstance()
-DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script>
+DoCreateNetworkInstance.postProcessResponse(execution)</bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:sequenceFlow id="SequenceFlow_1ipz2ze" sourceRef="callRESTUpdateContrailNetwork_ScriptTask" targetRef="isSdncRpc2_ExclusiveGateway2" />
     <bpmn2:scriptTask id="ScriptTask_0p3v749" name="Post Process Response" scriptFormat="groovy">
       <bpmn2:incoming>isNetworkActiveYes_SequenceFlow</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_18ylufb</bpmn2:outgoing>
-      <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+      <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
 def DoCreateNetworkInstance = new DoCreateNetworkInstance()
-DoCreateNetworkInstance.postProcessResponse(execution)]]></bpmn2:script>
+DoCreateNetworkInstance.postProcessResponse(execution)</bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:sequenceFlow id="SequenceFlow_18ylufb" sourceRef="ScriptTask_0p3v749" targetRef="EndEvent_0ti2ctu" />
     <bpmn2:scriptTask id="callGetServiceInstance" name="&#10;AAI&#10;Query&#10;(svc instance)&#10;" scriptFormat="groovy">
       <bpmn2:incoming>SequenceFlow_0ftylq3</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
-      <bpmn2:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+      <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
 def DoCreateNetworkInstance = new DoCreateNetworkInstance()
-DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
+DoCreateNetworkInstance.getServiceInstance(execution)</bpmn2:script>
     </bpmn2:scriptTask>
-    <bpmn2:textAnnotation id="TextAnnotation_1orb6o6">    <bpmn2:text><![CDATA[if '200', Prepare PO Network Rollback]]></bpmn2:text>
-</bpmn2:textAnnotation>
+    <bpmn2:textAnnotation id="TextAnnotation_1orb6o6">
+      <bpmn2:text>if '200', Prepare PO Network Rollback</bpmn2:text>
+    </bpmn2:textAnnotation>
     <bpmn2:association id="Association_0c315jr" sourceRef="validateCreatePONetwork_ScriptTask" targetRef="TextAnnotation_1orb6o6" />
   </bpmn2:process>
   <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
@@ -537,8 +525,8 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_62" targetElement="_BPMNShape_ExclusiveGateway_62">
-        <di:waypoint xsi:type="dc:Point" x="1026" y="8" />
-        <di:waypoint xsi:type="dc:Point" x="1098" y="9" />
+        <di:waypoint x="1026" y="8" />
+        <di:waypoint x="1098" y="9" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1062" y="-6.5" width="0" height="0" />
         </bpmndi:BPMNLabel>
@@ -546,50 +534,23 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
       <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_63" bpmnElement="validateCreatePONetwork_ScriptTask">
         <dc:Bounds x="1457" y="1258" width="100" height="80" />
       </bpmndi:BPMNShape>
-      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="isAAIQueryNameNo_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_62" targetElement="_BPMNShape_ExclusiveGateway_64">
-        <di:waypoint xsi:type="dc:Point" x="1123" y="34" />
-        <di:waypoint xsi:type="dc:Point" x="1123" y="91" />
+      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="isAAIQueryNameNo_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_62" targetElement="_BPMNShape_InclusiveGateway_4">
+        <di:waypoint x="1123" y="34" />
+        <di:waypoint x="1123" y="116" />
+        <di:waypoint x="1224" y="116" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="1131" y="39.0514827586207" width="14" height="12" />
+          <dc:Bounds x="1131" y="44" width="15" height="14" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="isAAIQueryNameYes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_62" targetElement="_BPMNShape_ExclusiveGateway_73">
-        <di:waypoint xsi:type="dc:Point" x="1148" y="9" />
-        <di:waypoint xsi:type="dc:Point" x="1186" y="9" />
-        <di:waypoint xsi:type="dc:Point" x="1186" y="9" />
-        <di:waypoint xsi:type="dc:Point" x="1224" y="9" />
+        <di:waypoint x="1148" y="9" />
+        <di:waypoint x="1186" y="9" />
+        <di:waypoint x="1186" y="9" />
+        <di:waypoint x="1224" y="9" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1151" y="14.164179104477611" width="18" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
-      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_64" bpmnElement="isReturnCode404_ExclusiveGateway" isMarkerVisible="true">
-        <dc:Bounds x="1098" y="91" width="50" height="50" />
-        <bpmndi:BPMNLabel>
-          <dc:Bounds x="1026" y="110" width="65" height="12" />
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNShape>
-      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="isReturnCode404_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_64" targetElement="_BPMNShape_EndEvent_118">
-        <di:waypoint xsi:type="dc:Point" x="1123" y="141" />
-        <di:waypoint xsi:type="dc:Point" x="1123" y="187" />
-        <bpmndi:BPMNLabel>
-          <dc:Bounds x="1132" y="138.4109225063519" width="14" height="12" />
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="isReturnCode404_Yes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_64" targetElement="_BPMNShape_InclusiveGateway_4">
-        <di:waypoint xsi:type="dc:Point" x="1148" y="116" />
-        <di:waypoint xsi:type="dc:Point" x="1186" y="116" />
-        <di:waypoint xsi:type="dc:Point" x="1186" y="116" />
-        <di:waypoint xsi:type="dc:Point" x="1224" y="116" />
-        <bpmndi:BPMNLabel>
-          <dc:Bounds x="1151" y="118.55844155844156" width="18" height="12" />
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
-      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_118" bpmnElement="aai_Error_EndEvent">
-        <dc:Bounds x="1105" y="187" width="36" height="36" />
-        <bpmndi:BPMNLabel>
-          <dc:Bounds x="1085" y="228" width="77" height="12" />
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNShape>
       <bpmndi:BPMNShape id="_BPMNShape_ServiceTask_83" bpmnElement="callCreateNetwork_ServiceTask">
         <dc:Bounds x="1454" y="1135" width="100" height="80" />
       </bpmndi:BPMNShape>
@@ -612,15 +573,15 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_26" bpmnElement="sdncTopoNo_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_67" targetElement="_BPMNShape_EndEvent_124">
-        <di:waypoint xsi:type="dc:Point" x="1665" y="545" />
-        <di:waypoint xsi:type="dc:Point" x="1739" y="545" />
+        <di:waypoint x="1665" y="545" />
+        <di:waypoint x="1739" y="545" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1670" y="545.8651480742376" width="14" height="13" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_28" bpmnElement="sdncTopoYes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_67" targetElement="_BPMNShape_ScriptTask_133">
-        <di:waypoint xsi:type="dc:Point" x="1615" y="545" />
-        <di:waypoint xsi:type="dc:Point" x="1554" y="546" />
+        <di:waypoint x="1615" y="545" />
+        <di:waypoint x="1554" y="546" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1587" y="549.9992641545633" width="18" height="12" />
         </bpmndi:BPMNLabel>
@@ -635,22 +596,22 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         <dc:Bounds x="1590" y="276" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_11" sourceElement="_BPMNShape_ScriptTask_67" targetElement="_BPMNShape_CallActivity_19">
-        <di:waypoint xsi:type="dc:Point" x="1640" y="235" />
-        <di:waypoint xsi:type="dc:Point" x="1640" y="276" />
+        <di:waypoint x="1640" y="235" />
+        <di:waypoint x="1640" y="276" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1655" y="255.5" width="0" height="0" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_29" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_CallActivity_19" targetElement="_BPMNShape_ScriptTask_131">
-        <di:waypoint xsi:type="dc:Point" x="1640" y="356" />
-        <di:waypoint xsi:type="dc:Point" x="1640" y="395" />
+        <di:waypoint x="1640" y="356" />
+        <di:waypoint x="1640" y="395" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1655" y="375.5" width="0" height="0" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_StartEvent_50">
-        <di:waypoint xsi:type="dc:Point" x="143" y="1184" />
-        <di:waypoint xsi:type="dc:Point" x="170" y="1184" />
+        <di:waypoint x="143" y="1184" />
+        <di:waypoint x="170" y="1184" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="157" y="1169" width="0" height="0" />
         </bpmndi:BPMNLabel>
@@ -659,10 +620,10 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         <dc:Bounds x="1590" y="395" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_11" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_131" targetElement="_BPMNShape_ExclusiveGateway_67">
-        <di:waypoint xsi:type="dc:Point" x="1640" y="475" />
-        <di:waypoint xsi:type="dc:Point" x="1640" y="498" />
-        <di:waypoint xsi:type="dc:Point" x="1640" y="498" />
-        <di:waypoint xsi:type="dc:Point" x="1640" y="520" />
+        <di:waypoint x="1640" y="475" />
+        <di:waypoint x="1640" y="498" />
+        <di:waypoint x="1640" y="498" />
+        <di:waypoint x="1640" y="520" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1655" y="498" width="0" height="0" />
         </bpmndi:BPMNLabel>
@@ -674,22 +635,22 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_39" bpmnElement="isNetworkActiveYes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_73">
-        <di:waypoint xsi:type="dc:Point" x="1274" y="9" />
-        <di:waypoint xsi:type="dc:Point" x="1335" y="9" />
+        <di:waypoint x="1274" y="9" />
+        <di:waypoint x="1335" y="9" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1275" y="14.380425096632202" width="18" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_44" bpmnElement="isNetworkActiveNo_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_73" targetElement="_BPMNShape_InclusiveGateway_4">
-        <di:waypoint xsi:type="dc:Point" x="1249" y="34" />
-        <di:waypoint xsi:type="dc:Point" x="1249" y="91" />
+        <di:waypoint x="1249" y="34" />
+        <di:waypoint x="1249" y="91" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1258" y="37.520779498373976" width="14" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_45" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_InclusiveGateway_4" targetElement="_BPMNShape_ScriptTask_245">
-        <di:waypoint xsi:type="dc:Point" x="1249" y="141" />
-        <di:waypoint xsi:type="dc:Point" x="1249" y="276" />
+        <di:waypoint x="1249" y="141" />
+        <di:waypoint x="1249" y="276" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1264" y="208.5" width="0" height="0" />
         </bpmndi:BPMNLabel>
@@ -710,8 +671,8 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         <dc:Bounds x="1454" y="1538" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_54" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_ScriptTask_134" targetElement="_BPMNShape_ScriptTask_135">
-        <di:waypoint xsi:type="dc:Point" x="1504" y="1472" />
-        <di:waypoint xsi:type="dc:Point" x="1504" y="1538" />
+        <di:waypoint x="1504" y="1472" />
+        <di:waypoint x="1504" y="1538" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1519" y="1505" width="0" height="0" />
         </bpmndi:BPMNLabel>
@@ -720,28 +681,28 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         <dc:Bounds x="1454" y="627" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ScriptTask_156" targetElement="_BPMNShape_ScriptTask_215">
-        <di:waypoint xsi:type="dc:Point" x="1504" y="707" />
-        <di:waypoint xsi:type="dc:Point" x="1504" y="727" />
-        <di:waypoint xsi:type="dc:Point" x="1504" y="727" />
-        <di:waypoint xsi:type="dc:Point" x="1504" y="750" />
+        <di:waypoint x="1504" y="707" />
+        <di:waypoint x="1504" y="727" />
+        <di:waypoint x="1504" y="727" />
+        <di:waypoint x="1504" y="750" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1519" y="727" width="0" height="0" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_49" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ScriptTask_133" targetElement="_BPMNShape_ScriptTask_156">
-        <di:waypoint xsi:type="dc:Point" x="1504" y="585" />
-        <di:waypoint xsi:type="dc:Point" x="1504" y="606" />
-        <di:waypoint xsi:type="dc:Point" x="1504" y="606" />
-        <di:waypoint xsi:type="dc:Point" x="1504" y="627" />
+        <di:waypoint x="1504" y="585" />
+        <di:waypoint x="1504" y="606" />
+        <di:waypoint x="1504" y="606" />
+        <di:waypoint x="1504" y="627" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1519" y="606" width="0" height="0" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_87" bpmnElement="SequenceFlow_59" sourceElement="_BPMNShape_ServiceTask_83" targetElement="_BPMNShape_ScriptTask_63">
-        <di:waypoint xsi:type="dc:Point" x="1505" y="1215" />
-        <di:waypoint xsi:type="dc:Point" x="1505" y="1237" />
-        <di:waypoint xsi:type="dc:Point" x="1505" y="1237" />
-        <di:waypoint xsi:type="dc:Point" x="1505" y="1258" />
+        <di:waypoint x="1505" y="1215" />
+        <di:waypoint x="1505" y="1237" />
+        <di:waypoint x="1505" y="1237" />
+        <di:waypoint x="1505" y="1258" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1520" y="1237" width="0" height="0" />
         </bpmndi:BPMNLabel>
@@ -750,10 +711,10 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         <dc:Bounds x="1454" y="1009" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_89" bpmnElement="SequenceFlow_61" sourceElement="_BPMNShape_ScriptTask_157" targetElement="_BPMNShape_ServiceTask_83">
-        <di:waypoint xsi:type="dc:Point" x="1504" y="1089" />
-        <di:waypoint xsi:type="dc:Point" x="1504" y="1111" />
-        <di:waypoint xsi:type="dc:Point" x="1504" y="1111" />
-        <di:waypoint xsi:type="dc:Point" x="1504" y="1135" />
+        <di:waypoint x="1504" y="1089" />
+        <di:waypoint x="1504" y="1111" />
+        <di:waypoint x="1504" y="1111" />
+        <di:waypoint x="1504" y="1135" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1519" y="1111" width="0" height="0" />
         </bpmndi:BPMNLabel>
@@ -762,8 +723,8 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         <dc:Bounds x="1454" y="750" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_60" bpmnElement="SequenceFlow_38" sourceElement="_BPMNShape_ScriptTask_215" targetElement="_BPMNShape_ScriptTask_333">
-        <di:waypoint xsi:type="dc:Point" x="1504" y="830" />
-        <di:waypoint xsi:type="dc:Point" x="1504" y="879" />
+        <di:waypoint x="1504" y="830" />
+        <di:waypoint x="1504" y="879" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1519" y="854.5" width="0" height="0" />
         </bpmndi:BPMNLabel>
@@ -775,16 +736,16 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_77" bpmnElement="isPONR_Yes_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_215">
-        <di:waypoint xsi:type="dc:Point" x="354" y="1085" />
-        <di:waypoint xsi:type="dc:Point" x="457" y="1085" />
-        <di:waypoint xsi:type="dc:Point" x="457" y="1159" />
+        <di:waypoint x="354" y="1085" />
+        <di:waypoint x="457" y="1085" />
+        <di:waypoint x="457" y="1159" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="351" y="1088" width="18" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_85" bpmnElement="isPONR_No_SequenceFlow" sourceElement="_BPMNShape_ExclusiveGateway_215">
-        <di:waypoint xsi:type="dc:Point" x="329" y="1060" />
-        <di:waypoint xsi:type="dc:Point" x="329" y="1003" />
+        <di:waypoint x="329" y="1060" />
+        <di:waypoint x="329" y="1003" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="339" y="1051" width="14" height="12" />
         </bpmndi:BPMNLabel>
@@ -796,17 +757,17 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_92" bpmnElement="sdncOk_Yeso_ExclusiveGateway" sourceElement="_BPMNShape_ExclusiveGateway_217" targetElement="_BPMNShape_ScriptTask_261">
-        <di:waypoint xsi:type="dc:Point" x="552" y="845" />
-        <di:waypoint xsi:type="dc:Point" x="552" y="776" />
-        <di:waypoint xsi:type="dc:Point" x="713" y="776" />
+        <di:waypoint x="552" y="845" />
+        <di:waypoint x="552" y="776" />
+        <di:waypoint x="713" y="776" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="559" y="829" width="18" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_93" bpmnElement="sdncOk_No_ExclusiveGateway" sourceElement="_BPMNShape_ExclusiveGateway_217">
-        <di:waypoint xsi:type="dc:Point" x="551" y="894" />
-        <di:waypoint xsi:type="dc:Point" x="551" y="978" />
-        <di:waypoint xsi:type="dc:Point" x="713" y="978" />
+        <di:waypoint x="551" y="894" />
+        <di:waypoint x="551" y="978" />
+        <di:waypoint x="713" y="978" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="559" y="895" width="14" height="12" />
         </bpmndi:BPMNLabel>
@@ -815,8 +776,8 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         <dc:Bounds x="1199" y="276" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_53" bpmnElement="SequenceFlow_32" sourceElement="_BPMNShape_ScriptTask_245" targetElement="_BPMNShape_ScriptTask_67">
-        <di:waypoint xsi:type="dc:Point" x="1299" y="316" />
-        <di:waypoint xsi:type="dc:Point" x="1337" y="316" />
+        <di:waypoint x="1299" y="316" />
+        <di:waypoint x="1337" y="316" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1318" y="301" width="0" height="0" />
         </bpmndi:BPMNLabel>
@@ -828,8 +789,8 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_69" bpmnElement="SequenceFlow_34" sourceElement="_BPMNShape_BoundaryEvent_38" targetElement="_BPMNShape_EndEvent_124">
-        <di:waypoint xsi:type="dc:Point" x="1702" y="488" />
-        <di:waypoint xsi:type="dc:Point" x="1745" y="533" />
+        <di:waypoint x="1702" y="488" />
+        <di:waypoint x="1745" y="533" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1724" y="495.5" width="0" height="0" />
         </bpmndi:BPMNLabel>
@@ -838,8 +799,8 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         <dc:Bounds x="886" y="830" width="100" height="79" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_63" targetElement="_BPMNShape_ScriptTask_134">
-        <di:waypoint xsi:type="dc:Point" x="1507" y="1338" />
-        <di:waypoint xsi:type="dc:Point" x="1505" y="1392" />
+        <di:waypoint x="1507" y="1338" />
+        <di:waypoint x="1505" y="1392" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1506" y="1350" width="0" height="0" />
         </bpmndi:BPMNLabel>
@@ -863,23 +824,23 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_StartEvent_71" targetElement="_BPMNShape_ScriptTask_270">
-        <di:waypoint xsi:type="dc:Point" x="90" y="476" />
-        <di:waypoint xsi:type="dc:Point" x="169" y="476" />
+        <di:waypoint x="90" y="476" />
+        <di:waypoint x="169" y="476" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="129" y="476" width="6" height="6" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_270" targetElement="_BPMNShape_EndEvent_220">
-        <di:waypoint xsi:type="dc:Point" x="269" y="476" />
-        <di:waypoint xsi:type="dc:Point" x="330" y="476" />
+        <di:waypoint x="269" y="476" />
+        <di:waypoint x="330" y="476" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="301" y="476" width="6" height="6" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="ScriptTask_0z2n0hl_di" targetElement="ExclusiveGateway_0lw40k5_di">
-        <di:waypoint xsi:type="dc:Point" x="809" y="235" />
-        <di:waypoint xsi:type="dc:Point" x="809" y="316" />
-        <di:waypoint xsi:type="dc:Point" x="951" y="316" />
+        <di:waypoint x="809" y="235" />
+        <di:waypoint x="809" y="316" />
+        <di:waypoint x="951" y="316" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="779" y="275.5" width="90" height="0" />
         </bpmndi:BPMNLabel>
@@ -888,19 +849,19 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         <dc:Bounds x="1454" y="879" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_20" sourceElement="_BPMNShape_ScriptTask_333" targetElement="_BPMNShape_ScriptTask_157">
-        <di:waypoint xsi:type="dc:Point" x="1504" y="959" />
-        <di:waypoint xsi:type="dc:Point" x="1504" y="981" />
-        <di:waypoint xsi:type="dc:Point" x="1504" y="981" />
-        <di:waypoint xsi:type="dc:Point" x="1504" y="1009" />
+        <di:waypoint x="1504" y="959" />
+        <di:waypoint x="1504" y="981" />
+        <di:waypoint x="1504" y="981" />
+        <di:waypoint x="1504" y="1009" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1519" y="981" width="0" height="0" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_1n61wit_di" bpmnElement="SequenceFlow_1n61wit">
-        <di:waypoint xsi:type="dc:Point" x="433" y="195" />
-        <di:waypoint xsi:type="dc:Point" x="492" y="195" />
-        <di:waypoint xsi:type="dc:Point" x="492" y="195" />
-        <di:waypoint xsi:type="dc:Point" x="546" y="195" />
+        <di:waypoint x="433" y="195" />
+        <di:waypoint x="492" y="195" />
+        <di:waypoint x="492" y="195" />
+        <di:waypoint x="546" y="195" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="507" y="195" width="0" height="0" />
         </bpmndi:BPMNLabel>
@@ -909,10 +870,10 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         <dc:Bounds x="546" y="155" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_0ftylq3_di" bpmnElement="SequenceFlow_0ftylq3">
-        <di:waypoint xsi:type="dc:Point" x="646" y="195" />
-        <di:waypoint xsi:type="dc:Point" x="706" y="195" />
-        <di:waypoint xsi:type="dc:Point" x="706" y="195" />
-        <di:waypoint xsi:type="dc:Point" x="759" y="195" />
+        <di:waypoint x="646" y="195" />
+        <di:waypoint x="706" y="195" />
+        <di:waypoint x="706" y="195" />
+        <di:waypoint x="759" y="195" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="676" y="195" width="90" height="0" />
         </bpmndi:BPMNLabel>
@@ -924,17 +885,17 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_0635hhm_di" bpmnElement="isNameSentYes_SequenceFlow">
-        <di:waypoint xsi:type="dc:Point" x="976" y="291" />
-        <di:waypoint xsi:type="dc:Point" x="976" y="170" />
-        <di:waypoint xsi:type="dc:Point" x="976" y="170" />
-        <di:waypoint xsi:type="dc:Point" x="976" y="49" />
+        <di:waypoint x="976" y="291" />
+        <di:waypoint x="976" y="170" />
+        <di:waypoint x="976" y="170" />
+        <di:waypoint x="976" y="49" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="988" y="275" width="18" height="13" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_1sirjgc_di" bpmnElement="isNameSentNo_SequenceFlow">
-        <di:waypoint xsi:type="dc:Point" x="1001" y="316" />
-        <di:waypoint xsi:type="dc:Point" x="1199" y="316" />
+        <di:waypoint x="1001" y="316" />
+        <di:waypoint x="1199" y="316" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1005" y="328" width="14" height="13" />
         </bpmndi:BPMNLabel>
@@ -952,36 +913,36 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_13deudk_di" bpmnElement="SequenceFlow_13deudk">
-        <di:waypoint xsi:type="dc:Point" x="1183" y="1578" />
-        <di:waypoint xsi:type="dc:Point" x="1114" y="1578" />
+        <di:waypoint x="1183" y="1578" />
+        <di:waypoint x="1114" y="1578" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1149" y="1563" width="0" height="0" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_08qibb9_di" bpmnElement="SequenceFlow_08qibb9">
-        <di:waypoint xsi:type="dc:Point" x="1014" y="1578" />
-        <di:waypoint xsi:type="dc:Point" x="953" y="1578" />
+        <di:waypoint x="1014" y="1578" />
+        <di:waypoint x="953" y="1578" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="984" y="1563" width="0" height="0" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_1t03rs2_di" bpmnElement="SequenceFlow_1t03rs2">
-        <di:waypoint xsi:type="dc:Point" x="853" y="1578" />
-        <di:waypoint xsi:type="dc:Point" x="774" y="1578" />
+        <di:waypoint x="853" y="1578" />
+        <di:waypoint x="774" y="1578" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="814" y="1563" width="0" height="0" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_1jia57e_di" bpmnElement="SequenceFlow_1jia57e">
-        <di:waypoint xsi:type="dc:Point" x="749" y="1553" />
-        <di:waypoint xsi:type="dc:Point" x="749" y="1484" />
+        <di:waypoint x="749" y="1553" />
+        <di:waypoint x="749" y="1484" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="757" y="1537.7047949008065" width="18" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_18ybfu5_di" bpmnElement="SequenceFlow_18ybfu5">
-        <di:waypoint xsi:type="dc:Point" x="749" y="1603" />
-        <di:waypoint xsi:type="dc:Point" x="749" y="1669" />
+        <di:waypoint x="749" y="1603" />
+        <di:waypoint x="749" y="1669" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="758" y="1603.7606668519034" width="14" height="12" />
         </bpmndi:BPMNLabel>
@@ -996,9 +957,9 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_0s51ns0_di" bpmnElement="SequenceFlow_0s51ns0">
-        <di:waypoint xsi:type="dc:Point" x="877" y="1636" />
-        <di:waypoint xsi:type="dc:Point" x="877" y="1687" />
-        <di:waypoint xsi:type="dc:Point" x="767" y="1687" />
+        <di:waypoint x="877" y="1636" />
+        <di:waypoint x="877" y="1687" />
+        <di:waypoint x="767" y="1687" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="892" y="1661.5" width="0" height="0" />
         </bpmndi:BPMNLabel>
@@ -1016,16 +977,16 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_0cly7z2_di" bpmnElement="SequenceFlow_0cly7z2">
-        <di:waypoint xsi:type="dc:Point" x="329" y="953" />
-        <di:waypoint xsi:type="dc:Point" x="329" y="910" />
+        <di:waypoint x="329" y="953" />
+        <di:waypoint x="329" y="910" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="335" y="937" width="18" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_12tlymf_di" bpmnElement="SequenceFlow_12tlymf">
-        <di:waypoint xsi:type="dc:Point" x="354" y="978" />
-        <di:waypoint xsi:type="dc:Point" x="457" y="978" />
-        <di:waypoint xsi:type="dc:Point" x="457" y="895" />
+        <di:waypoint x="354" y="978" />
+        <di:waypoint x="457" y="978" />
+        <di:waypoint x="457" y="895" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="350" y="988" width="14" height="12" />
         </bpmndi:BPMNLabel>
@@ -1037,16 +998,16 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_1r5sja0_di" bpmnElement="isSdncRpc1No_SequenceFlow1">
-        <di:waypoint xsi:type="dc:Point" x="1362" y="291" />
-        <di:waypoint xsi:type="dc:Point" x="1362" y="195" />
-        <di:waypoint xsi:type="dc:Point" x="1590" y="195" />
+        <di:waypoint x="1362" y="291" />
+        <di:waypoint x="1362" y="195" />
+        <di:waypoint x="1590" y="195" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1371" y="273" width="14" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_1ow57qy_di" bpmnElement="isSdncRpc1Yes_SequenceFlow1">
-        <di:waypoint xsi:type="dc:Point" x="1362" y="341" />
-        <di:waypoint xsi:type="dc:Point" x="1362" y="395" />
+        <di:waypoint x="1362" y="341" />
+        <di:waypoint x="1362" y="395" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1373" y="341" width="18" height="12" />
         </bpmndi:BPMNLabel>
@@ -1055,15 +1016,15 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         <dc:Bounds x="1454" y="395" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_0j8bxnb_di" bpmnElement="SequenceFlow_0j8bxnb">
-        <di:waypoint xsi:type="dc:Point" x="1412" y="435" />
-        <di:waypoint xsi:type="dc:Point" x="1454" y="435" />
+        <di:waypoint x="1412" y="435" />
+        <di:waypoint x="1454" y="435" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1433" y="420" width="0" height="0" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_0d93bqw_di" bpmnElement="SequenceFlow_0d93bqw">
-        <di:waypoint xsi:type="dc:Point" x="1554" y="435" />
-        <di:waypoint xsi:type="dc:Point" x="1590" y="435" />
+        <di:waypoint x="1554" y="435" />
+        <di:waypoint x="1590" y="435" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1572" y="420" width="0" height="0" />
         </bpmndi:BPMNLabel>
@@ -1075,16 +1036,16 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_0suu90e_di" bpmnElement="isSdncRpc4Yes_SequenceFlow4">
-        <di:waypoint xsi:type="dc:Point" x="738" y="801" />
-        <di:waypoint xsi:type="dc:Point" x="738" y="830" />
+        <di:waypoint x="738" y="801" />
+        <di:waypoint x="738" y="830" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="743" y="800" width="18" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_0xnyl6e_di" bpmnElement="isSdncRpc4No_SequenceFlow4">
-        <di:waypoint xsi:type="dc:Point" x="763" y="776" />
-        <di:waypoint xsi:type="dc:Point" x="936" y="776" />
-        <di:waypoint xsi:type="dc:Point" x="936" y="830" />
+        <di:waypoint x="763" y="776" />
+        <di:waypoint x="936" y="776" />
+        <di:waypoint x="936" y="830" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="772" y="755" width="14" height="12" />
         </bpmndi:BPMNLabel>
@@ -1096,16 +1057,16 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_1lphs99_di" bpmnElement="isSdncRpc2Yes_SequenceFlow2">
-        <di:waypoint xsi:type="dc:Point" x="1360" y="1578" />
-        <di:waypoint xsi:type="dc:Point" x="1283" y="1578" />
+        <di:waypoint x="1360" y="1578" />
+        <di:waypoint x="1283" y="1578" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1337" y="1580.0388981849903" width="18" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_0lk1uut_di" bpmnElement="isSdncRpc2No_SequenceFlow2">
-        <di:waypoint xsi:type="dc:Point" x="1385" y="1553" />
-        <di:waypoint xsi:type="dc:Point" x="1385" y="1444" />
-        <di:waypoint xsi:type="dc:Point" x="799" y="1444" />
+        <di:waypoint x="1385" y="1553" />
+        <di:waypoint x="1385" y="1444" />
+        <di:waypoint x="799" y="1444" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1362" y="1543.660178848007" width="14" height="12" />
         </bpmndi:BPMNLabel>
@@ -1135,10 +1096,10 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_1s8b1m1_di" bpmnElement="SequenceFlow_1s8b1m1">
-        <di:waypoint xsi:type="dc:Point" x="699" y="1444" />
-        <di:waypoint xsi:type="dc:Point" x="597" y="1444" />
-        <di:waypoint xsi:type="dc:Point" x="597" y="1444" />
-        <di:waypoint xsi:type="dc:Point" x="503" y="1444" />
+        <di:waypoint x="699" y="1444" />
+        <di:waypoint x="597" y="1444" />
+        <di:waypoint x="597" y="1444" />
+        <di:waypoint x="503" y="1444" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="612" y="1444" width="0" height="0" />
         </bpmndi:BPMNLabel>
@@ -1150,8 +1111,8 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         <dc:Bounds x="688" y="1053" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_0b8j5rw_di" bpmnElement="SequenceFlow_0b8j5rw">
-        <di:waypoint xsi:type="dc:Point" x="379" y="870" />
-        <di:waypoint xsi:type="dc:Point" x="432" y="870" />
+        <di:waypoint x="379" y="870" />
+        <di:waypoint x="432" y="870" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="406" y="855" width="0" height="0" />
         </bpmndi:BPMNLabel>
@@ -1160,10 +1121,10 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         <dc:Bounds x="279" y="830" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_1ipz2ze_di" bpmnElement="SequenceFlow_1ipz2ze">
-        <di:waypoint xsi:type="dc:Point" x="1454" y="1578" />
-        <di:waypoint xsi:type="dc:Point" x="1432" y="1578" />
-        <di:waypoint xsi:type="dc:Point" x="1432" y="1578" />
-        <di:waypoint xsi:type="dc:Point" x="1410" y="1578" />
+        <di:waypoint x="1454" y="1578" />
+        <di:waypoint x="1432" y="1578" />
+        <di:waypoint x="1432" y="1578" />
+        <di:waypoint x="1410" y="1578" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1447" y="1578" width="0" height="0" />
         </bpmndi:BPMNLabel>
@@ -1172,30 +1133,30 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         <dc:Bounds x="841" y="1053" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_0vzsyrd_di" bpmnElement="SequenceFlow_0vzsyrd">
-        <di:waypoint xsi:type="dc:Point" x="941" y="1093" />
-        <di:waypoint xsi:type="dc:Point" x="1007" y="1093" />
+        <di:waypoint x="941" y="1093" />
+        <di:waypoint x="1007" y="1093" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="974" y="1078" width="0" height="0" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_0bwpkkb_di" bpmnElement="SequenceFlow_0bwpkkb">
-        <di:waypoint xsi:type="dc:Point" x="738" y="910" />
-        <di:waypoint xsi:type="dc:Point" x="738" y="953" />
+        <di:waypoint x="738" y="910" />
+        <di:waypoint x="738" y="953" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="753" y="922" width="0" height="0" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_0lndbvr_di" bpmnElement="SequenceFlow_0lndbvr">
-        <di:waypoint xsi:type="dc:Point" x="936" y="909" />
-        <di:waypoint xsi:type="dc:Point" x="936" y="978" />
-        <di:waypoint xsi:type="dc:Point" x="763" y="978" />
+        <di:waypoint x="936" y="909" />
+        <di:waypoint x="936" y="978" />
+        <di:waypoint x="763" y="978" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="951" y="944" width="0" height="0" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_096tad6_di" bpmnElement="SequenceFlow_096tad6">
-        <di:waypoint xsi:type="dc:Point" x="788" y="1093" />
-        <di:waypoint xsi:type="dc:Point" x="841" y="1093" />
+        <di:waypoint x="788" y="1093" />
+        <di:waypoint x="841" y="1093" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="815" y="1078" width="0" height="0" />
         </bpmndi:BPMNLabel>
@@ -1204,15 +1165,15 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         <dc:Bounds x="1036" y="901" width="252" height="119" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="Association_0nketgd_di" bpmnElement="Association_0nketgd">
-        <di:waypoint xsi:type="dc:Point" x="941" y="1069" />
-        <di:waypoint xsi:type="dc:Point" x="1041" y="1020" />
+        <di:waypoint x="941" y="1069" />
+        <di:waypoint x="1041" y="1020" />
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNShape id="ScriptTask_0w2ekuz_di" bpmnElement="ScriptTask_0w2ekuz">
         <dc:Bounds x="1007" y="1053" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_1qwubew_di" bpmnElement="SequenceFlow_1qwubew">
-        <di:waypoint xsi:type="dc:Point" x="1107" y="1093" />
-        <di:waypoint xsi:type="dc:Point" x="1160" y="1093" />
+        <di:waypoint x="1107" y="1093" />
+        <di:waypoint x="1160" y="1093" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1134" y="1068" width="0" height="0" />
         </bpmndi:BPMNLabel>
@@ -1224,15 +1185,15 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_19kcbiw_di" bpmnElement="isRollbackOn_SequenceFlow_Yes">
-        <di:waypoint xsi:type="dc:Point" x="329" y="1159" />
-        <di:waypoint xsi:type="dc:Point" x="329" y="1110" />
+        <di:waypoint x="329" y="1159" />
+        <di:waypoint x="329" y="1110" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="337" y="1142" width="18" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_0pl3e54_di" bpmnElement="isRollbackOn_SequenceFlow_No">
-        <di:waypoint xsi:type="dc:Point" x="354" y="1184" />
-        <di:waypoint xsi:type="dc:Point" x="432" y="1184" />
+        <di:waypoint x="354" y="1184" />
+        <di:waypoint x="432" y="1184" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="355" y="1190" width="14" height="12" />
         </bpmndi:BPMNLabel>
@@ -1244,8 +1205,8 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_15sffxc_di" bpmnElement="SequenceFlow_15sffxc">
-        <di:waypoint xsi:type="dc:Point" x="738" y="1003" />
-        <di:waypoint xsi:type="dc:Point" x="738" y="1053" />
+        <di:waypoint x="738" y="1003" />
+        <di:waypoint x="738" y="1053" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="753" y="1028" width="0" height="0" />
         </bpmndi:BPMNLabel>
@@ -1257,8 +1218,8 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_0k7y7b5_di" bpmnElement="SequenceFlow_0k7y7b5">
-        <di:waypoint xsi:type="dc:Point" x="482" y="870" />
-        <di:waypoint xsi:type="dc:Point" x="527" y="870" />
+        <di:waypoint x="482" y="870" />
+        <di:waypoint x="527" y="870" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="505" y="845" width="0" height="0" />
         </bpmndi:BPMNLabel>
@@ -1267,8 +1228,8 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         <dc:Bounds x="1335" y="-31" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_18ylufb_di" bpmnElement="SequenceFlow_18ylufb">
-        <di:waypoint xsi:type="dc:Point" x="1435" y="9" />
-        <di:waypoint xsi:type="dc:Point" x="1486" y="9" />
+        <di:waypoint x="1435" y="9" />
+        <di:waypoint x="1486" y="9" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1461" y="-6" width="0" height="0" />
         </bpmndi:BPMNLabel>
@@ -1280,9 +1241,9 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_17nx822_di" bpmnElement="SequenceFlow_17nx822">
-        <di:waypoint xsi:type="dc:Point" x="482" y="1184" />
-        <di:waypoint xsi:type="dc:Point" x="1057" y="1184" />
-        <di:waypoint xsi:type="dc:Point" x="1057" y="1133" />
+        <di:waypoint x="482" y="1184" />
+        <di:waypoint x="1057" y="1184" />
+        <di:waypoint x="1057" y="1133" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="770" y="1169" width="0" height="0" />
         </bpmndi:BPMNLabel>
@@ -1291,22 +1252,22 @@ DoCreateNetworkInstance.getServiceInstance(execution)]]></bpmn2:script>
         <dc:Bounds x="1606" y="1241" width="233" height="37" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="Association_0c315jr_di" bpmnElement="Association_0c315jr">
-        <di:waypoint xsi:type="dc:Point" x="1557" y="1289" />
-        <di:waypoint xsi:type="dc:Point" x="1621" y="1278" />
+        <di:waypoint x="1557" y="1289" />
+        <di:waypoint x="1621" y="1278" />
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNShape id="TextAnnotation_0wjpv6r_di" bpmnElement="TextAnnotation_0wjpv6r">
         <dc:Bounds x="341" y="735" width="180" height="36" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="Association_0eolbkz_di" bpmnElement="Association_0eolbkz">
-        <di:waypoint xsi:type="dc:Point" x="452" y="850" />
-        <di:waypoint xsi:type="dc:Point" x="435" y="771" />
+        <di:waypoint x="452" y="850" />
+        <di:waypoint x="435" y="771" />
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNShape id="ScriptTask_0j3058g_di" bpmnElement="ScriptTask_0j3058g">
         <dc:Bounds x="170" y="1144" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_10ttvwn_di" bpmnElement="SequenceFlow_10ttvwn">
-        <di:waypoint xsi:type="dc:Point" x="270" y="1184" />
-        <di:waypoint xsi:type="dc:Point" x="304" y="1184" />
+        <di:waypoint x="270" y="1184" />
+        <di:waypoint x="304" y="1184" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="287" y="1159" width="0" height="0" />
         </bpmndi:BPMNLabel>
index fedec4f..58c6db1 100644 (file)
@@ -32,6 +32,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
 import com.jayway.jsonpath.JsonPath;
+import com.jayway.jsonpath.PathNotFoundException;
  
 @Component
 public class SDNCRequestTasks {
@@ -61,6 +62,9 @@ public class SDNCRequestTasks {
                        String response = sdncClient.post(request.getSDNCPayload(),request.getTopology());
                        String finalMessageIndicator = JsonPath.read(response, "$.output.ack-final-indicator");         
                        execution.setVariable("isSDNCCompleted", convertIndicatorToBoolean(finalMessageIndicator));
+               } catch(PathNotFoundException e) {
+                       logger.error("Error Parsing SDNC Response", e);
+                       exceptionBuilder.buildAndThrowWorkflowException(execution, 7000,"Error Parsing SDNC Response");
                } catch (MapperException e) {
                        logger.error("Error Parsing SDNC Response", e);
                        exceptionBuilder.buildAndThrowWorkflowException(execution, 7000,"Error Parsing SDNC Response");
index 66e2694..7670e02 100644 (file)
@@ -311,8 +311,14 @@ public class WorkflowActionBBTasks {
                        InfraActiveRequests request = requestDbclient.getInfraActiveRequestbyRequestId(requestId);
                        String errorMsg = null;
                        String rollbackErrorMsg = null;
-                       boolean rollbackCompleted = (boolean) execution.getVariable("isRollbackComplete");
-                       boolean isRollbackFailure = (boolean) execution.getVariable("isRollback");
+                       Boolean rollbackCompleted = (Boolean) execution.getVariable("isRollbackComplete");
+                       Boolean isRollbackFailure = (Boolean) execution.getVariable("isRollback");
+                       
+                       if(rollbackCompleted==null)
+                               rollbackCompleted = false;
+                       
+                       if(isRollbackFailure==null)
+                               isRollbackFailure = false;
                        
                        if(rollbackCompleted){
                                rollbackErrorMsg = "Rollback has been completed successfully.";
index 37e13fb..13ba107 100644 (file)
@@ -105,12 +105,20 @@ public class SdnCommonTasks {
                responseCode = (String) embeddedResponse.get(RESPONSE_CODE);
             responseMessage = (String) embeddedResponse.get(RESPONSE_MESSAGE);
         }
-        
+        ObjectMapper objMapper = new ObjectMapper();
+        String jsonResponse;
+               try {
+                       jsonResponse = objMapper.writeValueAsString(output);
+                       msoLogger.debug(jsonResponse);
+               } catch (JsonProcessingException e) {
+                       msoLogger.warnSimple("Could not convert SDNC Response to String", e);
+                       jsonResponse = "";
+               }
                msoLogger.info("ResponseCode: " + responseCode + " ResponseMessage: " + responseMessage);
                int code = StringUtils.isNotEmpty(responseCode) ? Integer.parseInt(responseCode) : 0;
                if (isHttpCodeSuccess(code)) {
                        msoLogger.info("Successful Response from SDNC");
-                       return responseMessage;
+                       return jsonResponse;
                } else {
                        String errorMessage = String.format(SDNC_CODE_NOT_0_OR_IN_200_299, responseMessage);
                        msoLogger.error(MessageEnum.RA_RESPONSE_FROM_SDNC, errorMessage, "BPMN", MsoLogger.getServiceName(),
index fc269cd..0ef764a 100644 (file)
@@ -39,8 +39,10 @@ import org.junit.Test;
 import org.junit.rules.ExpectedException;
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
+import org.mockito.Mockito;
 import org.mockito.Spy;
 import org.onap.so.bpmn.BaseTaskTest;
+import org.onap.so.bpmn.core.WorkflowException;
 import org.onap.so.bpmn.servicedecomposition.entities.BuildingBlock;
 import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock;
 import org.onap.so.db.request.beans.InfraActiveRequests;
@@ -54,6 +56,9 @@ public class WorkflowActionBBTasksTest extends BaseTaskTest {
        @Spy
        protected WorkflowActionBBTasks workflowActionBBTasks;
        
+       @Mock
+       InfraActiveRequests reqMock;
+       
        private DelegateExecution execution;
        
        @Rule
@@ -284,4 +289,23 @@ public class WorkflowActionBBTasksTest extends BaseTaskTest {
                workflowActionBBTasks.checkRetryStatus(execution);
                assertEquals(0,execution.getVariable("retryCount"));
        }
+       
+       
+       @Test
+       public void updateRequestStatusToFailed_Null_Rollback(){
+               String reqId = "reqId123";
+               execution.setVariable("mso-request-id", reqId);
+               execution.setVariable("retryCount", 3);
+               execution.setVariable("handlingCode","Success");
+               execution.setVariable("gCurrentSequence",1);
+               WorkflowException we = new WorkflowException("WorkflowAction",1231,"Error Case");
+               execution.setVariable("WorkflowException",we);
+               
+               doReturn(reqMock).when(requestsDbClient).getInfraActiveRequestbyRequestId(reqId);
+               workflowActionBBTasks.updateRequestStatusToFailed(execution);
+               Mockito.verify( reqMock, Mockito.times(1)).setStatusMessage("Error Case");
+               Mockito.verify( reqMock, Mockito.times(1)).setRequestStatus("FAILED");
+               Mockito.verify( reqMock, Mockito.times(1)).setProgress(Long.valueOf(100));
+               Mockito.verify( reqMock, Mockito.times(1)).setLastModifiedBy("CamundaBPMN");
+       }
 }
index e30fe66..2636aec 100644 (file)
@@ -60,12 +60,13 @@ public class SdnCommonTasksTest{
 
     @Test
     public void validateSDNResponseTest() throws BadResponseException {
+       String jsonResponse = "{\"output\":{\"response-code\":\"0\",\"response-message\":\"success\"}}";
         LinkedHashMap<String, Object> responseMap = new LinkedHashMap<>();
         LinkedHashMap<String, Object> output = new LinkedHashMap<>();
         output.put("response-code", "0");
         output.put("response-message", "success");
         responseMap.put("output", output);
-        assertEquals("success", sdnCommonTasks.validateSDNResponse(responseMap));
+        assertEquals(jsonResponse, sdnCommonTasks.validateSDNResponse(responseMap));
     }
 
     @Test
index cc1c5c5..9117b8e 100644 (file)
@@ -77,6 +77,6 @@ public class SDNCClientIT extends BaseIntegrationTest {
                         .withHeader("Content-Type", "application/json").withBody(responseJson)));
        
         String response = SPY_sdncClient.post("", SDNCTopology.NETWORK);
-        JSONAssert.assertEquals("", response, false);
+        JSONAssert.assertEquals(responseJson, response, true);
     }
 }
diff --git a/common/src/main/java/org/onap/so/client/HttpClientFactory.java b/common/src/main/java/org/onap/so/client/HttpClientFactory.java
new file mode 100644 (file)
index 0000000..9705d7d
--- /dev/null
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Nokia.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.so.client;
+
+import java.net.URL;
+import org.onap.so.utils.TargetEntity;
+
+public class HttpClientFactory {
+
+    public HttpClient create(URL host, String contentType, TargetEntity targetEntity) {
+        return new HttpClient(host, contentType, targetEntity);
+    }
+}
diff --git a/pom.xml b/pom.xml
index e88d67f..1be848a 100644 (file)
--- a/pom.xml
+++ b/pom.xml
                <dependency>
                        <groupId>org.assertj</groupId>
                        <artifactId>assertj-core</artifactId>
+                       <version>3.11.1</version>
                        <scope>test</scope>
                </dependency>
                <dependency>