Merge "More unit tests for CatalogDatabase II"
diff --git a/bpmn/MSOCommonBPMN/src/main/resources/META-INF/processes.xml b/bpmn/MSOCommonBPMN/src/main/resources/META-INF/processes.xml
new file mode 100644
index 0000000..772867d
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/resources/META-INF/processes.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  ============LICENSE_START=======================================================
+  ONAP SO
+  ================================================================================
+  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=========================================================
+  -->
+
+<process-application
+    xmlns="http://www.camunda.org/schema/1.0/ProcessApplication"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
+    <process-archive name="MSOCommonBPMN">
+        <process-engine>default</process-engine>
+        <properties>
+            <property name="isDeleteUponUndeploy">false</property>
+            <property name="isScanForProcessDefinitions">true</property>
+        </properties>
+    </process-archive>
+
+</process-application>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
index 933d450..1beb312 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
@@ -47,7 +47,7 @@
  * This groovy class supports the <class>CreateSDNCCNetworkResource.bpmn</class> process.

  * flow for SDNC Network Resource Create

  */

-public class CreateSDNCCNetworkResource extends AbstractServiceTaskProcessor {

+public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {

 

     String Prefix="CRESDNCRES_"

             

diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/MSOInfrastructureApplication.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/MSOInfrastructureApplication.java
index a4a7ede..c7420c3 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/MSOInfrastructureApplication.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/MSOInfrastructureApplication.java
@@ -35,7 +35,7 @@
  * @since Version 1.0

  *

  */

-@ProcessApplication(name="MSO Infrastructure Application", deploymentDescriptors={"../processes.xml"})

+@ProcessApplication("MSO Infrastructure Application")

 public class MSOInfrastructureApplication extends ServletProcessApplication {

 	

 	private MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);

diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/META-INF/persistence.xml b/bpmn/MSOInfrastructureBPMN/src/main/resources/META-INF/persistence.xml
index 3bfafac..8e87f47 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/resources/META-INF/persistence.xml
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/META-INF/persistence.xml
@@ -25,7 +25,7 @@
         http://java.sun.com/xml/ns/persistence

         http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">

 

-  <persistence-unit name="default">

+  <persistence-unit name="infrastructure">

     <jta-data-source>java:jboss/datasources/ProcessEngine</jta-data-source>

     <properties>

       <!-- Properties for Hibernate -->

diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateResources.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateResources.bpmn
index c18448e..2ad563a 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateResources.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateResources.bpmn
@@ -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="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.11.3" 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="1.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
   <bpmn2:process id="DoCreateResourcesV3" name="DoCreateResourcesV3" isExecutable="true">
     <bpmn2:startEvent id="createSI_startEvent" name="Start Flow">
       <bpmn2:outgoing>SequenceFlow_1qiiycn</bpmn2:outgoing>
@@ -32,14 +32,12 @@
 ddsi.sequenceResoure(execution)]]></bpmn2:script>
     </bpmn2:scriptTask>
     <bpmn2:sequenceFlow id="SequenceFlow_13d9g1n" sourceRef="ScriptTask_1y0los4" targetRef="ExclusiveGateway_07rr3wp" />
-    <bpmn2:exclusiveGateway id="ExclusiveGateway_0n9y4du" name="All ResourceFinished?">
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_0n9y4du" name="All ResourceFinished?" default="SequenceFlow_0q6uy30">
       <bpmn2:incoming>SequenceFlow_1jenxlp</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_0q6uy30</bpmn2:outgoing>
       <bpmn2:outgoing>SequenceFlow_16nxl6h</bpmn2:outgoing>
     </bpmn2:exclusiveGateway>
-    <bpmn2:sequenceFlow id="SequenceFlow_0q6uy30" name="no" sourceRef="ExclusiveGateway_0n9y4du" targetRef="ScriptTask_0l4nkqr">
-      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("allResourceFinished" )  == "false" )}]]></bpmn2:conditionExpression>
-    </bpmn2:sequenceFlow>
+    <bpmn2:sequenceFlow id="SequenceFlow_0q6uy30" name="no" sourceRef="ExclusiveGateway_0n9y4du" targetRef="ScriptTask_0l4nkqr" />
     <bpmn2:scriptTask id="ScriptTask_0y4u2ty" name="Parse Next Resource" scriptFormat="groovy">
       <bpmn2:incoming>SequenceFlow_13c7bhn</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_1jenxlp</bpmn2:outgoing>
@@ -56,14 +54,12 @@
 def ddsi = new DoCreateResources()
 ddsi.getCurrentResoure(execution)]]></bpmn2:script>
     </bpmn2:scriptTask>
-    <bpmn2:exclusiveGateway id="ExclusiveGateway_07rr3wp" name="Is SDN-C Service Needed">
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_07rr3wp" name="Is SDN-C Service Needed" default="SequenceFlow_18wj44x">
       <bpmn2:incoming>SequenceFlow_13d9g1n</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_18wj44x</bpmn2:outgoing>
       <bpmn2:outgoing>SequenceFlow_1vprtt9</bpmn2:outgoing>
     </bpmn2:exclusiveGateway>
-    <bpmn2:sequenceFlow id="SequenceFlow_18wj44x" name="no" sourceRef="ExclusiveGateway_07rr3wp" targetRef="IntermediateThrowEvent_0f2w7aj">
-      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("isContainsWanResource" )  == "false" )}]]></bpmn2:conditionExpression>
-    </bpmn2:sequenceFlow>
+    <bpmn2:sequenceFlow id="SequenceFlow_18wj44x" name="no" sourceRef="ExclusiveGateway_07rr3wp" targetRef="IntermediateThrowEvent_0f2w7aj" />
     <bpmn2:scriptTask id="Task_0qlkmvt" name="Prepare resource recipe Request" scriptFormat="groovy">
       <bpmn2:incoming>SequenceFlow_0uiygod</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_1u9k0dm</bpmn2:outgoing>
@@ -78,9 +74,9 @@
 def ddsi = new DoCreateResources()
 ddsi.executeResourceRecipe(execution)]]></bpmn2:script>
     </bpmn2:scriptTask>
-    <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0bq4fxs" name="Go to Decompose_Service">
+    <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0bq4fxs" name="Go to StratPrepareService">
       <bpmn2:incoming>SequenceFlow_0w9t6tc</bpmn2:incoming>
-      <bpmn2:linkEventDefinition name="Decompose_Service" />
+      <bpmn2:linkEventDefinition name="StartPrepareResource" />
     </bpmn2:intermediateThrowEvent>
     <bpmn2:sequenceFlow id="SequenceFlow_1qiiycn" sourceRef="createSI_startEvent" targetRef="preProcessRequest_ScriptTask" />
     <bpmn2:sequenceFlow id="SequenceFlow_0w9t6tc" sourceRef="preProcessRequest_ScriptTask" targetRef="IntermediateThrowEvent_0bq4fxs" />
@@ -172,7 +168,7 @@
       <bpmndi:BPMNShape id="ExclusiveGateway_0n9y4du_di" bpmnElement="ExclusiveGateway_0n9y4du" isMarkerVisible="true">
         <dc:Bounds x="929" y="500" width="50" height="50" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="912" y="554" width="83" height="36" />
+          <dc:Bounds x="911" y="454" width="85" height="36" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_0q6uy30_di" bpmnElement="SequenceFlow_0q6uy30">
@@ -181,7 +177,7 @@
         <di:waypoint xsi:type="dc:Point" x="246" y="691" />
         <di:waypoint xsi:type="dc:Point" x="246" y="565" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="594" y="670" width="12" height="12" />
+          <dc:Bounds x="593" y="670" width="15" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNShape id="ScriptTask_0y4u2ty_di" bpmnElement="ScriptTask_0y4u2ty">
@@ -200,14 +196,14 @@
       <bpmndi:BPMNShape id="ExclusiveGateway_07rr3wp_di" bpmnElement="ExclusiveGateway_07rr3wp" isMarkerVisible="true">
         <dc:Bounds x="753" y="275" width="50" height="50" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="736" y="329" width="87" height="24" />
+          <dc:Bounds x="734" y="243" width="88" height="24" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_18wj44x_di" bpmnElement="SequenceFlow_18wj44x">
         <di:waypoint xsi:type="dc:Point" x="803" y="300" />
         <di:waypoint xsi:type="dc:Point" x="1315" y="300" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="832.3633633633633" y="294" width="12" height="12" />
+          <dc:Bounds x="831" y="294" width="15" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNShape id="ScriptTask_0u88n0f_di" bpmnElement="Task_0qlkmvt">
@@ -219,7 +215,7 @@
       <bpmndi:BPMNShape id="IntermediateThrowEvent_11saqvj_di" bpmnElement="IntermediateThrowEvent_0bq4fxs">
         <dc:Bounds x="1315" y="-207" width="36" height="36" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="1290" y="-167" width="88" height="36" />
+          <dc:Bounds x="1292" y="-167" width="88" height="36" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_1qiiycn_di" bpmnElement="SequenceFlow_1qiiycn">
@@ -249,7 +245,7 @@
         <di:waypoint xsi:type="dc:Point" x="778" y="393" />
         <di:waypoint xsi:type="dc:Point" x="944" y="393" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="784" y="353" width="19" height="12" />
+          <dc:Bounds x="784" y="353" width="20" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNShape id="IntermediateCatchEvent_05dus9b_di" bpmnElement="IntermediateCatchEvent_05dus9b">
@@ -353,4 +349,4 @@
       </bpmndi:BPMNEdge>
     </bpmndi:BPMNPlane>
   </bpmndi:BPMNDiagram>
-</bpmn2:definitions>
\ No newline at end of file
+</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteResources.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteResources.bpmn
index 8f0cafa..678d242 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteResources.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteResources.bpmn
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.11.3">
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0">
   <bpmn:process id="DoDeleteResources" name="All Resources Deleted" isExecutable="true">
     <bpmn:startEvent id="StartEvent_0212h2r" name="Start Flow">
       <bpmn:outgoing>SequenceFlow_0vz7cd9</bpmn:outgoing>
@@ -73,7 +73,7 @@
 def ddsi = new DoDeleteResources()
 ddsi.sequenceResource(execution)]]></bpmn:script>
     </bpmn:scriptTask>
-    <bpmn:exclusiveGateway id="ExclusiveGateway_07toixi" name="Check Current Resource">
+    <bpmn:exclusiveGateway id="ExclusiveGateway_07toixi" name="Check Current Resource" default="SequenceFlow_1x3lehs">
       <bpmn:incoming>SequenceFlow_1htjmkv</bpmn:incoming>
       <bpmn:outgoing>SequenceFlow_1ubor5z</bpmn:outgoing>
       <bpmn:outgoing>SequenceFlow_1x3lehs</bpmn:outgoing>
@@ -91,9 +91,7 @@
     <bpmn:sequenceFlow id="SequenceFlow_1ubor5z" name="SDN-C" sourceRef="ExclusiveGateway_07toixi" targetRef="ScriptTask_0z30dax">
       <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("controllerInfo" )  == "SDN-C" )}]]></bpmn:conditionExpression>
     </bpmn:sequenceFlow>
-    <bpmn:sequenceFlow id="SequenceFlow_1x3lehs" name="VF-C" sourceRef="ExclusiveGateway_07toixi" targetRef="Task_0z1x3sg">
-      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("controllerInfo" )  == "VF-C" )}]]></bpmn:conditionExpression>
-    </bpmn:sequenceFlow>
+    <bpmn:sequenceFlow id="SequenceFlow_1x3lehs" name="VF-C" sourceRef="ExclusiveGateway_07toixi" targetRef="Task_0z1x3sg" />
     <bpmn:scriptTask id="ScriptTask_0w46sge" name="Parse Next Resource" scriptFormat="groovy">
       <bpmn:incoming>SequenceFlow_1lxqjmp</bpmn:incoming>
       <bpmn:incoming>SequenceFlow_0phwem2</bpmn:incoming>
@@ -104,15 +102,16 @@
     </bpmn:scriptTask>
     <bpmn:sequenceFlow id="SequenceFlow_1lxqjmp" sourceRef="CallActivity_Del_SDNC_cust" targetRef="ScriptTask_0w46sge" />
     <bpmn:sequenceFlow id="SequenceFlow_0phwem2" sourceRef="Task_0963dho" targetRef="ScriptTask_0w46sge" />
-    <bpmn:exclusiveGateway id="ExclusiveGateway_1hgjg3u" name="Is All Resource Deleted">
+    <bpmn:exclusiveGateway id="ExclusiveGateway_1hgjg3u" name="Is All Resource Deleted" default="SequenceFlow_0s1lswk">
       <bpmn:incoming>SequenceFlow_0l5r96s</bpmn:incoming>
       <bpmn:outgoing>SequenceFlow_0talboa</bpmn:outgoing>
       <bpmn:outgoing>SequenceFlow_0s1lswk</bpmn:outgoing>
     </bpmn:exclusiveGateway>
     <bpmn:sequenceFlow id="SequenceFlow_0l5r96s" sourceRef="ScriptTask_0w46sge" targetRef="ExclusiveGateway_1hgjg3u" />
-    <bpmn:exclusiveGateway id="ExclusiveGateway_16046vb" name="Is SDNC Service Contained">
+    <bpmn:exclusiveGateway id="ExclusiveGateway_16046vb" name="Is SDNC Service Contained" default="SequenceFlow_12avhgx">
       <bpmn:incoming>SequenceFlow_0talboa</bpmn:incoming>
       <bpmn:outgoing>SequenceFlow_1icwpye</bpmn:outgoing>
+      <bpmn:outgoing>SequenceFlow_12avhgx</bpmn:outgoing>
     </bpmn:exclusiveGateway>
     <bpmn:sequenceFlow id="SequenceFlow_1icwpye" name="yes" sourceRef="ExclusiveGateway_16046vb" targetRef="Task_0edkv0m">
       <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("isContainsWanResource" )  == "true" )}]]></bpmn:conditionExpression>
@@ -120,12 +119,11 @@
     <bpmn:sequenceFlow id="SequenceFlow_0talboa" name="yes" sourceRef="ExclusiveGateway_1hgjg3u" targetRef="ExclusiveGateway_16046vb">
       <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("allResourceFinished" )  == "true" )}]]></bpmn:conditionExpression>
     </bpmn:sequenceFlow>
-    <bpmn:sequenceFlow id="SequenceFlow_0s1lswk" name="no" sourceRef="ExclusiveGateway_1hgjg3u" targetRef="ScriptTask_12q6a51">
-      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("allResourceFinished" )  == "false" )}]]></bpmn:conditionExpression>
-    </bpmn:sequenceFlow>
+    <bpmn:sequenceFlow id="SequenceFlow_0s1lswk" name="no" sourceRef="ExclusiveGateway_1hgjg3u" targetRef="ScriptTask_12q6a51" />
     <bpmn:sequenceFlow id="SequenceFlow_1yujjwx" sourceRef="Task_0edkv0m" targetRef="ScriptTask_14pmqni" />
     <bpmn:scriptTask id="ScriptTask_14pmqni" name="Post Config Service Instance Creation" scriptFormat="groovy">
       <bpmn:incoming>SequenceFlow_1yujjwx</bpmn:incoming>
+      <bpmn:incoming>SequenceFlow_12avhgx</bpmn:incoming>
       <bpmn:outgoing>SequenceFlow_1r5306k</bpmn:outgoing>
       <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
 def csi = new  DoCreateResources()
@@ -165,7 +163,7 @@
     <bpmn:sequenceFlow id="SequenceFlow_1t8hf8m" sourceRef="ScriptTask_0ib77as" targetRef="CallActivity_0kf50as" />
     <bpmn:sequenceFlow id="SequenceFlow_0p5gr4z" sourceRef="CallActivity_0kf50as" targetRef="ScriptTask_1lqjyj9" />
     <bpmn:sequenceFlow id="SequenceFlow_1n85wxv" sourceRef="ScriptTask_197fr01" targetRef="ExclusiveGateway_1lt9ijz" />
-    <bpmn:exclusiveGateway id="ExclusiveGateway_1lt9ijz" name="Is All Resource Info OK">
+    <bpmn:exclusiveGateway id="ExclusiveGateway_1lt9ijz" name="Is All Resource Info OK" default="SequenceFlow_042d7oc">
       <bpmn:extensionElements>
         <camunda:properties>
           <camunda:property />
@@ -178,9 +176,7 @@
     <bpmn:sequenceFlow id="SequenceFlow_0xqdf1z" sourceRef="ExclusiveGateway_1lt9ijz" targetRef="ScriptTask_0o5bglz">
       <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("allNsFinished" )  == "true" )}]]></bpmn:conditionExpression>
     </bpmn:sequenceFlow>
-    <bpmn:sequenceFlow id="SequenceFlow_042d7oc" sourceRef="ExclusiveGateway_1lt9ijz" targetRef="ScriptTask_0ib77as">
-      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("allNsFinished" )  == "false" )}]]></bpmn:conditionExpression>
-    </bpmn:sequenceFlow>
+    <bpmn:sequenceFlow id="SequenceFlow_042d7oc" sourceRef="ExclusiveGateway_1lt9ijz" targetRef="ScriptTask_0ib77as" />
     <bpmn:scriptTask id="ScriptTask_14bl5a0" name="PreProcess Incoming Request" scriptFormat="groovy">
       <bpmn:incoming>SequenceFlow_0vz7cd9</bpmn:incoming>
       <bpmn:outgoing>SequenceFlow_1t2hfv0</bpmn:outgoing>
@@ -198,6 +194,7 @@
 ddsi.parseNextNS(execution)]]></bpmn:script>
     </bpmn:scriptTask>
     <bpmn:sequenceFlow id="SequenceFlow_131imj8" sourceRef="ScriptTask_1lqjyj9" targetRef="ScriptTask_197fr01" />
+    <bpmn:sequenceFlow id="SequenceFlow_12avhgx" name="no" sourceRef="ExclusiveGateway_16046vb" targetRef="ScriptTask_14pmqni" />
   </bpmn:process>
   <bpmndi:BPMNDiagram id="BPMNDiagram_1">
     <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteResources">
@@ -287,7 +284,7 @@
       <bpmndi:BPMNShape id="ExclusiveGateway_07toixi_di" bpmnElement="ExclusiveGateway_07toixi" isMarkerVisible="true">
         <dc:Bounds x="342.56962025316454" y="248" width="50" height="50" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="332" y="302" width="73" height="24" />
+          <dc:Bounds x="404" y="261" width="73" height="24" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNShape id="ScriptTask_12q6a51_di" bpmnElement="ScriptTask_12q6a51">
@@ -314,7 +311,7 @@
         <di:waypoint xsi:type="dc:Point" x="368" y="151" />
         <di:waypoint xsi:type="dc:Point" x="470" y="151" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="366" y="193.5" width="35" height="12" />
+          <dc:Bounds x="381" y="161" width="37" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_1x3lehs_di" bpmnElement="SequenceFlow_1x3lehs">
@@ -322,7 +319,7 @@
         <di:waypoint xsi:type="dc:Point" x="368" y="378" />
         <di:waypoint xsi:type="dc:Point" x="476" y="378" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="379" y="353" width="27" height="12" />
+          <dc:Bounds x="379" y="353" width="28" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNShape id="ScriptTask_0w46sge_di" bpmnElement="ScriptTask_0w46sge">
@@ -349,7 +346,7 @@
       <bpmndi:BPMNShape id="ExclusiveGateway_1hgjg3u_di" bpmnElement="ExclusiveGateway_1hgjg3u" isMarkerVisible="true">
         <dc:Bounds x="1040.9252217997464" y="248" width="50" height="50" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="1029" y="302" width="74" height="24" />
+          <dc:Bounds x="1028" y="215" width="75" height="24" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_0l5r96s_di" bpmnElement="SequenceFlow_0l5r96s">
@@ -362,7 +359,7 @@
       <bpmndi:BPMNShape id="ExclusiveGateway_16046vb_di" bpmnElement="ExclusiveGateway_16046vb" isMarkerVisible="true">
         <dc:Bounds x="1203.8174904942966" y="248.28010139416983" width="50" height="50" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="1187" y="302" width="83" height="24" />
+          <dc:Bounds x="1187" y="214" width="84" height="24" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_1icwpye_di" bpmnElement="SequenceFlow_1icwpye">
@@ -384,7 +381,7 @@
         <di:waypoint xsi:type="dc:Point" x="1066" y="490" />
         <di:waypoint xsi:type="dc:Point" x="259" y="490" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="1075" y="388" width="12" height="12" />
+          <dc:Bounds x="1074" y="388" width="15" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_1yujjwx_di" bpmnElement="SequenceFlow_1yujjwx">
@@ -438,7 +435,7 @@
       <bpmndi:BPMNShape id="ExclusiveGateway_1lt9ijz_di" bpmnElement="ExclusiveGateway_1lt9ijz" isMarkerVisible="true">
         <dc:Bounds x="-1" y="81" width="50" height="50" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="-13" y="135" width="74" height="24" />
+          <dc:Bounds x="-13" y="135" width="75" height="24" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_0xqdf1z_di" bpmnElement="SequenceFlow_0xqdf1z">
@@ -476,6 +473,14 @@
           <dc:Bounds x="210" y="-65" width="0" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_12avhgx_di" bpmnElement="SequenceFlow_12avhgx">
+        <di:waypoint xsi:type="dc:Point" x="1229" y="298" />
+        <di:waypoint xsi:type="dc:Point" x="1229" y="563" />
+        <di:waypoint xsi:type="dc:Point" x="1356" y="563" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="1237" y="425" width="15" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
     </bpmndi:BPMNPlane>
   </bpmndi:BPMNDiagram>
 </bpmn:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateE2EServiceInstanceRollback.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateE2EServiceInstanceRollback.bpmn
index c1974c2..2cbac26 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateE2EServiceInstanceRollback.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateE2EServiceInstanceRollback.bpmn
@@ -1,6 +1,6 @@
 <?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.11.3" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
-  <bpmn2:process id="DoCreateE2EServiceInstanceRollback" name="DoCreateE2EServiceInstanceRollback" isExecutable="true">
+<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:process id="DoUpdateE2EServiceInstanceRollback" name="DoUpdateE2EServiceInstanceRollback" isExecutable="true">
     <bpmn2:startEvent id="createSIRollback_startEvent" name="Start Flow">
       <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
     </bpmn2:startEvent>
@@ -71,7 +71,7 @@
     <bpmn2:sequenceFlow id="SequenceFlow_1rzlaoy" name="yes" sourceRef="ExclusiveGateway_19tbjgn" targetRef="PostProcess_ScriptTask">
       <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("skipRollback" )  == true}]]></bpmn2:conditionExpression>
     </bpmn2:sequenceFlow>
-    <bpmn2:exclusiveGateway id="ExclusiveGateway_0ii31dq" name="RollBack Deleted Resources?">
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_0ii31dq" name="RollBack Deleted Resources?" default="SequenceFlow_055b52t">
       <bpmn2:documentation>rollback Deleted Resources</bpmn2:documentation>
       <bpmn2:incoming>SequenceFlow_1uw2p9a</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_0drjj7b</bpmn2:outgoing>
@@ -148,7 +148,7 @@
 def csi = new  DoUpdateE2EServiceInstanceRollback()
 csi.postProcessForAddResource(execution)]]></bpmn2:script>
     </bpmn2:scriptTask>
-    <bpmn2:exclusiveGateway id="ExclusiveGateway_0ybxh3b" name="RollBackAAI?">
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_0ybxh3b" name="RollBackAAI?" default="SequenceFlow_0a83f6m">
       <bpmn2:documentation>rollback AAI</bpmn2:documentation>
       <bpmn2:incoming>SequenceFlow_055b52t</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_0a83f6m</bpmn2:outgoing>
@@ -215,7 +215,7 @@
     <bpmn2:sequenceFlow id="SequenceFlow_1a65s3k" sourceRef="IntermediateCatchEvent_0546q5i" targetRef="ScriptTask_13h2onn" />
     <bpmn2:sequenceFlow id="SequenceFlow_1lppnhy" sourceRef="ScriptTask_0gj4dj5" targetRef="CallActivity_0zs5y0x" />
     <bpmn2:sequenceFlow id="SequenceFlow_0kbisn8" sourceRef="CallActivity_0zs5y0x" targetRef="ScriptTask_1p96syr" />
-    <bpmn2:exclusiveGateway id="ExclusiveGateway_1k16vgh" name="RollBackAAI?">
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_1k16vgh" name="RollBackAAI?" default="SequenceFlow_161uzhj">
       <bpmn2:documentation>rollback AAI</bpmn2:documentation>
       <bpmn2:incoming>SequenceFlow_08p4pkv</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_0cbnwwi</bpmn2:outgoing>
@@ -226,7 +226,9 @@
       <bpmn2:incoming>SequenceFlow_0cbnwwi</bpmn2:incoming>
       <bpmn2:linkEventDefinition name="UpdateAAI" />
     </bpmn2:intermediateThrowEvent>
-    <bpmn2:sequenceFlow id="SequenceFlow_0cbnwwi" sourceRef="ExclusiveGateway_1k16vgh" targetRef="IntermediateThrowEvent_0x32fw8" />
+    <bpmn2:sequenceFlow id="SequenceFlow_0cbnwwi" name="yes" sourceRef="ExclusiveGateway_1k16vgh" targetRef="IntermediateThrowEvent_0x32fw8">
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("RollbackAAI" )  == "true" )}]]></bpmn2:conditionExpression>
+    </bpmn2:sequenceFlow>
     <bpmn2:scriptTask id="ScriptTask_1c3q8hc" name="Post Process Request" scriptFormat="groovy">
       <bpmn2:incoming>SequenceFlow_161uzhj</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_13r4lij</bpmn2:outgoing>
@@ -239,7 +241,7 @@
       <bpmn2:incoming>SequenceFlow_13r4lij</bpmn2:incoming>
     </bpmn2:endEvent>
     <bpmn2:sequenceFlow id="SequenceFlow_13r4lij" sourceRef="ScriptTask_1c3q8hc" targetRef="EndEvent_0knjkkx" />
-    <bpmn2:exclusiveGateway id="ExclusiveGateway_0g7wcmb" name="RollBackAAI?">
+    <bpmn2:exclusiveGateway id="ExclusiveGateway_0g7wcmb" name="RollBackAAI?" default="SequenceFlow_1isdxh1">
       <bpmn2:documentation>rollback AAI</bpmn2:documentation>
       <bpmn2:incoming>SequenceFlow_1bp5oce</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_0bkvqao</bpmn2:outgoing>
@@ -259,7 +261,9 @@
     <bpmn2:endEvent id="EndEvent_0yzh2qs">
       <bpmn2:incoming>SequenceFlow_0a9xori</bpmn2:incoming>
     </bpmn2:endEvent>
-    <bpmn2:sequenceFlow id="SequenceFlow_0bkvqao" sourceRef="ExclusiveGateway_0g7wcmb" targetRef="IntermediateThrowEvent_0q76lxg" />
+    <bpmn2:sequenceFlow id="SequenceFlow_0bkvqao" name="yes" sourceRef="ExclusiveGateway_0g7wcmb" targetRef="IntermediateThrowEvent_0q76lxg">
+      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("RollbackAAI" )  == "true" )}]]></bpmn2:conditionExpression>
+    </bpmn2:sequenceFlow>
     <bpmn2:sequenceFlow id="SequenceFlow_1isdxh1" sourceRef="ExclusiveGateway_0g7wcmb" targetRef="ScriptTask_1y4us3g" />
     <bpmn2:sequenceFlow id="SequenceFlow_0a9xori" sourceRef="ScriptTask_1y4us3g" targetRef="EndEvent_0yzh2qs" />
     <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1et42wh" name="GoTo UpdateAAI">
@@ -319,7 +323,7 @@
   <bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
   <bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
   <bpmndi:BPMNDiagram id="BPMNDiagram_1">
-    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateE2EServiceInstanceRollback">
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoUpdateE2EServiceInstanceRollback">
       <bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createSIRollback_startEvent">
         <dc:Bounds x="151" y="79" width="36" height="36" />
         <bpmndi:BPMNLabel>
@@ -442,7 +446,7 @@
       <bpmndi:BPMNShape id="ExclusiveGateway_0ii31dq_di" bpmnElement="ExclusiveGateway_0ii31dq" isMarkerVisible="true">
         <dc:Bounds x="687" y="72" width="50" height="50" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="670" y="39" width="83" height="24" />
+          <dc:Bounds x="668" y="39" width="87" height="24" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNShape id="ExclusiveGateway_09wkav2_di" bpmnElement="ExclusiveGateway_09wkav2" isMarkerVisible="true">
@@ -500,7 +504,7 @@
       <bpmndi:BPMNShape id="ExclusiveGateway_0ybxh3b_di" bpmnElement="ExclusiveGateway_0ybxh3b" isMarkerVisible="true">
         <dc:Bounds x="864" y="72" width="50" height="50" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="896" y="44" width="66" height="12" />
+          <dc:Bounds x="894" y="44" width="70" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_0drjj7b_di" bpmnElement="SequenceFlow_0drjj7b">
@@ -539,7 +543,7 @@
         <di:waypoint xsi:type="dc:Point" x="889" y="-22" />
         <di:waypoint xsi:type="dc:Point" x="704" y="-22" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="838" y="19.000000000000007" width="12" height="12" />
+          <dc:Bounds x="837" y="19" width="15" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_1fih4h0_di" bpmnElement="SequenceFlow_1fih4h0">
@@ -622,7 +626,7 @@
       <bpmndi:BPMNShape id="ExclusiveGateway_1k16vgh_di" bpmnElement="ExclusiveGateway_1k16vgh" isMarkerVisible="true">
         <dc:Bounds x="778" y="360" width="50" height="50" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="721" y="358" width="66" height="12" />
+          <dc:Bounds x="719" y="358" width="70" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_08p4pkv_di" bpmnElement="SequenceFlow_08p4pkv">
@@ -642,7 +646,7 @@
         <di:waypoint xsi:type="dc:Point" x="803" y="410" />
         <di:waypoint xsi:type="dc:Point" x="803" y="454" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="773" y="426" width="90" height="12" />
+          <dc:Bounds x="808" y="426" width="20" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNShape id="ScriptTask_1c3q8hc_di" bpmnElement="ScriptTask_1c3q8hc">
@@ -671,7 +675,7 @@
       <bpmndi:BPMNShape id="ExclusiveGateway_0g7wcmb_di" bpmnElement="ExclusiveGateway_0g7wcmb" isMarkerVisible="true">
         <dc:Bounds x="778" y="548" width="50" height="50" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="721" y="546" width="66" height="12" />
+          <dc:Bounds x="719" y="546" width="70" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNShape id="IntermediateThrowEvent_0q76lxg_di" bpmnElement="IntermediateThrowEvent_0q76lxg">
@@ -693,7 +697,7 @@
         <di:waypoint xsi:type="dc:Point" x="803" y="598" />
         <di:waypoint xsi:type="dc:Point" x="803" y="647" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="773" y="616.5" width="90" height="12" />
+          <dc:Bounds x="808" y="617" width="20" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_1isdxh1_di" bpmnElement="SequenceFlow_1isdxh1">
@@ -757,7 +761,7 @@
         <di:waypoint xsi:type="dc:Point" x="737" y="97" />
         <di:waypoint xsi:type="dc:Point" x="864" y="97" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="770" y="106" width="12" height="12" />
+          <dc:Bounds x="769" y="106" width="15" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNShape id="ScriptTask_13h2onn_di" bpmnElement="ScriptTask_13h2onn">
@@ -792,4 +796,4 @@
       </bpmndi:BPMNEdge>
     </bpmndi:BPMNPlane>
   </bpmndi:BPMNDiagram>
-</bpmn2:definitions>
\ No newline at end of file
+</bpmn2:definitions>
diff --git a/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/HeaderUtilTest.java b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/HeaderUtilTest.java
new file mode 100644
index 0000000..b861a79
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/test/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/HeaderUtilTest.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+public class HeaderUtilTest {
+
+    @Test
+    public void getAuthorizationTest() throws Exception {
+    	String authorization = HeaderUtil.getAuthorization(HeaderUtil.USER, HeaderUtil.PASS);
+    	assertEquals("Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==", authorization);
+    }
+
+}
\ No newline at end of file
diff --git a/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseTest.java b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseTest.java
new file mode 100644
index 0000000..166a2ff
--- /dev/null
+++ b/bpmn/MSORESTClient/src/test/java/org/openecomp/mso/rest/APIResponseTest.java
@@ -0,0 +1,57 @@
+/*
+* ============LICENSE_START=======================================================
+* ONAP : SO
+* ================================================================================
+* Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+*=================================================================================
+* 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.openecomp.mso.rest;
+
+import static org.junit.Assert.assertEquals;
+
+import org.json.JSONObject;
+import org.junit.Test;
+
+import org.apache.http.HttpResponse;
+import org.apache.http.ProtocolVersion;
+import org.apache.http.HttpEntity;
+import org.apache.http.entity.ContentType;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.message.BasicHttpResponse;
+
+public class APIResponseTest {
+	
+	@Test
+	public void test() throws Exception {
+		JSONObject jsonObject = new JSONObject();
+		jsonObject.put("firstName", "firstName1");
+		jsonObject.put("lastName", "lastName1");
+		String jsonObjectAsString= jsonObject.toString();
+		HttpEntity entity = new StringEntity(jsonObjectAsString, ContentType.APPLICATION_JSON);
+		ProtocolVersion ver = new ProtocolVersion("HTTP", 1, 1);		
+		HttpResponse response = new BasicHttpResponse(ver, 1, "Ok");  
+		response.setStatusLine(ver, 200);
+		response.setEntity(entity);
+		response.setHeader("name", "value");
+		response.setStatusCode(200);
+		APIResponse apiResponse = new APIResponse(response);
+		assertEquals(200, apiResponse.getStatusCode());
+		assertEquals(jsonObject.toString(), apiResponse.getResponseBodyAsString());
+		assertEquals("value", apiResponse.getFirstHeader("name"));
+		assertEquals(1, apiResponse.getAllHeaders().length);
+		assertEquals(49, apiResponse.getResponseBodyAsByteArray().length);
+	}
+}
\ No newline at end of file
diff --git a/mso-catalog-db/src/main/resources/HeatFiles.hbm.xml b/mso-catalog-db/src/main/resources/HeatFiles.hbm.xml
index 4674239..5a2c4aa 100644
--- a/mso-catalog-db/src/main/resources/HeatFiles.hbm.xml
+++ b/mso-catalog-db/src/main/resources/HeatFiles.hbm.xml
@@ -36,7 +36,7 @@
         <property name="version" type="java.lang.String" length="20" not-null="true">

             <column name="VERSION" />

         </property>

-        <property name="fileBody" type="java.lang.String" not-null="true">

+        <property name="fileBody" type="text" not-null="true">

             <column name="BODY" />

         </property>

         <property name="created" type="java.sql.Timestamp" generated="insert" update="false" insert="false" not-null="true">

diff --git a/mso-catalog-db/src/main/resources/NetworkResource.hbm.xml b/mso-catalog-db/src/main/resources/NetworkResource.hbm.xml
index 5d8a2a1..41e049a 100644
--- a/mso-catalog-db/src/main/resources/NetworkResource.hbm.xml
+++ b/mso-catalog-db/src/main/resources/NetworkResource.hbm.xml
@@ -29,7 +29,7 @@
 
 		<id 	  name="modelUUID" 					column="MODEL_UUID" 					type="string" 	length="200"/>
 		<property name="modelName" 					column="MODEL_NAME" 					type="string" 	length="200"	not-null="true" />
-		<property name="modelInvariantUUID" 		column="MODEL_INVARIANT_UUID" 			type="string" 	length="20"/>
+		<property name="modelInvariantUUID" 		column="MODEL_INVARIANT_UUID" 			type="string" 	length="200"/>
 		<property name="modelVersion" 				column="MODEL_VERSION" 					type="string" 	length="20"/>
 		<property name="toscaNodeType" 				column="TOSCA_NODE_TYPE" 				type="string" 	length="200"/>
 		<property name="neutronNetworkType" 		column="NEUTRON_NETWORK_TYPE" 			type="string" 	length="20"/>
@@ -52,4 +52,4 @@
 
 	</class>
 
-</hibernate-mapping>
\ No newline at end of file
+</hibernate-mapping>
diff --git a/mso-catalog-db/src/main/resources/Service.hbm.xml b/mso-catalog-db/src/main/resources/Service.hbm.xml
index 07f7795..2344432 100644
--- a/mso-catalog-db/src/main/resources/Service.hbm.xml
+++ b/mso-catalog-db/src/main/resources/Service.hbm.xml
@@ -42,9 +42,12 @@
         <property name="category" 				column="SERVICE_CATEGORY" 				type="string" 		length="20"/>
         <property name="serviceType" 				column="SERVICE_TYPE" 				type="string" 		length="20"/>
         <property name="serviceRole" 				column="SERVICE_ROLE" 				type="string" 		length="20"/>
-        <property name="environmentContext" 		column="ENVIRONMENT_CONTEXT" 		type="string" 		length="200"/>
-        <property name="workloadContext" 			column="WORKLOAD_CONTEXT" 			type="string" 		length="200"/>
-        
+        <property name="environmentContext" 		type="string" 		length="200">
+          <column name="ENVIRONMENT_CONTEXT" default="null"/>
+        </property>
+        <property name="workloadContext" 			type="string" 		length="200">
+          <column name="WORKLOAD_CONTEXT" default="null"/>
+        </property>
         
 		<map name="recipes" inverse="true" cascade="all">
 			<key column="SERVICE_MODEL_UUID"/>
@@ -57,4 +60,4 @@
             <one-to-many class="ServiceToResourceCustomization" />
         </set>
 	</class>
-</hibernate-mapping>
\ No newline at end of file
+</hibernate-mapping>