diff --git a/bpmn/mso-infrastructure-bpmn/pom.xml b/bpmn/mso-infrastructure-bpmn/pom.xml
new file mode 100644
index 0000000..fbfe831
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/pom.xml
@@ -0,0 +1,207 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<parent>
+		<groupId>org.onap.so</groupId>
+		<artifactId>bpmn</artifactId>
+		<version>1.3.0-SNAPSHOT</version>
+	</parent>
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>mso-infrastructure-bpmn</artifactId>
+	<packaging>jar</packaging>
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-dependency-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>unpack</id>
+						<goals>
+							<goal>unpack</goal>
+						</goals>
+						<configuration>
+							<artifactItems>
+								<artifactItem>
+									<groupId>org.onap.so</groupId>
+									<artifactId>MSOCommonBPMN</artifactId>
+									<version>${project.version}</version>
+									<type>jar</type>
+									<overWrite>false</overWrite>
+									<outputDirectory>${project.build.outputDirectory}</outputDirectory>
+									<includes>**/*.bpmn</includes>
+								</artifactItem>
+								<artifactItem>
+									<groupId>org.onap.so</groupId>
+									<artifactId>so-bpmn-building-blocks</artifactId>
+									<version>${project.version}</version>
+									<type>jar</type>
+									<overWrite>false</overWrite>
+									<outputDirectory>${project.build.outputDirectory}</outputDirectory>
+									<includes>**/*.bpmn</includes>
+								</artifactItem>
+								<artifactItem>
+									<groupId>org.onap.so</groupId>
+									<artifactId>so-bpmn-infrastructure-flows</artifactId>
+									<version>${project.version}</version>
+									<type>jar</type>
+									<overWrite>false</overWrite>
+									<outputDirectory>${project.build.outputDirectory}</outputDirectory>
+									<includes>**/*.bpmn</includes>
+								</artifactItem>
+							</artifactItems>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>test-compile</id>
+						<phase>compile</phase>
+						<goals>
+							<goal>testCompile</goal>
+						</goals>
+						<configuration>
+							<skip>false</skip>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-jar-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>tests</id>
+					</execution>
+					<execution>
+						<id>original</id>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>org.springframework.boot</groupId>
+				<artifactId>spring-boot-maven-plugin</artifactId>
+				<version>${springboot.version}</version>
+				<configuration>
+					<mainClass>org.onap.so.adapters.requestsdb.application.MSOInfrastructureApplication</mainClass>
+				</configuration>
+				<executions>
+					<execution>
+						<goals>
+							<goal>repackage</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-dependency-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>extract-docker-file</id>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>io.fabric8</groupId>
+				<artifactId>fabric8-maven-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>start</id>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+	</build>
+	<dependencyManagement>
+		<dependencies>
+			<dependency>
+				<!-- Import dependency management from Spring Boot -->
+				<groupId>org.springframework.boot</groupId>
+				<artifactId>spring-boot-dependencies</artifactId>
+				<version>${springboot.version}</version>
+				<type>pom</type>
+				<scope>import</scope>
+			</dependency>
+		</dependencies>
+	</dependencyManagement>
+	<dependencies>
+		<dependency>
+			<groupId>org.camunda.bpm.springboot</groupId>
+			<artifactId>camunda-bpm-spring-boot-starter</artifactId>
+			<version>2.3.0</version>
+		</dependency>
+		<dependency>
+			<groupId>org.camunda.bpm.extension</groupId>
+			<artifactId>camunda-bpm-assert</artifactId>
+			<version>2.0-alpha2</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.camunda.bpm.springboot</groupId>
+			<artifactId>camunda-bpm-spring-boot-starter-rest</artifactId>
+			<version>2.3.0</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-web</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-data-jpa</artifactId>
+			<optional>true</optional>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-test</artifactId>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.onap.so</groupId>
+			<artifactId>so-bpmn-infrastructure-common</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.onap.so</groupId>
+			<artifactId>MSOCommonBPMN</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.onap.so</groupId>
+			<artifactId>MSOCommonBPMN</artifactId>
+			<version>${project.version}</version>
+			<type>test-jar</type>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>com.h2database</groupId>
+			<artifactId>h2</artifactId>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework.cloud</groupId>
+			<artifactId>spring-cloud-contract-wiremock</artifactId>
+			<version>1.2.4.RELEASE</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>ch.vorburger.mariaDB4j</groupId>
+			<artifactId>mariaDB4j</artifactId>
+			<version>2.2.3</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>io.micrometer</groupId>
+			<artifactId>micrometer-spring-legacy</artifactId>
+			<version>1.0.5</version>
+		</dependency>
+		<dependency>
+			<groupId>io.micrometer</groupId>
+			<artifactId>micrometer-registry-prometheus</artifactId>
+			<version>1.0.5</version>
+		</dependency>
+	</dependencies>
+</project>
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy b/bpmn/mso-infrastructure-bpmn/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy
new file mode 100644
index 0000000..9262954
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy
@@ -0,0 +1,62 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Technologies Co., Ltd. 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.scripts
+
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
+
+/**
+ * This groovy class supports the <class>ActivateSDNCCNetworkResource.bpmn</class> process.
+ * flow for SDNC Network Resource Activate
+ */
+public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
+
+    String Prefix = "ACTSDNCRES_"
+
+    ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+    JsonUtils jsonUtil = new JsonUtils()
+
+    SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
+
+    public void preProcessRequest(DelegateExecution execution) {
+        def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+        utils.log("INFO"," ***** Started preProcessRequest *****",  isDebugEnabled)
+    }
+
+    public void prepareUpdateAfterActivateSDNCResource(DelegateExecution execution) {
+        def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+        utils.log("INFO"," ***** started prepareUpdateAfterActivateSDNCResource *****",  isDebugEnabled)
+    }
+
+    public void postCreateSDNCCall(DelegateExecution execution) {
+        def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+        utils.log("INFO"," ***** started postCreateSDNCCall *****",  isDebugEnabled)
+    }
+
+    public void sendSyncResponse(DelegateExecution execution) {
+        def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+        utils.log("INFO"," ***** started sendSyncResponse *****",  isDebugEnabled)
+    }
+}
\ No newline at end of file
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateActivateSDNCResource.groovy b/bpmn/mso-infrastructure-bpmn/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateActivateSDNCResource.groovy
new file mode 100644
index 0000000..bb58030
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateActivateSDNCResource.groovy
@@ -0,0 +1,425 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Technologies Co., Ltd. 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.onap.so.bpmn.infrastructure.scripts
+
+import org.json.JSONObject
+import org.json.XML;
+
+import static org.apache.commons.lang3.StringUtils.*;
+import groovy.xml.XmlUtil
+import groovy.json.*
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor 
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.recipe.ResourceInput;
+import org.onap.so.bpmn.common.resource.ResourceRequestBuilder 
+import org.onap.so.bpmn.core.WorkflowException 
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.bpmn.infrastructure.workflow.serviceTask.client.builder.AbstractBuilder
+import org.onap.so.rest.APIResponse
+import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
+import org.onap.so.bpmn.infrastructure.workflow.service.ServicePluginFactory
+import java.util.UUID;
+
+import org.camunda.bpm.engine.runtime.Execution
+import org.camunda.bpm.engine.delegate.BpmnError 
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.apache.commons.lang3.*
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.web.util.UriUtils 
+import org.onap.so.rest.RESTClient 
+import org.onap.so.rest.RESTConfig
+
+/**
+ * This groovy class supports the <class>CreateActivateSDNCResource.bpmn</class> process.
+ * flow for SDNC Network Resource Create
+ */
+public class CreateActivateSDNCResource extends AbstractServiceTaskProcessor {
+
+    String Prefix="CRESDNCRES_"
+            
+    ExceptionUtil exceptionUtil = new ExceptionUtil()
+
+    JsonUtils jsonUtil = new JsonUtils()
+
+    SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
+    
+    public void preProcessRequest(DelegateExecution execution){
+        def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+        utils.log("INFO"," ***** Started preProcessRequest *****",  isDebugEnabled)
+        try {           
+            
+            //get bpmn inputs from resource request.
+            String requestId = execution.getVariable("mso-request-id")
+            String requestAction = execution.getVariable("requestAction")
+            utils.log("INFO","The requestAction is: " + requestAction,  isDebugEnabled)
+            String recipeParamsFromRequest = execution.getVariable("recipeParams")
+            utils.log("INFO","The recipeParams is: " + recipeParamsFromRequest,  isDebugEnabled)
+            String resourceInput = execution.getVariable("resourceInput")
+            utils.log("INFO","The resourceInput is: " + resourceInput,  isDebugEnabled)
+            //Get ResourceInput Object
+            ResourceInput resourceInputObj = ResourceRequestBuilder.getJsonObject(resourceInput, ResourceInput.class)
+            execution.setVariable(Prefix + "resourceInput", resourceInputObj)
+            
+            //Deal with recipeParams
+            String recipeParamsFromWf = execution.getVariable("recipeParamXsd")
+            String resourceName = resourceInputObj.getResourceInstanceName()            
+            //For sdnc requestAction default is "createNetworkInstance"
+            String operationType = "Network"
+            String apiType = "network"
+            if(!StringUtils.isBlank(recipeParamsFromRequest)){
+                //the operationType from worflow(first node) is second priority.
+                operationType = jsonUtil.getJsonValue(recipeParamsFromRequest, "operationType")
+                apiType = jsonUtil.getJsonValue(recipeParamsFromRequest, "apiType")
+            }
+            if(!StringUtils.isBlank(recipeParamsFromWf)){
+                //the operationType from worflow(first node) is highest priority.
+                operationType = jsonUtil.getJsonValue(recipeParamsFromWf, "operationType")
+                apiType = jsonUtil.getJsonValue(recipeParamsFromRequest, "apiType")
+            }
+                  
+            execution.setVariable(Prefix + "operationType", operationType)        
+            execution.setVariable(Prefix + "apiType", apiType)
+            execution.setVariable(Prefix + "serviceInstanceId", resourceInputObj.getServiceInstanceId())
+            execution.setVariable("mso-request-id", requestId)
+            execution.setVariable("mso-service-instance-id", resourceInputObj.getServiceInstanceId())
+            //TODO Here build networkrequest
+            
+        } catch (BpmnError e) {
+            throw e;
+        } catch (Exception ex){
+            String msg = "Exception in preProcessRequest " + ex.getMessage()
+            utils.log("DEBUG", msg, isDebugEnabled)
+            exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+        }
+    }
+
+    String customizeResourceParam(String netowrkInputParametersJson) {
+        List<Map<String, Object>> paramList = new ArrayList();
+        JSONObject jsonObject = new JSONObject(netowrkInputParametersJson);
+        Iterator iterator = jsonObject.keys();
+        while (iterator.hasNext()) {
+            String key = iterator.next();
+            HashMap<String, String> hashMap = new HashMap();
+            hashMap.put("name", key);
+            hashMap.put("value", jsonObject.get(key))
+            paramList.add(hashMap)
+        }
+        Map<String, List<Map<String, Object>>> paramMap = new HashMap();
+        paramMap.put("param", paramList);
+
+        return  new JSONObject(paramMap).toString();
+    }
+    
+    public void prepareSDNCRequest (DelegateExecution execution) {
+        String svcAction = "create"
+        prepareSDNCRequestReq(execution, svcAction, "")        
+    }
+    
+
+    public void prepareSDNCActivateRequest (DelegateExecution execution) {
+        String svcAction = "activate"
+        String sndcResourceId = execution.getVariable(Prefix + "sdncResourceId")
+        prepareSDNCRequestReq(execution, svcAction, sndcResourceId)
+    }
+    /**
+     * Pre Process the BPMN Flow Request
+     * Inclouds:
+     * generate the nsOperationKey
+     * generate the nsParameters
+     */
+    public void prepareSDNCRequestReq (DelegateExecution execution, String svcAction, String sdncResourceId) {
+        def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+        utils.log("INFO"," ***** Started prepareSDNCRequest *****",  isDebugEnabled)
+
+        try {
+            // get variables
+            String operationType = execution.getVariable(Prefix + "operationType")   
+            String sdnc_apiType = execution.getVariable(Prefix + "apiType")
+            String sdnc_svcAction = svcAction
+            String sdnc_requestAction = StringUtils.capitalize(sdnc_svcAction) + operationType +"Instance"  
+
+            String sdncCallback = execution.getVariable("URN_mso_workflow_sdncadapter_callback")
+            String createNetworkInput = execution.getVariable(Prefix + "networkRequest")
+
+            String hdrRequestId = execution.getVariable("mso-request-id")
+            String serviceInstanceId = execution.getVariable(Prefix + "serviceInstanceId")
+            String source = execution.getVariable("source")
+            String sdnc_service_id = execution.getVariable(Prefix + "sdncServiceId")
+            ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
+            String serviceType = resourceInputObj.getServiceType()
+            String serviceModelInvariantUuid = resourceInputObj.getServiceModelInfo().getModelInvariantUuid()
+            String serviceModelUuid = resourceInputObj.getServiceModelInfo().getModelUuid()
+            String serviceModelVersion = resourceInputObj.getServiceModelInfo().getModelVersion()
+            String serviceModelName = resourceInputObj.getServiceModelInfo().getModelName()
+            String globalCustomerId = resourceInputObj.getGlobalSubscriberId()
+            String modelInvariantUuid = resourceInputObj.getResourceModelInfo().getModelInvariantUuid();
+            String modelCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid()
+            String modelUuid = resourceInputObj.getResourceModelInfo().getModelUuid()
+            String modelName = resourceInputObj.getResourceModelInfo().getModelName()
+            String modelVersion = resourceInputObj.getResourceModelInfo().getModelVersion()
+            String resourceInputPrameters = resourceInputObj.getResourceParameters()
+            String netowrkInputParametersJson = jsonUtil.getJsonValue(resourceInputPrameters, "requestInputs")
+            //here convert json string to xml string
+            String netowrkInputParameters = XML.toString(new JSONObject(customizeResourceParam(netowrkInputParametersJson)))
+
+            // 1. prepare assign topology via SDNC Adapter SUBFLOW call
+            String sndcTopologyCreateRequest =
+                    """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+                                                              xmlns:sdncadapter="http://org.openecomp.mso/workflow/sdnc/adapter/schema/v1" 
+                                                              xmlns:sdncadapterworkflow="http://org.openecomp/mso/workflow/schema/v1">
+                                 <sdncadapter:RequestHeader>
+                                    <sdncadapter:RequestId>${hdrRequestId}</sdncadapter:RequestId>
+                                    <sdncadapter:SvcInstanceId>${serviceInstanceId}</sdncadapter:SvcInstanceId>
+                                    <sdncadapter:SvcAction>${sdnc_svcAction}</sdncadapter:SvcAction>
+                                    <sdncadapter:SvcOperation>${sdnc_apiType}-topology-operation</sdncadapter:SvcOperation>
+                                    <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
+                                    <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
+                                 </sdncadapter:RequestHeader>
+                                 <sdncadapterworkflow:SDNCRequestData>
+                                     <request-information>
+                                        <request-id>${hdrRequestId}</request-id>
+                                        <request-action>${sdnc_requestAction}</request-action>
+                                        <source>${source}</source>
+                                        <notification-url></notification-url>
+                                        <order-number></order-number>
+                                        <order-version></order-version>
+                                     </request-information>
+                                     <service-information>
+                                        <service-id>${serviceInstanceId}</service-id>
+                                        <subscription-service-type>${serviceType}</subscription-service-type>
+                                        <onap-model-information>
+                                             <model-invariant-uuid>${serviceModelInvariantUuid}</model-invariant-uuid>
+                                             <model-uuid>${serviceModelUuid}</model-uuid>
+                                             <model-version>${serviceModelVersion}</model-version>
+                                             <model-name>${serviceModelName}</model-name>
+                                        </onap-model-information>
+                                        <service-instance-id>${serviceInstanceId}</service-instance-id>
+                                        <global-customer-id>${globalCustomerId}</global-customer-id>
+                                     </service-information>
+                                     <${sdnc_apiType}-information>
+                                        <${sdnc_apiType}-id>${sdncResourceId}</${sdnc_apiType}-id>
+                                        <onap-model-information>
+                                             <model-invariant-uuid>${modelInvariantUuid}</model-invariant-uuid>
+                                             <model-customization-uuid>${modelCustomizationUuid}</model-customization-uuid>
+                                             <model-uuid>${modelUuid}</model-uuid>
+                                             <model-version>${modelVersion}</model-version>
+                                             <model-name>${modelName}</model-name>
+                                        </onap-model-information>
+                                     </${sdnc_apiType}-information>
+                                     <${sdnc_apiType}-request-input>
+                                       <${sdnc_apiType}-input-parameters>${netowrkInputParameters}</${sdnc_apiType}-input-parameters>
+                                     </${sdnc_apiType}-request-input>
+                                </sdncadapterworkflow:SDNCRequestData>
+                             </aetgt:SDNCAdapterWorkflowRequest>""".trim()
+            
+            String sndcTopologyCreateRequesAsString = utils.formatXml(sndcTopologyCreateRequest)
+            utils.logAudit(sndcTopologyCreateRequesAsString)
+            execution.setVariable("sdncAdapterWorkflowRequest", sndcTopologyCreateRequesAsString)
+            utils.log("INFO","sdncAdapterWorkflowRequest :" + sndcTopologyCreateRequesAsString,  isDebugEnabled)
+            utils.log("DEBUG","sdncAdapterWorkflowRequest - " + "\n" +  sndcTopologyCreateRequesAsString, isDebugEnabled)
+
+        } catch (Exception ex) {
+            String exceptionMessage = " Bpmn error encountered in CreateSDNCCNetworkResource flow. prepareSDNCRequest() - " + ex.getMessage()
+            utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+            exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+
+        }
+       utils.log("INFO"," ***** Exit prepareSDNCRequest *****",  isDebugEnabled)
+	}
+ 
+    private void setProgressUpdateVariables(DelegateExecution execution, String body) {
+        def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint")
+        execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint)
+        execution.setVariable("CVFMI_updateResOperStatusRequest", body)
+    }
+
+    public void prepareUpdateBeforeCreateSDNCResource(DelegateExecution execution) {
+        def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+        utils.log("INFO"," ***** Started prepareUpdateBeforeCreateSDNCResource *****",  isDebugEnabled)
+
+        ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
+        String operType = resourceInputObj.getOperationType()
+        String resourceCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid()
+        String ServiceInstanceId = resourceInputObj.getServiceInstanceId()
+        String operationId = resourceInputObj.getOperationId()
+        String modelName = resourceInputObj.getResourceModelInfo().getModelName()
+        String progress = "20"
+        String status = "processing"
+        String statusDescription = "Create " + modelName
+
+        execution.getVariable("operationId")
+
+        String body = """
+                <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+                        xmlns:ns="http://org.openecomp.mso/requestsdb">
+                        <soapenv:Header/>
+                <soapenv:Body>
+                    <ns:updateResourceOperationStatus>
+                               <operType>${operType}</operType>
+                               <operationId>${operationId}</operationId>
+                               <progress>${progress}</progress>
+                               <resourceTemplateUUID>${resourceCustomizationUuid}</resourceTemplateUUID>
+                               <serviceId>${ServiceInstanceId}</serviceId>
+                               <status>${status}</status>
+                               <statusDescription>${statusDescription}</statusDescription>
+                    </ns:updateResourceOperationStatus>
+                </soapenv:Body>
+                </soapenv:Envelope>""";
+
+        setProgressUpdateVariables(execution, body)
+        utils.log("INFO"," ***** End prepareUpdateBeforeCreateSDNCResource *****",  isDebugEnabled)
+    }
+    
+    public void postCreateSDNC(DelegateExecution execution) {
+        def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+        ServicePluginFactory.getInstance().test()
+        utils.log("INFO"," ***** Started postCreateSDNC *****",  isDebugEnabled)
+        String sdnc_apiType = execution.getVariable(Prefix + "apiType")
+    	String sdncAdapterResponse = execution.getVariable("sdncAdapterResponse")    	
+    	utils.log("INFO","sdncAdapterResponse for create：" + sdncAdapterResponse ,  isDebugEnabled)
+    	sdncAdapterResponse = sdncAdapterResponse.replace("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n", "")
+    	sdncAdapterResponse = sdncAdapterResponse.replaceAll('tag0:', '').replaceAll(':tag0', '')
+    	utils.log("INFO","sdncAdapterResponse for create after replace：" + sdncAdapterResponse ,  isDebugEnabled)
+    	//if it is vnf we need to query the vnf-id,if it is network , we need to query the network-id
+		String sdncRespData = utils.getNodeText1(sdncAdapterResponse, "RequestData")
+		utils.log("INFO","sdncRespData：" + sdncRespData ,  isDebugEnabled)
+		String objectKey = "/" + sdnc_apiType + "/"
+		String objectDataKey = "/" + sdnc_apiType + "-data/"
+		String objectPath = utils.getNodeText1(sdncRespData, "object-path")
+		
+		String resourceObjId = objectPath.substring(objectPath.indexOf(objectKey) + objectKey.length(), objectPath.indexOf(objectDataKey))
+		utils.log("INFO", "resourceObjId:" + resourceObjId,  isDebugEnabled)
+		execution.setVariable(Prefix + "sdncResourceId", resourceObjId)
+
+    	utils.log("INFO"," ***** End postCreateSDNC *****",  isDebugEnabled)
+    			
+    }
+    
+    public void postActivateSDNC(DelegateExecution execution) {
+        def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+        utils.log("INFO"," ***** Started postActivateSDNC *****",  isDebugEnabled)
+    	String sdncAdapterResponse = execution.getVariable("sdncAdapterResponse")
+    	utils.log("INFO","sdncAdapterResponse for activate：" + sdncAdapterResponse ,  isDebugEnabled)
+    	utils.log("INFO"," ***** End postActivateSDNC *****",  isDebugEnabled)
+    }
+    
+    public void prepareUpdateAfterCreateSDNCResource(DelegateExecution execution) {
+        def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+        utils.log("INFO"," ***** Started prepareUpdateAfterCreateSDNCResource *****",  isDebugEnabled)
+        ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
+        String operType = resourceInputObj.getOperationType()
+        String resourceCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid()
+        String ServiceInstanceId = resourceInputObj.getServiceInstanceId()
+        String modelName = resourceInputObj.getResourceModelInfo().getModelName()
+        String operationId = resourceInputObj.getOperationId()
+        String progress = "50"
+        String status = "processing"
+        String statusDescription = "Instantiate " + modelName
+
+        execution.getVariable("operationId")
+
+        String body = """
+                <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+                        xmlns:ns="http://org.openecomp.mso/requestsdb">
+                        <soapenv:Header/>
+                <soapenv:Body>
+                    <ns:updateResourceOperationStatus>
+                               <operType>${operType}</operType>
+                               <operationId>${operationId}</operationId>
+                               <progress>${progress}</progress>
+                               <resourceTemplateUUID>${resourceCustomizationUuid}</resourceTemplateUUID>
+                               <serviceId>${ServiceInstanceId}</serviceId>
+                               <status>${status}</status>
+                               <statusDescription>${statusDescription}</statusDescription>
+                    </ns:updateResourceOperationStatus>
+                </soapenv:Body>
+                </soapenv:Envelope>""";
+
+        setProgressUpdateVariables(execution, body)
+        utils.log("INFO"," ***** End prepareUpdateAfterCreateSDNCResource *****",  isDebugEnabled)
+    }
+
+    public void prepareUpdateAfterActivateSDNCResource(DelegateExecution execution) {
+        def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+        utils.log("INFO"," ***** Started prepareUpdateAfterActivateSDNCResource *****",  isDebugEnabled)
+        ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
+        String operType = resourceInputObj.getOperationType()
+        String resourceCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid()
+        String ServiceInstanceId = resourceInputObj.getServiceInstanceId()
+        String modelName = resourceInputObj.getResourceModelInfo().getModelName()
+        String operationId = resourceInputObj.getOperationId()
+        String progress = "100"
+        String status = "finished"
+        String statusDescription = "Instantiate " + modelName + " finished"
+
+        execution.getVariable("operationId")
+
+        String body = """
+                <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+                        xmlns:ns="http://org.openecomp.mso/requestsdb">
+                        <soapenv:Header/>
+                <soapenv:Body>
+                    <ns:updateResourceOperationStatus>
+                               <operType>${operType}</operType>
+                               <operationId>${operationId}</operationId>
+                               <progress>${progress}</progress>
+                               <resourceTemplateUUID>${resourceCustomizationUuid}</resourceTemplateUUID>
+                               <serviceId>${ServiceInstanceId}</serviceId>
+                               <status>${status}</status>
+                               <statusDescription>${statusDescription}</statusDescription>
+                    </ns:updateResourceOperationStatus>
+                </soapenv:Body>
+                </soapenv:Envelope>""";
+
+        setProgressUpdateVariables(execution, body)
+        utils.log("INFO"," ***** End prepareUpdateAfterActivateSDNCResource *****",  isDebugEnabled)
+    }
+    
+    public void postCreateSDNCCall(DelegateExecution execution){
+        def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+        utils.log("INFO"," ***** Started prepareSDNCRequest *****",  isDebugEnabled)
+        String responseCode = execution.getVariable(Prefix + "sdncCreateReturnCode")
+        String responseObj = execution.getVariable(Prefix + "SuccessIndicator")
+        
+        utils.log("INFO","response from sdnc, response code :" + responseCode + "  response object :" + responseObj,  isDebugEnabled)
+        utils.log("INFO"," ***** Exit prepareSDNCRequest *****",  isDebugEnabled)
+    }
+    
+	public void sendSyncResponse (DelegateExecution execution) {
+		def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+		utils.log("DEBUG", " *** sendSyncResponse *** ", isDebugEnabled)
+
+		try {
+			String operationStatus = "finished"
+			// RESTResponse for main flow
+			String resourceOperationResp = """{"operationStatus":"${operationStatus}"}""".trim()
+			utils.log("DEBUG", " sendSyncResponse to APIH:" + "\n" + resourceOperationResp, isDebugEnabled)
+			sendWorkflowResponse(execution, 202, resourceOperationResp)
+			execution.setVariable("sentSyncResponse", true)
+
+		} catch (Exception ex) {
+			String msg = "Exceptuion in sendSyncResponse:" + ex.getMessage()
+			utils.log("DEBUG", msg, isDebugEnabled)
+			exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+		}
+		utils.log("DEBUG"," ***** Exit sendSyncResopnse *****",  isDebugEnabled)
+	}
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/sdnc/CallbackHeader.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/sdnc/CallbackHeader.java
new file mode 100644
index 0000000..bf4c59c
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/sdnc/CallbackHeader.java
@@ -0,0 +1,139 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common.adapter.sdnc;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="RequestId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="ResponseCode" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="ResponseMessage" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "requestId",
+    "responseCode",
+    "responseMessage"
+}, namespace="http://org.onap/workflow/sdnc/adapter/schema/v1")
+@XmlRootElement(name = "CallbackHeader")
+public class CallbackHeader {
+
+    @XmlElement(name = "RequestId", required = true, namespace="http://org.onap/workflow/sdnc/adapter/schema/v1")
+    protected String requestId;
+    @XmlElement(name = "ResponseCode", required = true,namespace="http://org.onap/workflow/sdnc/adapter/schema/v1")
+    protected String responseCode;
+    @XmlElement(name = "ResponseMessage", required = true,namespace="http://org.onap/workflow/sdnc/adapter/schema/v1")
+    protected String responseMessage;
+
+    /**
+     * Gets the value of the requestId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getRequestId() {
+        return requestId;
+    }
+
+    /**
+     * Sets the value of the requestId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setRequestId(String value) {
+        this.requestId = value;
+    }
+
+    /**
+     * Gets the value of the responseCode property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getResponseCode() {
+        return responseCode;
+    }
+
+    /**
+     * Sets the value of the responseCode property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setResponseCode(String value) {
+        this.responseCode = value;
+    }
+
+    /**
+     * Gets the value of the responseMessage property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getResponseMessage() {
+        return responseMessage;
+    }
+
+    /**
+     * Sets the value of the responseMessage property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setResponseMessage(String value) {
+        this.responseMessage = value;
+    }
+
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/sdnc/ObjectFactory.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/sdnc/ObjectFactory.java
new file mode 100644
index 0000000..a72e23e
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/sdnc/ObjectFactory.java
@@ -0,0 +1,91 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common.adapter.sdnc;
+
+import javax.xml.bind.annotation.XmlRegistry;
+
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the org.openecomp.domain2.workflow.sdnc.adapter.schema.v1 package.
+ * <p>An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups.  Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+
+    /**
+     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.openecomp.domain2.workflow.sdnc.adapter.schema.v1
+     *
+     */
+    public ObjectFactory() {
+    }
+
+    /**
+     * Create an instance of {@link RequestHeader }
+     *
+     */
+    public RequestHeader createRequestHeader() {
+        return new RequestHeader();
+    }
+
+    /**
+     * Create an instance of {@link SDNCAdapterResponse }
+     *
+     */
+    public SDNCAdapterResponse createSDNCAdapterResponse() {
+        return new SDNCAdapterResponse();
+    }
+
+    /**
+     * Create an instance of {@link SDNCAdapterCallbackRequest }
+     *
+     */
+    public SDNCAdapterCallbackRequest createSDNCAdapterCallbackRequest() {
+        return new SDNCAdapterCallbackRequest();
+    }
+
+    /**
+     * Create an instance of {@link CallbackHeader }
+     *
+     */
+    public CallbackHeader createCallbackHeader() {
+        return new CallbackHeader();
+    }
+
+    /**
+     * Create an instance of {@link SDNCAdapterRequest }
+     *
+     */
+    public SDNCAdapterRequest createSDNCAdapterRequest() {
+        return new SDNCAdapterRequest();
+    }
+
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/sdnc/RequestHeader.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/sdnc/RequestHeader.java
new file mode 100644
index 0000000..2c56a11
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/sdnc/RequestHeader.java
@@ -0,0 +1,223 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common.adapter.sdnc;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="RequestId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="SvcInstanceId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="SvcAction" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="SvcOperation" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="CallbackUrl" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="MsoAction" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "requestId",
+    "svcInstanceId",
+    "svcAction",
+    "svcOperation",
+    "callbackUrl",
+    "msoAction"
+})
+@XmlRootElement(name = "RequestHeader")
+public class RequestHeader {
+
+    @XmlElement(name = "RequestId", required = true)
+    protected String requestId;
+    @XmlElement(name = "SvcInstanceId")
+    protected String svcInstanceId;
+    @XmlElement(name = "SvcAction", required = true)
+    protected String svcAction;
+    @XmlElement(name = "SvcOperation", required = true)
+    protected String svcOperation;
+    @XmlElement(name = "CallbackUrl", required = true)
+    protected String callbackUrl;
+    @XmlElement(name = "MsoAction")
+    protected String msoAction;
+
+    /**
+     * Gets the value of the requestId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getRequestId() {
+        return requestId;
+    }
+
+    /**
+     * Sets the value of the requestId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setRequestId(String value) {
+        this.requestId = value;
+    }
+
+    /**
+     * Gets the value of the svcInstanceId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getSvcInstanceId() {
+        return svcInstanceId;
+    }
+
+    /**
+     * Sets the value of the svcInstanceId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setSvcInstanceId(String value) {
+        this.svcInstanceId = value;
+    }
+
+    /**
+     * Gets the value of the svcAction property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getSvcAction() {
+        return svcAction;
+    }
+
+    /**
+     * Sets the value of the svcAction property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setSvcAction(String value) {
+        this.svcAction = value;
+    }
+
+    /**
+     * Gets the value of the svcOperation property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getSvcOperation() {
+        return svcOperation;
+    }
+
+    /**
+     * Sets the value of the svcOperation property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setSvcOperation(String value) {
+        this.svcOperation = value;
+    }
+
+    /**
+     * Gets the value of the callbackUrl property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getCallbackUrl() {
+        return callbackUrl;
+    }
+
+    /**
+     * Sets the value of the callbackUrl property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setCallbackUrl(String value) {
+        this.callbackUrl = value;
+    }
+
+    /**
+     * Gets the value of the msoAction property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getMsoAction() {
+        return msoAction;
+    }
+
+    /**
+     * Sets the value of the msoAction property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setMsoAction(String value) {
+        this.msoAction = value;
+    }
+
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/sdnc/SDNCAdapterCallbackRequest.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/sdnc/SDNCAdapterCallbackRequest.java
new file mode 100644
index 0000000..e772325
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/sdnc/SDNCAdapterCallbackRequest.java
@@ -0,0 +1,130 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common.adapter.sdnc;
+
+import java.io.StringWriter;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element ref="{http://org.onap/workflow/sdnc/adapter/schema/v1}CallbackHeader"/>
+ *         &lt;element name="RequestData" type="{http://www.w3.org/2001/XMLSchema}anyType" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", namespace="http://org.onap/workflow/sdnc/adapter/schema/v1", propOrder = {
+    "callbackHeader",
+    "requestData"
+})
+@XmlRootElement(name = "SDNCAdapterCallbackRequest", namespace="http://org.onap/workflow/sdnc/adapter/schema/v1")
+public class SDNCAdapterCallbackRequest {
+
+    @XmlElement(name = "CallbackHeader", required = true, namespace="http://org.onap/workflow/sdnc/adapter/schema/v1")
+    protected CallbackHeader callbackHeader;
+    @XmlElement(name = "RequestData", required=false, namespace="http://org.onap/workflow/sdnc/adapter/schema/v1")
+    protected Object requestData;
+
+    /**
+     * Gets the value of the callbackHeader property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link CallbackHeader }
+     *     
+     */
+    public CallbackHeader getCallbackHeader() {
+        return callbackHeader;
+    }
+
+    /**
+     * Sets the value of the callbackHeader property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link CallbackHeader }
+     *     
+     */
+    public void setCallbackHeader(CallbackHeader value) {
+        this.callbackHeader = value;
+    }
+
+    /**
+     * Gets the value of the requestData property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Object }
+     *     
+     */
+    public Object getRequestData() {
+        return requestData;
+    }
+
+    /**
+     * Sets the value of the requestData property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Object }
+     *     
+     */
+    public void setRequestData(Object value) {
+        this.requestData = value;
+    }
+
+    @Override
+	public String toString() {
+		StringWriter writer = new StringWriter();
+		try {
+			JAXBContext context = JAXBContext
+					.newInstance(SDNCAdapterCallbackRequest.class);
+			Marshaller m = context.createMarshaller();
+			m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
+			m.marshal(this, writer);
+			return writer.getBuffer().toString();
+		} catch (JAXBException e) {
+			return "";
+		}
+	}
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/sdnc/SDNCAdapterRequest.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/sdnc/SDNCAdapterRequest.java
new file mode 100644
index 0000000..179776d
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/sdnc/SDNCAdapterRequest.java
@@ -0,0 +1,111 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common.adapter.sdnc;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element ref="{http://org.onap/workflow/sdnc/adapter/schema/v1}RequestHeader"/>
+ *         &lt;element name="RequestData" type="{http://www.w3.org/2001/XMLSchema}anyType"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "requestHeader",
+    "requestData"
+})
+@XmlRootElement(name = "SDNCAdapterRequest")
+public class SDNCAdapterRequest {
+
+    @XmlElement(name = "RequestHeader", required = true)
+    protected RequestHeader requestHeader;
+    @XmlElement(name = "RequestData", required = true)
+    protected Object requestData;
+
+    /**
+     * Gets the value of the requestHeader property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link RequestHeader }
+     *     
+     */
+    public RequestHeader getRequestHeader() {
+        return requestHeader;
+    }
+
+    /**
+     * Sets the value of the requestHeader property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link RequestHeader }
+     *     
+     */
+    public void setRequestHeader(RequestHeader value) {
+        this.requestHeader = value;
+    }
+
+    /**
+     * Gets the value of the requestData property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Object }
+     *     
+     */
+    public Object getRequestData() {
+        return requestData;
+    }
+
+    /**
+     * Sets the value of the requestData property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Object }
+     *     
+     */
+    public void setRequestData(Object value) {
+        this.requestData = value;
+    }
+
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/sdnc/SDNCAdapterResponse.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/sdnc/SDNCAdapterResponse.java
new file mode 100644
index 0000000..3666cb5
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/sdnc/SDNCAdapterResponse.java
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common.adapter.sdnc;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "")
+@XmlRootElement(name = "SDNCAdapterResponse")
+public class SDNCAdapterResponse {
+
+
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/sdnc/SDNCCallbackAdapterPortType.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/sdnc/SDNCCallbackAdapterPortType.java
new file mode 100644
index 0000000..eff70f5
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/sdnc/SDNCCallbackAdapterPortType.java
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common.adapter.sdnc;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.2.4-b01
+ * Generated source version: 2.2
+ *
+ */
+@WebService(name = "SDNCCallbackAdapterPortType", targetNamespace = "http://org.onap/workflow/sdnc/adapter/callback/wsdl/v1")
+@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+public interface SDNCCallbackAdapterPortType {
+
+
+    /**
+     *
+     * @param sdncAdapterCallbackRequest
+     * @return
+     *     returns org.openecomp.domain2.workflow.sdnc.adapter.schema.v1.SDNCAdapterResponse
+     */
+    @WebMethod(operationName = "SDNCAdapterCallback")
+    @WebResult(name = "SDNCAdapterResponse", targetNamespace = "http://org.onap/workflow/sdnc/adapter/schema/v1", partName = "SDNCAdapterCallbackResponse")
+    public SDNCAdapterResponse sdncAdapterCallback(
+        @WebParam(name = "SDNCAdapterCallbackRequest", targetNamespace = "http://org.onap/workflow/sdnc/adapter/schema/v1", partName = "SDNCAdapterCallbackRequest")
+        SDNCAdapterCallbackRequest sdncAdapterCallbackRequest);
+
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/sdnc/package-info.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/sdnc/package-info.java
new file mode 100644
index 0000000..ec341d8
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/sdnc/package-info.java
@@ -0,0 +1,22 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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=========================================================
+ */
+
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://org.onap/workflow/sdnc/adapter/schema/v1", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package org.onap.so.bpmn.common.adapter.sdnc;
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/CreateVnfNotification.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/CreateVnfNotification.java
new file mode 100644
index 0000000..aa348c7
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/CreateVnfNotification.java
@@ -0,0 +1,462 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common.adapter.vnf;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for createVnfNotification complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="createVnfNotification">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="messageId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="completed" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ *         &lt;element name="exception" type="{http://org.onap.so/vnfNotify}msoExceptionCategory" minOccurs="0"/>
+ *         &lt;element name="errorMessage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="vnfId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="outputs" minOccurs="0">
+ *           &lt;complexType>
+ *             &lt;complexContent>
+ *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 &lt;sequence>
+ *                   &lt;element name="entry" maxOccurs="unbounded" minOccurs="0">
+ *                     &lt;complexType>
+ *                       &lt;complexContent>
+ *                         &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                           &lt;sequence>
+ *                             &lt;element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *                             &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *                           &lt;/sequence>
+ *                         &lt;/restriction>
+ *                       &lt;/complexContent>
+ *                     &lt;/complexType>
+ *                   &lt;/element>
+ *                 &lt;/sequence>
+ *               &lt;/restriction>
+ *             &lt;/complexContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *         &lt;element name="rollback" type="{http://org.onap.so/vnfNotify}vnfRollback" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "createVnfNotification1", propOrder = {
+    "messageId",
+    "completed",
+    "exception",
+    "errorMessage",
+    "vnfId",
+    "outputs",
+    "rollback"
+})
+public class CreateVnfNotification {
+
+    @XmlElement(required = true)
+    protected String messageId;
+    protected boolean completed;
+    protected MsoExceptionCategory exception;
+    protected String errorMessage;
+    protected String vnfId;
+    protected Outputs outputs;
+    protected VnfRollback rollback;
+
+    /**
+     * Gets the value of the messageId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getMessageId() {
+        return messageId;
+    }
+
+    /**
+     * Sets the value of the messageId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setMessageId(String value) {
+        this.messageId = value;
+    }
+
+    /**
+     * Gets the value of the completed property.
+     * 
+     */
+    public boolean isCompleted() {
+        return completed;
+    }
+
+    /**
+     * Sets the value of the completed property.
+     * 
+     */
+    public void setCompleted(boolean value) {
+        this.completed = value;
+    }
+
+    /**
+     * Gets the value of the exception property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link MsoExceptionCategory }
+     *     
+     */
+    public MsoExceptionCategory getException() {
+        return exception;
+    }
+
+    /**
+     * Sets the value of the exception property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link MsoExceptionCategory }
+     *     
+     */
+    public void setException(MsoExceptionCategory value) {
+        this.exception = value;
+    }
+
+    /**
+     * Gets the value of the errorMessage property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getErrorMessage() {
+        return errorMessage;
+    }
+
+    /**
+     * Sets the value of the errorMessage property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setErrorMessage(String value) {
+        this.errorMessage = value;
+    }
+
+    /**
+     * Gets the value of the vnfId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVnfId() {
+        return vnfId;
+    }
+
+    /**
+     * Sets the value of the vnfId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVnfId(String value) {
+        this.vnfId = value;
+    }
+
+    /**
+     * Gets the value of the outputs property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link CreateVnfNotification.Outputs }
+     *     
+     */
+    public CreateVnfNotification.Outputs getOutputs() {
+        return outputs;
+    }
+
+    /**
+     * Sets the value of the outputs property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link CreateVnfNotification.Outputs }
+     *     
+     */
+    public void setOutputs(CreateVnfNotification.Outputs value) {
+        this.outputs = value;
+    }
+
+    /**
+     * Gets the value of the rollback property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link VnfRollback }
+     *     
+     */
+    public VnfRollback getRollback() {
+        return rollback;
+    }
+
+    /**
+     * Sets the value of the rollback property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link VnfRollback }
+     *     
+     */
+    public void setRollback(VnfRollback value) {
+        this.rollback = value;
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence>
+     *         &lt;element name="entry" maxOccurs="unbounded" minOccurs="0">
+     *           &lt;complexType>
+     *             &lt;complexContent>
+     *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                 &lt;sequence>
+     *                   &lt;element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+     *                   &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+     *                 &lt;/sequence>
+     *               &lt;/restriction>
+     *             &lt;/complexContent>
+     *           &lt;/complexType>
+     *         &lt;/element>
+     *       &lt;/sequence>
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "entry"
+    })
+    public static class Outputs {
+
+        protected List<CreateVnfNotification.Outputs.Entry> entry;
+        
+        /**
+         * Gets the value of the entry property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the entry property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getEntry().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link CreateVnfNotification.Outputs.Entry }
+         * 
+         * 
+         */
+        public List<CreateVnfNotification.Outputs.Entry> getEntry() {
+            if (entry == null) {
+                entry = new ArrayList<>();
+            }
+            return this.entry;
+        }
+
+        // Not a generated method
+	@Override
+        public String toString() {
+        	StringBuilder out = new StringBuilder();
+        	out.append("<outputs>\n");
+        	if (entry != null) {
+        		for (Entry e : entry) {
+        			out.append(e.toString());
+        			out.append('\n');
+        		}
+        	}
+        	out.append("</outputs>");
+        	return out.toString();
+        }
+
+        /**
+         * <p>Java class for anonymous complex type.
+         * 
+         * <p>The following schema fragment specifies the expected content contained within this class.
+         * 
+         * <pre>
+         * &lt;complexType>
+         *   &lt;complexContent>
+         *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *       &lt;sequence>
+         *         &lt;element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+         *         &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+         *       &lt;/sequence>
+         *     &lt;/restriction>
+         *   &lt;/complexContent>
+         * &lt;/complexType>
+         * </pre>
+         * 
+         * 
+         */
+        @XmlAccessorType(XmlAccessType.FIELD)
+        @XmlType(name = "", propOrder = {
+            "key",
+            "value"
+        })
+        public static class Entry {
+
+            protected String key;
+            protected String value;
+
+            /**
+             * Gets the value of the key property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link String }
+             *     
+             */
+            public String getKey() {
+                return key;
+            }
+
+            /**
+             * Sets the value of the key property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link String }
+             *     
+             */
+            public void setKey(String value) {
+                this.key = value;
+            }
+
+            /**
+             * Gets the value of the value property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link String }
+             *     
+             */
+            public String getValue() {
+                return value;
+            }
+
+            /**
+             * Sets the value of the value property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link String }
+             *     
+             */
+            public void setValue(String value) {
+                this.value = value;
+                
+            }
+            
+            // Not a generated method
+            @Override
+            public String toString() {
+            	String entrystr;
+            		entrystr =
+               "<entry>"+ '\n' +
+    	       "   <key>"+key+"</key>" + '\n' +
+    	       "   <value>"+value+"</value>" + '\n' +
+    	       "</entry>";
+            	return entrystr;
+            }
+
+        }
+
+    }
+
+	// Not a generated method
+	@Override
+	public String toString() {
+    	String createVnfNotification;
+    	if (exception==null) {
+    		createVnfNotification = "<ns2:createVnfNotification xmlns:ns2=\"http://org.onap.so/vnfNotify\"" + '\n' +
+    				       "  xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
+    				       "   <messageId>"+messageId+"</messageId>" + '\n' +
+    				       "   <completed>"+completed+"</completed>" + '\n' +
+    				       "   <vnfId>"+vnfId+"</vnfId>" + '\n' +
+    				       (outputs == null ? "" : outputs.toString() + '\n') +
+    				       "   <rollback>"+rollback+"</rollback>" + '\n' +
+    				       "</ns2:createVnfNotification>";
+    	} else {
+    		createVnfNotification = "<ns2:createVnfNotification xmlns:ns2=\"http://org.onap.so/vnfNotify\"" + '\n' +
+				       "  xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
+				       "   <messageId>"+messageId+"</messageId>" + '\n' +
+				       "   <completed>"+completed+"</completed>" + '\n' +
+    				       (outputs == null ? "" : outputs.toString() + '\n') +
+    				   "   <exception>"+exception+"</exception>" + '\n' +
+    				   "   <errorMessage>"+errorMessage+"</errorMessage>" + '\n' +
+				       "</ns2:createVnfNotification>";
+    	}
+    	return createVnfNotification;
+   	}    
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/DeleteVnfNotification.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/DeleteVnfNotification.java
new file mode 100644
index 0000000..3ad2173
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/DeleteVnfNotification.java
@@ -0,0 +1,198 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common.adapter.vnf;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for deleteVnfNotification complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="deleteVnfNotification">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="messageId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="completed" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ *         &lt;element name="exception" type="{http://org.onap.so/vnfNotify}msoExceptionCategory" minOccurs="0"/>
+ *         &lt;element name="errorMessage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "deleteVnfNotification1", propOrder = {
+    "messageId",
+    "completed",
+    "exception",
+    "errorMessage"
+})
+public class DeleteVnfNotification {
+
+    @XmlElement(required = true)
+    protected String messageId;
+    protected boolean completed;
+    protected MsoExceptionCategory exception;
+    protected String errorMessage;
+
+    /**
+     * Gets the value of the messageId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getMessageId() {
+        return messageId;
+    }
+
+    /**
+     * Sets the value of the messageId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setMessageId(String value) {
+        this.messageId = value;
+    }
+
+    /**
+     * Gets the value of the completed property.
+     * 
+     */
+    public boolean isCompleted() {
+        return completed;
+    }
+
+    /**
+     * Sets the value of the completed property.
+     * 
+     */
+    public void setCompleted(boolean value) {
+        this.completed = value;
+    }
+
+    /**
+     * Gets the value of the exception property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link MsoExceptionCategory }
+     *     
+     */
+    public MsoExceptionCategory getException() {
+        return exception;
+    }
+
+    /**
+     * Sets the value of the exception property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link MsoExceptionCategory }
+     *     
+     */
+    public void setException(MsoExceptionCategory value) {
+        this.exception = value;
+    }
+
+    /**
+     * Gets the value of the errorMessage property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getErrorMessage() {
+        return errorMessage;
+    }
+
+    /**
+     * Sets the value of the errorMessage property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setErrorMessage(String value) {
+        this.errorMessage = value;
+    }
+
+    /**
+     * Overrides toString() method 
+     * @return String type (deleteVnfNotification)
+     */
+ 
+    @Override
+	public String toString() {
+    	String deleteVnfNotification;
+    	if (exception == null) {
+    		deleteVnfNotification = "<ns2:deleteVnfNotification xmlns:ns2=\"http://org.onap.so/vnfNotify\"" + '\n' +
+    				       "  xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
+    				       "   <messageId>"+messageId+"</messageId>" + '\n' +
+    				       "   <completed>"+completed+"</completed>" + '\n' +
+    				       "</ns2:deleteVnfNotification>";
+    	} else {
+    		deleteVnfNotification = "<ns2:deleteVnfNotification xmlns:ns2=\"http://org.onap.so/vnfNotify\"" + '\n' +
+				       "  xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
+				       "   <messageId>"+messageId+"</messageId>" + '\n' +
+				       "   <completed>"+completed+"</completed>" + '\n' +
+    				   "   <exception>"+exception+"</exception>" + '\n' +
+    				   "   <errorMessage>"+errorMessage+"</errorMessage>" + '\n' +
+				       "</ns2:deleteVnfNotification>";
+    	}
+    	return deleteVnfNotification;
+   	}    
+
+/*	
+	public String toString() {
+		StringWriter writer = new StringWriter();
+		try {
+			JAXBContext context = JAXBContext
+					.newInstance(DeleteVnfNotification.class);
+			Marshaller m = context.createMarshaller();
+			m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
+			m.marshal(this, writer);
+			//System.out.println("toString() - " + writer.getBuffer().toString());			
+			return writer.getBuffer().toString();
+		} catch (JAXBException e) {
+			//System.out.println("JAXBException - " + e.getStackTrace());			
+			return "";
+		}
+	}    
+*/	
+	
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/MsoExceptionCategory.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/MsoExceptionCategory.java
new file mode 100644
index 0000000..e4c95e8
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/MsoExceptionCategory.java
@@ -0,0 +1,61 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common.adapter.vnf;
+
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for msoExceptionCategory.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p>
+ * <pre>
+ * &lt;simpleType name="msoExceptionCategory">
+ *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     &lt;enumeration value="OPENSTACK"/>
+ *     &lt;enumeration value="IO"/>
+ *     &lt;enumeration value="INTERNAL"/>
+ *     &lt;enumeration value="USERDATA"/>
+ *   &lt;/restriction>
+ * &lt;/simpleType>
+ * </pre>
+ * 
+ */
+@XmlType(name = "msoExceptionCategory")
+@XmlEnum
+public enum MsoExceptionCategory {
+
+    OPENSTACK,
+    IO,
+    INTERNAL,
+    USERDATA;
+
+    public String value() {
+        return name();
+    }
+
+    public static MsoExceptionCategory fromValue(String v) {
+        return valueOf(v);
+    }
+
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/MsoRequest.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/MsoRequest.java
new file mode 100644
index 0000000..6830109
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/MsoRequest.java
@@ -0,0 +1,112 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common.adapter.vnf;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for msoRequest complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="msoRequest">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="requestId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="serviceInstanceId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "msoRequest", propOrder = {
+    "requestId",
+    "serviceInstanceId"
+})
+public class MsoRequest {
+
+    protected String requestId;
+    protected String serviceInstanceId;
+
+    /**
+     * Gets the value of the requestId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getRequestId() {
+        return requestId;
+    }
+
+    /**
+     * Sets the value of the requestId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setRequestId(String value) {
+        this.requestId = value;
+    }
+
+    /**
+     * Gets the value of the serviceInstanceId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getServiceInstanceId() {
+        return serviceInstanceId;
+    }
+
+    /**
+     * Sets the value of the serviceInstanceId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setServiceInstanceId(String value) {
+        this.serviceInstanceId = value;
+    }
+
+    @Override
+    public String toString() {
+        return "<requestId>" + requestId + "</requestId>" + '\n' + "<serviceInstanceId>" + serviceInstanceId
+            + "</serviceInstanceId>";
+    }
+
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/ObjectFactory.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/ObjectFactory.java
new file mode 100644
index 0000000..21bd08f
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/ObjectFactory.java
@@ -0,0 +1,208 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common.adapter.vnf;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each 
+ * Java content interface and Java element interface 
+ * generated in the org.onap.so.adapters.vnf.async.client package. 
+ * <p>An ObjectFactory allows you to programatically 
+ * construct new instances of the Java representation 
+ * for XML content. The Java representation of XML 
+ * content can consist of schema derived interfaces 
+ * and classes representing the binding of schema 
+ * type definitions, element declarations and model 
+ * groups.  Factory methods for each of these are 
+ * provided in this class.
+ * 
+ */
+@XmlRegistry
+public class ObjectFactory {
+	private static final String VNF_NOTIFY = "http://org.onap.so/vnfNotify";
+    private static final QName _RollbackVnfNotification_QNAME = new QName(VNF_NOTIFY, "rollbackVnfNotification");
+    private static final QName _DeleteVnfNotification_QNAME = new QName(VNF_NOTIFY, "deleteVnfNotification");
+    private static final QName _CreateVnfNotification_QNAME = new QName(VNF_NOTIFY, "createVnfNotification");
+    private static final QName _UpdateVnfNotification_QNAME = new QName(VNF_NOTIFY, "updateVnfNotification");
+    private static final QName _QueryVnfNotification_QNAME = new QName(VNF_NOTIFY, "queryVnfNotification");
+
+    /**
+     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.onap.so.adapters.vnf.async.client
+     * 
+     */
+    public ObjectFactory() {
+    }
+
+    /**
+     * Create an instance of {@link UpdateVnfNotification }
+     * 
+     */
+    public UpdateVnfNotification createUpdateVnfNotification() {
+        return new UpdateVnfNotification();
+    }
+
+    /**
+     * Create an instance of {@link UpdateVnfNotification.Outputs }
+     * 
+     */
+    public UpdateVnfNotification.Outputs createUpdateVnfNotificationOutputs() {
+        return new UpdateVnfNotification.Outputs();
+    }
+
+    /**
+     * Create an instance of {@link QueryVnfNotification }
+     * 
+     */
+    public QueryVnfNotification createQueryVnfNotification() {
+        return new QueryVnfNotification();
+    }
+
+    /**
+     * Create an instance of {@link QueryVnfNotification.Outputs }
+     * 
+     */
+    public QueryVnfNotification.Outputs createQueryVnfNotificationOutputs() {
+        return new QueryVnfNotification.Outputs();
+    }
+
+    /**
+     * Create an instance of {@link CreateVnfNotification }
+     * 
+     */
+    public CreateVnfNotification createCreateVnfNotification() {
+        return new CreateVnfNotification();
+    }
+
+    /**
+     * Create an instance of {@link CreateVnfNotification.Outputs }
+     * 
+     */
+    public CreateVnfNotification.Outputs createCreateVnfNotificationOutputs() {
+        return new CreateVnfNotification.Outputs();
+    }
+
+    /**
+     * Create an instance of {@link DeleteVnfNotification }
+     * 
+     */
+    public DeleteVnfNotification createDeleteVnfNotification() {
+        return new DeleteVnfNotification();
+    }
+
+    /**
+     * Create an instance of {@link RollbackVnfNotification }
+     * 
+     */
+    public RollbackVnfNotification createRollbackVnfNotification() {
+        return new RollbackVnfNotification();
+    }
+
+    /**
+     * Create an instance of {@link MsoRequest }
+     * 
+     */
+    public MsoRequest createMsoRequest() {
+        return new MsoRequest();
+    }
+
+    /**
+     * Create an instance of {@link VnfRollback }
+     * 
+     */
+    public VnfRollback createVnfRollback() {
+        return new VnfRollback();
+    }
+
+    /**
+     * Create an instance of {@link UpdateVnfNotification.Outputs.Entry }
+     * 
+     */
+    public UpdateVnfNotification.Outputs.Entry createUpdateVnfNotificationOutputsEntry() {
+        return new UpdateVnfNotification.Outputs.Entry();
+    }
+
+    /**
+     * Create an instance of {@link QueryVnfNotification.Outputs.Entry }
+     * 
+     */
+    public QueryVnfNotification.Outputs.Entry createQueryVnfNotificationOutputsEntry() {
+        return new QueryVnfNotification.Outputs.Entry();
+    }
+
+    /**
+     * Create an instance of {@link CreateVnfNotification.Outputs.Entry }
+     * 
+     */
+    public CreateVnfNotification.Outputs.Entry createCreateVnfNotificationOutputsEntry() {
+        return new CreateVnfNotification.Outputs.Entry();
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link RollbackVnfNotification }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://org.onap.so/vnfNotify", name = "rollbackVnfNotification")
+    public JAXBElement<RollbackVnfNotification> createRollbackVnfNotification(RollbackVnfNotification value) {
+        return new JAXBElement<>(_RollbackVnfNotification_QNAME, RollbackVnfNotification.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link DeleteVnfNotification }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://org.onap.so/vnfNotify", name = "deleteVnfNotification")
+    public JAXBElement<DeleteVnfNotification> createDeleteVnfNotification(DeleteVnfNotification value) {
+        return new JAXBElement<>(_DeleteVnfNotification_QNAME, DeleteVnfNotification.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link CreateVnfNotification }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://org.onap.so/vnfNotify", name = "createVnfNotification")
+    public JAXBElement<CreateVnfNotification> createCreateVnfNotification(CreateVnfNotification value) {
+        return new JAXBElement<>(_CreateVnfNotification_QNAME, CreateVnfNotification.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link UpdateVnfNotification }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://org.onap.so/vnfNotify", name = "updateVnfNotification")
+    public JAXBElement<UpdateVnfNotification> createUpdateVnfNotification(UpdateVnfNotification value) {
+        return new JAXBElement<>(_UpdateVnfNotification_QNAME, UpdateVnfNotification.class, null, value);
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link QueryVnfNotification }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "http://org.onap.so/vnfNotify", name = "queryVnfNotification")
+    public JAXBElement<QueryVnfNotification> createQueryVnfNotification(QueryVnfNotification value) {
+        return new JAXBElement<>(_QueryVnfNotification_QNAME, QueryVnfNotification.class, null, value);
+    }
+
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/QueryVnfNotification.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/QueryVnfNotification.java
new file mode 100644
index 0000000..e7496b8
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/QueryVnfNotification.java
@@ -0,0 +1,488 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common.adapter.vnf;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for queryVnfNotification complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="queryVnfNotification">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="messageId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="completed" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ *         &lt;element name="exception" type="{http://org.onap.so/vnfNotify}msoExceptionCategory" minOccurs="0"/>
+ *         &lt;element name="errorMessage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="vnfExists" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
+ *         &lt;element name="vnfId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="status" type="{http://org.onap.so/vnfNotify}vnfStatus" minOccurs="0"/>
+ *         &lt;element name="outputs" minOccurs="0">
+ *           &lt;complexType>
+ *             &lt;complexContent>
+ *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 &lt;sequence>
+ *                   &lt;element name="entry" maxOccurs="unbounded" minOccurs="0">
+ *                     &lt;complexType>
+ *                       &lt;complexContent>
+ *                         &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                           &lt;sequence>
+ *                             &lt;element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *                             &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *                           &lt;/sequence>
+ *                         &lt;/restriction>
+ *                       &lt;/complexContent>
+ *                     &lt;/complexType>
+ *                   &lt;/element>
+ *                 &lt;/sequence>
+ *               &lt;/restriction>
+ *             &lt;/complexContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "queryVnfNotification1", propOrder = {
+    "messageId",
+    "completed",
+    "exception",
+    "errorMessage",
+    "vnfExists",
+    "vnfId",
+    "status",
+    "outputs"
+})
+public class QueryVnfNotification {
+
+    @XmlElement(required = true)
+    protected String messageId;
+    protected boolean completed;
+    protected MsoExceptionCategory exception;
+    protected String errorMessage;
+    protected Boolean vnfExists;
+    protected String vnfId;
+    protected VnfStatus status;
+    protected QueryVnfNotification.Outputs outputs;
+
+    /**
+     * Gets the value of the messageId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getMessageId() {
+        return messageId;
+    }
+
+    /**
+     * Sets the value of the messageId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setMessageId(String value) {
+        this.messageId = value;
+    }
+
+    /**
+     * Gets the value of the completed property.
+     * 
+     */
+    public boolean isCompleted() {
+        return completed;
+    }
+
+    /**
+     * Sets the value of the completed property.
+     * 
+     */
+    public void setCompleted(boolean value) {
+        this.completed = value;
+    }
+
+    /**
+     * Gets the value of the exception property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link MsoExceptionCategory }
+     *     
+     */
+    public MsoExceptionCategory getException() {
+        return exception;
+    }
+
+    /**
+     * Sets the value of the exception property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link MsoExceptionCategory }
+     *     
+     */
+    public void setException(MsoExceptionCategory value) {
+        this.exception = value;
+    }
+
+    /**
+     * Gets the value of the errorMessage property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getErrorMessage() {
+        return errorMessage;
+    }
+
+    /**
+     * Sets the value of the errorMessage property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setErrorMessage(String value) {
+        this.errorMessage = value;
+    }
+
+    /**
+     * Gets the value of the vnfExists property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Boolean }
+     *     
+     */
+    public Boolean isVnfExists() {
+        return vnfExists;
+    }
+
+    /**
+     * Sets the value of the vnfExists property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Boolean }
+     *     
+     */
+    public void setVnfExists(Boolean value) {
+        this.vnfExists = value;
+    }
+
+    /**
+     * Gets the value of the vnfId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVnfId() {
+        return vnfId;
+    }
+
+    /**
+     * Sets the value of the vnfId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVnfId(String value) {
+        this.vnfId = value;
+    }
+
+    /**
+     * Gets the value of the status property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link VnfStatus }
+     *     
+     */
+    public VnfStatus getStatus() {
+        return status;
+    }
+
+    /**
+     * Sets the value of the status property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link VnfStatus }
+     *     
+     */
+    public void setStatus(VnfStatus value) {
+        this.status = value;
+    }
+
+    /**
+     * Gets the value of the outputs property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link QueryVnfNotification.Outputs }
+     *     
+     */
+    public QueryVnfNotification.Outputs getOutputs() {
+        return outputs;
+    }
+
+    /**
+     * Sets the value of the outputs property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link QueryVnfNotification.Outputs }
+     *     
+     */
+    public void setOutputs(QueryVnfNotification.Outputs value) {
+        this.outputs = value;
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     * 
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     * 
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence>
+     *         &lt;element name="entry" maxOccurs="unbounded" minOccurs="0">
+     *           &lt;complexType>
+     *             &lt;complexContent>
+     *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                 &lt;sequence>
+     *                   &lt;element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+     *                   &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+     *                 &lt;/sequence>
+     *               &lt;/restriction>
+     *             &lt;/complexContent>
+     *           &lt;/complexType>
+     *         &lt;/element>
+     *       &lt;/sequence>
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     * 
+     * 
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "entry"
+    })
+    public static class Outputs {
+
+        protected List<QueryVnfNotification.Outputs.Entry> entry;
+
+        /**
+         * Gets the value of the entry property.
+         * 
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the entry property.
+         * 
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getEntry().add(newItem);
+         * </pre>
+         * 
+         * 
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link QueryVnfNotification.Outputs.Entry }
+         * 
+         * 
+         */
+        public List<QueryVnfNotification.Outputs.Entry> getEntry() {
+            if (entry == null) {
+                entry = new ArrayList<>();
+            }
+            return this.entry;
+        }
+        
+        // Not a generated method
+        public String toString() {
+        	StringBuilder out = new StringBuilder();
+        	out.append("<outputs>\n");
+        	if (entry != null) {
+        		for (Entry e : entry) {
+        			out.append(e.toString());
+        			out.append('\n');
+        		}
+        	}
+        	out.append("</outputs>");
+        	return out.toString();
+        }
+
+
+        /**
+         * <p>Java class for anonymous complex type.
+         * 
+         * <p>The following schema fragment specifies the expected content contained within this class.
+         * 
+         * <pre>
+         * &lt;complexType>
+         *   &lt;complexContent>
+         *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *       &lt;sequence>
+         *         &lt;element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+         *         &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+         *       &lt;/sequence>
+         *     &lt;/restriction>
+         *   &lt;/complexContent>
+         * &lt;/complexType>
+         * </pre>
+         * 
+         * 
+         */
+        @XmlAccessorType(XmlAccessType.FIELD)
+        @XmlType(name = "", propOrder = {
+            "key",
+            "value"
+        })
+        public static class Entry {
+
+            protected String key;
+            protected String value;
+
+            /**
+             * Gets the value of the key property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link String }
+             *     
+             */
+            public String getKey() {
+                return key;
+            }
+
+            /**
+             * Sets the value of the key property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link String }
+             *     
+             */
+            public void setKey(String value) {
+                this.key = value;
+            }
+
+            /**
+             * Gets the value of the value property.
+             * 
+             * @return
+             *     possible object is
+             *     {@link String }
+             *     
+             */
+            public String getValue() {
+                return value;
+            }
+
+            /**
+             * Sets the value of the value property.
+             * 
+             * @param value
+             *     allowed object is
+             *     {@link String }
+             *     
+             */
+            public void setValue(String value) {
+                this.value = value;
+            }
+            
+            // Not a generated method
+            public String toString() {
+            	String entry = "";
+            		entry =
+               "<entry>"+ '\n' +
+    	       "   <key>"+key+"</key>" + '\n' +
+    	       "   <value>"+value+"</value>" + '\n' +
+    	       "</entry>";
+            	return entry; 
+            }
+
+        }
+
+    }
+    
+ // Not a generated method
+ 	public String toString() {
+     	String queryVnfNotification = "";
+     	if (exception==null) {
+     		queryVnfNotification = "<ns2:queryVnfNotification xmlns:ns2=\"http://org.onap.so/vnfNotify\"" + '\n' +
+     				       "  xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
+     				       "   <messageId>"+messageId+"</messageId>" + '\n' +
+     				       "   <completed>"+completed+"</completed>" + '\n' +
+     				       "   <vnfExists>"+vnfExists+"</vnfExists>" + '\n' +
+     				       "   <vnfId>"+vnfId+"</vnfId>" + '\n' +
+     				       "   <status>"+status+"</status>" + '\n' +
+     				       (outputs == null ? "" : outputs.toString() + '\n') +     				      
+     				       "</ns2:queryVnfNotification>";
+     	} else {
+     		queryVnfNotification = "<ns2:queryVnfNotification xmlns:ns2=\"http://org.onap.so/vnfNotify\"" + '\n' +
+ 				       "  xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
+ 				       "   <messageId>"+messageId+"</messageId>" + '\n' +
+ 				       "   <completed>"+completed+"</completed>" + '\n' +
+     				       (outputs == null ? "" : outputs.toString() + '\n') +
+     				   "   <exception>"+exception+"</exception>" + '\n' +
+     				   "   <errorMessage>"+errorMessage+"</errorMessage>" + '\n' +
+ 				       "</ns2:queryVnfNotification>";
+     	}
+     	return queryVnfNotification;
+    	}    
+
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/RollbackVnfNotification.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/RollbackVnfNotification.java
new file mode 100644
index 0000000..6b143a2
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/RollbackVnfNotification.java
@@ -0,0 +1,175 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common.adapter.vnf;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for rollbackVnfNotification complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="rollbackVnfNotification">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="messageId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="completed" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ *         &lt;element name="exception" type="{http://org.onap.so/vnfNotify}msoExceptionCategory" minOccurs="0"/>
+ *         &lt;element name="errorMessage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "rollbackVnfNotification1", propOrder = {
+    "messageId",
+    "completed",
+    "exception",
+    "errorMessage"
+})
+public class RollbackVnfNotification {
+
+    @XmlElement(required = true)
+    protected String messageId;
+    protected boolean completed;
+    protected MsoExceptionCategory exception;
+    protected String errorMessage;
+
+    /**
+     * Gets the value of the messageId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getMessageId() {
+        return messageId;
+    }
+
+    /**
+     * Sets the value of the messageId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setMessageId(String value) {
+        this.messageId = value;
+    }
+
+    /**
+     * Gets the value of the completed property.
+     * 
+     */
+    public boolean isCompleted() {
+        return completed;
+    }
+
+    /**
+     * Sets the value of the completed property.
+     * 
+     */
+    public void setCompleted(boolean value) {
+        this.completed = value;
+    }
+
+    /**
+     * Gets the value of the exception property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link MsoExceptionCategory }
+     *     
+     */
+    public MsoExceptionCategory getException() {
+        return exception;
+    }
+
+    /**
+     * Sets the value of the exception property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link MsoExceptionCategory }
+     *     
+     */
+    public void setException(MsoExceptionCategory value) {
+        this.exception = value;
+    }
+
+    /**
+     * Gets the value of the errorMessage property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getErrorMessage() {
+        return errorMessage;
+    }
+
+    /**
+     * Sets the value of the errorMessage property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setErrorMessage(String value) {
+        this.errorMessage = value;
+    }
+    
+    public String toString() {
+    	String rollbackVnfNotification = "";
+    	if (exception==null) {
+    		rollbackVnfNotification = "<ns2:rollbackVnfNotification xmlns:ns2=\"http://org.onap.so/vnfNotify\"" + '\n' +
+    				       "  xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
+    				       "   <messageId>"+messageId+"</messageId>" + '\n' +
+    				       "   <completed>"+completed+"</completed>" + '\n' +
+    				       "</ns2:rollbackVnfNotification>";
+    	} else {
+    		rollbackVnfNotification = "<ns2:rollbackVnfNotification xmlns:ns2=\"http://org.onap.so/vnfNotify\"" + '\n' +
+				       "  xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
+				       "   <messageId>"+messageId+"</messageId>" + '\n' +
+				       "   <completed>"+completed+"</completed>" + '\n' +
+    				   "   <exception>"+exception+"</exception>" + '\n' +
+    				   "   <errorMessage>"+errorMessage+"</errorMessage>" + '\n' +
+				       "</ns2:rollbackVnfNotification>";
+    	}
+    	return rollbackVnfNotification;
+
+    }
+    
+ }
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/UpdateVnfNotification.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/UpdateVnfNotification.java
new file mode 100644
index 0000000..b89135b
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/UpdateVnfNotification.java
@@ -0,0 +1,412 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common.adapter.vnf;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for updateVnfNotification complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="updateVnfNotification">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="messageId" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="completed" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ *         &lt;element name="exception" type="{http://org.onap.so/vnfNotify}msoExceptionCategory" minOccurs="0"/>
+ *         &lt;element name="errorMessage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="outputs" minOccurs="0">
+ *           &lt;complexType>
+ *             &lt;complexContent>
+ *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 &lt;sequence>
+ *                   &lt;element name="entry" maxOccurs="unbounded" minOccurs="0">
+ *                     &lt;complexType>
+ *                       &lt;complexContent>
+ *                         &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                           &lt;sequence>
+ *                             &lt;element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *                             &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *                           &lt;/sequence>
+ *                         &lt;/restriction>
+ *                       &lt;/complexContent>
+ *                     &lt;/complexType>
+ *                   &lt;/element>
+ *                 &lt;/sequence>
+ *               &lt;/restriction>
+ *             &lt;/complexContent>
+ *           &lt;/complexType>
+ *         &lt;/element>
+ *         &lt;element name="rollback" type="{http://org.onap.so/vnfNotify}vnfRollback" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "updateVnfNotification1", propOrder = {
+    "messageId",
+    "completed",
+    "exception",
+    "errorMessage",
+    "outputs",
+    "rollback"
+})
+public class UpdateVnfNotification {
+
+    @XmlElement(required = true)
+    protected String messageId;
+    protected boolean completed;
+    protected MsoExceptionCategory exception;
+    protected String errorMessage;
+    protected UpdateVnfNotification.Outputs outputs;
+    protected VnfRollback rollback;
+
+    /**
+     * Gets the value of the messageId property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getMessageId() {
+        return messageId;
+    }
+
+    /**
+     * Sets the value of the messageId property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setMessageId(String value) {
+        this.messageId = value;
+    }
+
+    /**
+     * Gets the value of the completed property.
+     *
+     */
+    public boolean isCompleted() {
+        return completed;
+    }
+
+    /**
+     * Sets the value of the completed property.
+     *
+     */
+    public void setCompleted(boolean value) {
+        this.completed = value;
+    }
+
+    /**
+     * Gets the value of the exception property.
+     *
+     * @return
+     *     possible object is
+     *     {@link MsoExceptionCategory }
+     *
+     */
+    public MsoExceptionCategory getException() {
+        return exception;
+    }
+
+    /**
+     * Sets the value of the exception property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link MsoExceptionCategory }
+     *
+     */
+    public void setException(MsoExceptionCategory value) {
+        this.exception = value;
+    }
+
+    /**
+     * Gets the value of the errorMessage property.
+     *
+     * @return
+     *     possible object is
+     *     {@link String }
+     *
+     */
+    public String getErrorMessage() {
+        return errorMessage;
+    }
+
+    /**
+     * Sets the value of the errorMessage property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *
+     */
+    public void setErrorMessage(String value) {
+        this.errorMessage = value;
+    }
+
+    /**
+     * Gets the value of the outputs property.
+     *
+     * @return
+     *     possible object is
+     *     {@link UpdateVnfNotification.Outputs }
+     *
+     */
+    public UpdateVnfNotification.Outputs getOutputs() {
+        return outputs;
+    }
+
+    /**
+     * Sets the value of the outputs property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link UpdateVnfNotification.Outputs }
+     *
+     */
+    public void setOutputs(UpdateVnfNotification.Outputs value) {
+        this.outputs = value;
+    }
+
+    /**
+     * Gets the value of the rollback property.
+     *
+     * @return
+     *     possible object is
+     *     {@link VnfRollback }
+     *
+     */
+    public VnfRollback getRollback() {
+        return rollback;
+    }
+
+    /**
+     * Sets the value of the rollback property.
+     *
+     * @param value
+     *     allowed object is
+     *     {@link VnfRollback }
+     *
+     */
+    public void setRollback(VnfRollback value) {
+        this.rollback = value;
+    }
+
+
+    /**
+     * <p>Java class for anonymous complex type.
+     *
+     * <p>The following schema fragment specifies the expected content contained within this class.
+     *
+     * <pre>
+     * &lt;complexType>
+     *   &lt;complexContent>
+     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       &lt;sequence>
+     *         &lt;element name="entry" maxOccurs="unbounded" minOccurs="0">
+     *           &lt;complexType>
+     *             &lt;complexContent>
+     *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *                 &lt;sequence>
+     *                   &lt;element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+     *                   &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+     *                 &lt;/sequence>
+     *               &lt;/restriction>
+     *             &lt;/complexContent>
+     *           &lt;/complexType>
+     *         &lt;/element>
+     *       &lt;/sequence>
+     *     &lt;/restriction>
+     *   &lt;/complexContent>
+     * &lt;/complexType>
+     * </pre>
+     *
+     *
+     */
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "", propOrder = {
+        "entry"
+    })
+    public static class Outputs {
+
+        protected List<UpdateVnfNotification.Outputs.Entry> entry;
+
+        /**
+         * Gets the value of the entry property.
+         *
+         * <p>
+         * This accessor method returns a reference to the live list,
+         * not a snapshot. Therefore any modification you make to the
+         * returned list will be present inside the JAXB object.
+         * This is why there is not a <CODE>set</CODE> method for the entry property.
+         *
+         * <p>
+         * For example, to add a new item, do as follows:
+         * <pre>
+         *    getEntry().add(newItem);
+         * </pre>
+         *
+         *
+         * <p>
+         * Objects of the following type(s) are allowed in the list
+         * {@link UpdateVnfNotification.Outputs.Entry }
+         *
+         *
+         */
+        public List<UpdateVnfNotification.Outputs.Entry> getEntry() {
+            if (entry == null) {
+                entry = new ArrayList<>();
+            }
+            return this.entry;
+        }
+
+
+        /**
+         * <p>Java class for anonymous complex type.
+         *
+         * <p>The following schema fragment specifies the expected content contained within this class.
+         *
+         * <pre>
+         * &lt;complexType>
+         *   &lt;complexContent>
+         *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+         *       &lt;sequence>
+         *         &lt;element name="key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+         *         &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+         *       &lt;/sequence>
+         *     &lt;/restriction>
+         *   &lt;/complexContent>
+         * &lt;/complexType>
+         * </pre>
+         *
+         *
+         */
+        @XmlAccessorType(XmlAccessType.FIELD)
+        @XmlType(name = "", propOrder = {
+            "key",
+            "value"
+        })
+        public static class Entry {
+
+            protected String key;
+            protected String value;
+
+            /**
+             * Gets the value of the key property.
+             *
+             * @return
+             *     possible object is
+             *     {@link String }
+             *
+             */
+            public String getKey() {
+                return key;
+            }
+
+            /**
+             * Sets the value of the key property.
+             *
+             * @param value
+             *     allowed object is
+             *     {@link String }
+             *
+             */
+            public void setKey(String value) {
+                this.key = value;
+            }
+
+            /**
+             * Gets the value of the value property.
+             *
+             * @return
+             *     possible object is
+             *     {@link String }
+             *
+             */
+            public String getValue() {
+                return value;
+            }
+
+            /**
+             * Sets the value of the value property.
+             *
+             * @param value
+             *     allowed object is
+             *     {@link String }
+             *
+             */
+            public void setValue(String value) {
+                this.value = value;
+            }
+
+            public String toString() {
+            	String entry = "";
+            		entry =
+    	       "   <key>"+key+"</key>" + '\n' +
+    	       "   <value>"+value+"</value>";
+            	return entry;
+            }
+        }
+
+    }
+
+    public String toString(){
+    	String updateVnfNotification = "";
+    	if (exception==null) {
+    		updateVnfNotification = "<ns2:updateVnfNotification xmlns:ns2=\"http://org.onap.so/vnfNotify\"" + '\n' +
+    				       "  xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
+    				       "   <messageId>"+messageId+"</messageId>" + '\n' +
+    				       "   <completed>"+completed+"</completed>" + '\n' +
+    				       "   <rollback>"+rollback+"</rollback>" + '\n' +
+    				       "</ns2:updateVnfNotification>";
+    	} else {
+    		updateVnfNotification = "<ns2:updateVnfNotification xmlns:ns2=\"http://org.onap.so/vnfNotify\"" + '\n' +
+				       "  xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" + '\n' +
+				       "   <messageId>"+messageId+"</messageId>" + '\n' +
+				       "   <completed>"+completed+"</completed>" + '\n' +
+    				   "   <exception>"+exception+"</exception>" + '\n' +
+    				   "   <errorMessage>"+errorMessage+"</errorMessage>" + '\n' +
+				       "</ns2:updateVnfNotification>";
+    	}
+
+    	return updateVnfNotification;
+    }
+
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/VnfAdapterNotify.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/VnfAdapterNotify.java
new file mode 100644
index 0000000..adedca9
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/VnfAdapterNotify.java
@@ -0,0 +1,177 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common.adapter.vnf;
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.ws.Action;
+import javax.xml.ws.RequestWrapper;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.2.8
+ * Generated source version: 2.2
+ * 
+ */
+@WebService(name = "vnfAdapterNotify", targetNamespace = "http://org.onap.so/vnfNotify")
+@XmlSeeAlso({
+    ObjectFactory.class
+})
+public interface VnfAdapterNotify {
+
+
+    /**
+     * 
+     * @param errorMessage
+     * @param exception
+     * @param messageId
+     * @param completed
+     */
+    @WebMethod
+    @Oneway
+    @RequestWrapper(localName = "rollbackVnfNotification", targetNamespace = "http://org.onap.so/vnfNotify", className = "org.onap.so.adapters.vnf.async.client.RollbackVnfNotification")
+    @Action(input = "http://org.onap.so/notify/adapterNotify/rollbackVnfNotificationRequest")
+    public void rollbackVnfNotification(
+        @WebParam(name = "messageId", targetNamespace = "")
+        String messageId,
+        @WebParam(name = "completed", targetNamespace = "")
+        boolean completed,
+        @WebParam(name = "exception", targetNamespace = "")
+        MsoExceptionCategory exception,
+        @WebParam(name = "errorMessage", targetNamespace = "")
+        String errorMessage);
+
+    /**
+     * 
+     * @param errorMessage
+     * @param vnfExists
+     * @param status
+     * @param exception
+     * @param outputs
+     * @param messageId
+     * @param vnfId
+     * @param completed
+     */
+    @WebMethod
+    @Oneway
+    @RequestWrapper(localName = "queryVnfNotification", targetNamespace = "http://org.onap.so/vnfNotify", className = "org.onap.so.adapters.vnf.async.client.QueryVnfNotification")
+    @Action(input = "http://org.onap.so/notify/adapterNotify/queryVnfNotificationRequest")
+    public void queryVnfNotification(
+        @WebParam(name = "messageId", targetNamespace = "")
+        String messageId,
+        @WebParam(name = "completed", targetNamespace = "")
+        boolean completed,
+        @WebParam(name = "exception", targetNamespace = "")
+        MsoExceptionCategory exception,
+        @WebParam(name = "errorMessage", targetNamespace = "")
+        String errorMessage,
+        @WebParam(name = "vnfExists", targetNamespace = "")
+        Boolean vnfExists,
+        @WebParam(name = "vnfId", targetNamespace = "")
+        String vnfId,
+        @WebParam(name = "status", targetNamespace = "")
+        VnfStatus status,
+        @WebParam(name = "outputs", targetNamespace = "")
+        org.onap.so.bpmn.common.adapter.vnf.QueryVnfNotification.Outputs outputs);
+
+    /**
+     * 
+     * @param errorMessage
+     * @param exception
+     * @param rollback
+     * @param outputs
+     * @param messageId
+     * @param vnfId
+     * @param completed
+     */
+    @WebMethod
+    @Oneway
+    @RequestWrapper(localName = "createVnfNotification", targetNamespace = "http://org.onap.so/vnfNotify", className = "org.onap.so.adapters.vnf.async.client.CreateVnfNotification")
+    @Action(input = "http://org.onap.so/notify/adapterNotify/createVnfNotificationRequest")
+    public void createVnfNotification(
+        @WebParam(name = "messageId", targetNamespace = "")
+        String messageId,
+        @WebParam(name = "completed", targetNamespace = "")
+        boolean completed,
+        @WebParam(name = "exception", targetNamespace = "")
+        MsoExceptionCategory exception,
+        @WebParam(name = "errorMessage", targetNamespace = "")
+        String errorMessage,
+        @WebParam(name = "vnfId", targetNamespace = "")
+        String vnfId,
+        @WebParam(name = "outputs", targetNamespace = "")
+        org.onap.so.bpmn.common.adapter.vnf.CreateVnfNotification.Outputs outputs,
+        @WebParam(name = "rollback", targetNamespace = "")
+        VnfRollback rollback);
+
+    /**
+     * 
+     * @param errorMessage
+     * @param exception
+     * @param rollback
+     * @param outputs
+     * @param messageId
+     * @param completed
+     */
+    @WebMethod
+    @Oneway
+    @RequestWrapper(localName = "updateVnfNotification", targetNamespace = "http://org.onap.so/vnfNotify", className = "org.onap.so.adapters.vnf.async.client.UpdateVnfNotification")
+    @Action(input = "http://org.onap.so/notify/adapterNotify/updateVnfNotificationRequest")
+    public void updateVnfNotification(
+        @WebParam(name = "messageId", targetNamespace = "")
+        String messageId,
+        @WebParam(name = "completed", targetNamespace = "")
+        boolean completed,
+        @WebParam(name = "exception", targetNamespace = "")
+        MsoExceptionCategory exception,
+        @WebParam(name = "errorMessage", targetNamespace = "")
+        String errorMessage,
+        @WebParam(name = "outputs", targetNamespace = "")
+        org.onap.so.bpmn.common.adapter.vnf.UpdateVnfNotification.Outputs outputs,
+        @WebParam(name = "rollback", targetNamespace = "")
+        VnfRollback rollback);
+
+    /**
+     * 
+     * @param errorMessage
+     * @param exception
+     * @param messageId
+     * @param completed
+     */
+    @WebMethod
+    @Oneway
+    @RequestWrapper(localName = "deleteVnfNotification", targetNamespace = "http://org.onap.so/vnfNotify", className = "org.onap.so.adapters.vnf.async.client.DeleteVnfNotification")
+    @Action(input = "http://org.onap.so/notify/adapterNotify/deleteVnfNotificationRequest")
+    public void deleteVnfNotification(
+        @WebParam(name = "messageId", targetNamespace = "")
+        String messageId,
+        @WebParam(name = "completed", targetNamespace = "")
+        boolean completed,
+        @WebParam(name = "exception", targetNamespace = "")
+        MsoExceptionCategory exception,
+        @WebParam(name = "errorMessage", targetNamespace = "")
+        String errorMessage);
+
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/VnfAdapterNotify_Service.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/VnfAdapterNotify_Service.java
new file mode 100644
index 0000000..667545d
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/VnfAdapterNotify_Service.java
@@ -0,0 +1,108 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common.adapter.vnf;
+
+import java.net.URL;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.WebServiceFeature;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.2.8
+ * Generated source version: 2.2
+ * 
+ */
+@WebServiceClient(name = "vnfAdapterNotify", targetNamespace = "http://org.onap.so/vnfNotify", wsdlLocation = "/VnfAdapterNotify.wsdl")
+public class VnfAdapterNotify_Service extends Service
+{
+
+    private final static URL VNFADAPTERNOTIFY_WSDL_LOCATION;
+    private final static WebServiceException VNFADAPTERNOTIFY_EXCEPTION;
+    private final static QName VNFADAPTERNOTIFY_QNAME = new QName("http://org.onap.so/vnfNotify", "vnfAdapterNotify");
+
+    static {
+        VNFADAPTERNOTIFY_WSDL_LOCATION = org.onap.so.bpmn.common.adapter.vnf.VnfAdapterNotify_Service.class.getResource("/VnfAdapterNotify.wsdl");
+        WebServiceException e = null;
+        if (VNFADAPTERNOTIFY_WSDL_LOCATION == null) {
+            e = new WebServiceException("Cannot find '/VnfAdapterNotify.wsdl' wsdl. Place the resource correctly in the classpath.");
+        }
+        VNFADAPTERNOTIFY_EXCEPTION = e;
+    }
+
+    public VnfAdapterNotify_Service() {
+        super(__getWsdlLocation(), VNFADAPTERNOTIFY_QNAME);
+    }
+
+    public VnfAdapterNotify_Service(WebServiceFeature... features) {
+        super(__getWsdlLocation(), VNFADAPTERNOTIFY_QNAME, features);
+    }
+
+    public VnfAdapterNotify_Service(URL wsdlLocation) {
+        super(wsdlLocation, VNFADAPTERNOTIFY_QNAME);
+    }
+
+    public VnfAdapterNotify_Service(URL wsdlLocation, WebServiceFeature... features) {
+        super(wsdlLocation, VNFADAPTERNOTIFY_QNAME, features);
+    }
+
+    public VnfAdapterNotify_Service(URL wsdlLocation, QName serviceName) {
+        super(wsdlLocation, serviceName);
+    }
+
+    public VnfAdapterNotify_Service(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
+        super(wsdlLocation, serviceName, features);
+    }
+
+    /**
+     * 
+     * @return
+     *     returns VnfAdapterNotify
+     */
+    @WebEndpoint(name = "MsoVnfAdapterAsyncImplPort")
+    public VnfAdapterNotify getMsoVnfAdapterAsyncImplPort() {
+        return super.getPort(new QName("http://org.onap.so/vnfNotify", "MsoVnfAdapterAsyncImplPort"), VnfAdapterNotify.class);
+    }
+
+    /**
+     * 
+     * @param features
+     *     A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy.  Supported features not in the <code>features</code> parameter will have their default values.
+     * @return
+     *     returns VnfAdapterNotify
+     */
+    @WebEndpoint(name = "MsoVnfAdapterAsyncImplPort")
+    public VnfAdapterNotify getMsoVnfAdapterAsyncImplPort(WebServiceFeature... features) {
+        return super.getPort(new QName("http://org.onap.so/vnfNotify", "MsoVnfAdapterAsyncImplPort"), VnfAdapterNotify.class, features);
+    }
+
+    private static URL __getWsdlLocation() {
+        if (VNFADAPTERNOTIFY_EXCEPTION!= null) {
+            throw VNFADAPTERNOTIFY_EXCEPTION;
+        }
+        return VNFADAPTERNOTIFY_WSDL_LOCATION;
+    }
+
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/VnfRollback.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/VnfRollback.java
new file mode 100644
index 0000000..194ce58
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/VnfRollback.java
@@ -0,0 +1,210 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common.adapter.vnf;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for vnfRollback complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="vnfRollback">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="cloudSiteId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="msoRequest" type="{http://org.onap.so/vnfNotify}msoRequest" minOccurs="0"/>
+ *         &lt;element name="tenantCreated" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ *         &lt;element name="tenantId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         &lt;element name="vnfCreated" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ *         &lt;element name="vnfId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "vnfRollback", propOrder = {
+    "cloudSiteId",
+    "msoRequest",
+    "tenantCreated",
+    "tenantId",
+    "vnfCreated",
+    "vnfId"
+})
+public class VnfRollback {
+
+    protected String cloudSiteId;
+    protected MsoRequest msoRequest;
+    protected boolean tenantCreated;
+    protected String tenantId;
+    protected boolean vnfCreated;
+    protected String vnfId;
+
+    /**
+     * Gets the value of the cloudSiteId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getCloudSiteId() {
+        return cloudSiteId;
+    }
+
+    /**
+     * Sets the value of the cloudSiteId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setCloudSiteId(String value) {
+        this.cloudSiteId = value;
+    }
+
+    /**
+     * Gets the value of the msoRequest property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link MsoRequest }
+     *     
+     */
+    public MsoRequest getMsoRequest() {
+        return msoRequest;
+    }
+
+    /**
+     * Sets the value of the msoRequest property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link MsoRequest }
+     *     
+     */
+    public void setMsoRequest(MsoRequest value) {
+        this.msoRequest = value;
+    }
+
+    /**
+     * Gets the value of the tenantCreated property.
+     * 
+     */
+    public boolean isTenantCreated() {
+        return tenantCreated;
+    }
+
+    /**
+     * Sets the value of the tenantCreated property.
+     * 
+     */
+    public void setTenantCreated(boolean value) {
+        this.tenantCreated = value;
+    }
+
+    /**
+     * Gets the value of the tenantId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getTenantId() {
+        return tenantId;
+    }
+
+    /**
+     * Sets the value of the tenantId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setTenantId(String value) {
+        this.tenantId = value;
+    }
+
+    /**
+     * Gets the value of the vnfCreated property.
+     * 
+     */
+    public boolean isVnfCreated() {
+        return vnfCreated;
+    }
+
+    /**
+     * Sets the value of the vnfCreated property.
+     * 
+     */
+    public void setVnfCreated(boolean value) {
+        this.vnfCreated = value;
+    }
+
+    /**
+     * Gets the value of the vnfId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVnfId() {
+        return vnfId;
+    }
+
+    /**
+     * Sets the value of the vnfId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVnfId(String value) {
+        this.vnfId = value;
+    }
+    
+    public String toString() {
+    	String msoRequestElement = msoRequest == null ? ""
+        		: "<msoRequest>"+msoRequest+"</msoRequest>" + '\n';
+
+        	return
+        		"<cloudSiteId>"+cloudSiteId+"</cloudSiteId>" + '\n' +
+        		msoRequestElement +
+        		"<tenantCreated>"+tenantCreated+"</tenantCreated>" + '\n' +
+        		"<tenantId>"+tenantId+"</tenantId>" + '\n' +
+        		"<vnfCreated>"+vnfCreated+"</vnfCreated>" + '\n' +
+        		"<vnfId>"+vnfId+"</vnfId>";
+    }
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/VnfStatus.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/VnfStatus.java
new file mode 100644
index 0000000..d093f79
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/VnfStatus.java
@@ -0,0 +1,61 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common.adapter.vnf;
+
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for vnfStatus.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p>
+ * <pre>
+ * &lt;simpleType name="vnfStatus">
+ *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     &lt;enumeration value="ACTIVE"/>
+ *     &lt;enumeration value="FAILED"/>
+ *     &lt;enumeration value="NOTFOUND"/>
+ *     &lt;enumeration value="UNKNOWN"/>
+ *   &lt;/restriction>
+ * &lt;/simpleType>
+ * </pre>
+ * 
+ */
+@XmlType(name = "vnfStatus")
+@XmlEnum
+public enum VnfStatus {
+
+    ACTIVE,
+    FAILED,
+    NOTFOUND,
+    UNKNOWN;
+
+    public String value() {
+        return name();
+    }
+
+    public static VnfStatus fromValue(String v) {
+        return valueOf(v);
+    }
+
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/package-info.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/package-info.java
new file mode 100644
index 0000000..654673a
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/package-info.java
@@ -0,0 +1,22 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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=========================================================
+ */
+
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://org.onap.so/vnfNotify")
+package org.onap.so.bpmn.common.adapter.vnf;
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/CallbackHandlerService.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/CallbackHandlerService.java
new file mode 100644
index 0000000..f274850
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/CallbackHandlerService.java
@@ -0,0 +1,425 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common.workflow.service;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.camunda.bpm.engine.MismatchingMessageCorrelationException;
+import org.camunda.bpm.engine.OptimisticLockingException;
+import org.camunda.bpm.engine.RuntimeService;
+import org.camunda.bpm.engine.runtime.Execution;
+import org.camunda.bpm.engine.runtime.MessageCorrelationResult;
+import org.onap.so.bpmn.core.UrnPropertiesReader;
+import org.onap.so.logger.MessageEnum;
+import org.onap.so.logger.MsoLogger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+/**
+ * Abstract base class for callback services.
+ */
+@Service
+public class CallbackHandlerService {
+	public static final long DEFAULT_TIMEOUT_SECONDS = 60;
+	public static final long FAST_POLL_DUR_SECONDS = 5;
+	public static final long FAST_POLL_INT_MS = 100;
+	public static final long SLOW_POLL_INT_MS = 1000;
+	
+	private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, CallbackHandlerService.class);
+
+	@Autowired
+	RuntimeService runtimeService;
+	
+	/**
+	 * Parameterized callback handler.
+	 */
+	@Async
+	protected CallbackResult handleCallback(String method, Object message,
+			String messageEventName, String messageVariable,
+			String correlationVariable, String correlationValue,
+			String logMarker) {
+
+		return handleCallback(method, message, messageEventName, messageVariable,
+			correlationVariable, correlationValue, logMarker, null);
+	}
+
+	/**
+	 * Parameterized callback handler.
+	 */
+	protected CallbackResult handleCallback(String method, Object message,
+			String messageEventName, String messageVariable,
+			String correlationVariable, String correlationValue,
+			String logMarker, Map<String, Object> injectedVariables) {
+
+		long startTime = System.currentTimeMillis();
+
+		LOGGER.debug(logMarker + " " + method + " received message: "
+			+ (message == null ? "" : System.lineSeparator()) + message);
+
+		try {
+			Map<String, Object> variables = new HashMap<>();
+
+			if (injectedVariables != null) {
+				variables.putAll(injectedVariables);
+			}
+
+			variables.put(correlationVariable, correlationValue);
+			variables.put(messageVariable, message == null ? null : message.toString());
+
+			boolean ok = correlate(messageEventName, correlationVariable,
+				correlationValue, variables, logMarker);
+
+			if (!ok) {
+				String msg = "No process is waiting for " + messageEventName
+					+ " with " + correlationVariable + " = '" + correlationValue + "'";
+				logCallbackError(method, startTime, msg);
+				return new CallbackError(msg);
+			}
+
+			logCallbackSuccess(method, startTime);
+			return new CallbackSuccess();
+		} catch (Exception e) {
+			LOGGER.debug("Exception :",e);
+			String msg = "Caught " + e.getClass().getSimpleName()
+				+ " processing " + messageEventName + " with " + correlationVariable
+				+ " = '" + correlationValue + "'";
+			logCallbackError(method, startTime, msg);
+			return new CallbackError(msg);
+		}
+	}
+	
+	/**
+	 * Performs message correlation.  Waits a limited amount of time for
+	 * a process to become ready for correlation.  The return value indicates
+	 * whether or not a process was found to receive the message.  Due to the
+	 * synchronous nature of message injection in Camunda, by the time this
+	 * method returns, one of 3 things will have happened: (1) the process
+	 * received the message and ended, (2) the process received the message
+	 * and reached an activity that suspended, or (3) an exception occurred
+	 * during correlation or while the process was executing.  Correlation
+	 * exceptions are handled differently from process execution exceptions.
+	 * Correlation exceptions are thrown so the client knows something went
+	 * wrong with the delivery of the message.  Process execution exceptions
+	 * are logged but not thrown.
+	 * @param messageEventName the message event name
+	 * @param correlationVariable the process variable used as the correlator
+	 * @param correlationValue the correlation value
+	 * @param variables variables to inject into the process
+	 * @param logMarker a marker for debug logging
+	 * @return true if a process could be found, false if not
+	 * @throws Exception for correlation errors
+	 */
+	protected boolean correlate(String messageEventName, String correlationVariable,
+			String correlationValue, Map<String, Object> variables, String logMarker)
+			throws Exception {
+	try{
+		LOGGER.debug(logMarker + " Attempting to find process waiting"
+			+ " for " + messageEventName + " with " + correlationVariable
+			+ " = '" + correlationValue + "'");
+
+		
+
+		long timeout = DEFAULT_TIMEOUT_SECONDS;
+
+		// The code is here in case we ever need to change the default.
+		String correlationTimemout = UrnPropertiesReader.getVariable("mso.correlation.timeout");
+		if (correlationTimemout != null) {
+			try {
+				timeout = Long.parseLong(correlationTimemout);
+			} catch (NumberFormatException e) {
+				// Ignore
+			}
+		}
+
+		long now = System.currentTimeMillis();
+		long fastPollEndTime = now + (FAST_POLL_DUR_SECONDS * 1000);
+		long endTime = now + (timeout * 1000);
+		long sleep = FAST_POLL_INT_MS;
+
+		List<Execution> waitingProcesses = null;
+		Exception queryException = null;
+		int queryCount = 0;
+		int queryFailCount = 0;
+
+		while (true) {
+			try {
+				++queryCount;
+				waitingProcesses = runtimeService.createExecutionQuery()
+					.messageEventSubscriptionName(messageEventName)
+					.processVariableValueEquals(correlationVariable, correlationValue)
+					.list();
+			} catch (Exception e) {
+				++queryFailCount;
+				queryException = e;
+			}
+
+			if (waitingProcesses != null && waitingProcesses.size() > 0) {
+				break;
+			}
+
+			if (now > endTime - sleep) {
+				break;
+			}
+
+			Thread.sleep(sleep);
+			now = System.currentTimeMillis();
+
+			if (now > fastPollEndTime) {
+				sleep = SLOW_POLL_INT_MS;
+			}
+		}
+
+		if (waitingProcesses == null) {
+			waitingProcesses = new ArrayList<Execution>(0);
+		}
+
+		int count = waitingProcesses.size();
+
+		List<ExecInfo> execInfoList = new ArrayList<>(count);
+		for (Execution execution : waitingProcesses) {
+			execInfoList.add(new ExecInfo(execution));
+		}
+
+		LOGGER.debug(logMarker + " Found " + count + " process(es) waiting"
+			+ " for " + messageEventName + " with " + correlationVariable
+			+ " = '" + correlationValue + "': " + execInfoList);
+
+		if (count == 0) {
+			if (queryFailCount > 0) {
+				String msg = queryFailCount + "/" + queryCount
+					+ " execution queries failed attempting to correlate "
+					+ messageEventName + " with " + correlationVariable
+					+ " = '" + correlationValue + "'; last exception was:"
+					+ queryException;
+				LOGGER.debug(msg);
+				LOGGER.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(),
+					MsoLogger.ErrorCode.UnknownError, msg, queryException);
+			}
+
+			return false;
+		}
+
+		if (count > 1) {
+			// Only one process should be waiting. Throw an exception back to the client.
+			throw new MismatchingMessageCorrelationException(messageEventName,
+				"more than 1 process is waiting with " + correlationVariable
+				+ " = '" + correlationValue + "'");
+		}
+		
+		// We prototyped an asynchronous solution, i.e. resuming the process
+		// flow in a separate thread, but this affected too many existing tests,
+		// and we went back to the synchronous solution. The synchronous solution
+		// has some troublesome characteristics though.  For example, the
+		// resumed flow may send request #2 to a remote system before MSO has
+		// acknowledged the notification associated with request #1.  
+
+		try {
+			LOGGER.debug(logMarker + " Running " + execInfoList.get(0) + " to receive "
+				+ messageEventName + " with " + correlationVariable + " = '"
+				+ correlationValue + "'");
+
+			@SuppressWarnings("unused")
+			MessageCorrelationResult result = runtimeService
+				.createMessageCorrelation(messageEventName)
+				.setVariables(variables)
+				.processInstanceVariableEquals(correlationVariable, correlationValue)
+				.correlateWithResult();
+			
+		} catch (MismatchingMessageCorrelationException e) {
+			// A correlation exception occurred even after we identified
+			// one waiting process.  Throw it back to the client.
+			throw e;
+		} catch (OptimisticLockingException ole) {
+			
+			String msg = "Caught " + ole.getClass().getSimpleName() + " after receiving " + messageEventName
+				+ " with " + correlationVariable + " = '" + correlationValue
+				+ "': " + ole;
+			LOGGER.debug(msg);
+			LOGGER.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN CORRELATION ERROR -", MsoLogger.getServiceName(),
+				MsoLogger.ErrorCode.UnknownError, msg, ole);
+			
+			//Retry for OptimisticLocking Exceptions
+			int retryCount = 0;
+			String retryStr = UrnPropertiesReader.getVariable("mso.bpmn.optimisticlockingexception.retrycount");
+			if (retryStr != null) {
+				try {
+					retryCount = Integer.parseInt(retryStr);
+				} catch (NumberFormatException e) {
+					// Ignore
+				}
+			}
+			
+			LOGGER.debug("Retry correlate for OptimisticLockingException, retryCount:" + retryCount);
+			
+			for (; retryCount >0 ; retryCount--) {
+				
+				try{
+					Thread.sleep(SLOW_POLL_INT_MS);
+					
+					@SuppressWarnings("unused")
+					MessageCorrelationResult result = runtimeService
+						.createMessageCorrelation(messageEventName)
+						.setVariables(variables)
+						.processInstanceVariableEquals(correlationVariable, correlationValue)
+						.correlateWithResult();
+					retryCount = 0;
+					LOGGER.debug("OptimisticLockingException retry was successful, seting retryCount: " + retryCount);
+				} catch (OptimisticLockingException olex) {
+					//oleFlag = ex instanceof org.camunda.bpm.engine.OptimisticLockingException;
+					String strMsg = "Received exception, OptimisticLockingException retry failed, retryCount:" + retryCount + " | exception returned: " + olex;
+					LOGGER.debug(strMsg);
+					LOGGER.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(),
+						MsoLogger.ErrorCode.UnknownError, strMsg, olex);
+				} catch (Exception excep) {
+					retryCount = 0;
+					//oleFlag = ex instanceof org.camunda.bpm.engine.OptimisticLockingException;
+					String strMsg = "Received exception, OptimisticLockingException retry failed, retryCount:" + retryCount + " | exception returned: " + excep;
+					LOGGER.debug(strMsg);
+					LOGGER.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(),
+						MsoLogger.ErrorCode.UnknownError, strMsg, excep);
+				}
+		
+			}
+			
+		}catch (Exception e) {
+			// This must be an exception from the flow itself.  Log it, but don't
+			// report it back to the client.
+			String msg = "Caught " + e.getClass().getSimpleName() + " running "
+				+ execInfoList.get(0) + " after receiving " + messageEventName
+				+ " with " + correlationVariable + " = '" + correlationValue
+				+ "': " + e;
+			LOGGER.debug(msg);
+			LOGGER.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(),
+				MsoLogger.ErrorCode.UnknownError, msg, e);
+		}
+	}  catch (Exception e) {
+		// This must be an exception from the flow itself.  Log it, but don't
+		// report it back to the client.
+		String msg = "Caught " + e.getClass().getSimpleName() + " after receiving " + messageEventName
+			+ " with " + correlationVariable + " = '" + correlationValue
+			+ "': " + e;
+		LOGGER.debug(msg);
+		LOGGER.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN CORRELATION ERROR -", MsoLogger.getServiceName(),
+			MsoLogger.ErrorCode.UnknownError, msg, e);
+	}	
+
+		return true;
+	}
+	
+	/**
+	 * Records audit and metric events in the log for a callback success.
+	 * @param method the method name
+	 * @param startTime the request start time
+	 */
+	protected void logCallbackSuccess(String method, long startTime) {
+		LOGGER.recordAuditEvent(startTime, MsoLogger.StatusCode.COMPLETE,
+			MsoLogger.ResponseCode.Suc, "Completed " + method);
+
+		LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE,
+			MsoLogger.ResponseCode.Suc, "Completed " + method,
+			"BPMN", MsoLogger.getServiceName(), null);
+	}
+
+	/**
+	 * Records error, audit and metric events in the log for a callback
+	 * internal error.
+	 * @param method the method name
+	 * @param startTime the request start time
+	 * @param msg the error message
+	 */
+	protected void logCallbackError(String method, long startTime, String msg) {
+		logCallbackError(method, startTime, msg, null);
+	}
+
+	/**
+	 * Records error, audit and metric events in the log for a callback
+	 * internal error.
+	 * @param method the method name
+	 * @param startTime the request start time
+	 * @param msg the error message
+	 * @param e the exception
+	 */
+	protected void logCallbackError(String method, long startTime, String msg, Exception e) {
+		if (e == null) {
+			LOGGER.error(MessageEnum.BPMN_CALLBACK_EXCEPTION, "BPMN", MsoLogger.getServiceName(), 
+				MsoLogger.ErrorCode.UnknownError, msg);
+		} else {
+			LOGGER.error(MessageEnum.BPMN_CALLBACK_EXCEPTION, "BPMN", MsoLogger.getServiceName(), 
+				MsoLogger.ErrorCode.UnknownError, msg, e);
+		}
+
+		LOGGER.recordAuditEvent(startTime, MsoLogger.StatusCode.COMPLETE,
+			MsoLogger.ResponseCode.InternalError, "Completed " + method);
+
+		LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE,
+			MsoLogger.ResponseCode.InternalError, "Completed " + method,
+			"BPMN", MsoLogger.getServiceName(), null);
+	}
+	
+	/**
+	 * Abstract callback result object.
+	 */
+	protected abstract class CallbackResult {
+	}
+
+	/**
+	 * Indicates that callback handling was successful.
+	 */
+	protected class CallbackSuccess extends CallbackResult {
+	}
+
+	/**
+	 * Indicates that callback handling failed.
+	 */
+	protected class CallbackError extends CallbackResult {
+		private final String errorMessage;
+
+		public CallbackError(String errorMessage) {
+			this.errorMessage = errorMessage;
+		}
+
+		/**
+		 * Gets the error message.
+		 */
+		public String getErrorMessage() {
+			return errorMessage;
+		}
+	}
+
+	private static class ExecInfo {
+		private final Execution execution;
+
+		public ExecInfo(Execution execution) {
+			this.execution = execution;
+		}
+	
+		@Override
+		public String toString() {
+			return "Process[" + execution.getProcessInstanceId()
+				+ ":" + execution.getId() + "]";
+		}
+	}
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/ProcessEngineAwareService.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/ProcessEngineAwareService.java
new file mode 100644
index 0000000..0e9e142
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/ProcessEngineAwareService.java
@@ -0,0 +1,68 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.onap.so.bpmn.common.workflow.service;
+
+import java.util.Optional;
+
+import javax.ws.rs.ext.Provider;
+
+import org.camunda.bpm.engine.ProcessEngineServices;
+import org.camunda.bpm.engine.ProcessEngines;
+import org.springframework.stereotype.Service;
+
+/**
+ * Base class for services that must be process-engine aware. The only
+ * process engine currently supported is the "default" process engine.
+ */
+@Service
+public class ProcessEngineAwareService {
+	
+	private final String processEngineName = "default";
+	private volatile Optional<ProcessEngineServices> pes4junit = Optional.empty();
+	
+	/**
+	 * Gets the process engine name.
+	 * @return the process engine name
+	 */
+	public String getProcessEngineName() {
+		return processEngineName;
+	}
+
+	/**
+	 * Gets process engine services.
+	 * @return process engine services
+	 */
+	public ProcessEngineServices getProcessEngineServices() {
+		return pes4junit.orElse(ProcessEngines.getProcessEngine(
+				getProcessEngineName()));
+	}
+
+	/**
+	 * Allows a particular process engine to be specified, overriding the
+	 * usual process engine lookup by name.  Intended primarily for the
+	 * unit test environment.
+	 * @param pes process engine services
+	 */
+	public void setProcessEngineServices4junit(ProcessEngineServices pes) {
+		pes4junit = Optional.ofNullable(pes);
+	}
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/SDNCAdapterCallbackServiceImpl.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/SDNCAdapterCallbackServiceImpl.java
new file mode 100644
index 0000000..710144d
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/SDNCAdapterCallbackServiceImpl.java
@@ -0,0 +1,91 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common.workflow.service;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.ws.rs.core.Context;
+import javax.xml.ws.WebServiceContext;
+
+import org.onap.so.bpmn.common.adapter.sdnc.SDNCAdapterCallbackRequest;
+import org.onap.so.bpmn.common.adapter.sdnc.SDNCAdapterResponse;
+import org.onap.so.bpmn.common.adapter.sdnc.SDNCCallbackAdapterPortType;
+import org.onap.so.bpmn.common.workflow.service.CallbackHandlerService.CallbackError;
+import org.onap.so.bpmn.common.workflow.service.CallbackHandlerService.CallbackResult;
+import org.onap.so.logger.MsoLogger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * Implementation of SDNCAdapterCallbackService.
+ */
+@WebService(serviceName="SDNCAdapterCallbackService", targetNamespace="http://org.onap/workflow/sdnc/adapter/schema/v1")
+@Service
+public class SDNCAdapterCallbackServiceImpl extends ProcessEngineAwareService implements SDNCCallbackAdapterPortType {
+
+	private final static String logMarker = "[SDNC-CALLBACK]";
+
+	@Context WebServiceContext wsContext;
+	
+	@Autowired
+	CallbackHandlerService callback;
+
+	@WebMethod(operationName = "SDNCAdapterCallback")
+    @WebResult(name = "SDNCAdapterResponse", targetNamespace = "http://org.onap/workflow/sdnc/adapter/schema/v1", partName = "SDNCAdapterCallbackResponse")
+    public SDNCAdapterResponse sdncAdapterCallback(
+            @WebParam(name = "SDNCAdapterCallbackRequest", targetNamespace = "http://org.onap/workflow/sdnc/adapter/schema/v1", partName = "SDNCAdapterCallbackRequest")
+            SDNCAdapterCallbackRequest sdncAdapterCallbackRequest) {
+
+		String method = "sdncAdapterCallback";
+		Object message = sdncAdapterCallbackRequest;
+		String messageEventName = "sdncAdapterCallbackRequest";
+		String messageVariable = "sdncAdapterCallbackRequest";
+		String correlationVariable = "SDNCA_requestId";
+		String correlationValue = sdncAdapterCallbackRequest.getCallbackHeader().getRequestId();
+
+		MsoLogger.setServiceName("MSO." + method);
+		MsoLogger.setLogContext(correlationValue, "N/A");
+
+		CallbackResult result = callback.handleCallback(method, message, messageEventName,
+			messageVariable, correlationVariable, correlationValue, logMarker);
+
+		if (result instanceof CallbackError) {
+			return new SDNCAdapterErrorResponse(((CallbackError)result).getErrorMessage());
+		} else {
+			return new SDNCAdapterResponse();
+		}
+	}
+
+	// This subclass allows unit tests to extract the error
+	public class SDNCAdapterErrorResponse extends SDNCAdapterResponse {
+		private String error;
+
+		public SDNCAdapterErrorResponse(String error) {
+			this.error = error;
+		}
+
+		public String getError() {
+			return error;
+		}
+	}
+}
\ No newline at end of file
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/VnfAdapterNotifyServiceImpl.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/VnfAdapterNotifyServiceImpl.java
new file mode 100644
index 0000000..ae9cec9
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/VnfAdapterNotifyServiceImpl.java
@@ -0,0 +1,255 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common.workflow.service;
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.ws.rs.core.Context;
+import javax.xml.ws.Action;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.WebServiceContext;
+
+import org.onap.so.bpmn.common.adapter.vnf.CreateVnfNotification;
+import org.onap.so.bpmn.common.adapter.vnf.DeleteVnfNotification;
+import org.onap.so.bpmn.common.adapter.vnf.MsoExceptionCategory;
+import org.onap.so.bpmn.common.adapter.vnf.QueryVnfNotification;
+import org.onap.so.bpmn.common.adapter.vnf.RollbackVnfNotification;
+import org.onap.so.bpmn.common.adapter.vnf.UpdateVnfNotification;
+import org.onap.so.bpmn.common.adapter.vnf.VnfAdapterNotify;
+import org.onap.so.bpmn.common.adapter.vnf.VnfRollback;
+import org.onap.so.bpmn.common.adapter.vnf.VnfStatus;
+import org.onap.so.logger.MsoLogger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * Implementation of the VnfAdapterNotify service.
+ */
+@WebService(serviceName = "vnfAdapterNotify", targetNamespace = "http://org.onap.so/vnfNotify")
+@Service
+public class VnfAdapterNotifyServiceImpl extends ProcessEngineAwareService implements VnfAdapterNotify{
+
+	private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, VnfAdapterNotifyServiceImpl.class);
+
+	private final String logMarker = "[VNF-NOTIFY]";
+	
+	@Autowired
+	CallbackHandlerService callback;
+
+	@Context WebServiceContext wsContext;
+
+    @WebMethod(operationName = "rollbackVnfNotification")
+    @Oneway
+    @RequestWrapper(localName = "rollbackVnfNotification", targetNamespace = "http://org.onap.so/vnfNotify", className = "org.onap.so.adapters.vnf.async.client.RollbackVnfNotification")
+    @Action(input = "http://org.onap.so/notify/adapterNotify/rollbackVnfNotificationRequest")
+    public void rollbackVnfNotification(
+        @WebParam(name = "messageId", targetNamespace = "")
+        String messageId,
+        @WebParam(name = "completed", targetNamespace = "")
+        boolean completed,
+        @WebParam(name = "exception", targetNamespace = "")
+        MsoExceptionCategory exception,
+        @WebParam(name = "errorMessage", targetNamespace = "")
+        String errorMessage) {
+
+		RollbackVnfNotification rollbackVnfNotification = new RollbackVnfNotification();
+
+		rollbackVnfNotification.setMessageId(messageId);
+		rollbackVnfNotification.setCompleted(completed);
+		rollbackVnfNotification.setException(exception);
+		rollbackVnfNotification.setErrorMessage(errorMessage);
+
+		String method = "rollbackVnfNotification";
+		Object message = rollbackVnfNotification;
+		String messageEventName = "rollbackVnfNotificationCallback";
+		String messageVariable = "rollbackVnfNotificationCallback";
+		String correlationVariable = "VNFRB_messageId";
+		String correlationValue = messageId;
+
+		callback.handleCallback(method, message, messageEventName, messageVariable,
+			correlationVariable, correlationValue, logMarker);
+    }
+
+    @WebMethod(operationName = "queryVnfNotification")
+    @Oneway
+    @RequestWrapper(localName = "queryVnfNotification", targetNamespace = "http://org.onap.so/vnfNotify", className = "org.onap.so.adapters.vnf.async.client.QueryVnfNotification")
+    @Action(input = "http://org.onap.so/notify/adapterNotify/queryVnfNotificationRequest")
+    public void queryVnfNotification(
+        @WebParam(name = "messageId", targetNamespace = "")
+        String messageId,
+        @WebParam(name = "completed", targetNamespace = "")
+        boolean completed,
+        @WebParam(name = "exception", targetNamespace = "")
+        MsoExceptionCategory exception,
+        @WebParam(name = "errorMessage", targetNamespace = "")
+        String errorMessage,
+        @WebParam(name = "vnfExists", targetNamespace = "")
+        Boolean vnfExists,
+        @WebParam(name = "vnfId", targetNamespace = "")
+        String vnfId,
+        @WebParam(name = "status", targetNamespace = "")
+        VnfStatus status,
+        @WebParam(name = "outputs", targetNamespace = "")
+        QueryVnfNotification.Outputs outputs){
+
+		String method = "queryVnfNotification";
+		String messageEventName = "queryVnfNotificationCallback";
+		String messageVariable = "queryVnfNotificationCallback";
+		String correlationVariable = "VNFQ_messageId";
+		String correlationValue = messageId;
+
+		MsoLogger.setServiceName("MSO." + method);
+		MsoLogger.setLogContext(correlationValue, "N/A");
+
+    	QueryVnfNotification message = new QueryVnfNotification();
+
+    	message.setMessageId(messageId);
+    	message.setCompleted(completed);
+    	message.setException(exception);
+    	message.setErrorMessage(errorMessage);
+    	message.setVnfExists(vnfExists);
+    	message.setVnfId(vnfId);
+    	message.setStatus(status);
+    	message.setOutputs(outputs);
+
+    	callback.handleCallback(method, message, messageEventName, messageVariable,
+			correlationVariable, correlationValue, logMarker);
+    }
+
+	@WebMethod(operationName = "createVnfNotification")
+    @Oneway
+    @RequestWrapper(localName = "createVnfNotification", targetNamespace = "http://org.onap.so/vnfNotify", className = "org.onap.so.adapters.vnf.async.client.CreateVnfNotification")
+    @Action(input = "http://org.onap.so/notify/adapterNotify/createVnfNotificationRequest")
+	public void createVnfNotification(
+			@WebParam(name = "messageId", targetNamespace = "")
+	        String messageId,
+	        @WebParam(name = "completed", targetNamespace = "")
+	        boolean completed,
+	        @WebParam(name = "exception", targetNamespace = "")
+	        MsoExceptionCategory exception,
+	        @WebParam(name = "errorMessage", targetNamespace = "")
+	        String errorMessage,
+	        @WebParam(name = "vnfId", targetNamespace = "")
+	        String vnfId,
+	        @WebParam(name = "outputs", targetNamespace = "")
+	        CreateVnfNotification.Outputs outputs,
+	        @WebParam(name = "rollback", targetNamespace = "")
+	        VnfRollback rollback){
+
+		String method = "createVnfNotification";
+		String messageEventName = "createVnfNotificationCallback";
+		String messageVariable = "createVnfNotificationCallback";
+		String correlationVariable = "VNFC_messageId";
+		String correlationValue = messageId;
+
+		MsoLogger.setServiceName("MSO." + method);
+		MsoLogger.setLogContext(correlationValue, "N/A");
+
+		CreateVnfNotification message = new CreateVnfNotification();
+
+		message.setMessageId(messageId);
+		message.setCompleted(completed);
+		message.setException(exception);
+		message.setErrorMessage(errorMessage);
+		message.setVnfId(vnfId);
+		message.setOutputs(outputs);
+		message.setRollback(rollback);
+
+		callback.handleCallback(method, message, messageEventName, messageVariable,
+			correlationVariable, correlationValue, logMarker);
+	 }
+
+	@WebMethod(operationName = "updateVnfNotification")
+    @Oneway
+    @RequestWrapper(localName = "updateVnfNotification", targetNamespace = "http://org.onap.so/vnfNotify", className = "org.onap.so.adapters.vnf.async.client.UpdateVnfNotification")
+    @Action(input = "http://org.onap.so/notify/adapterNotify/updateVnfNotificationRequest")
+    public void updateVnfNotification(
+        @WebParam(name = "messageId", targetNamespace = "")
+        String messageId,
+        @WebParam(name = "completed", targetNamespace = "")
+        boolean completed,
+        @WebParam(name = "exception", targetNamespace = "")
+        MsoExceptionCategory exception,
+        @WebParam(name = "errorMessage", targetNamespace = "")
+        String errorMessage,
+        @WebParam(name = "outputs", targetNamespace = "")
+        UpdateVnfNotification.Outputs outputs,
+        @WebParam(name = "rollback", targetNamespace = "")
+        VnfRollback rollback){
+
+		String method = "updateVnfNotification";
+		String messageEventName = "updateVnfNotificationCallback";
+		String messageVariable = "updateVnfNotificationCallback";
+		String correlationVariable = "VNFU_messageId";
+		String correlationValue = messageId;
+
+		MsoLogger.setServiceName("MSO." + method);
+		MsoLogger.setLogContext(correlationValue, "N/A");
+
+    	UpdateVnfNotification message = new UpdateVnfNotification();
+
+    	message.setMessageId(messageId);
+    	message.setCompleted(completed);
+    	message.setException(exception);
+    	message.setErrorMessage(errorMessage);
+    	message.setOutputs(outputs);
+    	message.setRollback(rollback);
+
+    	callback.handleCallback(method, message, messageEventName, messageVariable,
+			correlationVariable, correlationValue, logMarker);
+	 }
+
+    @WebMethod(operationName = "deleteVnfNotification")
+    @Oneway
+    @RequestWrapper(localName = "deleteVnfNotification", targetNamespace = "http://org.onap.so/vnfNotify", className = "org.onap.so.adapters.vnf.async.client.DeleteVnfNotification")
+    @Action(input = "http://org.onap.so/notify/adapterNotify/deleteVnfNotificationRequest")
+    public void deleteVnfNotification(
+        @WebParam(name = "messageId", targetNamespace = "")
+        String messageId,
+        @WebParam(name = "completed", targetNamespace = "")
+        boolean completed,
+        @WebParam(name = "exception", targetNamespace = "")
+        MsoExceptionCategory exception,
+        @WebParam(name = "errorMessage", targetNamespace = "")
+        String errorMessage) {
+
+		String method = "deleteVnfNotification";
+		String messageEventName = "deleteVnfACallback";
+		String messageVariable = "deleteVnfACallback";
+		String correlationVariable = "VNFDEL_uuid";
+		String correlationValue = messageId;
+
+		MsoLogger.setServiceName("MSO." + method);
+		MsoLogger.setLogContext(correlationValue, "N/A");
+
+    	DeleteVnfNotification message = new DeleteVnfNotification();
+
+    	message.setMessageId(messageId);
+    	message.setCompleted(completed);
+    	message.setException(exception);
+    	message.setErrorMessage(errorMessage);
+
+    	callback.handleCallback(method, message, messageEventName, messageVariable,
+			correlationVariable, correlationValue, logMarker);
+	}
+}
\ No newline at end of file
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncCommonResource.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncCommonResource.java
new file mode 100644
index 0000000..a9a3a63
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncCommonResource.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common.workflow.service;
+
+import org.camunda.bpm.engine.ProcessEngineServices;
+import org.camunda.bpm.engine.ProcessEngines;
+
+
+public class WorkflowAsyncCommonResource extends WorkflowAsyncResource {
+
+	@Override
+    public String getProcessEngineName() {
+		return "default";
+	}
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResource.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResource.java
new file mode 100644
index 0000000..cfd07d8
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowAsyncResource.java
@@ -0,0 +1,244 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common.workflow.service;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.UUID;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.ext.Provider;
+
+import org.camunda.bpm.engine.ProcessEngineServices;
+import org.camunda.bpm.engine.variable.impl.VariableMapImpl;
+import org.onap.so.bpmn.common.workflow.context.WorkflowContext;
+import org.onap.so.bpmn.common.workflow.context.WorkflowContextHolder;
+import org.onap.so.bpmn.common.workflow.context.WorkflowResponse;
+import org.onap.so.logger.MsoLogger;
+import org.slf4j.MDC;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+
+/**
+ * 
+ * @version 1.0
+ * Asynchronous Workflow processing using JAX RS RESTeasy implementation
+ * Both Synchronous and Asynchronous BPMN process can benefit from this implementation since the workflow gets executed in the background
+ * and the server thread is freed up, server scales better to process more incoming requests
+ * 
+ * Usage: For synchronous process, when you are ready to send the response invoke the callback to write the response
+ * For asynchronous process - the activity may send a acknowledgement response and then proceed further on executing the process
+ */
+@Path("/async")
+@Api(value = "/async", description = "Provides asynchronous starting of a bpmn process")
+@Provider
+@Component
+public class WorkflowAsyncResource extends ProcessEngineAwareService {
+
+	private static final WorkflowContextHolder contextHolder = WorkflowContextHolder.getInstance();
+	
+	
+	protected Optional<ProcessEngineServices> pes4junit = Optional.empty();
+	
+	long workflowPollInterval=1000; 
+
+	@Autowired
+	private WorkflowProcessor processor;
+	
+	@Autowired
+	private WorkflowContextHolder workflowContext;
+	
+	public WorkflowProcessor getProcessor() {
+		return processor;
+	}
+
+
+
+	public void setProcessor(WorkflowProcessor processor) {
+		this.processor = processor;
+	}
+
+	protected static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,WorkflowAsyncResource.class);
+	protected static final long DEFAULT_WAIT_TIME = 60000;	//default wait time
+	
+	/**
+	 * Asynchronous JAX-RS method that starts a process instance.
+	 * @param asyncResponse an object that will receive the asynchronous response
+	 * @param processKey the process key
+	 * @param variableMap input variables to the process
+	 * @return 
+	 */
+	
+	@POST
+	@Path("/services/{processKey}")
+	@ApiOperation(
+		        value = "Starts a new process with the appropriate process Key",
+		        notes = "Aysnc fall outs are only logged"
+		    )
+	@Produces("application/json")
+	@Consumes("application/json")
+	public Response startProcessInstanceByKey (
+			@PathParam("processKey") String processKey, VariableMapImpl variableMap){
+		Map<String, Object> inputVariables = getInputVariables(variableMap);	
+		try {		
+			MDC.put(MsoLogger.REQUEST_ID, getRequestId(inputVariables));
+			processor.startProcess(processKey, variableMap);
+			WorkflowResponse response = waitForResponse(getRequestId(inputVariables)); 
+			return Response.status(202).entity(response).build();	
+		} catch (Exception e) {
+			WorkflowResponse response =  buildUnkownError(getRequestId(inputVariables),e.getMessage());		
+			return Response.status(500).entity(response).build();	
+		}		
+	}
+	
+	private WorkflowResponse waitForResponse(String requestId) throws Exception {		
+		long currentWaitTime = 0;		
+		while (DEFAULT_WAIT_TIME > currentWaitTime ) {			
+			Thread.sleep(workflowPollInterval);
+			currentWaitTime = currentWaitTime + workflowPollInterval;
+			WorkflowContext foundContext = contextHolder.getWorkflowContext(requestId);
+			if(foundContext!=null){
+				contextHolder.remove(foundContext);
+				return buildResponse(foundContext);
+			}
+		}
+		throw new Exception("TimeOutOccured");
+	}
+
+	private WorkflowResponse buildTimeoutResponse(String requestId) {
+		WorkflowResponse response = new WorkflowResponse();
+		response.setMessage("Fail");
+		response.setResponse("Request timedout, request id:" + requestId);		
+		response.setMessageCode(500);
+		return response;
+	}
+	
+	private WorkflowResponse buildUnkownError(String requestId,String error) {
+		WorkflowResponse response = new WorkflowResponse();
+		response.setMessage(error);
+		response.setResponse("UnknownError, request id:" + requestId);		
+		response.setMessageCode(500);
+		return response;
+	}
+
+	private WorkflowResponse buildResponse(WorkflowContext foundContext) {
+		return foundContext.getWorkflowResponse();
+	}
+	
+    protected static String getOrCreate(Map<String, Object> inputVariables, String key) {
+        String value = Objects.toString(inputVariables.get(key), null);
+        if (value == null) {
+            value = UUID.randomUUID().toString();
+            inputVariables.put(key, value);
+        }
+        return value;
+    }
+	
+	// Note: the business key is used to identify the process in unit tests
+	protected static String getBusinessKey(Map<String, Object> inputVariables) {
+        return getOrCreate(inputVariables, "mso-business-key");
+	}
+
+	protected static String getRequestId(Map<String, Object> inputVariables) {
+        return getOrCreate(inputVariables, "mso-request-id");
+	}
+
+
+	
+	protected void recordEvents(String processKey, WorkflowResponse response,
+			long startTime) {
+		
+		msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, 
+				response.getMessage() + " for processKey: "
+				+ processKey + " with response: " + response.getResponse(), "BPMN", MDC.get(processKey), null);
+		
+		msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, 
+				 response.getMessage() + "for processKey: " + processKey + " with response: " + response.getResponse());
+		
+	}
+
+	protected static void setLogContext(String processKey,
+			Map<String, Object> inputVariables) {
+		MsoLogger.setServiceName("MSO." + processKey);
+		if (inputVariables != null) {
+			MsoLogger.setLogContext(getKeyValueFromInputVariables(inputVariables,"mso-request-id"), getKeyValueFromInputVariables(inputVariables,"serviceInstanceId"));
+		}
+	}
+
+	protected static String getKeyValueFromInputVariables(Map<String,Object> inputVariables, String key) {
+		if (inputVariables == null) {
+			return "";
+		}
+
+		return Objects.toString(inputVariables.get(key), "N/A");
+	}
+
+	protected boolean isProcessEnded(String processInstanceId) {
+		ProcessEngineServices pes = getProcessEngineServices();
+		return pes.getRuntimeService().createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult() == null;
+	}
+	
+	protected static Map<String, Object> getInputVariables(VariableMapImpl variableMap) {
+		Map<String, Object> inputVariables = new HashMap<>();
+		@SuppressWarnings("unchecked")
+		Map<String, Object> vMap = (Map<String, Object>) variableMap.get("variables");
+		for (Map.Entry<String, Object> entry : vMap.entrySet()) {
+			String vName = entry.getKey();
+			Object value = entry.getValue();
+			@SuppressWarnings("unchecked")
+			Map<String, Object> valueMap = (Map<String,Object>)value; // value, type
+			inputVariables.put(vName, valueMap.get("value"));
+		}
+		return inputVariables;
+	}
+	
+    
+	protected long getWaitTime(Map<String, Object> inputVariables)
+	{
+	    
+		String timeout = Objects.toString(inputVariables.get("mso-service-request-timeout"), null);
+
+		if (timeout != null) {
+			try {
+				return Long.parseLong(timeout)*1000;
+			} catch (NumberFormatException nex) {
+				msoLogger.debug("Invalid input for mso-service-request-timeout");
+			}
+		}
+
+		return DEFAULT_WAIT_TIME;
+	}
+	
+	
+	
+
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowMessageResource.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowMessageResource.java
new file mode 100644
index 0000000..02cda80
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowMessageResource.java
@@ -0,0 +1,124 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common.workflow.service;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.HeaderParam;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.onap.so.bpmn.common.workflow.service.CallbackHandlerService.CallbackError;
+import org.onap.so.bpmn.common.workflow.service.CallbackHandlerService.CallbackResult;
+import org.onap.so.logger.MessageEnum;
+import org.onap.so.logger.MsoLogger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+/**
+ * Generalized REST interface that injects a message event into a waiting BPMN process.
+ * Examples:
+ * <pre>
+ *     /WorkflowMessage/SDNCAResponse/6d10d075-100c-42d0-9d84-a52432681cae-1478486185286
+ *     /WorkflowMessage/SDNCAEvent/USOSTCDALTX0101UJZZ01
+ * </pre>
+ */
+@Path("/")
+@Api(description = "Provides a generic service to inject messages into a waiting BPMN Proccess")
+@Component
+public class WorkflowMessageResource{
+	private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, WorkflowMessageResource.class);
+	private static final String LOGMARKER = "[WORKFLOW-MESSAGE]";
+	
+	@Autowired
+	CallbackHandlerService callback;
+	
+	@POST
+	@Path("/WorkflowMessage/{messageType}/{correlator}")
+	@ApiOperation(
+	        value = "Workflow message correlator",
+	        notes = ""
+	    )
+	@Consumes("*/*")
+	@Produces(MediaType.TEXT_PLAIN)
+	public Response deliver(
+			@HeaderParam("Content-Type") String contentType,
+			@PathParam("messageType") String messageType,
+			@PathParam("correlator") String correlator,
+			String message) {
+
+		String method = "receiveWorkflowMessage";
+		MsoLogger.setServiceName("MSO." + method);
+		MsoLogger.setLogContext(correlator, "N/A");
+
+		LOGGER.debug(LOGMARKER + " Received workflow message"
+			+ " type='" + messageType + "'"
+			+ " correlator='" + correlator + "'"
+			+ (contentType == null ? "" : " contentType='" + contentType + "'")
+			+ " message=" + System.lineSeparator() + message);
+
+		if (messageType == null || messageType.isEmpty()) {
+			String msg = "Missing message type";
+			LOGGER.debug(LOGMARKER + " " + msg);
+			LOGGER.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(),
+				MsoLogger.ErrorCode.DataError, LOGMARKER + ":" + msg);
+			return Response.status(400).entity(msg).build();
+		}
+
+		if (correlator == null || correlator.isEmpty()) {
+			String msg = "Missing correlator";
+			LOGGER.debug(LOGMARKER + " " + msg);
+			LOGGER.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(),
+				MsoLogger.ErrorCode.DataError, LOGMARKER + ":" + msg);
+			return Response.status(400).entity(msg).build();
+		}
+
+		String messageEventName = "WorkflowMessage";
+		String messageVariable = messageType + "_MESSAGE";
+		String correlationVariable = messageType + "_CORRELATOR";
+		String correlationValue = correlator;
+		String contentTypeVariable = messageType + "_CONTENT_TYPE";
+
+		Map<String, Object> variables = new HashMap<>();
+
+		if (contentType != null) {
+			variables.put(contentTypeVariable, contentType);
+		}
+
+		CallbackResult result = callback.handleCallback(method, message, messageEventName,
+			messageVariable, correlationVariable, correlationValue, LOGMARKER, variables);
+
+		if (result instanceof CallbackError) {
+			return Response.status(500).entity(((CallbackError)result).getErrorMessage()).build();
+		} else {
+			return Response.status(204).build();
+		}
+	}
+}
\ No newline at end of file
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowProcessor.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowProcessor.java
new file mode 100644
index 0000000..edc05af
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowProcessor.java
@@ -0,0 +1,155 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common.workflow.service;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.RuntimeService;
+import org.camunda.bpm.engine.runtime.ProcessInstance;
+import org.camunda.bpm.engine.variable.impl.VariableMapImpl;
+import org.onap.so.bpmn.common.workflow.context.WorkflowCallbackResponse;
+import org.onap.so.bpmn.common.workflow.context.WorkflowContextHolder;
+import org.onap.so.logger.MsoLogger;
+import org.slf4j.MDC;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.stereotype.Service;
+
+@Service
+public class WorkflowProcessor extends ProcessEngineAwareService {
+	
+	private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, WorkflowProcessor.class);
+	
+	protected static final String logMarker = "[WRKFLOW-RESOURCE]";
+	protected static final long DEFAULT_WAIT_TIME = 30000;	//default wait time
+	
+	@Async
+	public void startProcess( String processKey, VariableMapImpl variableMap) throws InterruptedException
+	{
+		MDC.getCopyOfContextMap();
+		long startTime = System.currentTimeMillis();
+		Map<String, Object> inputVariables = null;
+		String processInstanceId = null;
+		try {
+			inputVariables = getInputVariables(variableMap);
+			setLogContext(processKey, inputVariables);
+
+			// This variable indicates that the flow was invoked asynchronously
+			inputVariables.put("isAsyncProcess", "true");
+			
+			
+			setLogContext(processKey, inputVariables);
+
+			// Note: this creates a random businessKey if it wasn't specified.
+			String businessKey = getBusinessKey(inputVariables);
+
+			msoLogger.debug("***Received MSO startProcessInstanceByKey with processKey: " + processKey
+					+ " and variables: " + inputVariables);
+
+			RuntimeService runtimeService = getProcessEngineServices().getRuntimeService();
+			ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(processKey, businessKey,
+					inputVariables);
+			processInstanceId = processInstance.getId();
+
+			msoLogger.debug(logMarker + "Process " + processKey + ":" + processInstanceId + " "
+					+ (processInstance.isEnded() ? "ENDED" : "RUNNING"));
+		} catch (Exception e) {
+
+			msoLogger.recordAuditEvent(startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.InternalError,
+					logMarker + "Error in starting the process: " + e.getMessage());
+
+			WorkflowCallbackResponse callbackResponse = new WorkflowCallbackResponse();
+			callbackResponse.setStatusCode(500);
+			callbackResponse.setMessage("Fail");
+			callbackResponse.setResponse("Error occurred while executing the process: " + e);
+
+			WorkflowContextHolder.getInstance().processCallback(processKey, processInstanceId,
+					getRequestId(inputVariables), callbackResponse);
+		}
+	}
+	
+	protected static void setLogContext(String processKey,
+			Map<String, Object> inputVariables) {
+		MsoLogger.setServiceName("MSO." + processKey);
+		if (inputVariables != null) {
+			MsoLogger.setLogContext(getKeyValueFromInputVariables(inputVariables,"mso-request-id"), getKeyValueFromInputVariables(inputVariables,"mso-service-instance-id"));
+		}
+	}
+	
+	protected static String getKeyValueFromInputVariables(Map<String,Object> inputVariables, String key) {
+		if (inputVariables == null) {
+			return "";
+		}
+
+		return Objects.toString(inputVariables.get(key), "N/A");
+	}
+	
+	// Note: the business key is used to identify the process in unit tests
+	protected static String getBusinessKey(Map<String, Object> inputVariables) {
+        return getOrCreate(inputVariables, "mso-business-key");
+	}
+
+	protected static String getRequestId(Map<String, Object> inputVariables) {
+        return getOrCreate(inputVariables, "mso-request-id");
+	}
+	
+	protected static Map<String, Object> getInputVariables(VariableMapImpl variableMap) {
+		Map<String, Object> inputVariables = new HashMap<>();
+		@SuppressWarnings("unchecked")
+		Map<String, Object> vMap = (Map<String, Object>) variableMap.get("variables");
+		for (Map.Entry<String, Object> entry : vMap.entrySet()) {
+			String vName = entry.getKey();
+			Object value = entry.getValue();
+			@SuppressWarnings("unchecked")
+			Map<String, Object> valueMap = (Map<String,Object>)value; // value, type
+			inputVariables.put(vName, valueMap.get("value"));
+		}
+		return inputVariables;
+	}
+	
+    protected static String getOrCreate(Map<String, Object> inputVariables, String key) {
+        String value = Objects.toString(inputVariables.get(key), null);
+        if (value == null) {
+            value = UUID.randomUUID().toString();
+            inputVariables.put(key, value);
+        }
+        return value;
+    }
+    
+	protected long getWaitTime(Map<String, Object> inputVariables)
+	{
+	    
+		String timeout = Objects.toString(inputVariables.get("mso-service-request-timeout"), null);
+
+		if (timeout != null) {
+			try {
+				return Long.parseLong(timeout)*1000;
+			} catch (NumberFormatException nex) {
+				msoLogger.debug("Invalid input for mso-service-request-timeout");
+			}
+		}
+
+		return DEFAULT_WAIT_TIME;
+	}
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowResource.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowResource.java
new file mode 100644
index 0000000..c2a7f41
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowResource.java
@@ -0,0 +1,630 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.onap.so.bpmn.common.workflow.service;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import java.util.concurrent.atomic.AtomicLong;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
+
+import org.camunda.bpm.engine.HistoryService;
+import org.camunda.bpm.engine.ProcessEngineException;
+import org.camunda.bpm.engine.ProcessEngineServices;
+import org.camunda.bpm.engine.RuntimeService;
+import org.camunda.bpm.engine.history.HistoricVariableInstance;
+import org.camunda.bpm.engine.runtime.ProcessInstance;
+import org.camunda.bpm.engine.variable.VariableMap;
+import org.camunda.bpm.engine.variable.Variables;
+import org.camunda.bpm.engine.variable.Variables.SerializationDataFormats;
+import org.camunda.bpm.engine.variable.impl.VariableMapImpl;
+import org.onap.so.bpmn.common.workflow.context.WorkflowResponse;
+import org.onap.so.bpmn.core.WorkflowException;
+import org.onap.so.logger.MessageEnum;
+import org.onap.so.logger.MsoLogger;
+import org.slf4j.MDC;
+import org.springframework.stereotype.Component;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+@Path("/workflow")
+@Api(value = "/workflow", description = "Root of workflow services")
+@Component
+public class WorkflowResource extends ProcessEngineAwareService {
+	
+	private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, WorkflowResource.class);
+	private static final String LOGMARKER = "[WRKFLOW-RESOURCE]";
+
+	private static final int DEFAULT_WAIT_TIME = 30000;
+
+	@Context
+	private UriInfo uriInfo = null;
+
+	/**
+	 * Starts the process instance and responds to client synchronously
+	 * If the request does not contain mso-service-request-timeout then it waits for the value specified in DEFAULT_WAIT_TIME
+	 * Note: value specified in mso-service-request-timeout is in seconds
+	 * During polling time, if there is an exception encountered in the process execution then polling is stopped and the error response is 
+	 * returned to the client
+	 * @param processKey
+	 * @param variableMap
+	 * @return
+	 */
+	@POST
+	@Path("/services/{processKey}")
+	@ApiOperation(
+	        value = "Starts a new process with the appropriate process synchronously",
+	        notes = "d"
+	    )
+	@Produces("application/json")
+	@Consumes("application/json")
+	public Response startProcessInstanceByKey(@PathParam("processKey") String processKey,
+			VariableMapImpl variableMap) {
+
+		Map<String, Object> inputVariables = getInputVariables(variableMap);	
+		setLogContext(processKey, inputVariables);
+
+		WorkflowResponse workflowResponse = new WorkflowResponse();
+		long startTime = System.currentTimeMillis();
+		ProcessInstance processInstance = null;
+
+		try {
+			//Kickoff the process
+			ProcessThread thread = new ProcessThread(inputVariables,processKey,msoLogger);
+			thread.start();
+
+			Map<String, Object> responseMap = null;
+
+			//wait for process to be completed
+			long waitTime = getWaitTime(inputVariables);
+			long now = System.currentTimeMillis();
+			long start = now;
+			long endTime = start + waitTime;
+			long pollingInterval = 500;
+
+			// TEMPORARY LOGIC FOR UNIT TEST REFACTORING
+			// If this is a unit test (method is invoked directly), wait a max
+			// of 5 seconds after process ended for a result.  In production,
+			// wait up to 60 seconds.
+			long timeToWaitAfterProcessEnded = uriInfo == null ? 5000 : 60000;
+			AtomicLong timeProcessEnded = new AtomicLong(0);
+			boolean endedWithNoResponse = false;
+
+			while (now <= endTime) {
+				Thread.sleep(pollingInterval);
+
+				now = System.currentTimeMillis();
+
+				// Increase the polling interval over time
+
+				long elapsed = now - start;
+
+				if (elapsed > 60000) {
+					pollingInterval = 5000;
+				} else if (elapsed > 10000) {
+					pollingInterval = 1000;
+				}
+				Exception exception = thread.getException();
+				if (exception != null) {
+					throw new Exception(exception);
+				}
+
+				processInstance = thread.getProcessInstance();
+
+				if (processInstance == null) {
+					msoLogger.debug(LOGMARKER + processKey + " process has not been created yet");
+					continue;
+				}
+
+				String processInstanceId = processInstance.getId();
+				workflowResponse.setProcessInstanceID(processInstanceId);
+
+				responseMap = getResponseMap(processInstance, processKey, timeProcessEnded);
+
+				if (responseMap == null) {
+					msoLogger.debug(LOGMARKER + processKey + " has not produced a response yet");
+
+					if (timeProcessEnded.longValue() != 0) {
+						long elapsedSinceEnded = System.currentTimeMillis() - timeProcessEnded.longValue();
+
+						if (elapsedSinceEnded > timeToWaitAfterProcessEnded) {
+							endedWithNoResponse = true;
+							break;
+						}
+					}
+				} else {
+					processResponseMap(workflowResponse, responseMap);
+					recordEvents(processKey, workflowResponse, startTime);
+					return Response.status(workflowResponse.getMessageCode()).entity(workflowResponse).build();
+				}
+			}
+
+			//if we dont get response after waiting then send timeout response
+
+			String state;
+			String processInstanceId;
+
+			if (processInstance == null) {
+				processInstanceId = "N/A";
+				state = "NOT STARTED";
+			} else {
+				processInstanceId = processInstance.getProcessInstanceId();
+				state = isProcessEnded(processInstanceId) ? "ENDED" : "NOT ENDED";
+			}
+
+			workflowResponse.setMessage("Fail");
+			if (endedWithNoResponse) {
+				workflowResponse.setResponse("Process ended without producing a response");
+			} else {
+				workflowResponse.setResponse("Request timed out, process state: " + state);
+			}
+			workflowResponse.setProcessInstanceID(processInstanceId);
+			recordEvents(processKey, workflowResponse, startTime);
+			workflowResponse.setMessageCode(500);
+			return Response.status(500).entity(workflowResponse).build();
+		} catch (Exception ex) {
+			msoLogger.debug(LOGMARKER + "Exception in startProcessInstance by key",ex);
+			workflowResponse.setMessage("Fail" );
+			workflowResponse.setResponse("Error occurred while executing the process: " + ex.getMessage());
+			if (processInstance != null) workflowResponse.setProcessInstanceID(processInstance.getId());
+			
+			msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG,  "BPMN", MDC.get(processKey), 
+					MsoLogger.ErrorCode.UnknownError, LOGMARKER + workflowResponse.getMessage()
+					+ " for processKey: " + processKey + " with response: " + workflowResponse.getResponse());
+			
+			workflowResponse.setMessageCode(500);
+			recordEvents(processKey, workflowResponse, startTime);
+			return Response.status(500).entity(workflowResponse).build();
+		}
+	}
+
+	/**
+	 * Returns the wait time, this is used by the resource on how long it should wait to send a response
+	 * If none specified DEFAULT_WAIT_TIME is used
+	 * @param inputVariables
+	 * @return
+	 */
+	private int getWaitTime(Map<String, Object> inputVariables)
+	{
+		String timeout = inputVariables.get("mso-service-request-timeout") == null
+			? null : inputVariables.get("mso-service-request-timeout").toString();
+
+		if (timeout != null) {
+			try {
+				return Integer.parseInt(timeout)*1000;
+			} catch (NumberFormatException nex) {
+				msoLogger.debug("Invalid input for mso-service-request-timeout");
+			}
+		}
+		return DEFAULT_WAIT_TIME;
+	}
+	
+	private void recordEvents(String processKey, WorkflowResponse response, long startTime) {
+		
+		msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, 
+				LOGMARKER + response.getMessage() + " for processKey: "
+				+ processKey + " with response: " + response.getResponse(), "BPMN", MDC.get(processKey), null);
+		
+		msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, 
+				LOGMARKER + response.getMessage() + " for processKey: "
+				+ processKey + " with response: " + response.getResponse());
+	}
+
+	private void setLogContext(String processKey, Map<String, Object> inputVariables) {
+		MsoLogger.setServiceName("MSO." + processKey);
+		if (inputVariables != null) {
+			MsoLogger.setLogContext(getValueFromInputVariables(inputVariables, "mso-request-id"),
+				getValueFromInputVariables(inputVariables, "mso-service-instance-id"));
+		}
+	}
+
+	private String getValueFromInputVariables(Map<String,Object> inputVariables, String key) {
+		Object value = inputVariables.get(key);
+		if (value == null) {
+			return "N/A";
+		} else {
+			return value.toString();
+		}
+	}
+	
+	/**
+	 * Checks to see if the specified process is ended.
+	 * @param processInstanceId the process instance ID
+	 * @return true if the process is ended
+	 */
+	private boolean isProcessEnded(String processInstanceId) {
+		ProcessEngineServices pes = getProcessEngineServices();
+		try {
+			return pes.getRuntimeService().createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult() == null ? true : false ;
+		} catch (Exception e) {
+			msoLogger.debug("Exception :",e);
+			return true;
+		}        
+	}
+
+	private void processResponseMap(WorkflowResponse workflowResponse, Map<String, Object> responseMap) {
+		Object object = responseMap.get("Response");
+		String response = object == null ? null : String.valueOf(object);
+		if(response == null){
+			object = responseMap.get("WorkflowResponse");
+			response = object == null ? null : String.valueOf(object);
+		}
+
+		workflowResponse.setResponse(response);
+
+		object = responseMap.get("ResponseCode");
+		String responseCode = object == null ? null : String.valueOf(object);
+
+		try {
+			workflowResponse.setMessageCode(Integer.parseInt(responseCode));
+		} catch(NumberFormatException nex) {
+			msoLogger.debug(LOGMARKER + "Failed to parse ResponseCode: " + responseCode);
+			workflowResponse.setMessageCode(-1);
+		}
+
+		Object status = responseMap.get("Status");
+
+		if ("Success".equalsIgnoreCase(String.valueOf(status))) {
+			workflowResponse.setMessage("Success");
+		} else if ("Fail".equalsIgnoreCase(String.valueOf(status))) {
+			workflowResponse.setMessage("Fail");
+		} else {
+			msoLogger.debug(LOGMARKER + "Unrecognized Status: " + responseCode);
+			workflowResponse.setMessage("Fail");
+		}
+	}
+
+	/**
+	 * @version 1.0
+	 * Triggers the workflow in a separate thread
+	 */
+	private class ProcessThread extends Thread {
+		private final Map<String,Object> inputVariables;
+		private final String processKey;
+		private final MsoLogger msoLogger;
+		private final String businessKey;
+		private ProcessInstance processInstance = null;
+		private Exception exception = null;
+
+		public ProcessThread(Map<String, Object> inputVariables, String processKey, MsoLogger msoLogger) {
+			this.inputVariables = inputVariables;
+			this.processKey = processKey;
+			this.msoLogger = msoLogger;
+			this.businessKey = UUID.randomUUID().toString();
+		}
+
+		/**
+		 * If an exception occurs when starting the process instance, it may
+		 * be obtained by calling this method.  Note that exceptions are only
+		 * recorded while the process is executing in its original thread.
+		 * Once a process is suspended, exception recording stops.
+		 * @return the exception, or null if none has occurred
+		 */
+		public Exception getException() {
+			return exception;
+		}
+
+		
+		public ProcessInstance getProcessInstance() {
+			return this.processInstance;
+		}
+		
+		/**
+		 * Sets the process instance exception.
+		 * @param exception the exception
+		 */
+		private void setException(Exception exception) {
+			this.exception = exception;
+		}
+
+		public void run() {
+			setLogContext(processKey, inputVariables);
+
+			long startTime = System.currentTimeMillis();
+			
+			try {
+				msoLogger.debug(LOGMARKER + "***Received MSO startProcessInstanceByKey with processKey:"
+					+ processKey + " and variables: " + inputVariables);
+				
+				msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, LOGMARKER
+						+ "Call to MSO workflow/services in Camunda. Received MSO startProcessInstanceByKey with"
+						+ " processKey:" + processKey
+						+ " businessKey:" + businessKey
+						+ " variables: " + inputVariables);
+						
+				RuntimeService runtimeService = getProcessEngineServices().getRuntimeService();
+
+				// Note that this method doesn't return until the process suspends
+				// itself or finishes.  We provide a business key so we can identify
+				// the process instance immediately.
+				processInstance = runtimeService.startProcessInstanceByKey(
+					processKey, inputVariables);
+
+			} catch (Exception e) {
+				msoLogger.debug(LOGMARKER + "ProcessThread caught an exception executing "
+					+ processKey + ": " + e);
+				setException(e);
+			}
+		}
+
+	}
+
+	private Map<String, Object> getInputVariables(VariableMapImpl variableMap) {
+		VariableMap inputVariables = Variables.createVariables();
+		@SuppressWarnings("unchecked")
+		Map<String, Object> vMap = (Map<String, Object>) variableMap.get("variables");
+		for (String key : vMap.keySet()) { //variabe name vn
+			@SuppressWarnings("unchecked")
+			Map<String, Object> valueMap = (Map<String,Object>)vMap.get(key); //value, type
+			inputVariables.putValueTyped(key, Variables
+			.objectValue(valueMap.get("value"))
+			.serializationDataFormat(SerializationDataFormats.JAVA) // tells the engine to use java serialization for persisting the value
+			.create());
+		}
+		return inputVariables;
+	}
+
+	/**
+	 * Attempts to get a response map from the specified process instance.
+	 * @return the response map, or null if it is unavailable
+	 */
+	private Map<String, Object> getResponseMap(ProcessInstance processInstance,
+			String processKey, AtomicLong timeProcessEnded) {
+
+		String responseMapVariable = processKey + "ResponseMap";
+		String processInstanceId = processInstance.getId();
+
+		// Query the runtime service to see if a response map is ready.
+
+/*		RuntimeService runtimeService = getProcessEngineServices().getRuntimeService();
+		List<Execution> executions = runtimeService.createExecutionQuery()
+			.processInstanceId(processInstanceId).list();
+
+		for (Execution execution : executions) {
+			@SuppressWarnings("unchecked")
+			Map<String, Object> responseMap = (Map<String, Object>)
+				getVariableFromExecution(runtimeService, execution.getId(),
+					responseMapVariable);
+
+			if (responseMap != null) {
+				msoLogger.debug(LOGMARKER + "Obtained " + responseMapVariable
+					+ " from process " + processInstanceId + " execution "
+					+ execution.getId());
+				return responseMap;
+			}
+		}
+*/
+		//Querying history seem to return consistent results compared to querying the runtime service
+
+		boolean alreadyEnded = timeProcessEnded.longValue() != 0;
+
+		if (alreadyEnded || isProcessEnded(processInstance.getId())) {
+			if (!alreadyEnded) {
+				timeProcessEnded.set(System.currentTimeMillis());
+			}
+
+			// Query the history service to see if a response map exists.
+
+			HistoryService historyService = getProcessEngineServices().getHistoryService();
+			@SuppressWarnings("unchecked")
+			Map<String, Object> responseMap = (Map<String, Object>)
+				getVariableFromHistory(historyService, processInstance.getId(),
+					responseMapVariable);
+
+			if (responseMap != null) {
+				msoLogger.debug(LOGMARKER + "Obtained " + responseMapVariable
+					+ " from process " + processInstanceId + " history");
+				return responseMap;
+			}
+
+			// Query the history service for old-style response variables.
+
+			String prefix = (String) getVariableFromHistory(historyService, processInstanceId, "prefix");
+
+			if (prefix != null) {
+				
+				// Check for 'WorkflowResponse' variable
+				Object workflowResponseObject = getVariableFromHistory(historyService, processInstanceId, "WorkflowResponse");
+				String workflowResponse = workflowResponseObject == null ? null : String.valueOf(workflowResponseObject);
+				msoLogger.debug(LOGMARKER + "WorkflowResponse: " + workflowResponse);
+				
+				if (workflowResponse != null) {
+					Object responseCodeObject = getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");
+					String responseCode = responseCodeObject == null ? null : String.valueOf(responseCodeObject);
+					msoLogger.debug(LOGMARKER + prefix + "ResponseCode: " + responseCode);
+					responseMap = new HashMap<>();
+					responseMap.put("WorkflowResponse", workflowResponse);
+					responseMap.put("ResponseCode", responseCode);
+					responseMap.put("Status", "Success");
+					return responseMap;
+				}
+				
+				
+				// Check for 'WorkflowException' variable
+				WorkflowException workflowException = null;
+				String workflowExceptionText = null;
+
+				Object workflowExceptionObject = getVariableFromHistory(historyService, processInstanceId, "WorkflowException");
+				if(workflowExceptionObject != null) {
+					if(workflowExceptionObject instanceof WorkflowException) {
+						workflowException = (WorkflowException) workflowExceptionObject;
+						workflowExceptionText = workflowException.toString();
+						responseMap = new HashMap<>();
+						responseMap.put("WorkflowException", workflowExceptionText);
+						responseMap.put("ResponseCode", workflowException.getErrorCode());
+						responseMap.put("Status", "Fail");
+						return responseMap;
+					}
+					else if (workflowExceptionObject instanceof String) {
+						Object object = getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");
+						String responseCode = object == null ? null : String.valueOf(object);
+						workflowExceptionText = (String) workflowExceptionObject;
+						responseMap = new HashMap<>();
+						responseMap.put("WorkflowException", workflowExceptionText);
+						responseMap.put("ResponseCode", responseCode);
+						responseMap.put("Status", "Fail");
+						return responseMap;
+					}
+					
+				}
+				msoLogger.debug(LOGMARKER + "WorkflowException: " + workflowExceptionText);
+				
+				// BEGIN LEGACY SUPPORT.  TODO: REMOVE THIS CODE
+				Object object = getVariableFromHistory(historyService, processInstanceId, processKey + "Response");
+				String response = object == null ? null : String.valueOf(object);
+				msoLogger.debug(LOGMARKER + processKey + "Response: " + response);
+
+				if (response != null) {
+					object = getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");
+					String responseCode = object == null ? null : String.valueOf(object);
+					msoLogger.debug(LOGMARKER + prefix + "ResponseCode: " + responseCode);
+					responseMap = new HashMap<>();
+					responseMap.put("Response", response);
+					responseMap.put("ResponseCode", responseCode);
+					responseMap.put("Status", "Success");
+					return responseMap;
+				}
+	
+				object = getVariableFromHistory(historyService, processInstanceId, prefix + "ErrorResponse");
+				String errorResponse = object == null ? null : String.valueOf(object);
+				msoLogger.debug(LOGMARKER + prefix + "ErrorResponse: " + errorResponse);
+
+				if (errorResponse != null) {
+					object = getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");
+					String responseCode = object == null ? null : String.valueOf(object);
+					msoLogger.debug(LOGMARKER + prefix + "ResponseCode: " + responseCode);
+					responseMap = new HashMap<>();
+					responseMap.put("Response", errorResponse);
+					responseMap.put("ResponseCode", responseCode);
+					responseMap.put("Status", "Fail");
+					return responseMap;
+				}
+				// END LEGACY SUPPORT.  TODO: REMOVE THIS CODE
+			}
+		}
+		return null;
+	}
+	
+	/**
+	 * Gets a variable value from the specified execution.
+	 * @return the variable value, or null if the variable could not be
+	 * obtained
+	 */
+	private Object getVariableFromExecution(RuntimeService runtimeService,
+			String executionId, String variableName) {
+		try {
+			return runtimeService.getVariable(executionId, variableName);
+		} catch (ProcessEngineException e) {
+			// Most likely cause is that the execution no longer exists.
+			msoLogger.debug("Error retrieving execution " + executionId
+				+ " variable " + variableName + ": " + e);
+			return null;
+		}
+	}
+	/**
+	 * Gets a variable value from specified historical process instance.
+	 * @return the variable value, or null if the variable could not be
+	 * obtained
+	 */
+	private Object getVariableFromHistory(HistoryService historyService,
+			String processInstanceId, String variableName) {
+		try {
+			HistoricVariableInstance v = historyService.createHistoricVariableInstanceQuery()
+				.processInstanceId(processInstanceId).variableName(variableName).singleResult();
+			return v == null ? null : v.getValue();
+		} catch (Exception e) {
+			msoLogger.debug("Error retrieving process " + processInstanceId
+				+ " variable " + variableName + " from history: " + e);
+			return null;
+		}
+	}
+	
+	@POST
+	@Path("/services/{processKey}/{processInstanceId}")
+	@Produces("application/json")
+	@Consumes("application/json")
+	@ApiOperation(
+	        value = "Allows for retrieval of the variables for a given process",
+	        notes = ""
+	    )
+	public WorkflowResponse getProcessVariables(@PathParam("processKey") String processKey, @PathParam("processInstanceId") String processInstanceId) {
+		//TODO filter only set of variables
+		WorkflowResponse response = new WorkflowResponse();
+
+		long startTime = System.currentTimeMillis();
+		try {
+			ProcessEngineServices engine = getProcessEngineServices();
+			List<HistoricVariableInstance> variables = engine.getHistoryService().createHistoricVariableInstanceQuery().processInstanceId(processInstanceId).list();
+			Map<String,String> variablesMap = new HashMap<>();
+			for (HistoricVariableInstance variableInstance: variables) {
+				variablesMap.put(variableInstance.getName(), variableInstance.getValue().toString());
+			}
+
+			msoLogger.debug(LOGMARKER + "***Received MSO getProcessVariables with processKey:" + processKey + " and variables: " + variablesMap.toString());
+			
+			msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, LOGMARKER 
+					+ "Call to MSO workflow/services in Camunda. Received MSO getProcessVariables with processKey:" 
+					+ processKey + " and variables: " 
+					+ variablesMap.toString());
+			
+			
+			response.setVariables(variablesMap);
+			response.setMessage("Success");
+			response.setResponse("Successfully retrieved the variables");
+			response.setProcessInstanceID(processInstanceId);
+
+			msoLogger.debug(LOGMARKER + response.getMessage() + " for processKey: " + processKey + " with response: " + response.getResponse());
+		} catch (Exception ex) {
+			response.setMessage("Fail");
+			response.setResponse("Failed to retrieve the variables," + ex.getMessage());
+			response.setProcessInstanceID(processInstanceId);
+			
+			msoLogger.error (MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "BPMN", MDC.get(processKey), MsoLogger.ErrorCode.UnknownError, LOGMARKER 
+					+ response.getMessage() 
+					+ " for processKey: " 
+					+ processKey 
+					+ " with response: " 
+					+ response.getResponse());
+			msoLogger.debug("Exception :",ex);
+		}
+		
+		msoLogger.recordMetricEvent ( startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, 
+				LOGMARKER + response.getMessage() + " for processKey: "
+				+ processKey + " with response: " + response.getResponse(), "BPMN", MDC.get(processKey), null);
+		
+		msoLogger.recordAuditEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, 
+				LOGMARKER + response.getMessage() + " for processKey: "
+				+ processKey + " with response: " + response.getResponse());
+		
+		return response;
+	}
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/LoggingAndURNMappingPlugin.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/LoggingAndURNMappingPlugin.java
new file mode 100644
index 0000000..00ee6eb
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/LoggingAndURNMappingPlugin.java
@@ -0,0 +1,353 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.core.plugins;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.camunda.bpm.engine.RepositoryService;
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.camunda.bpm.engine.delegate.ExecutionListener;
+import org.camunda.bpm.engine.impl.bpmn.parser.AbstractBpmnParseListener;
+import org.camunda.bpm.engine.impl.bpmn.parser.BpmnParseListener;
+import org.camunda.bpm.engine.impl.cfg.AbstractProcessEnginePlugin;
+import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl;
+import org.camunda.bpm.engine.impl.context.Context;
+import org.camunda.bpm.engine.impl.interceptor.Command;
+import org.camunda.bpm.engine.impl.interceptor.CommandContext;
+import org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity;
+import org.camunda.bpm.engine.impl.pvm.process.ActivityImpl;
+import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl;
+import org.camunda.bpm.engine.impl.pvm.process.TransitionImpl;
+import org.camunda.bpm.engine.impl.util.xml.Element;
+import org.camunda.bpm.engine.impl.variable.VariableDeclaration;
+import org.camunda.bpm.model.bpmn.impl.instance.FlowNodeImpl;
+import org.camunda.bpm.model.bpmn.instance.EndEvent;
+import org.camunda.bpm.model.bpmn.instance.FlowNode;
+import org.camunda.bpm.model.bpmn.instance.StartEvent;
+import org.onap.so.bpmn.core.BPMNLogger;
+
+
+import org.onap.so.logger.MessageEnum;
+import org.onap.so.logger.MsoLogger;
+import org.slf4j.MDC;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.env.AbstractEnvironment;
+import org.springframework.core.env.Environment;
+import org.springframework.core.env.MapPropertySource;
+import org.springframework.core.env.PropertySource;
+import org.springframework.stereotype.Component;
+
+
+
+/**
+ * Plugin for MSO logging and URN mapping.
+ */
+@Component
+public class LoggingAndURNMappingPlugin extends AbstractProcessEnginePlugin {
+	private static MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, LoggingAndURNMappingPlugin.class);
+	private static final String FSPROPKEY = "URNMapping.FileSystemLoading.Enabled";
+	
+	@Autowired
+	private LoggingParseListener loggingParseListener;
+	
+	@Override
+	public void preInit(
+			ProcessEngineConfigurationImpl processEngineConfiguration) {
+		List<BpmnParseListener> preParseListeners = processEngineConfiguration
+				.getCustomPreBPMNParseListeners();
+		if (preParseListeners == null) {
+			preParseListeners = new ArrayList<>();
+			processEngineConfiguration.setCustomPreBPMNParseListeners(preParseListeners);
+		}
+		preParseListeners.add(loggingParseListener);
+	}
+	
+	/**
+	 * Called when a process flow is parsed so we can inject listeners.
+	 */
+	@Component
+	public class LoggingParseListener extends AbstractBpmnParseListener {		
+		
+		
+		private void injectLogExecutionListener(ActivityImpl activity) {
+			activity.addListener(
+					ExecutionListener.EVENTNAME_END,
+					new LoggingExecutionListener("END"));
+
+			activity.addListener(
+					ExecutionListener.EVENTNAME_START,
+					new LoggingExecutionListener("START"));
+
+			activity.addListener(
+					ExecutionListener.EVENTNAME_TAKE,
+					new LoggingExecutionListener("TAKE"));
+		}
+
+                @Override
+		public void parseProcess(Element processElement, ProcessDefinitionEntity processDefinition) {
+		}
+
+                @Override
+		public void parseStartEvent(Element startEventElement, ScopeImpl scope, ActivityImpl startEventActivity) {
+			// Inject these listeners only on the main start event for the flow, not on any embedded subflow start events			
+
+			injectLogExecutionListener(startEventActivity);
+		}
+
+		@Override
+		public void parseServiceTask(Element serviceTaskElement, ScopeImpl scope, ActivityImpl activity) {
+			injectLogExecutionListener(activity);
+		}
+
+                @Override
+		public void parseExclusiveGateway(Element exclusiveGwElement, ScopeImpl scope, ActivityImpl activity) {
+			injectLogExecutionListener(activity);
+		}
+
+                @Override
+		public void parseInclusiveGateway(Element inclusiveGwElement, ScopeImpl scope, ActivityImpl activity) {
+			injectLogExecutionListener(activity);
+		}
+
+                @Override
+		public void parseParallelGateway(Element parallelGwElement, ScopeImpl scope, ActivityImpl activity) {
+			injectLogExecutionListener(activity);
+		}
+
+                @Override
+		public void parseScriptTask(Element scriptTaskElement, ScopeImpl scope, ActivityImpl activity) {
+			injectLogExecutionListener(activity);
+		}
+
+                @Override
+		public void parseBusinessRuleTask(Element businessRuleTaskElement, ScopeImpl scope, ActivityImpl activity) {
+			injectLogExecutionListener(activity);
+		}
+
+                @Override
+		public void parseTask(Element taskElement, ScopeImpl scope, ActivityImpl activity) {
+			injectLogExecutionListener(activity);
+		}
+
+                @Override
+		public void parseManualTask(Element manualTaskElement, ScopeImpl scope, ActivityImpl activity) {
+			injectLogExecutionListener(activity);
+		}
+
+                @Override
+		public void parseUserTask(Element userTaskElement, ScopeImpl scope, ActivityImpl activity) {
+			injectLogExecutionListener(activity);
+		}
+
+                @Override
+		public void parseEndEvent(Element endEventElement, ScopeImpl scope, ActivityImpl activity) {
+			injectLogExecutionListener(activity);
+		}
+
+                @Override
+		public void parseBoundaryTimerEventDefinition(Element timerEventDefinition, boolean interrupting, ActivityImpl timerActivity) {
+			injectLogExecutionListener(timerActivity);
+		}
+
+                @Override
+		public void parseBoundaryErrorEventDefinition(Element errorEventDefinition, boolean interrupting, ActivityImpl activity, ActivityImpl nestedErrorEventActivity) {
+			injectLogExecutionListener(activity);
+		}
+
+                @Override
+		public void parseSubProcess(Element subProcessElement, ScopeImpl scope, ActivityImpl activity) {
+			injectLogExecutionListener(activity);
+		}
+
+                @Override
+		public void parseCallActivity(Element callActivityElement, ScopeImpl scope, ActivityImpl activity) {
+			injectLogExecutionListener(activity);
+		}
+
+                @Override
+		public void parseProperty(Element propertyElement, VariableDeclaration variableDeclaration, ActivityImpl activity) {
+			injectLogExecutionListener(activity);
+		}
+
+                @Override
+		public void parseSequenceFlow(Element sequenceFlowElement, ScopeImpl scopeElement, TransitionImpl transition) {
+			//injectLogExecutionListener(activity);
+		}
+
+                @Override
+		public void parseSendTask(Element sendTaskElement, ScopeImpl scope, ActivityImpl activity) {
+			injectLogExecutionListener(activity);
+		}
+
+                @Override
+		public void parseMultiInstanceLoopCharacteristics(Element activityElement, Element multiInstanceLoopCharacteristicsElement, ActivityImpl activity) {
+			injectLogExecutionListener(activity);
+		}
+
+                @Override
+		public void parseIntermediateTimerEventDefinition(Element timerEventDefinition, ActivityImpl timerActivity) {
+			injectLogExecutionListener(timerActivity);
+		}
+
+                @Override
+		public void parseRootElement(Element rootElement, List<ProcessDefinitionEntity> processDefinitions) {
+			//injectLogExecutionListener(activity);
+		}
+
+                @Override
+		public void parseReceiveTask(Element receiveTaskElement, ScopeImpl scope, ActivityImpl activity) {
+			injectLogExecutionListener(activity);
+		}
+
+                @Override
+		public void parseIntermediateSignalCatchEventDefinition(Element signalEventDefinition, ActivityImpl signalActivity) {
+			injectLogExecutionListener(signalActivity);
+		}
+
+                @Override
+		public void parseBoundarySignalEventDefinition(Element signalEventDefinition, boolean interrupting, ActivityImpl signalActivity) {
+			injectLogExecutionListener(signalActivity);
+		}
+
+                @Override
+		public void parseEventBasedGateway(Element eventBasedGwElement, ScopeImpl scope, ActivityImpl activity) {
+			injectLogExecutionListener(activity);
+		}
+
+                @Override
+		public void parseTransaction(Element transactionElement, ScopeImpl scope, ActivityImpl activity) {
+			injectLogExecutionListener(activity);
+		}
+
+                @Override
+		public void parseCompensateEventDefinition(Element compensateEventDefinition, ActivityImpl compensationActivity) {
+			injectLogExecutionListener(compensationActivity);
+		}
+
+                @Override
+		public void parseIntermediateThrowEvent(Element intermediateEventElement, ScopeImpl scope, ActivityImpl activity) {
+			injectLogExecutionListener(activity);
+		}
+
+                @Override
+		public void parseIntermediateCatchEvent(Element intermediateEventElement, ScopeImpl scope, ActivityImpl activity) {
+			injectLogExecutionListener(activity);
+		}
+
+                @Override
+		public void parseBoundaryEvent(Element boundaryEventElement, ScopeImpl scopeElement, ActivityImpl nestedActivity) {
+			injectLogExecutionListener(nestedActivity);
+		}
+
+                @Override
+		public void parseIntermediateMessageCatchEventDefinition(Element messageEventDefinition, ActivityImpl nestedActivity) {
+			injectLogExecutionListener(nestedActivity);
+		}
+
+                @Override
+		public void parseBoundaryMessageEventDefinition(Element element, boolean interrupting, ActivityImpl messageActivity) {
+			injectLogExecutionListener(messageActivity);
+		}
+	}
+	
+	/**
+	 * Logs details about the current activity.
+	 */	
+	public class LoggingExecutionListener implements ExecutionListener {
+		private final MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,LoggingExecutionListener.class);	
+
+		private String event;
+		
+		public LoggingExecutionListener() {
+			this.event = "";
+		}
+
+		public LoggingExecutionListener(String event) {
+			this.event = event;
+		}
+		
+		public String getEvent() {
+			return event;
+		}
+
+		@Override
+		public void notify(DelegateExecution execution) throws Exception {
+			logger.trace("Logging for activity---------------:" + event + ":"
+						+ execution.getCurrentActivityName()
+						+ ", processDefinitionId="
+						+ execution.getProcessDefinitionId() + ", activtyId="
+						+ execution.getCurrentActivityId() + ", activtyName='"
+						+ execution.getCurrentActivityName() + "'"
+						+ ", processInstanceId="
+						+ execution.getProcessInstanceId() + ", businessKey="
+						+ execution.getProcessBusinessKey() + ", executionId="
+						+ execution.getId());
+			//required for legacy groovy processing in camunda
+			execution.setVariable("isDebugLogEnabled", "true");
+			if (!isBlank(execution.getCurrentActivityName())) {
+				try {
+				
+					String id = execution.getId();
+					if (id != null ) {				
+						RepositoryService repositoryService = execution.getProcessEngineServices().getRepositoryService();
+						String processName = repositoryService.createProcessDefinitionQuery()
+						  .processDefinitionId(execution.getProcessDefinitionId())
+						  .singleResult()
+						  .getName();
+						
+						if (execution.getBpmnModelElementInstance() instanceof StartEvent) {
+							logger.debug("Starting process: " + processName);
+						}
+						if (execution.getBpmnModelElementInstance() instanceof EndEvent) {
+							logger.debug("Ending process: " + processName);
+						}
+						
+						String serviceName = MDC.get(MsoLogger.SERVICE_NAME);
+						
+						if(serviceName != null && !serviceName.contains(processName))
+							MsoLogger.setServiceName( serviceName + "." + processName);
+						else if(serviceName == null)
+							MsoLogger.setServiceName(processName);
+						
+						String requestId = (String) execution.getVariable("mso-request-id");
+						String svcid = (String) execution.getVariable("mso-service-instance-id");
+						MsoLogger.setLogContext(requestId, svcid);							
+					}
+				} catch(Exception e) {					
+					logger.error(e);
+				}
+			}
+		}
+
+		private boolean isBlank(Object object) {
+			return object == null || "".equals(object.toString().trim());
+		}
+	}
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/WorkflowExceptionPlugin.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/WorkflowExceptionPlugin.java
new file mode 100644
index 0000000..9b8f6cd
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/WorkflowExceptionPlugin.java
@@ -0,0 +1,172 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.core.plugins;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.camunda.bpm.engine.delegate.BpmnError;
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.camunda.bpm.engine.delegate.ExecutionListener;
+import org.camunda.bpm.engine.delegate.JavaDelegate;
+import org.camunda.bpm.engine.impl.bpmn.behavior.ClassDelegateActivityBehavior;
+import org.camunda.bpm.engine.impl.bpmn.parser.AbstractBpmnParseListener;
+import org.camunda.bpm.engine.impl.bpmn.parser.BpmnParseListener;
+import org.camunda.bpm.engine.impl.bpmn.parser.FieldDeclaration;
+import org.camunda.bpm.engine.impl.cfg.AbstractProcessEnginePlugin;
+import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl;
+import org.camunda.bpm.engine.impl.persistence.entity.ProcessDefinitionEntity;
+import org.camunda.bpm.engine.impl.pvm.PvmTransition;
+import org.camunda.bpm.engine.impl.pvm.process.ActivityImpl;
+import org.camunda.bpm.engine.impl.pvm.process.TransitionImpl;
+import org.camunda.bpm.engine.impl.util.xml.Element;
+
+import org.onap.so.bpmn.core.BPMNLogger;
+import org.onap.so.bpmn.core.WorkflowException;
+import org.springframework.stereotype.Component;
+
+/**
+ * This plugin does the following:
+ * <ol>
+ * <li>
+ * Adds logic at the start of every Call Activity to remove any existing
+ * WorkflowException object from the execution (saving a copy of it in a
+ * different variable).
+ * </li>
+ * <li>
+ * Adds logic at the end of every Call Activity to generate a MSOWorkflowException
+ * event if there is a WorkflowException object in the execution.
+ * </li>
+ * </ol>
+ */
+@Component
+public class WorkflowExceptionPlugin extends AbstractProcessEnginePlugin {
+	
+	@Override
+	public void preInit(ProcessEngineConfigurationImpl processEngineConfiguration) {
+		List<BpmnParseListener> preParseListeners =
+			processEngineConfiguration.getCustomPreBPMNParseListeners();
+
+		if (preParseListeners == null) {
+			preParseListeners = new ArrayList<>();
+			processEngineConfiguration.setCustomPreBPMNParseListeners(preParseListeners);
+		}
+
+		preParseListeners.add(new WorkflowExceptionParseListener());
+	}
+	
+	public static class WorkflowExceptionParseListener extends AbstractBpmnParseListener {
+		@Override
+		public void parseProcess(Element processElement, ProcessDefinitionEntity processDefinition) {
+			AtomicInteger triggerTaskIndex = new AtomicInteger(1);
+			List<ActivityImpl> activities = new ArrayList<>(processDefinition.getActivities());
+			recurse(activities, triggerTaskIndex);
+		}
+
+		/**
+		 * Helper method that recurses (into subprocesses) over all the listed activities.
+		 * @param activities a list of workflow activities
+		 * @param triggerTaskIndex the index of the next trigger task (mutable)
+		 */
+		private void recurse(List<ActivityImpl> activities, AtomicInteger triggerTaskIndex) {
+			for (ActivityImpl activity : activities) {
+				String type = (String) activity.getProperty("type");
+
+				if ("callActivity".equals(type)) {
+					// Add a WorkflowExceptionResetListener to clear the WorkflowException
+					// variable when each Call Activity starts.
+
+					activity.addListener(
+						ExecutionListener.EVENTNAME_START,
+						new WorkflowExceptionResetListener());
+
+					// Add a WorkflowExceptionTriggerTask after the call activity.
+					// It must be a task because a listener cannot be used to generate
+					// an event.  Throwing BpmnError from an execution listener will
+					// cause the process to die.
+
+					List<PvmTransition> outTransitions =
+                        new ArrayList<>(activity.getOutgoingTransitions());
+
+					for (PvmTransition transition : outTransitions) {
+						String triggerTaskId = "WorkflowExceptionTriggerTask_" + triggerTaskIndex;
+
+						ActivityImpl triggerTask = activity.getFlowScope().createActivity(triggerTaskId);
+
+						ClassDelegateActivityBehavior behavior = new  ClassDelegateActivityBehavior(
+								WorkflowExceptionTriggerTask.class.getName(),
+                            new ArrayList<>(0));
+
+						triggerTask.setActivityBehavior(behavior);
+						triggerTask.setName("Workflow Exception Trigger Task " + triggerTaskIndex);
+						triggerTaskIndex.getAndIncrement();
+
+						TransitionImpl transitionImpl = (TransitionImpl) transition;
+						TransitionImpl triggerTaskOutTransition = triggerTask.createOutgoingTransition();
+						triggerTaskOutTransition.setDestination((ActivityImpl)transitionImpl.getDestination());
+						transitionImpl.setDestination(triggerTask);
+					}
+				} else if ("subProcess".equals(type)) {
+					recurse(new ArrayList<>(activity.getActivities()), triggerTaskIndex);
+				}
+			}
+		}
+	}
+	
+    /**
+     * If there is a WorkflowException object in the execution, this method
+     * removes it (saving a copy of it in a different variable).
+     */
+	public static class WorkflowExceptionResetListener implements ExecutionListener {
+		public void notify(DelegateExecution execution) throws Exception {
+			Object workflowException = execution.getVariable("WorkflowException");
+
+			if (workflowException instanceof WorkflowException) {
+				int index = 1;
+				String saveName = "SavedWorkflowException" + index;
+				while (execution.getVariable(saveName) != null) {
+					saveName = "SavedWorkflowException" + (++index);
+				}
+
+				BPMNLogger.debug((String)execution.getVariable("isDebugLogEnabled"),
+					"WorkflowExceptionResetTask is moving WorkflowException to " + saveName);
+
+				execution.setVariable(saveName, workflowException);
+				execution.setVariable("WorkflowException", null);
+			}
+		}
+	}
+
+    /**
+     * Generates an MSOWorkflowException event if there is a WorkflowException
+     * object in the execution.
+     */
+	public static class WorkflowExceptionTriggerTask implements JavaDelegate {
+		public void execute(DelegateExecution execution) throws Exception {
+			if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+				BPMNLogger.debug((String)execution.getVariable("isDebugLogEnabled"),
+					"WorkflowExceptionTriggerTask is generating a MSOWorkflowException event");
+				throw new BpmnError("MSOWorkflowException");
+			}
+		}
+	}
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/CXFConfiguration.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/CXFConfiguration.java
new file mode 100644
index 0000000..8fe7ebe
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/CXFConfiguration.java
@@ -0,0 +1,122 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.infrastructure;
+
+import java.util.Arrays;
+
+import javax.xml.ws.Endpoint;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.endpoint.Server;
+import org.apache.cxf.feature.LoggingFeature;
+import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;
+import org.apache.cxf.jaxrs.swagger.Swagger2Feature;
+import org.apache.cxf.jaxws.EndpointImpl;
+import org.apache.cxf.transport.servlet.CXFServlet;
+import org.onap.so.bpmn.common.adapter.sdnc.SDNCCallbackAdapterPortType;
+import org.onap.so.bpmn.common.adapter.vnf.VnfAdapterNotify;
+import org.onap.so.bpmn.common.workflow.service.WorkflowAsyncResource;
+import org.onap.so.bpmn.common.workflow.service.WorkflowMessageResource;
+import org.onap.so.bpmn.common.workflow.service.WorkflowResource;
+import org.onap.so.logger.MsoLogger;
+import org.onap.so.logging.jaxrs.filter.jersey.JaxRsFilterLogging;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.web.servlet.ServletRegistrationBean;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
+
+
+@Configuration
+public class CXFConfiguration {
+    
+	private static final MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,CXFConfiguration.class);
+	
+    @Autowired
+    private Bus bus;    
+
+	@Autowired
+	private WorkflowMessageResource wmr;
+	
+	@Autowired
+	private WorkflowResource workflowResource;
+
+	@Autowired
+	private WorkflowAsyncResource workflowAsyncResource;
+	
+	@Autowired
+	private JaxRsFilterLogging jaxRsFilterLogging;
+	
+	@Autowired
+	private ObjectMapper mapper; 
+	
+	@Autowired
+	private SDNCCallbackAdapterPortType sdncAdapterCallbackServiceImpl;
+	
+	@Autowired
+	private VnfAdapterNotify vnfAdapterNotifyServiceImpl;
+	
+	@Bean
+    public ServletRegistrationBean cxfServlet() {
+        return new ServletRegistrationBean(new CXFServlet(), "/mso/*");
+    }
+    
+    @Bean
+    public Endpoint vnfAdapterCallback() {
+        EndpointImpl endpoint = new EndpointImpl(bus, vnfAdapterNotifyServiceImpl);
+        endpoint.publish("/VNFAdaptercallback");
+        return endpoint;
+    }
+	
+    @Bean
+    public Endpoint sndcAdapterCallback() {
+        EndpointImpl endpoint = new EndpointImpl(bus, sdncAdapterCallbackServiceImpl);
+        endpoint.publish("/SDNCAdapterCallbackService");
+        return endpoint;
+    }
+		
+    @Bean
+    public Server rsServer() {
+        JAXRSServerFactoryBean endpoint = new JAXRSServerFactoryBean();
+        endpoint.setBus(bus);
+        endpoint.setServiceBeans(Arrays.<Object>asList(wmr, workflowResource, workflowAsyncResource));
+        endpoint.setAddress("/");       
+        endpoint.setFeatures(Arrays.asList(createSwaggerFeature(), new LoggingFeature()));
+        endpoint.setProviders(Arrays.asList(new JacksonJsonProvider(mapper),jaxRsFilterLogging));
+       
+        return endpoint.create();
+    }
+
+    @Bean
+    public Swagger2Feature createSwaggerFeature() {
+    	Swagger2Feature swagger2Feature= new Swagger2Feature();
+        swagger2Feature.setPrettyPrint(true);
+        swagger2Feature.setTitle("SO Orchestration Application");
+        swagger2Feature.setContact("The ONAP SO team");
+        swagger2Feature.setDescription("This project is the SO Orchestration Engine");
+        swagger2Feature.setVersion("1.0.0");
+        swagger2Feature.setResourcePackage("org.onap.so.bpmn.common.workflow.service");
+        swagger2Feature.setScan(true);
+        return swagger2Feature;
+    }
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java
new file mode 100644
index 0000000..c263fe6
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java
@@ -0,0 +1,117 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.infrastructure;
+
+import java.util.List;
+import java.util.concurrent.Executor;
+
+import org.camunda.bpm.application.PostDeploy;
+import org.camunda.bpm.application.PreUndeploy;
+import org.camunda.bpm.application.ProcessApplicationInfo;
+import org.camunda.bpm.engine.ProcessEngine;
+import org.camunda.bpm.spring.boot.starter.annotation.EnableProcessApplication;
+import org.onap.so.bpmn.common.DefaultToShortClassNameBeanNameGenerator;
+import org.onap.so.db.request.data.repository.InfraActiveRequestsRepositoryImpl;
+import org.onap.so.logger.MsoLogger;
+import org.onap.so.requestsdb.RequestsDBHelper;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.ComponentScan.Filter;
+import org.springframework.context.annotation.FilterType;
+import org.springframework.context.annotation.Primary;
+import org.springframework.scheduling.annotation.EnableAsync;
+import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
+
+/**
+ * @since Version 1.0
+ *
+ */
+
+@SpringBootApplication
+@EnableProcessApplication("MSO Infrastructure Application")
+@EnableAsync
+@ComponentScan(basePackages = { "org.onap" }, nameGenerator = DefaultToShortClassNameBeanNameGenerator.class, excludeFilters = {
+				@Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class),
+				@Filter(type = FilterType.ASSIGNABLE_TYPE, classes = RequestsDBHelper.class),
+				@Filter(type = FilterType.ASSIGNABLE_TYPE, classes = InfraActiveRequestsRepositoryImpl.class) })
+public class MSOInfrastructureApplication {
+
+	private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,
+			MSOInfrastructureApplication.class);
+
+	@Value("${mso.async.core-pool-size}")
+	private int corePoolSize;
+
+	@Value("${mso.async.max-pool-size}")
+	private int maxPoolSize;
+
+	@Value("${mso.async.queue-capacity}")
+	private int queueCapacity;
+
+	private static final String LOGS_DIR = "logs_dir";
+
+
+	private static void setLogsDir() {
+		if (System.getProperty(LOGS_DIR) == null) {
+			System.getProperties().setProperty(LOGS_DIR, "./logs/bpmn/");
+		}
+	}
+
+	public static void main(String... args) {
+		SpringApplication.run(MSOInfrastructureApplication.class, args);
+		System.getProperties().setProperty("mso.config.path", ".");
+		setLogsDir();
+	}
+
+	@PostDeploy
+	public void postDeploy(ProcessEngine processEngineInstance) {
+		long startTime = System.currentTimeMillis();
+
+		msoLogger.recordAuditEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
+				"Post deployment complete...");
+	}
+
+	@PreUndeploy
+	public void cleanup(ProcessEngine processEngine, ProcessApplicationInfo processApplicationInfo,
+			List<ProcessEngine> processEngines) {
+		long startTime = System.currentTimeMillis();
+
+		msoLogger.recordAuditEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
+				"Pre Undeploy complete...");
+
+	}
+
+	@Bean
+	@Primary
+	public Executor asyncExecutor() {
+		ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
+
+		executor.setCorePoolSize(corePoolSize);
+		executor.setMaxPoolSize(maxPoolSize);
+		executor.setQueueCapacity(queueCapacity);
+		executor.setThreadNamePrefix("Camunda-");
+		executor.initialize();
+		return executor;
+	}
+}
\ No newline at end of file
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/WebSecurityConfigImpl.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/WebSecurityConfigImpl.java
new file mode 100644
index 0000000..ad9e210
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/WebSecurityConfigImpl.java
@@ -0,0 +1,52 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 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.onap.so.bpmn.infrastructure;
+
+import org.onap.so.security.MSOSpringFirewall;
+import org.onap.so.security.WebSecurityConfig;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.builders.WebSecurity;
+import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
+import org.springframework.security.web.firewall.StrictHttpFirewall;
+import org.springframework.util.StringUtils;
+
+@EnableWebSecurity
+public class WebSecurityConfigImpl extends WebSecurityConfig {
+
+	@Override
+	protected void configure(HttpSecurity http) throws Exception {
+		http.csrf().disable()
+		.authorizeRequests()
+		.antMatchers("/manage/health","/manage/info").permitAll()
+		.antMatchers("/async/services/**", "/workflow/services/*", "/SDNCAdapterCallbackService", "/WorkflowMessage", "/vnfAdapterNotify", "/vnfAdapterRestNotify")
+		.hasAnyRole(StringUtils.collectionToDelimitedString(getRoles(),",").toString())
+		.and()
+		.httpBasic();
+	}
+	
+	@Override
+	public void configure(WebSecurity web) throws Exception {
+		super.configure(web);
+		StrictHttpFirewall firewall = new MSOSpringFirewall();
+		web.httpFirewall(firewall);
+	}
+
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputs.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputs.java
new file mode 100644
index 0000000..e4866f5
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputs.java
@@ -0,0 +1,57 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.infrastructure.pnf.delegate;
+
+import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.CORRELATION_ID;
+import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.TIMEOUT_FOR_NOTIFICATION;
+
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.camunda.bpm.engine.delegate.JavaDelegate;
+import org.onap.so.bpmn.common.scripts.ExceptionUtil;
+import org.onap.so.logger.MsoLogger;
+
+public class PnfCheckInputs implements JavaDelegate {
+
+    private static MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.GENERAL, PnfCheckInputs.class);
+
+    private String defaultTimeout;
+
+    @Override
+    public void execute(DelegateExecution execution) throws Exception {
+        String correlationId = (String) execution.getVariable(CORRELATION_ID);
+        if (correlationId == null) {
+            new ExceptionUtil().buildAndThrowWorkflowException(execution, 9999, "correlationId variable not defined");
+        }
+        String timeout = (String) execution.getVariable(TIMEOUT_FOR_NOTIFICATION);
+        if (timeout == null) {
+            LOGGER.debug("timeoutForPnfEntryNotification variable not found, setting default");
+            if (defaultTimeout == null) {
+                new ExceptionUtil().buildAndThrowWorkflowException(execution, 9999,
+                        "default timeoutForPnfEntryNotification value not defined");
+            }
+            execution.setVariable(TIMEOUT_FOR_NOTIFICATION, defaultTimeout);
+        }
+    }
+
+    public void setDefaultTimeout(String defaultTimeout) {
+        this.defaultTimeout = defaultTimeout;
+    }
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java
new file mode 100644
index 0000000..bd78175
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java
@@ -0,0 +1,422 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei 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.onap.so.bpmn.infrastructure.workflow.service;
+
+import java.io.IOException;
+import java.net.SocketTimeoutException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.apache.http.HttpResponse;
+import org.apache.http.ParseException;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.client.methods.HttpDelete;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.client.methods.HttpPut;
+import org.apache.http.client.methods.HttpRequestBase;
+import org.apache.http.conn.ConnectTimeoutException;
+import org.apache.http.entity.ContentType;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.util.EntityUtils;
+import org.camunda.bpm.engine.runtime.Execution;
+import org.onap.so.bpmn.core.UrnPropertiesReader;
+import org.onap.so.bpmn.core.domain.ServiceDecomposition;
+import org.onap.so.bpmn.core.json.JsonUtils;
+import org.onap.so.logger.MessageEnum;
+import org.onap.so.logger.MsoLogger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.env.Environment;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+
+public class ServicePluginFactory {
+
+	// SOTN calculate route
+	public static final String OOF_Default_EndPoint = "http://192.168.1.223:8443/oof/sotncalc";
+
+	public static final String Third_SP_Default_EndPoint = "http://192.168.1.223:8443/sp/resourcemgr/querytps";
+
+	private static final int DEFAULT_TIME_OUT = 60000;
+
+	static JsonUtils jsonUtil = new JsonUtils();
+
+	private static MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA, ServicePluginFactory.class);
+
+	private static ServicePluginFactory instance;
+	
+
+	public static synchronized ServicePluginFactory getInstance() {
+		if (null == instance) {
+			instance = new ServicePluginFactory();
+		}
+		return instance;
+	}
+	
+	private String getThirdSPEndPoint(){
+		return UrnPropertiesReader.getVariable("mso.service-plugin.third-sp-endpoint", Third_SP_Default_EndPoint);
+	}
+
+	private String getOOFCalcEndPoint(){
+		return UrnPropertiesReader.getVariable("mso.service-plugin.oof-calc-endpoint", OOF_Default_EndPoint);
+	}
+	
+
+	public String preProcessService(ServiceDecomposition serviceDecomposition, String uuiRequest) {
+
+		// now only for sotn
+		if (isSOTN(serviceDecomposition, uuiRequest)) {
+			// We Need to query the terminalpoint of the VPN by site location
+			// info
+			return preProcessSOTNService(serviceDecomposition, uuiRequest);
+		}
+		return uuiRequest;
+	}
+
+	public String doServiceHoming(ServiceDecomposition serviceDecomposition, String uuiRequest) {
+		// now only for sotn
+		if (isSOTN(serviceDecomposition, uuiRequest)) {
+			return doSOTNServiceHoming(serviceDecomposition, uuiRequest);
+		}
+		return uuiRequest;
+	}
+
+	private boolean isSOTN(ServiceDecomposition serviceDecomposition, String uuiRequest) {
+		// there should be a register platform , we check it very simple here.
+		return uuiRequest.contains("clientSignal") && uuiRequest.contains("vpnType");
+	}
+
+	private String preProcessSOTNService(ServiceDecomposition serviceDecomposition, String uuiRequest) {
+		Map<String, Object> uuiObject = getJsonObject(uuiRequest, Map.class);
+		Map<String, Object> serviceObject = (Map<String, Object>) uuiObject.get("service");
+		Map<String, Object> serviceParametersObject = (Map<String, Object>) serviceObject.get("parameters");
+		Map<String, Object> serviceRequestInputs = (Map<String, Object>) serviceParametersObject.get("requestInputs");
+		List<Object> resources = (List<Object>) serviceParametersObject.get("resources");
+		// This is a logic for demo , it could not be finalized to community.
+		String srcLocation = "";
+		String dstLocation = "";
+		String srcClientSignal = "";
+		String dstClientSignal = "";
+		// support R2 uuiReq and R1 uuiReq
+		// logic for R2 uuiRequest params in service level
+		for (Entry<String, Object> entry : serviceRequestInputs.entrySet()) {
+			if (entry.getKey().toLowerCase().contains("location")) {
+				if ("".equals(srcLocation)) {
+					srcLocation = (String) entry.getValue();
+				} else if ("".equals(dstLocation)) {
+					dstLocation = (String) entry.getValue();
+				}
+			}
+			if (entry.getKey().toLowerCase().contains("clientsignal")) {
+				if ("".equals(srcClientSignal)) {
+					srcClientSignal = (String) entry.getValue();
+				} else if ("".equals(dstClientSignal)) {
+					dstClientSignal = (String) entry.getValue();
+				}
+			}
+		}
+
+		// logic for R1 uuiRequest, params in resource level
+		for (Object resource : resources) {
+			Map<String, Object> resourceObject = (Map<String, Object>) resource;
+			Map<String, Object> resourceParametersObject = (Map<String, Object>) resourceObject.get("parameters");
+			Map<String, Object> resourceRequestInputs = (Map<String, Object>) resourceParametersObject
+					.get("requestInputs");
+			for (Entry<String, Object> entry : resourceRequestInputs.entrySet()) {
+				if (entry.getKey().toLowerCase().contains("location")) {
+					if ("".equals(srcLocation)) {
+						srcLocation = (String) entry.getValue();
+					} else if ("".equals(dstLocation)) {
+						dstLocation = (String) entry.getValue();
+					}
+				}
+				if (entry.getKey().toLowerCase().contains("clientsignal")) {
+					if ("".equals(srcClientSignal)) {
+						srcClientSignal = (String) entry.getValue();
+					} else if ("".equals(dstClientSignal)) {
+						dstClientSignal = (String) entry.getValue();
+					}
+				}
+			}
+		}
+
+		Map<String, Object> vpnRequestInputs = getVPNResourceRequestInputs(resources);
+		// here we put client signal to vpn resource inputs
+		vpnRequestInputs.put("src-client-signal", srcClientSignal);
+		vpnRequestInputs.put("dst-client-signal", dstClientSignal);
+
+		// Now we need to query terminal points from SP resourcemgr system.
+		List<Object> locationTerminalPointList = queryTerminalPointsFromServiceProviderSystem(srcLocation, dstLocation);
+		Map<String, Object> tpInfoMap = (Map<String, Object>) locationTerminalPointList.get(0);
+
+		serviceRequestInputs.put("inner-src-access-provider-id", tpInfoMap.get("access-provider-id"));
+		serviceRequestInputs.put("inner-src-access-client-id", tpInfoMap.get("access-client-id"));
+		serviceRequestInputs.put("inner-src-access-topology-id", tpInfoMap.get("access-topology-id"));
+		serviceRequestInputs.put("inner-src-access-node-id", tpInfoMap.get("access-node-id"));
+		serviceRequestInputs.put("inner-src-access-ltp-id", tpInfoMap.get("access-ltp-id"));
+		tpInfoMap = (Map<String, Object>) locationTerminalPointList.get(1);
+
+		serviceRequestInputs.put("inner-dst-access-provider-id", tpInfoMap.get("access-provider-id"));
+		serviceRequestInputs.put("inner-dst-access-client-id", tpInfoMap.get("access-client-id"));
+		serviceRequestInputs.put("inner-dst-access-topology-id", tpInfoMap.get("access-topology-id"));
+		serviceRequestInputs.put("inner-dst-access-node-id", tpInfoMap.get("access-node-id"));
+		serviceRequestInputs.put("inner-dst-access-ltp-id", tpInfoMap.get("access-ltp-id"));
+
+		String newRequest = getJsonString(uuiObject);
+		return newRequest;
+	}
+
+	private List<Object> queryTerminalPointsFromServiceProviderSystem(String srcLocation, String dstLocation) {
+		Map<String, String> locationSrc = new HashMap<>();
+		locationSrc.put("location", srcLocation);
+		Map<String, String> locationDst = new HashMap<>();
+		locationDst.put("location", dstLocation);
+		List<Map<String, String>> locations = new ArrayList<>();
+		locations.add(locationSrc);
+		locations.add(locationDst);
+		List<Object> returnList = new ArrayList<>();
+		String reqContent = getJsonString(locations);
+		String url = getThirdSPEndPoint();
+		String responseContent = sendRequest(url, "POST", reqContent);
+		if (null != responseContent) {
+			returnList = getJsonObject(responseContent, List.class);
+		}
+		return returnList;
+	}
+
+	private Map<String, Object> getVPNResourceRequestInputs(List<Object> resources) {
+		for (Object resource : resources) {
+			Map<String, Object> resourceObject = (Map<String, Object>) resource;
+			Map<String, Object> resourceParametersObject = (Map<String, Object>) resourceObject.get("parameters");
+			Map<String, Object> resourceRequestInputs = (Map<String, Object>) resourceParametersObject
+					.get("requestInputs");
+			for (Entry<String, Object> entry : resourceRequestInputs.entrySet()) {
+				if (entry.getKey().toLowerCase().contains("vpntype")) {
+					return resourceRequestInputs;
+				}
+			}
+		}
+		return null;
+	}
+	
+	public static void main(String args[]){
+		String str = "restconf/config/GENERIC-RESOURCE-API:services/service/eca7e542-12ba-48de-8544-fac59303b14e/service-data/networks/network/aec07806-1671-4af2-b722-53c8e320a633/network-data/";
+		
+		int index1 = str.indexOf("/network/");
+		int index2 = str.indexOf("/network-data");
+		
+		String str1 = str.substring(index1 + "/network/".length(), index2);
+		System.out.println(str1);
+		
+	}
+
+	private String doSOTNServiceHoming(ServiceDecomposition serviceDecomposition, String uuiRequest) {
+		// query the route for the service.
+		Map<String, Object> uuiObject = getJsonObject(uuiRequest, Map.class);
+		Map<String, Object> serviceObject = (Map<String, Object>) uuiObject.get("service");
+		Map<String, Object> serviceParametersObject = (Map<String, Object>) serviceObject.get("parameters");
+		Map<String, Object> serviceRequestInputs = (Map<String, Object>) serviceParametersObject.get("requestInputs");
+		Map<String, Object> oofQueryObject = new HashMap<>();
+		List<Object> resources = (List<Object>) serviceParametersObject.get("resources");
+		oofQueryObject.put("src-access-provider-id", serviceRequestInputs.get("inner-src-access-provider-id"));
+		oofQueryObject.put("src-access-client-id", serviceRequestInputs.get("inner-src-access-client-id"));
+		oofQueryObject.put("src-access-topology-id", serviceRequestInputs.get("inner-src-access-topology-id"));
+		oofQueryObject.put("src-access-node-id", serviceRequestInputs.get("inner-src-access-node-id"));
+		oofQueryObject.put("src-access-ltp-id", serviceRequestInputs.get("inner-src-access-ltp-id"));
+		oofQueryObject.put("dst-access-provider-id", serviceRequestInputs.get("inner-dst-access-provider-id"));
+		oofQueryObject.put("dst-access-client-id", serviceRequestInputs.get("inner-dst-access-client-id"));
+		oofQueryObject.put("dst-access-topology-id", serviceRequestInputs.get("inner-dst-access-topology-id"));
+		oofQueryObject.put("dst-access-node-id", serviceRequestInputs.get("inner-dst-access-node-id"));
+		oofQueryObject.put("dst-access-ltp-id", serviceRequestInputs.get("inner-dst-access-ltp-id"));
+		String oofRequestReq = getJsonString(oofQueryObject);
+		String url = getOOFCalcEndPoint();
+		String responseContent = sendRequest(url, "POST", oofRequestReq);
+
+		List<Object> returnList = new ArrayList<>();
+		if (null != responseContent) {
+			returnList = getJsonObject(responseContent, List.class);
+		}
+		// in demo we have only one VPN. no cross VPNs, so get first item.
+		Map<String, Object> returnRoute = getReturnRoute(returnList);
+		Map<String, Object> vpnRequestInputs = getVPNResourceRequestInputs(resources);
+		vpnRequestInputs.putAll(returnRoute);
+		String newRequest = getJsonString(uuiObject);
+		return newRequest;
+	}
+	
+	private Map<String, Object> getReturnRoute(List<Object> returnList){
+		Map<String, Object> returnRoute = new HashMap<>();
+		for(Object returnVpn :returnList){
+			Map<String, Object> returnVpnInfo = (Map<String, Object>) returnVpn;
+		    String accessTopoId = (String)returnVpnInfo.get("access-topology-id");
+			if("100".equals(accessTopoId)){
+				returnRoute.putAll(returnVpnInfo);
+			}
+			else if("101".equals(accessTopoId)){
+				for(String key : returnVpnInfo.keySet()){
+					returnRoute.put("domain1-" + key, returnVpnInfo.get(key));
+				}
+			}
+			else if("102".equals(accessTopoId)){
+				for(String key : returnVpnInfo.keySet()){
+					returnRoute.put("domain2-" + key, returnVpnInfo.get(key));
+				}
+			}
+			else{
+				for(String key : returnVpnInfo.keySet()){
+					returnRoute.put("domain" + accessTopoId +"-" + key, returnVpnInfo.get(key));
+				}
+			}
+		}
+		return returnRoute;
+	}
+
+	private Map<String, Object> getResourceParams(Execution execution, String resourceCustomizationUuid,
+			String serviceParameters) {
+		List<String> resourceList = jsonUtil.StringArrayToList(execution,
+				(String) JsonUtils.getJsonValue(serviceParameters, "resources"));
+		// Get the right location str for resource. default is an empty array.
+		String resourceInputsFromUui = "";
+		for (String resource : resourceList) {
+			String resCusUuid = (String) JsonUtils.getJsonValue(resource, "resourceCustomizationUuid");
+			if (resourceCustomizationUuid.equals(resCusUuid)) {
+				String resourceParameters = JsonUtils.getJsonValue(resource, "parameters");
+				resourceInputsFromUui = JsonUtils.getJsonValue(resourceParameters, "requestInputs");
+			}
+		}
+		Map<String, Object> resourceInputsFromUuiMap = getJsonObject(resourceInputsFromUui, Map.class);
+		return resourceInputsFromUuiMap;
+	}
+
+	public static <T> T getJsonObject(String jsonstr, Class<T> type) {
+		ObjectMapper mapper = new ObjectMapper();
+		mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);
+		try {
+			return mapper.readValue(jsonstr, type);
+		} catch (IOException e) {
+			LOGGER.error(MessageEnum.RA_NS_EXC, "", "", MsoLogger.ErrorCode.BusinessProcesssError,
+					"fail to unMarshal json", e);
+		}
+		return null;
+	}
+
+	public static String getJsonString(Object srcObj) {
+		ObjectMapper mapper = new ObjectMapper();
+		mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, false);
+		String jsonStr = null;
+		try {
+			jsonStr = mapper.writeValueAsString(srcObj);
+		} catch (JsonProcessingException e) {
+			LOGGER.debug("SdcToscaParserException", e);
+			e.printStackTrace();
+		}
+		return jsonStr;
+	}
+
+	private static String sendRequest(String url, String methodType, String content) {
+		
+		String msbUrl = url;
+		HttpRequestBase method = null;
+		HttpResponse httpResponse = null;
+
+		try {
+			int timeout = DEFAULT_TIME_OUT;
+
+			RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(timeout).setConnectTimeout(timeout)
+					.setConnectionRequestTimeout(timeout).build();
+
+			HttpClient client = HttpClientBuilder.create().build();
+
+			if ("POST".equals(methodType.toUpperCase())) {
+				HttpPost httpPost = new HttpPost(msbUrl);
+				httpPost.setConfig(requestConfig);
+				httpPost.setEntity(new StringEntity(content, ContentType.APPLICATION_JSON));
+				method = httpPost;
+			} else if ("PUT".equals(methodType.toUpperCase())) {
+				HttpPut httpPut = new HttpPut(msbUrl);
+				httpPut.setConfig(requestConfig);
+				httpPut.setEntity(new StringEntity(content, ContentType.APPLICATION_JSON));
+				method = httpPut;
+			} else if ("GET".equals(methodType.toUpperCase())) {
+				HttpGet httpGet = new HttpGet(msbUrl);
+				httpGet.setConfig(requestConfig);
+				method = httpGet;
+			} else if ("DELETE".equals(methodType.toUpperCase())) {
+				HttpDelete httpDelete = new HttpDelete(msbUrl);
+				httpDelete.setConfig(requestConfig);
+				method = httpDelete;
+			}
+
+			// now have no auth
+			// String userCredentials =
+			// SDNCAdapterProperties.getEncryptedProperty(Constants.SDNC_AUTH_PROP,
+			// Constants.DEFAULT_SDNC_AUTH, Constants.ENCRYPTION_KEY);
+			// String authorization = "Basic " +
+			// DatatypeConverter.printBase64Binary(userCredentials.getBytes());
+			// method.setHeader("Authorization", authorization);
+
+			httpResponse = client.execute(method);
+			String responseContent = null;
+			if (null != httpResponse && httpResponse.getEntity() != null) {
+				try {
+					responseContent = EntityUtils.toString(httpResponse.getEntity(), "UTF-8");
+				} catch (ParseException e) {
+					e.printStackTrace();
+				} catch (IOException e) {
+					e.printStackTrace();
+				}
+			}
+			if (null != method) {
+				method.reset();
+			}
+			method = null;
+			return responseContent;
+
+		} catch (SocketTimeoutException | ConnectTimeoutException e) {
+			return null;
+
+		} catch (Exception e) {
+			return null;
+
+		} finally {
+			if (httpResponse != null) {
+				try {
+					EntityUtils.consume(httpResponse.getEntity());
+				} catch (Exception e) {
+				}
+			}
+			if (method != null) {
+				try {
+					method.reset();
+				} catch (Exception e) {
+
+				}
+			}
+		}
+	}
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/resources/META-INF/processes.xml b/bpmn/mso-infrastructure-bpmn/src/main/resources/META-INF/processes.xml
new file mode 100644
index 0000000..35235b8
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/resources/META-INF/processes.xml
@@ -0,0 +1,31 @@
+<?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="att-services-bpmn">
+        <properties>
+            <property name="isDeleteUponUndeploy">false</property>
+            <property name="isScanForProcessDefinitions">true</property>
+        </properties>
+    </process-archive>
+
+</process-application>
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/resources/application-local.yml b/bpmn/mso-infrastructure-bpmn/src/main/resources/application-local.yml
new file mode 100644
index 0000000..92e8f58
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/resources/application-local.yml
@@ -0,0 +1,275 @@
+aai:
+  auth: asdf
+  dme2:
+    timeout: '30000'
+  endpoint: http://localhost:8443
+camunda:
+  bpm:
+    admin-user:
+      id: admin
+      password: admin
+    history-level: full
+    job-execution:
+      max-pool-size: 30
+      core-pool-size: 3
+entitymanager:
+  packagesToScan: com
+
+mso:
+  correlation:
+    timeout: 60
+  logPath: logs
+  async:
+    core-pool-size: 50
+    max-pool-size: 50
+    queue-capacity: 500
+  adapters:
+    completemsoprocess:
+      endpoint: http://localhost:30253/CompleteMsoProcess
+    db:
+      auth: 26AFB797A6A57960D5D718491925C50F77CDC22AC394B3DBA09950D8FD1C0764
+      password: wLg4sjrAFUS8rfVfdvTXeQ==
+      endpoint: http://localhost:30257/services/RequestsDbAdapter      
+      spring:
+        endpoint: http://localhost:30257
+    network:
+      endpoint: http://localhost:30253/services/NetworkAdapter
+      rest:
+        endpoint: http://localhost:30253/services/rest/v1/networks
+    openecomp:
+      db:
+        endpoint: http://localhost:30257/services/RequestsDbAdapter
+    po:
+      auth: 757A94191D685FD2092AC1490730A4FC
+      password: 3141634BF7E070AA289CF2892C986C0B
+    sdnc:
+      endpoint: http://localhost:30254/adapters/SDNCAdapter
+      rest:
+        endpoint: http://localhost:30254/adapters/rest/v1/sdnc
+      timeout: PT60S
+    tenant:
+      endpoint: http://localhost:30253/services/TenantAdapter
+    vnf:
+      endpoint: http://localhost:30253/services/VnfAdapter
+      rest:
+        endpoint: http://localhost:30253/services/rest/vnfs/v1/vnfs
+    volume-groups:
+      rest:
+        endpoint: http://localhost:30253/services/rest/v1/volume-groups
+    vnf-async:
+      endpoint: http://localhost:30253/services/VnfAdapterAsync
+  bpmn:
+    process:
+      historyTimeToLive: '30'
+  callbackRetryAttempts: '5'
+  catalog:
+    db:
+      endpoint: http://localhost:30258/ecomp/mso/catalog
+      spring:
+        endpoint:  http://localhost:30258
+  db:
+    auth: Basic YnBlbDptc28tZGItMTUwNyE=
+  default:
+    adapter:
+      namespace: http://com.att.mso  
+  healthcheck:
+    log:
+      debug: 'false'
+  infra:
+    customer:
+      id: testCustIdInfra
+  msoKey: 07a7159d3bf51a0e53be7a8f89699be7
+  po:
+    timeout: PT60S  
+  request:
+    db:
+      endpoint: http://localhost:28090/
+  rollback: 'true'
+  sdnc:    
+    password: 3141634BF7E070AA289CF2892C986C0B
+  service:
+    agnostic:
+      sniro:
+        endpoint: /sniro/api/v2/placement
+        host: http://localhost:30253
+  site-name: CamundaEngine
+  sniro:
+    auth: test:testpwd
+    callback: http://localhost:28090/adapters/rest/SDNCNotify
+    endpoint: http://localhost:28090/optimizationInstance/V1/create
+    timeout: PT30M  
+  workflow:
+    CreateGenericVNFV1:
+      aai:
+        volume-group:
+          uri: /aai/v6/cloud-infrastructure/volume-groups/volume-group   
+    default:
+      aai:
+        version: '8'
+        cloud-region:
+          version: '9'
+        generic-vnf:
+          version: '9'
+        v11:
+          customer:
+            uri: /aai/v11/business/customers/customer
+          generic-query:
+            uri: /aai/v11/search/generic-query
+          generic-vnf:
+            uri: /aai/v11/network/generic-vnfs/generic-vnf
+          l3-network:
+            uri: /aai/v11/network/l3-networks/l3-network
+          network-policy:
+            uri: /aai/v11/network/network-policies/network-policy
+          nodes-query:
+            uri: /aai/v11/search/nodes-query
+          route-table-reference:
+            uri: /aai/v11/network/route-table-references/route-table-reference
+          tenant:
+            uri: /aai/v11/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant
+          vce:
+            uri: /aai/v11/network/vces/vce
+          vpn-binding:
+            uri: /aai/v11/network/vpn-bindings/vpn-binding
+        v8:
+          configuration:
+            uri: /aai/v11/network/configurations/configuration
+          customer:
+            uri: /aai/v8/business/customers/customer
+          generic-query:
+            uri: /aai/v8/search/generic-query
+          l3-network:
+            uri: /aai/v8/network/l3-networks/l3-network
+          network-policy:
+            uri: /aai/v8/network/network-policies/network-policy
+          nodes-query:
+            uri: /aai/v8/search/nodes-query
+          route-table-reference:
+            uri: /aai/v8/network/route-table-references/route-table-reference
+          tenant:
+            uri: /aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant
+          vce:
+            uri: /aai/v8/network/vces/vce
+          vpn-binding:
+            uri: /aai/v8/network/vpn-bindings/vpn-binding
+        v9:
+          cloud-region:
+            uri: /aai/v9/cloud-infrastructure/cloud-regions/cloud-region/att-aic
+          generic-vnf:
+            uri: /aai/v9/network/generic-vnfs/generic-vnf
+      retry:
+        attempts: '1'
+    deleteCinderVolumeV1:
+      aai:
+        volume-group:
+          uri: /aai/v6/cloud-infrastructure/volume-groups/volume-group
+    global:
+      default:
+        aai:
+          namespace: http://org.openecomp.aai.inventory/   
+    message:
+      endpoint: http://localhost:30252/mso/WorkflowMessage
+    notification:
+      name: GenericNotificationServiceATT
+    sdncadapter:
+      callback: http://localhost:30254/mso/SDNCAdapterCallbackService
+    vnfadapter:
+      create:
+        callback: http://localhost:30253/mso/vnfAdapterNotify
+      delete:
+        callback: http://localhost:30253/mso/vnfAdapterNotify
+      query:
+        callback: http://localhost:30253/mso/vnfAdapterNotify
+      rollback:
+        callback: http://localhost:30253/mso/vnfAdapterNotify
+  global:
+    dmaap:
+      username: testuser
+      password: alRyMzJ3NUNeakxl
+      host: http://localhost:3904
+      publisher:
+        topic: com.att.mso.dev.25239-asyncStatusUpdate-v1 
+policy:
+  auth: Basic dGVzdHBkcDphbHBoYTEyMw==
+  client:
+    auth: Basic bTAzNzQzOnBvbGljeVIwY2sk
+  endpoint: https://localhost:8081/pdp/api/
+  environment: TEST
+sdnc:
+  auth: Basic YWRtaW46YWRtaW4=
+  host: https://localhost:8443
+  path: /restconf/operations/GENERIC-RESOURCE-API
+      
+appc:
+  client:
+    topic:
+      read: 
+        name: APPC-TEST-AMDOCS2
+        timeout: 360000 
+      write: APPC-TEST-AMDOCS1-IST
+    response:
+      timeout: 360000
+    key: LSl8QKolmKcC0yJR
+    secret: lgjXraD1HutKxv8jEN6tVouu
+    service: ueb
+    poolMembers: localhost:3904
+server:
+  port: 8080
+  tomcat:
+    max-threads: 50
+spring:
+  h2:
+    console:
+      enabled: true
+      path: /h2  
+  datasource:
+    url: jdbc:h2:mem:AZ;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
+    username: sa
+    password: sa
+    driverClassName: org.h2.Driver
+  security:
+    usercredentials:
+    -  
+      username: apihBpmn
+      password: '$2a$12$chgDUKcdlf1t41CtS/kjIOwRuq0zWdvCcYYXtyL5TqNdPW0GhN4e6'
+      role: BPMN-Client
+    -  
+      username: sdncaBpmn
+      password: '$2a$12$1TeeS2hAXtqXgdL7f2jCWeF5on7/lrrVZqRmqUqYijOTfrlS2CZae'
+      role: BPMN-Client 
+    -  
+      username: poBpmn
+      password: '$2a$12$TixZE5fK3YkTzWcpktm.Uuk5ePFOD2n9sj2ugGRybfsz0QQ0TKLAS'
+      role: BPMN-Client
+    -  
+      username: wmaBpmn
+      password: '$2a$12$WucJSJD5iUD9MuEzhfuSmeF1W/zPMbcu.384Lh8gCkB7SPtKqZQna'
+      role: BPMN-Client
+    -  
+      username: sniro
+      password: '$2a$12$lbOQWS1iDmdQPxW2Mb6OiuTzGaPUrkrvoKVn2zwpFWb6n5Y86Lf1y'
+      role: SNIRO-Client
+    -  
+      username: mso_admin
+      password: '$2a$12$tidKuu.h88E2nuL95pTVY.ZOYMN/1dp29A9b1o.0GFDsVVSYlMkHa'
+      role: ACTUATOR
+request:
+  datasource:
+    url: jdbc:h2:mem:AZ;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
+    username: sa
+    password: sa
+    driver-class-name: org.h2.Driver
+    intialize: true 
+    
+# Hibernate
+hibernate:
+  dialect: org.hibernate.dialect.MySQL5Dialect
+  show_sql: true
+  hbm2ddl:
+    auto: create
+
+#Actuator
+management: 
+  context-path: /manage
+
+
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/resources/application.yaml b/bpmn/mso-infrastructure-bpmn/src/main/resources/application.yaml
new file mode 100644
index 0000000..c1f58e9
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/resources/application.yaml
@@ -0,0 +1,30 @@
+server: 
+  port: 8080  
+  tomcat:
+    max-threads: 50
+
+spring: 
+  datasource:
+     driver-class-name: org.mariadb.jdbc.Driver 
+     url: jdbc:mariadb://${DB_HOST}:${DB_PORT}/camundabpmn
+     username: ${DB_USERNAME}
+     password: ${DB_PASSWORD}
+     dbcp2: 
+      initial-size: 5
+      max-total: 20 
+      validation-query: select 1
+      test-on-borrow: true
+  http:
+    multipart:
+      enabled: false
+  jersey:
+    application-path: /sobpmnengine
+#Actuator
+management: 
+  context-path: /manage
+  metrics:
+    se-global-registry: false
+    export:
+      prometheus:
+        enabled: true # Whether exporting of metrics to Prometheus is enabled.
+        step: 1m # Step size (i.e. reporting frequency) to use.
\ No newline at end of file
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/resources/process/CreateActivateSDNCResource.bpmn b/bpmn/mso-infrastructure-bpmn/src/main/resources/process/CreateActivateSDNCResource.bpmn
new file mode 100644
index 0000000..29d7a11
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/resources/process/CreateActivateSDNCResource.bpmn
@@ -0,0 +1,393 @@
+<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0">
+  <bpmn:process id="CreateActivateSDNCResource" name="CreateActivateSDNCResource" isExecutable="true">
+    <bpmn:startEvent id="createSDNCRES_StartEvent" name="createSDNCRES_StartEvent">
+      <bpmn:outgoing>SequenceFlow_1qo2pln</bpmn:outgoing>
+    </bpmn:startEvent>
+    <bpmn:sequenceFlow id="SequenceFlow_1qo2pln" sourceRef="createSDNCRES_StartEvent" targetRef="Task_1dlrfiw" />
+    <bpmn:sequenceFlow id="SequenceFlow_0khtova" sourceRef="PreprocessIncomingRequest_task" targetRef="Task_0tezqd4" />
+    <bpmn:scriptTask id="PreprocessIncomingRequest_task" name="prepare SDNC Create Request" scriptFormat="groovy">
+      <bpmn:incoming>SequenceFlow_18l3crb</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_0khtova</bpmn:outgoing>
+      <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new CreateActivateSDNCResource()
+dcsi.prepareSDNCRequest(execution)]]></bpmn:script>
+    </bpmn:scriptTask>
+    <bpmn:endEvent id="EndEvent_1x6k78c" name="create SDNC call end">
+      <bpmn:incoming>SequenceFlow_17md60u</bpmn:incoming>
+    </bpmn:endEvent>
+    <bpmn:callActivity id="CallActivity_1600xlj" name="Call SDNC RSRC Create&#10; Adapter V1&#10;" calledElement="sdncAdapter">
+      <bpmn:extensionElements>
+        <camunda:in source="CRESDNCRES_activateSDNCRequest" target="sdncAdapterWorkflowRequest" />
+        <camunda:in source="mso-request-id" target="mso-request-id" />
+        <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+        <camunda:out source="sdncAdapterResponse" target="sdncAdapterResponse" />
+        <camunda:out source="SDNCA_ResponseCode" target="SDNCA_ResponseCode" />
+        <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+        <camunda:out source="WorkflowException" target="WorkflowException" />
+        <camunda:in source="sdncAdapterWorkflowRequest" target="sdncAdapterWorkflowRequest" />
+      </bpmn:extensionElements>
+      <bpmn:incoming>SequenceFlow_15mvedq</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_1xk5xed</bpmn:outgoing>
+    </bpmn:callActivity>
+    <bpmn:sequenceFlow id="SequenceFlow_1xk5xed" sourceRef="CallActivity_1600xlj" targetRef="Task_0mszkkr" />
+    <bpmn:sequenceFlow id="SequenceFlow_0ow44q0" sourceRef="Task_023hred" targetRef="ScriptTask_1g5zyi6" />
+    <bpmn:scriptTask id="Task_023hred" name="post SDNC create call">
+      <bpmn:incoming>SequenceFlow_1afu5al</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_0ow44q0</bpmn:outgoing>
+      <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new CreateActivateSDNCResource()
+dcsi.postCreateSDNCCall(execution)]]></bpmn:script>
+    </bpmn:scriptTask>
+    <bpmn:sequenceFlow id="SequenceFlow_0w2es8j" sourceRef="Task_1dlrfiw" targetRef="Task_13sx2bp" />
+    <bpmn:sequenceFlow id="SequenceFlow_18l3crb" sourceRef="Task_13sx2bp" targetRef="PreprocessIncomingRequest_task" />
+    <bpmn:scriptTask id="Task_1dlrfiw" name="Set the Recipe DesignTimeParam" scriptFormat="groovy">
+      <bpmn:incoming>SequenceFlow_1qo2pln</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_0w2es8j</bpmn:outgoing>
+      <bpmn:script><![CDATA[String recipeParamXsdDemo="""{"operationType":"VPN","apiType":"network"}"""
+String recipeParamXsd=""
+execution.setVariable("recipeParamXsd", recipeParamXsd)]]></bpmn:script>
+    </bpmn:scriptTask>
+    <bpmn:scriptTask id="Task_13sx2bp" name="Pre Process Request" scriptFormat="groovy">
+      <bpmn:incoming>SequenceFlow_0w2es8j</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_18l3crb</bpmn:outgoing>
+      <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new CreateActivateSDNCResource()
+dcsi.preProcessRequest(execution)]]></bpmn:script>
+    </bpmn:scriptTask>
+    <bpmn:sequenceFlow id="SequenceFlow_1mz0vdx" sourceRef="Task_0tezqd4" targetRef="Task_18tomkl" />
+    <bpmn:sequenceFlow id="SequenceFlow_15mvedq" sourceRef="Task_18tomkl" targetRef="CallActivity_1600xlj" />
+    <bpmn:scriptTask id="Task_0tezqd4" name="Create progress update parameters before create" scriptFormat="groovy">
+      <bpmn:incoming>SequenceFlow_0khtova</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_1mz0vdx</bpmn:outgoing>
+      <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new CreateActivateSDNCResource()
+dcsi.prepareUpdateBeforeCreateSDNCResource(execution)]]></bpmn:script>
+    </bpmn:scriptTask>
+    <bpmn:scriptTask id="Task_0uwlr22" name="Create progress update parameters After create" scriptFormat="groovy">
+      <bpmn:incoming>SequenceFlow_0ruppyi</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_1jr6zi0</bpmn:outgoing>
+      <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new CreateActivateSDNCResource()
+dcsi.prepareUpdateAfterCreateSDNCResource(execution)]]></bpmn:script>
+    </bpmn:scriptTask>
+    <bpmn:serviceTask id="Task_18tomkl" name="update progress update">
+      <bpmn:extensionElements>
+        <camunda:connector>
+          <camunda:inputOutput>
+            <camunda:inputParameter name="url">${CVFMI_dbAdapterEndpoint}</camunda:inputParameter>
+            <camunda:inputParameter name="headers">
+              <camunda:map>
+                <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+                <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+              </camunda:map>
+            </camunda:inputParameter>
+            <camunda:inputParameter name="payload">${CVFMI_updateResOperStatusRequest}</camunda:inputParameter>
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>
+            <camunda:outputParameter name="CVFMI_dbResponseCode">${statusCode}</camunda:outputParameter>
+            <camunda:outputParameter name="CVFMI_dbResponse">${response}</camunda:outputParameter>
+          </camunda:inputOutput>
+          <camunda:connectorId>http-connector</camunda:connectorId>
+        </camunda:connector>
+      </bpmn:extensionElements>
+      <bpmn:incoming>SequenceFlow_1mz0vdx</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_15mvedq</bpmn:outgoing>
+    </bpmn:serviceTask>
+    <bpmn:serviceTask id="ServiceTask_1cm8iwr" name="update progress update">
+      <bpmn:extensionElements>
+        <camunda:connector>
+          <camunda:inputOutput>
+            <camunda:inputParameter name="url">${CVFMI_dbAdapterEndpoint}</camunda:inputParameter>
+            <camunda:inputParameter name="headers">
+              <camunda:map>
+                <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+                <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+              </camunda:map>
+            </camunda:inputParameter>
+            <camunda:inputParameter name="payload">${CVFMI_updateResOperStatusRequest}</camunda:inputParameter>
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>
+            <camunda:outputParameter name="CVFMI_dbResponseCode">${statusCode}</camunda:outputParameter>
+            <camunda:outputParameter name="CVFMI_dbResponse">${response}</camunda:outputParameter>
+          </camunda:inputOutput>
+          <camunda:connectorId>http-connector</camunda:connectorId>
+        </camunda:connector>
+      </bpmn:extensionElements>
+      <bpmn:incoming>SequenceFlow_1jr6zi0</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_10cy2nu</bpmn:outgoing>
+    </bpmn:serviceTask>
+    <bpmn:sequenceFlow id="SequenceFlow_1jr6zi0" sourceRef="Task_0uwlr22" targetRef="ServiceTask_1cm8iwr" />
+    <bpmn:scriptTask id="ScriptTask_1g5zyi6" name="Send Sync Ack Response" scriptFormat="groovy">
+      <bpmn:incoming>SequenceFlow_0ow44q0</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_17md60u</bpmn:outgoing>
+      <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new  CreateActivateSDNCResource()
+csi.sendSyncResponse(execution)]]></bpmn:script>
+    </bpmn:scriptTask>
+    <bpmn:sequenceFlow id="SequenceFlow_17md60u" sourceRef="ScriptTask_1g5zyi6" targetRef="EndEvent_1x6k78c" />
+    <bpmn:scriptTask id="ScriptTask_0a98d9a" name="prepare SDNC Activate Request" scriptFormat="groovy">
+      <bpmn:incoming>SequenceFlow_10cy2nu</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_0rp0tdn</bpmn:outgoing>
+      <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new CreateActivateSDNCResource()
+dcsi.prepareSDNCActivateRequest(execution)]]></bpmn:script>
+    </bpmn:scriptTask>
+    <bpmn:sequenceFlow id="SequenceFlow_10cy2nu" sourceRef="ServiceTask_1cm8iwr" targetRef="ScriptTask_0a98d9a" />
+    <bpmn:scriptTask id="ScriptTask_1toiss1" name="Create progress update parameters After Activate" scriptFormat="groovy">
+      <bpmn:incoming>SequenceFlow_0s3vc50</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_05adaey</bpmn:outgoing>
+      <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new CreateActivateSDNCResource()
+dcsi.prepareUpdateAfterActivateSDNCResource(execution)]]></bpmn:script>
+    </bpmn:scriptTask>
+    <bpmn:serviceTask id="ServiceTask_10e6vjg" name="update progress update">
+      <bpmn:extensionElements>
+        <camunda:connector>
+          <camunda:inputOutput>
+            <camunda:inputParameter name="url">${CVFMI_dbAdapterEndpoint}</camunda:inputParameter>
+            <camunda:inputParameter name="headers">
+              <camunda:map>
+                <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+                <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+              </camunda:map>
+            </camunda:inputParameter>
+            <camunda:inputParameter name="payload">${CVFMI_updateResOperStatusRequest}</camunda:inputParameter>
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>
+            <camunda:outputParameter name="CVFMI_dbResponseCode">${statusCode}</camunda:outputParameter>
+            <camunda:outputParameter name="CVFMI_dbResponse">${response}</camunda:outputParameter>
+          </camunda:inputOutput>
+          <camunda:connectorId>http-connector</camunda:connectorId>
+        </camunda:connector>
+      </bpmn:extensionElements>
+      <bpmn:incoming>SequenceFlow_05adaey</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_1afu5al</bpmn:outgoing>
+    </bpmn:serviceTask>
+    <bpmn:sequenceFlow id="SequenceFlow_05adaey" sourceRef="ScriptTask_1toiss1" targetRef="ServiceTask_10e6vjg" />
+    <bpmn:sequenceFlow id="SequenceFlow_1afu5al" sourceRef="ServiceTask_10e6vjg" targetRef="Task_023hred" />
+    <bpmn:callActivity id="CallActivity_0pr0s2y" name="Call SDNC RSRCActivate&#10; Adapter V1&#10;" calledElement="sdncAdapter">
+      <bpmn:extensionElements>
+        <camunda:in source="CRESDNCRES_activateSDNCRequest" target="sdncAdapterWorkflowRequest" />
+        <camunda:in source="mso-request-id" target="mso-request-id" />
+        <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+        <camunda:out source="sdncAdapterResponse" target="sdncAdapterResponse" />
+        <camunda:out source="SDNCA_ResponseCode" target="SDNCA_ResponseCode" />
+        <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
+        <camunda:out source="WorkflowException" target="WorkflowException" />
+        <camunda:in source="sdncAdapterWorkflowRequest" target="sdncAdapterWorkflowRequest" />
+      </bpmn:extensionElements>
+      <bpmn:incoming>SequenceFlow_0rp0tdn</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_1efgf9m</bpmn:outgoing>
+    </bpmn:callActivity>
+    <bpmn:sequenceFlow id="SequenceFlow_1efgf9m" sourceRef="CallActivity_0pr0s2y" targetRef="Task_0p200y6" />
+    <bpmn:sequenceFlow id="SequenceFlow_0ruppyi" sourceRef="Task_0mszkkr" targetRef="Task_0uwlr22" />
+    <bpmn:scriptTask id="Task_0mszkkr" name="post create SDNC call" scriptFormat="groovy">
+      <bpmn:incoming>SequenceFlow_1xk5xed</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_0ruppyi</bpmn:outgoing>
+      <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new CreateActivateSDNCResource()
+dcsi.postCreateSDNC(execution)]]></bpmn:script>
+    </bpmn:scriptTask>
+    <bpmn:scriptTask id="Task_0p200y6" name="post activate SDNC call" scriptFormat="groovy">
+      <bpmn:incoming>SequenceFlow_1efgf9m</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_0s3vc50</bpmn:outgoing>
+      <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new CreateActivateSDNCResource()
+dcsi.postActivateSDNC(execution)]]></bpmn:script>
+    </bpmn:scriptTask>
+    <bpmn:sequenceFlow id="SequenceFlow_0s3vc50" sourceRef="Task_0p200y6" targetRef="ScriptTask_1toiss1" />
+    <bpmn:sequenceFlow id="SequenceFlow_0rp0tdn" sourceRef="ScriptTask_0a98d9a" targetRef="CallActivity_0pr0s2y" />
+  </bpmn:process>
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateActivateSDNCResource">
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="createSDNCRES_StartEvent">
+        <dc:Bounds x="-111" y="111" width="36" height="36" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="-134" y="147" width="85" height="28" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_1qo2pln_di" bpmnElement="SequenceFlow_1qo2pln">
+        <di:waypoint xsi:type="dc:Point" x="-75" y="129" />
+        <di:waypoint xsi:type="dc:Point" x="-10" y="129" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="-87.5" y="108" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_0khtova_di" bpmnElement="SequenceFlow_0khtova">
+        <di:waypoint xsi:type="dc:Point" x="413" y="129" />
+        <di:waypoint xsi:type="dc:Point" x="460" y="129" />
+        <di:waypoint xsi:type="dc:Point" x="500" y="129" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="391.5" y="108" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="ScriptTask_03j6ogo_di" bpmnElement="PreprocessIncomingRequest_task">
+        <dc:Bounds x="313" y="89" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="EndEvent_15pcuuc_di" bpmnElement="EndEvent_1x6k78c">
+        <dc:Bounds x="1049" y="544" width="36" height="36" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="1013" y="586" width="81" height="28" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="CallActivity_1600xlj_di" bpmnElement="CallActivity_1600xlj">
+        <dc:Bounds x="109" y="295" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_1xk5xed_di" bpmnElement="SequenceFlow_1xk5xed">
+        <di:waypoint xsi:type="dc:Point" x="209" y="335" />
+        <di:waypoint xsi:type="dc:Point" x="257" y="335" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="188" y="314" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_0ow44q0_di" bpmnElement="SequenceFlow_0ow44q0">
+        <di:waypoint xsi:type="dc:Point" x="896" y="562" />
+        <di:waypoint xsi:type="dc:Point" x="915" y="562" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="860.5" y="541" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="ScriptTask_0gyej62_di" bpmnElement="Task_023hred">
+        <dc:Bounds x="796" y="522" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_0w2es8j_di" bpmnElement="SequenceFlow_0w2es8j">
+        <di:waypoint xsi:type="dc:Point" x="90" y="129" />
+        <di:waypoint xsi:type="dc:Point" x="148" y="129" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="74" y="108" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_18l3crb_di" bpmnElement="SequenceFlow_18l3crb">
+        <di:waypoint xsi:type="dc:Point" x="248" y="129" />
+        <di:waypoint xsi:type="dc:Point" x="313" y="129" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="235.5" y="108" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="ScriptTask_0lc6l7a_di" bpmnElement="Task_1dlrfiw">
+        <dc:Bounds x="-10" y="89" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="ScriptTask_14l9mlv_di" bpmnElement="Task_13sx2bp">
+        <dc:Bounds x="148" y="89" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_1mz0vdx_di" bpmnElement="SequenceFlow_1mz0vdx">
+        <di:waypoint xsi:type="dc:Point" x="606" y="129" />
+        <di:waypoint xsi:type="dc:Point" x="638" y="129" />
+        <di:waypoint xsi:type="dc:Point" x="638" y="129" />
+        <di:waypoint xsi:type="dc:Point" x="738" y="129" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="608" y="123" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_15mvedq_di" bpmnElement="SequenceFlow_15mvedq">
+        <di:waypoint xsi:type="dc:Point" x="788" y="169" />
+        <di:waypoint xsi:type="dc:Point" x="788" y="218" />
+        <di:waypoint xsi:type="dc:Point" x="0" y="218" />
+        <di:waypoint xsi:type="dc:Point" x="0" y="335" />
+        <di:waypoint xsi:type="dc:Point" x="109" y="335" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="349" y="197" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="ScriptTask_1kqf4ge_di" bpmnElement="Task_0tezqd4">
+        <dc:Bounds x="506" y="89" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="ScriptTask_0hu4lhm_di" bpmnElement="Task_0uwlr22">
+        <dc:Bounds x="426" y="295" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="ServiceTask_1q6ssz7_di" bpmnElement="Task_18tomkl">
+        <dc:Bounds x="738" y="89" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="ServiceTask_1cm8iwr_di" bpmnElement="ServiceTask_1cm8iwr">
+        <dc:Bounds x="588" y="295" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_1jr6zi0_di" bpmnElement="SequenceFlow_1jr6zi0">
+        <di:waypoint xsi:type="dc:Point" x="526" y="335" />
+        <di:waypoint xsi:type="dc:Point" x="554" y="335" />
+        <di:waypoint xsi:type="dc:Point" x="554" y="335" />
+        <di:waypoint xsi:type="dc:Point" x="588" y="335" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="524" y="329" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="ScriptTask_1g5zyi6_di" bpmnElement="ScriptTask_1g5zyi6">
+        <dc:Bounds x="915" y="522" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_17md60u_di" bpmnElement="SequenceFlow_17md60u">
+        <di:waypoint xsi:type="dc:Point" x="1015" y="562" />
+        <di:waypoint xsi:type="dc:Point" x="1049" y="562" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="987" y="540" width="90" height="14" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="ScriptTask_0a98d9a_di" bpmnElement="ScriptTask_0a98d9a">
+        <dc:Bounds x="-2" y="522" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_10cy2nu_di" bpmnElement="SequenceFlow_10cy2nu">
+        <di:waypoint xsi:type="dc:Point" x="638" y="375" />
+        <di:waypoint xsi:type="dc:Point" x="638" y="435" />
+        <di:waypoint xsi:type="dc:Point" x="-33" y="435" />
+        <di:waypoint xsi:type="dc:Point" x="-33" y="562" />
+        <di:waypoint xsi:type="dc:Point" x="-2" y="562" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="302.5" y="413" width="0" height="14" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="ScriptTask_1toiss1_di" bpmnElement="ScriptTask_1toiss1">
+        <dc:Bounds x="490" y="522" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="ServiceTask_10e6vjg_di" bpmnElement="ServiceTask_10e6vjg">
+        <dc:Bounds x="656" y="522" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_05adaey_di" bpmnElement="SequenceFlow_05adaey">
+        <di:waypoint xsi:type="dc:Point" x="590" y="562" />
+        <di:waypoint xsi:type="dc:Point" x="656" y="562" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="623" y="540" width="0" height="14" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_1afu5al_di" bpmnElement="SequenceFlow_1afu5al">
+        <di:waypoint xsi:type="dc:Point" x="756" y="562" />
+        <di:waypoint xsi:type="dc:Point" x="796" y="562" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="776" y="540" width="0" height="14" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="CallActivity_0pr0s2y_di" bpmnElement="CallActivity_0pr0s2y">
+        <dc:Bounds x="178" y="522" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_1efgf9m_di" bpmnElement="SequenceFlow_1efgf9m">
+        <di:waypoint xsi:type="dc:Point" x="278" y="562" />
+        <di:waypoint xsi:type="dc:Point" x="336" y="562" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="307" y="540" width="0" height="14" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_0ruppyi_di" bpmnElement="SequenceFlow_0ruppyi">
+        <di:waypoint xsi:type="dc:Point" x="357" y="335" />
+        <di:waypoint xsi:type="dc:Point" x="426" y="335" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="391.5" y="313" width="0" height="14" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="ScriptTask_13eovp4_di" bpmnElement="Task_0mszkkr">
+        <dc:Bounds x="257" y="295" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="ScriptTask_0ymnxuf_di" bpmnElement="Task_0p200y6">
+        <dc:Bounds x="336" y="522" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_0s3vc50_di" bpmnElement="SequenceFlow_0s3vc50">
+        <di:waypoint xsi:type="dc:Point" x="436" y="562" />
+        <di:waypoint xsi:type="dc:Point" x="490" y="562" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="463" y="540" width="0" height="14" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_0rp0tdn_di" bpmnElement="SequenceFlow_0rp0tdn">
+        <di:waypoint xsi:type="dc:Point" x="98" y="562" />
+        <di:waypoint xsi:type="dc:Point" x="178" y="562" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="138" y="540" width="0" height="14" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+    </bpmndi:BPMNPlane>
+  </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/resources/process/CreateCustom3rdONAPServiceInstance.bpmn b/bpmn/mso-infrastructure-bpmn/src/main/resources/process/CreateCustom3rdONAPServiceInstance.bpmn
new file mode 100644
index 0000000..a8bd33c
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/resources/process/CreateCustom3rdONAPServiceInstance.bpmn
@@ -0,0 +1,389 @@
+<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.11.3">
+  <bpmn:process id="CreateCustom3rdONAPServiceInstance" name="CreateCustom3rdONAPServiceInstance" isExecutable="true">
+    <bpmn:startEvent id="StartEvent_00qj6ro" name="Create SI Start Flow">
+      <bpmn:outgoing>SequenceFlow_0s2spoq</bpmn:outgoing>
+    </bpmn:startEvent>
+    <bpmn:subProcess id="SubProcess_0ka59nc" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+      <bpmn:scriptTask id="ScriptTask_0u3lw39" name="Handle Unexpected Error" scriptFormat="groovy">
+        <bpmn:incoming>SequenceFlow_1dsbjjb</bpmn:incoming>
+        <bpmn:outgoing>SequenceFlow_1yay321</bpmn:outgoing>
+        <bpmn:script>import org.onap.so.bpmn.common.scripts.* ExceptionUtil ex = new ExceptionUtil() ex.processJavaException(execution)</bpmn:script>
+      </bpmn:scriptTask>
+      <bpmn:startEvent id="StartEvent_0v1ffn4">
+        <bpmn:outgoing>SequenceFlow_1dsbjjb</bpmn:outgoing>
+        <bpmn:errorEventDefinition />
+      </bpmn:startEvent>
+      <bpmn:endEvent id="EndEvent_0eznq6x">
+        <bpmn:incoming>SequenceFlow_1yay321</bpmn:incoming>
+      </bpmn:endEvent>
+      <bpmn:sequenceFlow id="SequenceFlow_1dsbjjb" name="" sourceRef="StartEvent_0v1ffn4" targetRef="ScriptTask_0u3lw39" />
+      <bpmn:sequenceFlow id="SequenceFlow_1yay321" name="" sourceRef="ScriptTask_0u3lw39" targetRef="EndEvent_0eznq6x" />
+    </bpmn:subProcess>
+    <bpmn:callActivity id="DoCreateE2EServiceInstance" name="Call DoCreateE2EServiceInstance&#10;" calledElement="DoCreateE2EServiceInstanceV3">
+      <bpmn:extensionElements>
+        <camunda:out source="WorkflowException" target="WorkflowException" />
+        <camunda:in source="msoRequestId" target="msoRequestId" />
+        <camunda:out source="rollbackData" target="rollbackData" />
+        <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+        <camunda:in source="serviceInstanceName" target="serviceInstanceName" />
+        <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+        <camunda:in source="productFamilyId" target="productFamilyId" />
+        <camunda:in source="disableRollback" target="disableRollback" />
+        <camunda:in source="serviceInputParams" target="serviceInputParams" />
+        <camunda:out source="rolledBack" target="rolledBack" />
+        <camunda:out source="serviceInstanceName" target="serviceInstanceName" />
+        <camunda:in source="failIfExists" target="failIfExists" />
+        <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+        <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
+        <camunda:in sourceExpression="1610" target="sdncVersion" />
+        <camunda:in source="initialStatus" target="initialStatus" />
+        <camunda:in source="serviceType" target="serviceType" />
+        <camunda:in source="uuiRequest" target="uuiRequest" />
+        <camunda:in source="requestAction" target="operationType" />
+        <camunda:in source="operationId" target="operationId" />
+      </bpmn:extensionElements>
+      <bpmn:incoming>SequenceFlow_19eilro</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_0klbpxx</bpmn:outgoing>
+    </bpmn:callActivity>
+    <bpmn:endEvent id="EndEvent_0bpd6c0" name="End">
+      <bpmn:incoming>SequenceFlow_0yayvrf</bpmn:incoming>
+    </bpmn:endEvent>
+    <bpmn:scriptTask id="ScriptTask_1s09c7d" name="Pre Process Incoming Request" scriptFormat="groovy">
+      <bpmn:incoming>SequenceFlow_0s2spoq</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_0z4faf9</bpmn:outgoing>
+      <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def csi= new CreateCustomE2EServiceInstance()
+csi.preProcessRequest(execution)</bpmn:script>
+    </bpmn:scriptTask>
+    <bpmn:scriptTask id="ScriptTask_0ttvn8r" name="Prepare Completion Request" scriptFormat="groovy">
+      <bpmn:incoming>SequenceFlow_14zu6wr</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_0je30si</bpmn:outgoing>
+      <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new CreateCustomE2EServiceInstance()
+csi.prepareCompletionRequest(execution)</bpmn:script>
+    </bpmn:scriptTask>
+    <bpmn:callActivity id="CallActivity_02fyxz0" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">
+      <bpmn:extensionElements>
+        <camunda:in source="completionRequest" target="CompleteMsoProcessRequest" />
+        <camunda:in source="mso-request-id" target="mso-request-id" />
+        <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+        <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode" />
+        <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" />
+        <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse" />
+      </bpmn:extensionElements>
+      <bpmn:incoming>SequenceFlow_0je30si</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_0yayvrf</bpmn:outgoing>
+    </bpmn:callActivity>
+    <bpmn:subProcess id="SubProcess_0vaws86" name="Sub-process for FalloutHandler and Rollback" triggeredByEvent="true">
+      <bpmn:startEvent id="StartEvent_0dug28e">
+        <bpmn:outgoing>SequenceFlow_0e1r62n</bpmn:outgoing>
+        <bpmn:errorEventDefinition />
+      </bpmn:startEvent>
+      <bpmn:endEvent id="EndEvent_03wysuk">
+        <bpmn:incoming>SequenceFlow_1ysapam</bpmn:incoming>
+      </bpmn:endEvent>
+      <bpmn:scriptTask id="ScriptTask_0u8o9p2" name="Prepare Fallout Request" scriptFormat="groovy">
+        <bpmn:incoming>SequenceFlow_0n9pexp</bpmn:incoming>
+        <bpmn:outgoing>SequenceFlow_01umodj</bpmn:outgoing>
+        <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new CreateCustomE2EServiceInstance()
+csi.prepareFalloutRequest(execution)</bpmn:script>
+      </bpmn:scriptTask>
+      <bpmn:callActivity id="CallActivity_1ang7q8" name="Call FalloutHandler" calledElement="FalloutHandler">
+        <bpmn:extensionElements>
+          <camunda:in source="falloutRequest" target="FalloutHandlerRequest" />
+          <camunda:in source="mso-request-id" target="mso-request-id" />
+          <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+          <camunda:out source="FH_ResponseCode" target="FH_ResponseCode" />
+          <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse" />
+          <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse" />
+        </bpmn:extensionElements>
+        <bpmn:incoming>SequenceFlow_01umodj</bpmn:incoming>
+        <bpmn:outgoing>SequenceFlow_1ysapam</bpmn:outgoing>
+      </bpmn:callActivity>
+      <bpmn:scriptTask id="ScriptTask_1rn6nqi" name="Send Error Response">
+        <bpmn:incoming>SequenceFlow_0e1r62n</bpmn:incoming>
+        <bpmn:outgoing>SequenceFlow_0n9pexp</bpmn:outgoing>
+        <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new  CreateCustomE2EServiceInstance()
+csi.sendSyncError(execution)</bpmn:script>
+      </bpmn:scriptTask>
+      <bpmn:sequenceFlow id="SequenceFlow_0e1r62n" sourceRef="StartEvent_0dug28e" targetRef="ScriptTask_1rn6nqi" />
+      <bpmn:sequenceFlow id="SequenceFlow_1ysapam" sourceRef="CallActivity_1ang7q8" targetRef="EndEvent_03wysuk" />
+      <bpmn:sequenceFlow id="SequenceFlow_0n9pexp" sourceRef="ScriptTask_1rn6nqi" targetRef="ScriptTask_0u8o9p2" />
+      <bpmn:sequenceFlow id="SequenceFlow_01umodj" sourceRef="ScriptTask_0u8o9p2" targetRef="CallActivity_1ang7q8" />
+    </bpmn:subProcess>
+    <bpmn:scriptTask id="ScriptTask_0xupxj9" name="Send Sync Ack Response" scriptFormat="groovy">
+      <bpmn:incoming>SequenceFlow_081z8l2</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_19eilro</bpmn:outgoing>
+      <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new  CreateCustomE2EServiceInstance()
+csi.sendSyncResponse(execution)</bpmn:script>
+    </bpmn:scriptTask>
+    <bpmn:exclusiveGateway id="ExclusiveGateway_0aqn64l" name="Success?">
+      <bpmn:incoming>SequenceFlow_0klbpxx</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_14zu6wr</bpmn:outgoing>
+      <bpmn:outgoing>SequenceFlow_1fueo69</bpmn:outgoing>
+    </bpmn:exclusiveGateway>
+    <bpmn:endEvent id="EndEvent_07uk5iy">
+      <bpmn:incoming>SequenceFlow_1fueo69</bpmn:incoming>
+      <bpmn:errorEventDefinition errorRef="Error_0nbdy47" />
+    </bpmn:endEvent>
+    <bpmn:sequenceFlow id="SequenceFlow_0s2spoq" sourceRef="StartEvent_00qj6ro" targetRef="ScriptTask_1s09c7d" />
+    <bpmn:sequenceFlow id="SequenceFlow_19eilro" sourceRef="ScriptTask_0xupxj9" targetRef="DoCreateE2EServiceInstance" />
+    <bpmn:sequenceFlow id="SequenceFlow_0klbpxx" sourceRef="DoCreateE2EServiceInstance" targetRef="ExclusiveGateway_0aqn64l" />
+    <bpmn:sequenceFlow id="SequenceFlow_0yayvrf" sourceRef="CallActivity_02fyxz0" targetRef="EndEvent_0bpd6c0" />
+    <bpmn:sequenceFlow id="SequenceFlow_0z4faf9" sourceRef="ScriptTask_1s09c7d" targetRef="Task_1tqjch6" />
+    <bpmn:sequenceFlow id="SequenceFlow_14zu6wr" name="yes" sourceRef="ExclusiveGateway_0aqn64l" targetRef="ScriptTask_0ttvn8r">
+      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{execution.getVariable("WorkflowException") == null}</bpmn:conditionExpression>
+    </bpmn:sequenceFlow>
+    <bpmn:sequenceFlow id="SequenceFlow_0je30si" sourceRef="ScriptTask_0ttvn8r" targetRef="CallActivity_02fyxz0" />
+    <bpmn:sequenceFlow id="SequenceFlow_1fueo69" name="no" sourceRef="ExclusiveGateway_0aqn64l" targetRef="EndEvent_07uk5iy">
+      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{execution.getVariable("WorkflowException") != null}</bpmn:conditionExpression>
+    </bpmn:sequenceFlow>
+    <bpmn:sequenceFlow id="SequenceFlow_1euqjsp" sourceRef="Task_1tqjch6" targetRef="Task_19mxcw3" />
+    <bpmn:scriptTask id="Task_1tqjch6" name="Init Service Operation Status" scriptFormat="groovy">
+      <bpmn:incoming>SequenceFlow_0z4faf9</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_1euqjsp</bpmn:outgoing>
+      <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def csi= new CreateCustomE2EServiceInstance()
+csi.prepareInitServiceOperationStatus(execution)</bpmn:script>
+    </bpmn:scriptTask>
+    <bpmn:serviceTask id="Task_19mxcw3" name="Update Service Operation Status">
+      <bpmn:extensionElements>
+        <camunda:connector>
+          <camunda:inputOutput>
+            <camunda:inputParameter name="url">${CVFMI_dbAdapterEndpoint}</camunda:inputParameter>
+            <camunda:inputParameter name="headers">
+              <camunda:map>
+                <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+                <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+              </camunda:map>
+            </camunda:inputParameter>
+            <camunda:inputParameter name="payload">${CVFMI_updateServiceOperStatusRequest}</camunda:inputParameter>
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>
+            <camunda:outputParameter name="CVFMI_dbResponseCode">${statusCode}</camunda:outputParameter>
+            <camunda:outputParameter name="CVFMI_dbResponse">${response}</camunda:outputParameter>
+          </camunda:inputOutput>
+          <camunda:connectorId>http-connector</camunda:connectorId>
+        </camunda:connector>
+      </bpmn:extensionElements>
+      <bpmn:incoming>SequenceFlow_1euqjsp</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_081z8l2</bpmn:outgoing>
+    </bpmn:serviceTask>
+    <bpmn:sequenceFlow id="SequenceFlow_081z8l2" sourceRef="Task_19mxcw3" targetRef="ScriptTask_0xupxj9" />
+  </bpmn:process>
+  <bpmn:error id="Error_0nbdy47" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateCustom3rdONAPServiceInstance">
+      <bpmndi:BPMNShape id="StartEvent_00qj6ro_di" bpmnElement="StartEvent_00qj6ro">
+        <dc:Bounds x="-6" y="180" width="36" height="36" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="-24" y="221" width="73" height="24" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="SubProcess_0ka59nc_di" bpmnElement="SubProcess_0ka59nc" isExpanded="true">
+        <dc:Bounds x="463" y="632" width="394" height="188" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="CallActivity_0rhljy8_di" bpmnElement="DoCreateE2EServiceInstance">
+        <dc:Bounds x="751" y="158" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="EndEvent_0bpd6c0_di" bpmnElement="EndEvent_0bpd6c0">
+        <dc:Bounds x="1258" y="286" width="36" height="36" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="1268" y="322" width="22" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="ScriptTask_1s09c7d_di" bpmnElement="ScriptTask_1s09c7d">
+        <dc:Bounds x="115" y="158" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="ScriptTask_0ttvn8r_di" bpmnElement="ScriptTask_0ttvn8r">
+        <dc:Bounds x="1038" y="158" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="CallActivity_02fyxz0_di" bpmnElement="CallActivity_02fyxz0">
+        <dc:Bounds x="1226" y="158" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="SubProcess_0vaws86_di" bpmnElement="SubProcess_0vaws86" isExpanded="true">
+        <dc:Bounds x="348" y="370" width="679" height="194" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="ScriptTask_0xupxj9_di" bpmnElement="ScriptTask_0xupxj9">
+        <dc:Bounds x="610" y="158" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="ExclusiveGateway_0aqn64l_di" bpmnElement="ExclusiveGateway_0aqn64l" isMarkerVisible="true">
+        <dc:Bounds x="903" y="173" width="50" height="50" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="903" y="145" width="50" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="EndEvent_07uk5iy_di" bpmnElement="EndEvent_07uk5iy">
+        <dc:Bounds x="910" y="286" width="36" height="36" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="883" y="322" width="0" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_0s2spoq_di" bpmnElement="SequenceFlow_0s2spoq">
+        <di:waypoint x="30" y="198" />
+        <di:waypoint x="115" y="198" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="27.5" y="177" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_19eilro_di" bpmnElement="SequenceFlow_19eilro">
+        <di:waypoint x="710" y="198" />
+        <di:waypoint x="751" y="198" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="685.5" y="177" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_0klbpxx_di" bpmnElement="SequenceFlow_0klbpxx">
+        <di:waypoint x="851" y="198" />
+        <di:waypoint x="903" y="198" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="832" y="177" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_0yayvrf_di" bpmnElement="SequenceFlow_0yayvrf">
+        <di:waypoint x="1276" y="238" />
+        <di:waypoint x="1276" y="286" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="1246" y="262" width="0" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_0z4faf9_di" bpmnElement="SequenceFlow_0z4faf9">
+        <di:waypoint x="215" y="198" />
+        <di:waypoint x="273" y="198" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="199" y="177" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_14zu6wr_di" bpmnElement="SequenceFlow_14zu6wr">
+        <di:waypoint x="953" y="198" />
+        <di:waypoint x="990" y="198" />
+        <di:waypoint x="990" y="198" />
+        <di:waypoint x="1038" y="198" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="987" y="195" width="20" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_0je30si_di" bpmnElement="SequenceFlow_0je30si">
+        <di:waypoint x="1138" y="198" />
+        <di:waypoint x="1226" y="198" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="1137" y="183" width="0" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_1fueo69_di" bpmnElement="SequenceFlow_1fueo69">
+        <di:waypoint x="928" y="223" />
+        <di:waypoint x="928" y="250" />
+        <di:waypoint x="928" y="250" />
+        <di:waypoint x="928" y="286" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="901" y="228" width="15" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="ScriptTask_0u3lw39_di" bpmnElement="ScriptTask_0u3lw39">
+        <dc:Bounds x="611" y="687" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="StartEvent_0v1ffn4_di" bpmnElement="StartEvent_0v1ffn4">
+        <dc:Bounds x="496" y="709" width="36" height="36" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="469" y="750" width="0" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="EndEvent_0eznq6x_di" bpmnElement="EndEvent_0eznq6x">
+        <dc:Bounds x="772" y="709" width="36" height="36" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="745" y="750" width="0" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="StartEvent_0dug28e_di" bpmnElement="StartEvent_0dug28e">
+        <dc:Bounds x="363" y="456" width="36" height="36" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="336" y="497" width="0" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="EndEvent_03wysuk_di" bpmnElement="EndEvent_03wysuk">
+        <dc:Bounds x="942" y="456" width="36" height="36" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="915" y="497" width="0" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="ScriptTask_0u8o9p2_di" bpmnElement="ScriptTask_0u8o9p2">
+        <dc:Bounds x="621" y="434" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="CallActivity_1ang7q8_di" bpmnElement="CallActivity_1ang7q8">
+        <dc:Bounds x="798" y="434" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="ScriptTask_1rn6nqi_di" bpmnElement="ScriptTask_1rn6nqi">
+        <dc:Bounds x="443" y="434" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_1dsbjjb_di" bpmnElement="SequenceFlow_1dsbjjb">
+        <di:waypoint x="532" y="727" />
+        <di:waypoint x="611" y="727" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="529.5" y="727" width="0" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_1yay321_di" bpmnElement="SequenceFlow_1yay321">
+        <di:waypoint x="711" y="727" />
+        <di:waypoint x="772" y="727" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="701.5" y="727" width="0" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_0e1r62n_di" bpmnElement="SequenceFlow_0e1r62n">
+        <di:waypoint x="399" y="474" />
+        <di:waypoint x="421" y="474" />
+        <di:waypoint x="421" y="474" />
+        <di:waypoint x="442" y="474" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="391" y="474" width="0" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_1ysapam_di" bpmnElement="SequenceFlow_1ysapam">
+        <di:waypoint x="898" y="474" />
+        <di:waypoint x="942" y="474" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="875" y="459" width="0" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_0n9pexp_di" bpmnElement="SequenceFlow_0n9pexp">
+        <di:waypoint x="543" y="474" />
+        <di:waypoint x="570" y="474" />
+        <di:waypoint x="570" y="474" />
+        <di:waypoint x="621" y="474" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="540" y="474" width="0" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_01umodj_di" bpmnElement="SequenceFlow_01umodj">
+        <di:waypoint x="721" y="474" />
+        <di:waypoint x="798" y="474" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="715.5" y="459" width="0" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_1euqjsp_di" bpmnElement="SequenceFlow_1euqjsp">
+        <di:waypoint x="373" y="198" />
+        <di:waypoint x="446" y="198" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="364.5" y="177" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="ScriptTask_1a3vwas_di" bpmnElement="Task_1tqjch6">
+        <dc:Bounds x="273" y="158" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="ServiceTask_1afiuuq_di" bpmnElement="Task_19mxcw3">
+        <dc:Bounds x="446" y="158" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_081z8l2_di" bpmnElement="SequenceFlow_081z8l2">
+        <di:waypoint x="546" y="198" />
+        <di:waypoint x="610" y="198" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="533" y="177" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+    </bpmndi:BPMNPlane>
+  </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/resources/process/DeleteCustom3rdONAPServiceInstance.bpmn b/bpmn/mso-infrastructure-bpmn/src/main/resources/process/DeleteCustom3rdONAPServiceInstance.bpmn
new file mode 100644
index 0000000..9ca0b06
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/resources/process/DeleteCustom3rdONAPServiceInstance.bpmn
@@ -0,0 +1,381 @@
+<?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.16.2">
+  <bpmn:process id="DeleteCustom3rdONAPServiceInstance" name="DeleteCustom3rdONAPServiceInstance" isExecutable="true">
+    <bpmn:startEvent id="StartEvent_00m8zen" name="Delete SI Start Flow">
+      <bpmn:outgoing>SequenceFlow_1wxumid</bpmn:outgoing>
+    </bpmn:startEvent>
+    <bpmn:subProcess id="SubProcess_0amn8vu" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+      <bpmn:scriptTask id="ScriptTask_1c6ogpt" name="Handle Unexpected Error" scriptFormat="groovy">
+        <bpmn:incoming>SequenceFlow_0guajy5</bpmn:incoming>
+        <bpmn:outgoing>SequenceFlow_0dbt753</bpmn:outgoing>
+        <bpmn:script>import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)</bpmn:script>
+      </bpmn:scriptTask>
+      <bpmn:startEvent id="StartEvent_121296y">
+        <bpmn:outgoing>SequenceFlow_0guajy5</bpmn:outgoing>
+        <bpmn:errorEventDefinition />
+      </bpmn:startEvent>
+      <bpmn:endEvent id="EndEvent_1dw3dwx">
+        <bpmn:incoming>SequenceFlow_0dbt753</bpmn:incoming>
+      </bpmn:endEvent>
+      <bpmn:sequenceFlow id="SequenceFlow_0guajy5" name="" sourceRef="StartEvent_121296y" targetRef="ScriptTask_1c6ogpt" />
+      <bpmn:sequenceFlow id="SequenceFlow_0dbt753" name="" sourceRef="ScriptTask_1c6ogpt" targetRef="EndEvent_1dw3dwx" />
+    </bpmn:subProcess>
+    <bpmn:callActivity id="CallActivity_1vyx9hu" name="Call DoCustomDeleteE2EServiceInstance&#10;" calledElement="DoDeleteE2EServiceInstance">
+      <bpmn:extensionElements>
+        <camunda:out source="WorkflowException" target="WorkflowException" />
+        <camunda:in source="msoRequestId" target="msoRequestId" />
+        <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+        <camunda:in source="serviceInstanceName" target="serviceInstanceName" />
+        <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+        <camunda:in source="productFamilyId" target="productFamilyId" />
+        <camunda:in source="disableRollback" target="disableRollback" />
+        <camunda:in source="serviceInputParams" target="serviceInputParams" />
+        <camunda:in source="failIfExists" target="failIfExists" />
+        <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+        <camunda:in source="serviceType" target="serviceType" />
+        <camunda:in sourceExpression="1610" target="sdncVersion" />
+        <camunda:in source="operationId" target="operationId" />
+        <camunda:in source="operationType" target="operationType" />
+      </bpmn:extensionElements>
+      <bpmn:incoming>SequenceFlow_0zf2qyk</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_07hrbs0</bpmn:outgoing>
+    </bpmn:callActivity>
+    <bpmn:endEvent id="EndEvent_0db8bs6" name="End">
+      <bpmn:incoming>SequenceFlow_1ab5l2q</bpmn:incoming>
+    </bpmn:endEvent>
+    <bpmn:scriptTask id="ScriptTask_0a63hms" name="Pre Process Incoming Request" scriptFormat="groovy">
+      <bpmn:incoming>SequenceFlow_1wxumid</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_0yowshs</bpmn:outgoing>
+      <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def csi= new DeleteCustomE2EServiceInstance()
+csi.preProcessRequest(execution)</bpmn:script>
+    </bpmn:scriptTask>
+    <bpmn:scriptTask id="ScriptTask_1fzpbop" name="Prepare Completion Request" scriptFormat="groovy">
+      <bpmn:incoming>SequenceFlow_04urx2e</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_1ii935p</bpmn:outgoing>
+      <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DeleteCustomE2EServiceInstance()
+csi.prepareCompletionRequest(execution)</bpmn:script>
+    </bpmn:scriptTask>
+    <bpmn:callActivity id="CallActivity_1wx4ihe" name="Call CompleteMsoProcess" calledElement="CompleteMsoProcess">
+      <bpmn:extensionElements>
+        <camunda:in source="completionRequest" target="CompleteMsoProcessRequest" />
+        <camunda:in source="mso-request-id" target="mso-request-id" />
+        <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+        <camunda:out source="CMSO_ResponseCode" target="CMSO_ResponseCode" />
+        <camunda:out source="CompleteMsoProcessResponse" target="CompleteMsoProcessResponse" />
+        <camunda:out source="CMSO_ErrorResponse" target="CMSO_ErrorResponse" />
+      </bpmn:extensionElements>
+      <bpmn:incoming>SequenceFlow_1ii935p</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_1ab5l2q</bpmn:outgoing>
+    </bpmn:callActivity>
+    <bpmn:subProcess id="SubProcess_1vbcima" name="Sub-process for FalloutHandler " triggeredByEvent="true">
+      <bpmn:startEvent id="StartEvent_0jybicw">
+        <bpmn:outgoing>SequenceFlow_0for83z</bpmn:outgoing>
+        <bpmn:errorEventDefinition />
+      </bpmn:startEvent>
+      <bpmn:endEvent id="EndEvent_1jegbhy">
+        <bpmn:incoming>SequenceFlow_0hrazlh</bpmn:incoming>
+      </bpmn:endEvent>
+      <bpmn:scriptTask id="ScriptTask_0so3xj0" name="Prepare Fallout Request" scriptFormat="groovy">
+        <bpmn:incoming>SequenceFlow_1s1cbgf</bpmn:incoming>
+        <bpmn:outgoing>SequenceFlow_1py6yqz</bpmn:outgoing>
+        <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new DeleteCustomE2EServiceInstance()
+csi.prepareFalloutRequest(execution)</bpmn:script>
+      </bpmn:scriptTask>
+      <bpmn:callActivity id="CallActivity_1qhekgt" name="Call FalloutHandler" calledElement="FalloutHandler">
+        <bpmn:extensionElements>
+          <camunda:in source="falloutRequest" target="FalloutHandlerRequest" />
+          <camunda:in source="mso-request-id" target="mso-request-id" />
+          <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+          <camunda:out source="FH_ResponseCode" target="FH_ResponseCode" />
+          <camunda:out source="FalloutHandlerResponse" target="FalloutHandlerResponse" />
+          <camunda:out source="FH_ErrorResponse" target="FH_ErrorResponse" />
+        </bpmn:extensionElements>
+        <bpmn:incoming>SequenceFlow_1py6yqz</bpmn:incoming>
+        <bpmn:outgoing>SequenceFlow_0hrazlh</bpmn:outgoing>
+      </bpmn:callActivity>
+      <bpmn:scriptTask id="ScriptTask_006nty7" name="Send Error Response">
+        <bpmn:incoming>SequenceFlow_0for83z</bpmn:incoming>
+        <bpmn:outgoing>SequenceFlow_1s1cbgf</bpmn:outgoing>
+        <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new  DeleteCustomE2EServiceInstance()
+csi.sendSyncError(execution)</bpmn:script>
+      </bpmn:scriptTask>
+      <bpmn:sequenceFlow id="SequenceFlow_0for83z" sourceRef="StartEvent_0jybicw" targetRef="ScriptTask_006nty7" />
+      <bpmn:sequenceFlow id="SequenceFlow_0hrazlh" sourceRef="CallActivity_1qhekgt" targetRef="EndEvent_1jegbhy" />
+      <bpmn:sequenceFlow id="SequenceFlow_1s1cbgf" sourceRef="ScriptTask_006nty7" targetRef="ScriptTask_0so3xj0" />
+      <bpmn:sequenceFlow id="SequenceFlow_1py6yqz" sourceRef="ScriptTask_0so3xj0" targetRef="CallActivity_1qhekgt" />
+    </bpmn:subProcess>
+    <bpmn:scriptTask id="ScriptTask_1mao77y" name="Send Sync Ack Response" scriptFormat="groovy">
+      <bpmn:incoming>SequenceFlow_1dkcu9o</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_0zf2qyk</bpmn:outgoing>
+      <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new  DeleteCustomE2EServiceInstance()
+csi.sendSyncResponse(execution)</bpmn:script>
+    </bpmn:scriptTask>
+    <bpmn:exclusiveGateway id="ExclusiveGateway_0vu8gx6" name="Success?" default="SequenceFlow_1t6ekab">
+      <bpmn:incoming>SequenceFlow_07hrbs0</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_04urx2e</bpmn:outgoing>
+      <bpmn:outgoing>SequenceFlow_1t6ekab</bpmn:outgoing>
+    </bpmn:exclusiveGateway>
+    <bpmn:endEvent id="EndEvent_1i1g9s6">
+      <bpmn:incoming>SequenceFlow_1t6ekab</bpmn:incoming>
+      <bpmn:errorEventDefinition errorRef="Error_1erlsmy" />
+    </bpmn:endEvent>
+    <bpmn:sequenceFlow id="SequenceFlow_1wxumid" sourceRef="StartEvent_00m8zen" targetRef="ScriptTask_0a63hms" />
+    <bpmn:sequenceFlow id="SequenceFlow_0zf2qyk" sourceRef="ScriptTask_1mao77y" targetRef="CallActivity_1vyx9hu" />
+    <bpmn:sequenceFlow id="SequenceFlow_07hrbs0" sourceRef="CallActivity_1vyx9hu" targetRef="ExclusiveGateway_0vu8gx6" />
+    <bpmn:sequenceFlow id="SequenceFlow_1ab5l2q" sourceRef="CallActivity_1wx4ihe" targetRef="EndEvent_0db8bs6" />
+    <bpmn:sequenceFlow id="SequenceFlow_0yowshs" sourceRef="ScriptTask_0a63hms" targetRef="Task_1jksf62" />
+    <bpmn:sequenceFlow id="SequenceFlow_04urx2e" name="yes" sourceRef="ExclusiveGateway_0vu8gx6" targetRef="ScriptTask_1fzpbop">
+      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{execution.getVariable("WorkflowException") == null}</bpmn:conditionExpression>
+    </bpmn:sequenceFlow>
+    <bpmn:sequenceFlow id="SequenceFlow_1ii935p" sourceRef="ScriptTask_1fzpbop" targetRef="CallActivity_1wx4ihe" />
+    <bpmn:sequenceFlow id="SequenceFlow_1t6ekab" name="no" sourceRef="ExclusiveGateway_0vu8gx6" targetRef="EndEvent_1i1g9s6" />
+    <bpmn:sequenceFlow id="SequenceFlow_0c4t26p" sourceRef="Task_1jksf62" targetRef="ServiceTask_0j9q5xe" />
+    <bpmn:scriptTask id="Task_1jksf62" name="prepare init operation status" scriptFormat="groovy">
+      <bpmn:incoming>SequenceFlow_0yowshs</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_0c4t26p</bpmn:outgoing>
+      <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def csi= new DeleteCustomE2EServiceInstance()
+csi.prepareInitServiceOperationStatus(execution)</bpmn:script>
+    </bpmn:scriptTask>
+    <bpmn:serviceTask id="ServiceTask_0j9q5xe" name="Update Service Operation Status">
+      <bpmn:extensionElements>
+        <camunda:connector>
+          <camunda:inputOutput>
+            <camunda:inputParameter name="url">${CVFMI_dbAdapterEndpoint}</camunda:inputParameter>
+            <camunda:inputParameter name="headers">
+              <camunda:map>
+                <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+                <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+              </camunda:map>
+            </camunda:inputParameter>
+            <camunda:inputParameter name="payload">${CVFMI_updateServiceOperStatusRequest}</camunda:inputParameter>
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>
+            <camunda:outputParameter name="CVFMI_dbResponseCode">${statusCode}</camunda:outputParameter>
+            <camunda:outputParameter name="CVFMI_dbResponse">${response}</camunda:outputParameter>
+          </camunda:inputOutput>
+          <camunda:connectorId>http-connector</camunda:connectorId>
+        </camunda:connector>
+      </bpmn:extensionElements>
+      <bpmn:incoming>SequenceFlow_0c4t26p</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_1dkcu9o</bpmn:outgoing>
+    </bpmn:serviceTask>
+    <bpmn:sequenceFlow id="SequenceFlow_1dkcu9o" sourceRef="ServiceTask_0j9q5xe" targetRef="ScriptTask_1mao77y" />
+  </bpmn:process>
+  <bpmn:error id="Error_1erlsmy" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteCustom3rdONAPServiceInstance">
+      <bpmndi:BPMNShape id="StartEvent_00m8zen_di" bpmnElement="StartEvent_00m8zen">
+        <dc:Bounds x="490" y="209" width="36" height="36" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="471" y="250" width="74" height="24" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="SubProcess_0amn8vu_di" bpmnElement="SubProcess_0amn8vu" isExpanded="true">
+        <dc:Bounds x="834" y="660" width="394" height="188" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="CallActivity_1vyx9hu_di" bpmnElement="CallActivity_1vyx9hu">
+        <dc:Bounds x="1121" y="187" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="EndEvent_0db8bs6_di" bpmnElement="EndEvent_0db8bs6">
+        <dc:Bounds x="1646" y="304" width="36" height="36" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="1657" y="340" width="19" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="ScriptTask_0a63hms_di" bpmnElement="ScriptTask_0a63hms">
+        <dc:Bounds x="562" y="187" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="ScriptTask_1fzpbop_di" bpmnElement="ScriptTask_1fzpbop">
+        <dc:Bounds x="1453" y="187" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="CallActivity_1wx4ihe_di" bpmnElement="CallActivity_1wx4ihe">
+        <dc:Bounds x="1614" y="187" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="SubProcess_1vbcima_di" bpmnElement="SubProcess_1vbcima" isExpanded="true">
+        <dc:Bounds x="736" y="374" width="679" height="194" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="ScriptTask_1mao77y_di" bpmnElement="ScriptTask_1mao77y">
+        <dc:Bounds x="970" y="187" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="ExclusiveGateway_0vu8gx6_di" bpmnElement="ExclusiveGateway_0vu8gx6" isMarkerVisible="true">
+        <dc:Bounds x="1318" y="202" width="50" height="50" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="1318" y="174" width="49" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="EndEvent_1i1g9s6_di" bpmnElement="EndEvent_1i1g9s6">
+        <dc:Bounds x="1325" y="304" width="36" height="36" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="1298" y="340" width="0" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_1wxumid_di" bpmnElement="SequenceFlow_1wxumid">
+        <di:waypoint x="526" y="227" />
+        <di:waypoint x="562" y="227" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="499" y="206" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_0zf2qyk_di" bpmnElement="SequenceFlow_0zf2qyk">
+        <di:waypoint x="1070" y="227" />
+        <di:waypoint x="1121" y="227" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="1050.5" y="206" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_07hrbs0_di" bpmnElement="SequenceFlow_07hrbs0">
+        <di:waypoint x="1221" y="227" />
+        <di:waypoint x="1318" y="227" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="1225.5" y="212" width="0" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_1ab5l2q_di" bpmnElement="SequenceFlow_1ab5l2q">
+        <di:waypoint x="1664" y="267" />
+        <di:waypoint x="1664" y="304" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="1634" y="279.5" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_0yowshs_di" bpmnElement="SequenceFlow_0yowshs">
+        <di:waypoint x="662" y="227" />
+        <di:waypoint x="707" y="227" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="639.5" y="206" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_04urx2e_di" bpmnElement="SequenceFlow_04urx2e">
+        <di:waypoint x="1368" y="227" />
+        <di:waypoint x="1453" y="227" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="1370.25" y="203" width="18" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_1ii935p_di" bpmnElement="SequenceFlow_1ii935p">
+        <di:waypoint x="1553" y="227" />
+        <di:waypoint x="1614" y="227" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="1495" y="212" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_1t6ekab_di" bpmnElement="SequenceFlow_1t6ekab">
+        <di:waypoint x="1343" y="252" />
+        <di:waypoint x="1343" y="277" />
+        <di:waypoint x="1343" y="277" />
+        <di:waypoint x="1343" y="304" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="1352" y="277" width="12" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="ScriptTask_1c6ogpt_di" bpmnElement="ScriptTask_1c6ogpt">
+        <dc:Bounds x="982" y="715" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="StartEvent_121296y_di" bpmnElement="StartEvent_121296y">
+        <dc:Bounds x="867" y="737" width="36" height="36" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="795" y="778" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="EndEvent_1dw3dwx_di" bpmnElement="EndEvent_1dw3dwx">
+        <dc:Bounds x="1143" y="737" width="36" height="36" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="1071" y="778" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="StartEvent_0jybicw_di" bpmnElement="StartEvent_0jybicw">
+        <dc:Bounds x="752" y="460" width="36" height="36" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="680" y="501" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="EndEvent_1jegbhy_di" bpmnElement="EndEvent_1jegbhy">
+        <dc:Bounds x="1331" y="460" width="36" height="36" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="1259" y="501" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="ScriptTask_0so3xj0_di" bpmnElement="ScriptTask_0so3xj0">
+        <dc:Bounds x="1010" y="438" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="CallActivity_1qhekgt_di" bpmnElement="CallActivity_1qhekgt">
+        <dc:Bounds x="1187" y="438" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="ScriptTask_006nty7_di" bpmnElement="ScriptTask_006nty7">
+        <dc:Bounds x="832" y="438" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_0guajy5_di" bpmnElement="SequenceFlow_0guajy5">
+        <di:waypoint x="903" y="755" />
+        <di:waypoint x="982" y="755" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="856" y="755" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_0dbt753_di" bpmnElement="SequenceFlow_0dbt753">
+        <di:waypoint x="1082" y="755" />
+        <di:waypoint x="1143" y="755" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="1028" y="755" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_0for83z_di" bpmnElement="SequenceFlow_0for83z">
+        <di:waypoint x="788" y="478" />
+        <di:waypoint x="810" y="478" />
+        <di:waypoint x="810" y="478" />
+        <di:waypoint x="831" y="478" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="735" y="478" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_0hrazlh_di" bpmnElement="SequenceFlow_0hrazlh">
+        <di:waypoint x="1287" y="478" />
+        <di:waypoint x="1331" y="478" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="1219" y="463" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_1s1cbgf_di" bpmnElement="SequenceFlow_1s1cbgf">
+        <di:waypoint x="932" y="478" />
+        <di:waypoint x="959" y="478" />
+        <di:waypoint x="959" y="478" />
+        <di:waypoint x="1010" y="478" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="884" y="478" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_1py6yqz_di" bpmnElement="SequenceFlow_1py6yqz">
+        <di:waypoint x="1110" y="478" />
+        <di:waypoint x="1187" y="478" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="1060" y="463" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_0c4t26p_di" bpmnElement="SequenceFlow_0c4t26p">
+        <di:waypoint x="807" y="227" />
+        <di:waypoint x="833" y="227" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="820" y="206" width="0" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="ScriptTask_1joo7s7_di" bpmnElement="Task_1jksf62">
+        <dc:Bounds x="707" y="187" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="ServiceTask_0j9q5xe_di" bpmnElement="ServiceTask_0j9q5xe">
+        <dc:Bounds x="833" y="187" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_1dkcu9o_di" bpmnElement="SequenceFlow_1dkcu9o">
+        <di:waypoint x="933" y="227" />
+        <di:waypoint x="970" y="227" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="951.5" y="206" width="0" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+    </bpmndi:BPMNPlane>
+  </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/resources/subprocess/ActivateSDNCNetworkResource.bpmn b/bpmn/mso-infrastructure-bpmn/src/main/resources/subprocess/ActivateSDNCNetworkResource.bpmn
new file mode 100644
index 0000000..e44804a
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/resources/subprocess/ActivateSDNCNetworkResource.bpmn
@@ -0,0 +1,162 @@
+<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.16.2">
+  <bpmn:process id="ActivateSDNCNetworkResource" name="ActivateSDNCNetworkResource" isExecutable="true">
+    <bpmn:startEvent id="createNS_StartEvent" name="createNS_StartEvent">
+      <bpmn:outgoing>SequenceFlow_1c92ks3</bpmn:outgoing>
+    </bpmn:startEvent>
+    <bpmn:endEvent id="EndEvent_1x6k78c" name="create SDNC call end">
+      <bpmn:incoming>SequenceFlow_17md60u</bpmn:incoming>
+    </bpmn:endEvent>
+    <bpmn:callActivity id="CallActivity_1600xlj" name="Call SDNC resource activate&#10;Adapter V1&#10;" calledElement="sdncAdapter">
+      <bpmn:extensionElements>
+        <camunda:in source="CRESDNCRES_activateSDNCRequest" target="sdncAdapterWorkflowRequest" />
+        <camunda:in source="mso-request-id" target="mso-request-id" />
+        <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+        <camunda:out source="sdncAdapterResponse" target="CRENWKI_activateSDNCResponse" />
+        <camunda:out source="SDNCA_ResponseCode" target="CRESDNCRES_sdncCreateReturnCode" />
+        <camunda:out source="SDNCA_SuccessIndicator" target="CRESDNCRES_SuccessIndicator" />
+        <camunda:out source="WorkflowException" target="WorkflowException" />
+        <camunda:in source="sdncAdapterWorkflowRequest" target="sdncAdapterWorkflowRequest" />
+      </bpmn:extensionElements>
+      <bpmn:incoming>SequenceFlow_18l3crb</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_1xk5xed</bpmn:outgoing>
+    </bpmn:callActivity>
+    <bpmn:sequenceFlow id="SequenceFlow_1xk5xed" sourceRef="CallActivity_1600xlj" targetRef="Task_0uwlr22" />
+    <bpmn:sequenceFlow id="SequenceFlow_0ow44q0" sourceRef="Task_023hred" targetRef="ScriptTask_1g5zyi6" />
+    <bpmn:scriptTask id="Task_023hred" name="post SDNC activate call">
+      <bpmn:incoming>SequenceFlow_1vnx1pp</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_0ow44q0</bpmn:outgoing>
+      <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new ActivateSDNCNetworkResource()
+dcsi.postCreateSDNCCall(execution)</bpmn:script>
+    </bpmn:scriptTask>
+    <bpmn:sequenceFlow id="SequenceFlow_18l3crb" sourceRef="Task_13sx2bp" targetRef="CallActivity_1600xlj" />
+    <bpmn:scriptTask id="Task_13sx2bp" name="Pre Process Request" scriptFormat="groovy">
+      <bpmn:incoming>SequenceFlow_1c92ks3</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_18l3crb</bpmn:outgoing>
+      <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new ActivateSDNCNetworkResource()
+dcsi.preProcessRequest(execution)</bpmn:script>
+    </bpmn:scriptTask>
+    <bpmn:scriptTask id="Task_0uwlr22" name="Create progress update parameters After create" scriptFormat="groovy">
+      <bpmn:incoming>SequenceFlow_1xk5xed</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_1jr6zi0</bpmn:outgoing>
+      <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new ActivateSDNCNetworkResource()
+dcsi.prepareUpdateAfterActivateSDNCResource(execution)</bpmn:script>
+    </bpmn:scriptTask>
+    <bpmn:serviceTask id="ServiceTask_1cm8iwr" name="update progress update">
+      <bpmn:extensionElements>
+        <camunda:connector>
+          <camunda:inputOutput>
+            <camunda:inputParameter name="url">${CVFMI_dbAdapterEndpoint}</camunda:inputParameter>
+            <camunda:inputParameter name="headers">
+              <camunda:map>
+                <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+                <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+              </camunda:map>
+            </camunda:inputParameter>
+            <camunda:inputParameter name="payload">${CVFMI_updateResOperStatusRequest}</camunda:inputParameter>
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>
+            <camunda:outputParameter name="CVFMI_dbResponseCode">${statusCode}</camunda:outputParameter>
+            <camunda:outputParameter name="CVFMI_dbResponse">${response}</camunda:outputParameter>
+          </camunda:inputOutput>
+          <camunda:connectorId>http-connector</camunda:connectorId>
+        </camunda:connector>
+      </bpmn:extensionElements>
+      <bpmn:incoming>SequenceFlow_1jr6zi0</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_1vnx1pp</bpmn:outgoing>
+    </bpmn:serviceTask>
+    <bpmn:sequenceFlow id="SequenceFlow_1jr6zi0" sourceRef="Task_0uwlr22" targetRef="ServiceTask_1cm8iwr" />
+    <bpmn:sequenceFlow id="SequenceFlow_1vnx1pp" sourceRef="ServiceTask_1cm8iwr" targetRef="Task_023hred" />
+    <bpmn:scriptTask id="ScriptTask_1g5zyi6" name="Send Sync Ack Response" scriptFormat="groovy">
+      <bpmn:incoming>SequenceFlow_0ow44q0</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_17md60u</bpmn:outgoing>
+      <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new  ActivateSDNCNetworkResource()
+csi.sendSyncResponse(execution)</bpmn:script>
+    </bpmn:scriptTask>
+    <bpmn:sequenceFlow id="SequenceFlow_17md60u" sourceRef="ScriptTask_1g5zyi6" targetRef="EndEvent_1x6k78c" />
+    <bpmn:sequenceFlow id="SequenceFlow_1c92ks3" sourceRef="createNS_StartEvent" targetRef="Task_13sx2bp" />
+  </bpmn:process>
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="ActivateSDNCNetworkResource">
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="createNS_StartEvent">
+        <dc:Bounds x="-203" y="306" width="36" height="36" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="-230" y="352" width="89" height="27" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="EndEvent_15pcuuc_di" bpmnElement="EndEvent_1x6k78c">
+        <dc:Bounds x="930" y="306" width="36" height="36" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="893" y="348" width="84" height="27" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="CallActivity_1600xlj_di" bpmnElement="CallActivity_1600xlj">
+        <dc:Bounds x="77" y="284" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_1xk5xed_di" bpmnElement="SequenceFlow_1xk5xed">
+        <di:waypoint x="177" y="324" />
+        <di:waypoint x="247" y="324" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="210.5" y="314" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_0ow44q0_di" bpmnElement="SequenceFlow_0ow44q0">
+        <di:waypoint x="694" y="324" />
+        <di:waypoint x="765" y="324" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="780.5" y="314" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="ScriptTask_0gyej62_di" bpmnElement="Task_023hred">
+        <dc:Bounds x="594" y="284" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_18l3crb_di" bpmnElement="SequenceFlow_18l3crb">
+        <di:waypoint x="12" y="324" />
+        <di:waypoint x="77" y="324" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="235.5" y="108" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="ScriptTask_14l9mlv_di" bpmnElement="Task_13sx2bp">
+        <dc:Bounds x="-88" y="284" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="ScriptTask_0hu4lhm_di" bpmnElement="Task_0uwlr22">
+        <dc:Bounds x="247" y="284" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="ServiceTask_1cm8iwr_di" bpmnElement="ServiceTask_1cm8iwr">
+        <dc:Bounds x="417" y="284" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_1jr6zi0_di" bpmnElement="SequenceFlow_1jr6zi0">
+        <di:waypoint x="347" y="324" />
+        <di:waypoint x="417" y="324" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="444.5" y="314" width="0" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_1vnx1pp_di" bpmnElement="SequenceFlow_1vnx1pp">
+        <di:waypoint x="517" y="324" />
+        <di:waypoint x="594" y="324" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="641" y="314" width="0" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="ScriptTask_1g5zyi6_di" bpmnElement="ScriptTask_1g5zyi6">
+        <dc:Bounds x="765" y="284" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_17md60u_di" bpmnElement="SequenceFlow_17md60u">
+        <di:waypoint x="865" y="324" />
+        <di:waypoint x="930" y="324" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="998" y="313" width="0" height="14" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_1c92ks3_di" bpmnElement="SequenceFlow_1c92ks3">
+        <di:waypoint x="-167" y="324" />
+        <di:waypoint x="-88" y="324" />
+      </bpmndi:BPMNEdge>
+    </bpmndi:BPMNPlane>
+  </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/resources/subprocess/DeActivateNetworkResource.bpmn b/bpmn/mso-infrastructure-bpmn/src/main/resources/subprocess/DeActivateNetworkResource.bpmn
new file mode 100644
index 0000000..31604fd
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/resources/subprocess/DeActivateNetworkResource.bpmn
@@ -0,0 +1,258 @@
+<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0">
+  <bpmn:process id="DeActivateNetworkResource" name="DeActivateNetworkResource" isExecutable="true">
+    <bpmn:startEvent id="deleteNetworkResource_StartEvent" name="deleteNetworkResource_StartEvent">
+      <bpmn:outgoing>SequenceFlow_1qo2pln</bpmn:outgoing>
+    </bpmn:startEvent>
+    <bpmn:sequenceFlow id="SequenceFlow_1qo2pln" sourceRef="deleteNetworkResource_StartEvent" targetRef="Task_1dlrfiw" />
+    <bpmn:sequenceFlow id="SequenceFlow_0khtova" sourceRef="PreprocessIncomingRequest_task" targetRef="Task_0tezqd4" />
+    <bpmn:scriptTask id="PreprocessIncomingRequest_task" name="prepare SDNC Request" scriptFormat="groovy">
+      <bpmn:incoming>SequenceFlow_18l3crb</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_0khtova</bpmn:outgoing>
+      <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DeleteSDNCNetworkResource()
+dcsi.prepareSDNCRequest(execution)]]></bpmn:script>
+    </bpmn:scriptTask>
+    <bpmn:endEvent id="EndEvent_1x6k78c" name="delete SDNC call end">
+      <bpmn:incoming>SequenceFlow_15wux6a</bpmn:incoming>
+    </bpmn:endEvent>
+    <bpmn:callActivity id="CallActivity_1600xlj" name="Call SDNC RSRC &#10; Adapter V1&#10;" calledElement="sdncAdapter">
+      <bpmn:extensionElements>
+        <camunda:in source="sdncAdapterWorkflowRequest" target="sdncAdapterWorkflowRequest" />
+        <camunda:in source="mso-request-id" target="mso-request-id" />
+        <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
+        <camunda:out source="sdncAdapterResponse" target="DELSDNCRES_activateSDNCResponse" />
+        <camunda:out source="SDNCA_ResponseCode" target="DELSDNCRES_sdncDeleteReturnCode" />
+        <camunda:out source="SDNCA_SuccessIndicator" target="DELSDNCRES_SuccessIndicator" />
+        <camunda:out source="WorkflowException" target="WorkflowException" />
+        <camunda:in source="sdncAdapterWorkflowRequest" target="sdncAdapterWorkflowRequest" />
+      </bpmn:extensionElements>
+      <bpmn:incoming>SequenceFlow_15mvedq</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_1xk5xed</bpmn:outgoing>
+    </bpmn:callActivity>
+    <bpmn:sequenceFlow id="SequenceFlow_1xk5xed" sourceRef="CallActivity_1600xlj" targetRef="Task_0uwlr22" />
+    <bpmn:sequenceFlow id="SequenceFlow_0ow44q0" sourceRef="Task_023hred" targetRef="ScriptTask_1emjxm2" />
+    <bpmn:scriptTask id="Task_023hred" name="post SDNC delete call">
+      <bpmn:incoming>SequenceFlow_1vnx1pp</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_0ow44q0</bpmn:outgoing>
+      <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DeleteSDNCNetworkResource()
+dcsi.postDeleteSDNCCall(execution)]]></bpmn:script>
+    </bpmn:scriptTask>
+    <bpmn:sequenceFlow id="SequenceFlow_0w2es8j" sourceRef="Task_1dlrfiw" targetRef="Task_13sx2bp" />
+    <bpmn:sequenceFlow id="SequenceFlow_18l3crb" sourceRef="Task_13sx2bp" targetRef="PreprocessIncomingRequest_task" />
+    <bpmn:scriptTask id="Task_1dlrfiw" name="Set the Recipe DesignTimeParam" scriptFormat="groovy">
+      <bpmn:incoming>SequenceFlow_1qo2pln</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_0w2es8j</bpmn:outgoing>
+      <bpmn:script><![CDATA[String recipeParamXsdDemo="""{"operationType":"GRE"}"""
+String recipeParamXsd=""
+execution.setVariable("recipeParamXsd", recipeParamXsd)]]></bpmn:script>
+    </bpmn:scriptTask>
+    <bpmn:scriptTask id="Task_13sx2bp" name="Pre Process Request" scriptFormat="groovy">
+      <bpmn:incoming>SequenceFlow_0w2es8j</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_18l3crb</bpmn:outgoing>
+      <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DeleteSDNCNetworkResource()
+dcsi.preProcessRequest(execution)]]></bpmn:script>
+    </bpmn:scriptTask>
+    <bpmn:sequenceFlow id="SequenceFlow_1mz0vdx" sourceRef="Task_0tezqd4" targetRef="Task_18tomkl" />
+    <bpmn:sequenceFlow id="SequenceFlow_15mvedq" sourceRef="Task_18tomkl" targetRef="CallActivity_1600xlj" />
+    <bpmn:scriptTask id="Task_0tezqd4" name="Delete progress update parameters before delete" scriptFormat="groovy">
+      <bpmn:incoming>SequenceFlow_0khtova</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_1mz0vdx</bpmn:outgoing>
+      <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DeleteSDNCNetworkResource()
+dcsi.prepareUpdateBeforeDeleteSDNCResource(execution)]]></bpmn:script>
+    </bpmn:scriptTask>
+    <bpmn:scriptTask id="Task_0uwlr22" name="Create progress update parameters After delete" scriptFormat="groovy">
+      <bpmn:incoming>SequenceFlow_1xk5xed</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_1jr6zi0</bpmn:outgoing>
+      <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def dcsi = new DeleteSDNCNetworkResource()
+dcsi.prepareUpdateAfterDeleteSDNCResource(execution)]]></bpmn:script>
+    </bpmn:scriptTask>
+    <bpmn:serviceTask id="Task_18tomkl" name="update progress update">
+      <bpmn:extensionElements>
+        <camunda:connector>
+          <camunda:inputOutput>
+            <camunda:inputParameter name="url">${CVFMI_dbAdapterEndpoint}</camunda:inputParameter>
+            <camunda:inputParameter name="headers">
+              <camunda:map>
+                <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+                <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+              </camunda:map>
+            </camunda:inputParameter>
+            <camunda:inputParameter name="payload">${CVFMI_updateResOperStatusRequest}</camunda:inputParameter>
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>
+            <camunda:outputParameter name="CVFMI_dbResponseCode">${statusCode}</camunda:outputParameter>
+            <camunda:outputParameter name="CVFMI_dbResponse">${response}</camunda:outputParameter>
+          </camunda:inputOutput>
+          <camunda:connectorId>http-connector</camunda:connectorId>
+        </camunda:connector>
+      </bpmn:extensionElements>
+      <bpmn:incoming>SequenceFlow_1mz0vdx</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_15mvedq</bpmn:outgoing>
+    </bpmn:serviceTask>
+    <bpmn:serviceTask id="ServiceTask_1cm8iwr" name="update progress update">
+      <bpmn:extensionElements>
+        <camunda:connector>
+          <camunda:inputOutput>
+            <camunda:inputParameter name="url">${CVFMI_dbAdapterEndpoint}</camunda:inputParameter>
+            <camunda:inputParameter name="headers">
+              <camunda:map>
+                <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+                <camunda:entry key="Authorization">Basic QlBFTENsaWVudDpwYXNzd29yZDEk</camunda:entry>
+              </camunda:map>
+            </camunda:inputParameter>
+            <camunda:inputParameter name="payload">${CVFMI_updateResOperStatusRequest}</camunda:inputParameter>
+            <camunda:inputParameter name="method">POST</camunda:inputParameter>
+            <camunda:outputParameter name="CVFMI_dbResponseCode">${statusCode}</camunda:outputParameter>
+            <camunda:outputParameter name="CVFMI_dbResponse">${response}</camunda:outputParameter>
+          </camunda:inputOutput>
+          <camunda:connectorId>http-connector</camunda:connectorId>
+        </camunda:connector>
+      </bpmn:extensionElements>
+      <bpmn:incoming>SequenceFlow_1jr6zi0</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_1vnx1pp</bpmn:outgoing>
+    </bpmn:serviceTask>
+    <bpmn:sequenceFlow id="SequenceFlow_1jr6zi0" sourceRef="Task_0uwlr22" targetRef="ServiceTask_1cm8iwr" />
+    <bpmn:sequenceFlow id="SequenceFlow_1vnx1pp" sourceRef="ServiceTask_1cm8iwr" targetRef="Task_023hred" />
+    <bpmn:scriptTask id="ScriptTask_1emjxm2" name="Send Sync Ack Response" scriptFormat="groovy">
+      <bpmn:incoming>SequenceFlow_0ow44q0</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_15wux6a</bpmn:outgoing>
+      <bpmn:script><![CDATA[import org.onap.so.bpmn.infrastructure.scripts.*
+def csi = new  DeleteSDNCNetworkResource()
+csi.sendSyncResponse(execution)]]></bpmn:script>
+    </bpmn:scriptTask>
+    <bpmn:sequenceFlow id="SequenceFlow_15wux6a" sourceRef="ScriptTask_1emjxm2" targetRef="EndEvent_1x6k78c" />
+  </bpmn:process>
+  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteSDNCNetworkResource">
+      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="deleteNetworkResource_StartEvent">
+        <dc:Bounds x="-111" y="111" width="36" height="36" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="-136" y="147" width="89" height="28" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_1qo2pln_di" bpmnElement="SequenceFlow_1qo2pln">
+        <di:waypoint xsi:type="dc:Point" x="-75" y="129" />
+        <di:waypoint xsi:type="dc:Point" x="-10" y="129" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="-87.5" y="108" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_0khtova_di" bpmnElement="SequenceFlow_0khtova">
+        <di:waypoint xsi:type="dc:Point" x="413" y="129" />
+        <di:waypoint xsi:type="dc:Point" x="460" y="129" />
+        <di:waypoint xsi:type="dc:Point" x="500" y="129" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="391.5" y="108" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="ScriptTask_03j6ogo_di" bpmnElement="PreprocessIncomingRequest_task">
+        <dc:Bounds x="313" y="89" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="EndEvent_15pcuuc_di" bpmnElement="EndEvent_1x6k78c">
+        <dc:Bounds x="967" y="317" width="36" height="36" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="933" y="359" width="79" height="28" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="CallActivity_1600xlj_di" bpmnElement="CallActivity_1600xlj">
+        <dc:Bounds x="109" y="295" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_1xk5xed_di" bpmnElement="SequenceFlow_1xk5xed">
+        <di:waypoint xsi:type="dc:Point" x="209" y="335" />
+        <di:waypoint xsi:type="dc:Point" x="302" y="335" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="210.5" y="314" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_0ow44q0_di" bpmnElement="SequenceFlow_0ow44q0">
+        <di:waypoint xsi:type="dc:Point" x="735" y="335" />
+        <di:waypoint xsi:type="dc:Point" x="793" y="335" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="719" y="314" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="ScriptTask_0gyej62_di" bpmnElement="Task_023hred">
+        <dc:Bounds x="635" y="295" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_0w2es8j_di" bpmnElement="SequenceFlow_0w2es8j">
+        <di:waypoint xsi:type="dc:Point" x="90" y="129" />
+        <di:waypoint xsi:type="dc:Point" x="148" y="129" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="74" y="108" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_18l3crb_di" bpmnElement="SequenceFlow_18l3crb">
+        <di:waypoint xsi:type="dc:Point" x="248" y="129" />
+        <di:waypoint xsi:type="dc:Point" x="313" y="129" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="235.5" y="108" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="ScriptTask_0lc6l7a_di" bpmnElement="Task_1dlrfiw">
+        <dc:Bounds x="-10" y="89" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="ScriptTask_14l9mlv_di" bpmnElement="Task_13sx2bp">
+        <dc:Bounds x="148" y="89" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_1mz0vdx_di" bpmnElement="SequenceFlow_1mz0vdx">
+        <di:waypoint xsi:type="dc:Point" x="606" y="129" />
+        <di:waypoint xsi:type="dc:Point" x="638" y="129" />
+        <di:waypoint xsi:type="dc:Point" x="638" y="129" />
+        <di:waypoint xsi:type="dc:Point" x="738" y="129" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="608" y="123" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_15mvedq_di" bpmnElement="SequenceFlow_15mvedq">
+        <di:waypoint xsi:type="dc:Point" x="788" y="169" />
+        <di:waypoint xsi:type="dc:Point" x="788" y="218" />
+        <di:waypoint xsi:type="dc:Point" x="0" y="218" />
+        <di:waypoint xsi:type="dc:Point" x="0" y="335" />
+        <di:waypoint xsi:type="dc:Point" x="109" y="335" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="349" y="197" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="ScriptTask_1kqf4ge_di" bpmnElement="Task_0tezqd4">
+        <dc:Bounds x="506" y="89" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="ScriptTask_0hu4lhm_di" bpmnElement="Task_0uwlr22">
+        <dc:Bounds x="302" y="295" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="ServiceTask_1q6ssz7_di" bpmnElement="Task_18tomkl">
+        <dc:Bounds x="738" y="89" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape id="ServiceTask_1cm8iwr_di" bpmnElement="ServiceTask_1cm8iwr">
+        <dc:Bounds x="487" y="295" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_1jr6zi0_di" bpmnElement="SequenceFlow_1jr6zi0">
+        <di:waypoint xsi:type="dc:Point" x="402" y="335" />
+        <di:waypoint xsi:type="dc:Point" x="487" y="335" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="444.5" y="314" width="0" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_1vnx1pp_di" bpmnElement="SequenceFlow_1vnx1pp">
+        <di:waypoint xsi:type="dc:Point" x="587" y="335" />
+        <di:waypoint xsi:type="dc:Point" x="635" y="335" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="566" y="314" width="90" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="ScriptTask_1emjxm2_di" bpmnElement="ScriptTask_1emjxm2">
+        <dc:Bounds x="793" y="295" width="100" height="80" />
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_15wux6a_di" bpmnElement="SequenceFlow_15wux6a">
+        <di:waypoint xsi:type="dc:Point" x="893" y="335" />
+        <di:waypoint xsi:type="dc:Point" x="967" y="335" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="930" y="313" width="0" height="14" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+    </bpmndi:BPMNPlane>
+  </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/RequestHeaderTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/RequestHeaderTest.java
new file mode 100644
index 0000000..e56b45f
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/RequestHeaderTest.java
@@ -0,0 +1,46 @@
+/*
+* ============LICENSE_START=======================================================
+ * ONAP : SO
+ * ================================================================================
+ * Copyright (C) 2018 TechMahindra
+ * ================================================================================
+ * 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=========================================================
+*/
+
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.onap.so.bpmn.common.adapter.sdnc.RequestHeader;
+
+public class RequestHeaderTest{
+	RequestHeader rh = new RequestHeader();
+
+	@Test
+	public void testRequestHeader() {
+		rh.setRequestId("requestId");
+		rh.setSvcInstanceId("svcInstanceId");
+		rh.setSvcAction("svcAction");
+		rh.setSvcOperation("svcOperation");
+		rh.setCallbackUrl("callbackUrl");
+		rh.setMsoAction("msoAction");
+		assertEquals(rh.getRequestId(), "requestId");
+		assertEquals(rh.getSvcInstanceId(), "svcInstanceId");
+		assertEquals(rh.getSvcAction(), "svcAction");
+		assertEquals(rh.getSvcOperation(), "svcOperation");
+		assertEquals(rh.getCallbackUrl(), "callbackUrl");
+		assertEquals(rh.getMsoAction(), "msoAction");
+		assert(rh.toString()!=null);	
+	}
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/SDNCAdapterCallbackRequestTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/SDNCAdapterCallbackRequestTest.java
new file mode 100644
index 0000000..9843a953
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/SDNCAdapterCallbackRequestTest.java
@@ -0,0 +1,45 @@
+/*
+* ============LICENSE_START=======================================================
+ * ONAP : SO
+ * ================================================================================
+ * Copyright (C) 2018 TechMahindra
+ * ================================================================================
+ * 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=========================================================
+*/
+
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.Test;
+import org.onap.so.BaseTest;
+import org.onap.so.bpmn.common.adapter.sdnc.CallbackHeader;
+import org.onap.so.bpmn.common.adapter.sdnc.SDNCAdapterCallbackRequest;
+
+public class SDNCAdapterCallbackRequestTest{
+	
+	SDNCAdapterCallbackRequest sdnccall = new SDNCAdapterCallbackRequest();
+	CallbackHeader cbh = new CallbackHeader();
+	String o = "test";
+
+	@Test
+	public void testSDNCAdapterCallbackRequest() {
+		sdnccall.setCallbackHeader(cbh);
+		sdnccall.setRequestData(o);
+		assertEquals(sdnccall.getCallbackHeader(), cbh);
+		assertEquals(sdnccall.getRequestData(), o);
+		assertNotNull(sdnccall.toString());	
+	}
+
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/SDNCAdapterRequestTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/SDNCAdapterRequestTest.java
new file mode 100644
index 0000000..79bffe4
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/SDNCAdapterRequestTest.java
@@ -0,0 +1,41 @@
+/*
+* ============LICENSE_START=======================================================
+ * ONAP : SO
+ * ================================================================================
+ * Copyright (C) 2018 TechMahindra
+ * ================================================================================
+ * 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=========================================================
+*/
+
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.onap.so.bpmn.common.adapter.sdnc.RequestHeader;
+import org.onap.so.bpmn.common.adapter.sdnc.SDNCAdapterRequest;
+
+public class SDNCAdapterRequestTest {
+	
+	SDNCAdapterRequest adapter = new SDNCAdapterRequest();
+	RequestHeader rh = new RequestHeader();
+	Object o = new Object();
+
+	@Test
+	public void testSDNCAdapterRequest() {
+		adapter.setRequestHeader(rh);
+		adapter.setRequestData(o);
+		assertEquals(adapter.getRequestHeader(), rh);
+		assertEquals(adapter.getRequestData(), o);
+		}
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/BaseIntegrationTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/BaseIntegrationTest.java
new file mode 100644
index 0000000..b5511f6
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/BaseIntegrationTest.java
@@ -0,0 +1,54 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 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.onap.so;
+
+import org.junit.After;
+import org.junit.runner.RunWith;
+import org.onap.so.bpmn.common.BPMNUtil;
+import org.onap.so.bpmn.common.WorkflowTest;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.cloud.contract.wiremock.AutoConfigureWireMock;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import com.github.tomakehurst.wiremock.client.WireMock;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = TestApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
+@ActiveProfiles("test")
+@ContextConfiguration
+@AutoConfigureWireMock(port = 0)
+public abstract class  BaseIntegrationTest extends WorkflowTest {
+	@Autowired
+	BPMNUtil bpmnUtil;
+
+	@Value("${wiremock.server.port}")
+	protected String wiremockPort;
+	
+	@After
+	public void baseAfterTest() {
+		WireMock.reset();
+	}
+}
+
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/InfraEmbeddedMariaDbConfig.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/InfraEmbeddedMariaDbConfig.java
new file mode 100644
index 0000000..eee2810
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/InfraEmbeddedMariaDbConfig.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 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.onap.so.bpmn;
+import ch.vorburger.exec.ManagedProcessException;
+import ch.vorburger.mariadb4j.DBConfigurationBuilder;
+import ch.vorburger.mariadb4j.springframework.MariaDB4jSpringService;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder;
+import org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Primary;
+import org.springframework.context.annotation.Profile;
+import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
+import org.springframework.orm.jpa.JpaTransactionManager;
+import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
+import org.springframework.transaction.PlatformTransactionManager;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+import javax.persistence.EntityManagerFactory;
+import javax.sql.DataSource;
+
+@Configuration
+@EnableTransactionManagement
+@EnableJpaRepositories(
+        entityManagerFactoryRef = "requestEntityManagerFactory",transactionManagerRef = "requestTransactionManager",
+        basePackages = { "org.onap.so.db.request.data.repository"}
+)
+@Profile({"test"})
+public class InfraEmbeddedMariaDbConfig {
+
+    @Primary
+    @Bean(name = "requestEntityManagerFactory")
+    public LocalContainerEntityManagerFactoryBean
+    entityManagerFactory(
+            EntityManagerFactoryBuilder builder,
+            DataSource dataSource
+    ) {
+        return builder
+                .dataSource(dataSource)
+                .packages("org.onap.so.db.request.beans")
+                .persistenceUnit("requestDB")
+                .build();
+    }
+
+    @Bean(name = "requestTransactionManager")
+    public PlatformTransactionManager transactionManager(
+            @Qualifier("requestEntityManagerFactory") EntityManagerFactory
+                    entityManagerFactory
+    ) {
+        return new JpaTransactionManager(entityManagerFactory);
+    }
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/IntegrationTestSuite.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/IntegrationTestSuite.java
new file mode 100644
index 0000000..f65cada
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/IntegrationTestSuite.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 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.onap.so.bpmn;
+
+import com.googlecode.junittoolbox.SuiteClasses;
+import com.googlecode.junittoolbox.WildcardPatternSuite;
+import org.junit.runner.RunWith;
+
+@RunWith(WildcardPatternSuite.class)
+@SuiteClasses({"**/*IT.class"})
+public class IntegrationTestSuite {
+  // the class remains empty,
+  // used only as a holder for the above annotations
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/BPMNUtil.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/BPMNUtil.java
new file mode 100644
index 0000000..5f0722a
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/BPMNUtil.java
@@ -0,0 +1,357 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.ws.rs.core.Response;
+
+import org.camunda.bpm.engine.HistoryService;
+import org.camunda.bpm.engine.ProcessEngineServices;
+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.variable.impl.VariableMapImpl;
+import org.onap.so.bpmn.common.workflow.context.WorkflowResponse;
+import org.onap.so.bpmn.common.workflow.service.WorkflowAsyncResource;
+import org.onap.so.bpmn.common.workflow.service.WorkflowResource;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+/**
+ * Set of utility methods used for Unit testing
+ *
+ */
+@Component
+public class BPMNUtil {
+
+	private static WorkflowAsyncResource workflowResource;
+	
+	@Autowired
+	public void setWorkflowResource(WorkflowAsyncResource workflowResource) {
+		BPMNUtil.workflowResource = workflowResource;
+	}
+
+	public static String getVariable(ProcessEngineServices processEngineServices, String processDefinitionID, String name) {
+		String pID = getProcessInstanceId(processEngineServices,
+				processDefinitionID);
+		return getVariable( processEngineServices,  processDefinitionID,  name,  pID);
+	}
+	
+	public static String getVariable(ProcessEngineServices processEngineServices, String processDefinitionID, String name, String processInstanceId) {
+		assertProcessInstanceFinished(processEngineServices, processInstanceId);
+		HistoricVariableInstance responseData = processEngineServices.getHistoryService()
+			    .createHistoricVariableInstanceQuery().processInstanceId(processInstanceId)
+			    .variableName(name)
+			    .singleResult();
+		
+		if (responseData != null) {
+			return (responseData.getValue() != null ? responseData.getValue().toString(): null); 
+		}
+		return null;
+	}
+
+	/*
+	@SuppressWarnings("unchecked")
+	public static <T extends Object> T getRawVariable(HistoryService historyService, String processDefinitionID, String name) {
+		//String pID = getProcessInstanceId(processEngineServices,
+		//		processDefinitionID);
+		assertProcessInstanceFinished(historyService, pID);
+		Object responseData = historyService
+			    .createHistoricVariableInstanceQuery().processInstanceId(pID)
+			    .variableName(name)
+			    .singleResult()
+			    .getValue();
+		return (T) responseData;
+	}
+	*/
+	
+	@SuppressWarnings("unchecked")
+	public static <T> T getRawVariable(ProcessEngineServices processEngineServices, String processDefinitionID, String name) {
+		String pID = getProcessInstanceId(processEngineServices,
+				processDefinitionID);
+		return getRawVariable( processEngineServices,  processDefinitionID,  name,  pID);
+	}
+	
+	@SuppressWarnings("unchecked")
+	public static <T> T getRawVariable(ProcessEngineServices processEngineServices, String processDefinitionID, String name, String processInstanceId) {
+		assertProcessInstanceFinished(processEngineServices, processInstanceId);
+		Object responseData = processEngineServices.getHistoryService()
+			    .createHistoricVariableInstanceQuery().processInstanceId(processInstanceId)
+			    .variableName(name)
+			    .singleResult()
+			    .getValue();
+		return (T) responseData;
+	}
+
+	
+	public static void assertAnyProcessInstanceFinished(ProcessEngineServices processEngineServices, String processDefinitionID) {
+		String pID = getProcessInstanceId(processEngineServices,
+				processDefinitionID);
+		assertNotNull(pID);
+	    assertTrue(processEngineServices.getHistoryService().createHistoricProcessInstanceQuery().processInstanceId(pID).finished().count() > 0);
+	}
+	
+	public static void assertNoProcessInstance(ProcessEngineServices processEngineServices, String processDefinitionID) {
+		assertNull(getProcessInstanceId(processEngineServices, processDefinitionID));
+	}
+	
+	public static void assertProcessInstanceFinished(HistoryService historyService, String pid) {
+	    assertEquals(1, historyService.createHistoricProcessInstanceQuery().processInstanceId(pid).finished().count());
+	}
+	
+	public static void assertProcessInstanceFinished(ProcessEngineServices processEngineServices, String pid) {
+	    assertEquals(1, processEngineServices.getHistoryService().createHistoricProcessInstanceQuery().processInstanceId(pid).finished().count());
+	}
+	
+	public static void assertProcessInstanceNotFinished(ProcessEngineServices processEngineServices, String processDefinitionID) {
+		String pID = getProcessInstanceId(processEngineServices,
+				processDefinitionID);		
+	    assertEquals(0, processEngineServices.getHistoryService().createHistoricProcessInstanceQuery().processInstanceId(pID).finished().count());
+	}
+	
+	private static String getProcessInstanceId(
+			ProcessEngineServices processEngineServices, String processDefinitionID) {
+		List<HistoricProcessInstance> historyList =  processEngineServices.getHistoryService().createHistoricProcessInstanceQuery().list();
+		String pID = null;
+		for (HistoricProcessInstance hInstance: historyList) {
+			if (hInstance.getProcessDefinitionKey().equals(processDefinitionID)) {
+				pID = hInstance.getId();
+				break;
+			}
+		}
+		return pID;
+	}
+	
+	public static void cleanHistory(ProcessEngineServices processEngineServices) {
+		List<HistoricProcessInstance> historyList = processEngineServices.getHistoryService().createHistoricProcessInstanceQuery().list();
+		List<String> pidList = new ArrayList<>();
+		for (HistoricProcessInstance hInstance : historyList) {
+			pidList.add(hInstance.getId());
+		}
+		if (pidList.size() > 0) {
+			processEngineServices.getHistoryService().deleteHistoricProcessInstances(pidList);
+		}
+	}
+	
+	private static String getProcessInstanceId(
+			HistoryService historyService, String processDefinitionID) {
+		List<HistoricProcessInstance> historyList =  historyService.createHistoricProcessInstanceQuery().list();
+		String pID = null;
+		for (HistoricProcessInstance hInstance: historyList) {
+			if (hInstance.getProcessDefinitionKey().equals(processDefinitionID)) {
+				pID = hInstance.getId();
+				break;
+			}
+		}
+		return pID;
+	}
+
+	public static boolean isProcessInstanceFinished(ProcessEngineServices processEngineServices, String pid) {
+	    return processEngineServices.getHistoryService().createHistoricProcessInstanceQuery().processInstanceId(pid).finished().count() == 1 ? true: false;
+	}
+
+	
+	private static void buildVariable(String key, String value, Map<String,Object> variableValueType) {
+		Map<String, Object> host = new HashMap<>();
+		host.put("value", value);
+		host.put("type", "String");
+		variableValueType.put(key, host);
+	}
+	
+	public static WorkflowResponse executeWorkFlow(ProcessEngineServices processEngineServices, String processKey, Map<String,String> variables) {
+		VariableMapImpl variableMap = new VariableMapImpl();
+
+		Map<String, Object> variableValueType = new HashMap<>();
+		for (String key : variables.keySet()) {
+			buildVariable(key, variables.get(key), variableValueType);
+		}
+		buildVariable("mso-service-request-timeout","600", variableValueType);
+		variableMap.put("variables", variableValueType);
+		
+		workflowResource.setProcessEngineServices4junit(processEngineServices);
+		Response response = workflowResource.startProcessInstanceByKey(
+					processKey, variableMap);
+		WorkflowResponse workflowResponse = (WorkflowResponse) response.getEntity();
+		return workflowResponse;
+	}
+	
+	public static WorkflowResponse executeWorkFlow(RuntimeService runtimeService, String processKey, Map<String,String> variables, WorkflowResource workflowResource) {
+		
+		VariableMapImpl variableMap = new VariableMapImpl();
+
+		Map<String, Object> variableValueType = new HashMap<String, Object>();
+		for (String key : variables.keySet()) {
+			buildVariable(key, variables.get(key), variableValueType);
+		}
+		buildVariable("mso-service-request-timeout","600", variableValueType);
+		variableMap.put("variables", variableValueType);
+		
+
+		Response response = workflowResource.startProcessInstanceByKey(
+					processKey, variableMap);
+		WorkflowResponse workflowResponse = (WorkflowResponse) response.getEntity();
+		return workflowResponse;
+	}
+
+	//Check the runtime service to see whether the process is completed
+	public static void waitForWorkflowToFinish(ProcessEngineServices processEngineServices, String pid) throws InterruptedException {
+		// Don't wait forever
+		long waitTime = 120000;
+		long endTime = System.currentTimeMillis() + waitTime;
+
+		while (true) {
+			if (processEngineServices.getRuntimeService().createProcessInstanceQuery().processInstanceId(pid).singleResult() == null) {
+				break;
+			}
+
+			if (System.currentTimeMillis() >= endTime) {
+				fail("Process " + pid + " did not finish in " + waitTime + "ms");
+			}
+
+			Thread.sleep(200);
+		}
+	}
+	
+	
+	//Check the runtime service to see whether the process is completed
+	public static void waitForWorkflowToFinish(RuntimeService runtimeService, String pid) throws InterruptedException {
+		// Don't wait forever
+		long waitTime = 120000;
+		long endTime = System.currentTimeMillis() + waitTime;
+
+		while (true) {
+			if (runtimeService.createProcessInstanceQuery().processInstanceId(pid).singleResult() == null) {
+				break;
+			}
+
+			if (System.currentTimeMillis() >= endTime) {
+				fail("Process " + pid + " did not finish in " + waitTime + "ms");
+			}
+
+			Thread.sleep(200);
+		}
+	}
+	
+	
+	/**
+	 * Executes the Asynchronous workflow in synchronous fashion and returns the WorkflowResponse object
+	 * @param processEngineServices
+	 * @param processKey
+	 * @param variables
+	 * @return
+	 * @throws InterruptedException
+	 */
+	public static WorkflowResponse executeAsyncWorkflow(ProcessEngineServices processEngineServices, String processKey, Map<String,String> variables) throws InterruptedException {
+		ProcessThread pthread = new ProcessThread(processKey, processEngineServices, variables);
+		pthread.start();
+		BPMNUtil.assertProcessInstanceNotFinished(processEngineServices, processKey);
+		String pid = getProcessInstanceId(processEngineServices, processKey);
+		//Caution: If there is a problem with workflow, this may wait for ever
+		while (true) {
+			pid = getProcessInstanceId(processEngineServices, processKey);
+			if (!isProcessInstanceFinished(processEngineServices,pid)) {
+				Thread.sleep(200);
+			} else{
+				break;
+			}
+		}
+		//need to retrieve for second time ?
+		pid = getProcessInstanceId(processEngineServices, processKey);
+		waitForWorkflowToFinish(processEngineServices, pid);
+		return pthread.workflowResponse;
+	}
+
+	/**
+	 * Execute workflow using async resource
+	 * @param processEngineServices
+	 * @param processKey
+	 * @param asyncResponse
+	 * @param variables
+	 * @throws InterruptedException 
+	 */
+	private static void executeAsyncFlow(ProcessEngineServices processEngineServices, String processKey, Map<String,String> variables) throws InterruptedException {
+		VariableMapImpl variableMap = new VariableMapImpl();
+
+		Map<String, Object> variableValueType = new HashMap<>();
+		for (String key : variables.keySet()) {
+			buildVariable(key, variables.get(key), variableValueType);
+		}
+		buildVariable("mso-service-request-timeout","600", variableValueType);
+		variableMap.put("variables", variableValueType);
+		
+		workflowResource.setProcessEngineServices4junit(processEngineServices);
+		workflowResource.startProcessInstanceByKey(processKey, variableMap);
+	}
+	
+	/**
+	 * Helper class which executes workflow in a thread
+	 *
+	 */
+	static class ProcessThread extends Thread {
+		
+		public WorkflowResponse workflowResponse = null;
+		public String processKey;
+		public boolean started;
+		public ProcessEngineServices processEngineServices;
+		public Map<String,String> variables;
+		
+		public ProcessThread(String processKey, ProcessEngineServices processEngineServices, Map<String,String> variables) {
+			this.processKey = processKey;
+			this.processEngineServices = processEngineServices;
+			this.variables = variables;
+		}
+		
+		public void run() {
+			started = true;
+			/*doAnswer(new Answer<Void>() {
+			    public Void answer(InvocationOnMock invocation) {
+			      Response response = (Response) invocation.getArguments()[0];
+			      try {
+			      workflowResponse = (WorkflowResponse) response.getEntity();
+			      } catch (ClassCastException e) {
+			    	  String workflowResponseString = (String)response.getEntity();
+			    	  workflowResponse = new WorkflowResponse();
+			    	  workflowResponse.setResponse(workflowResponseString);
+			    	  workflowResponse.setMessageCode(200);
+			      }
+			      return null;
+			    }
+			}).when(asyncResponse).setResponse(any(Response.class));
+			*/
+			try {
+				executeAsyncFlow(processEngineServices, processKey, variables);
+			} catch (InterruptedException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+		}
+	}
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CompleteMsoProcessIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CompleteMsoProcessIT.java
new file mode 100644
index 0000000..470cc22
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CompleteMsoProcessIT.java
@@ -0,0 +1,183 @@
+/*- 
+ * ============LICENSE_START======================================================= 
+ * ONAP - SO 
+ * ================================================================================ 
+ * Copyright (C) 2017 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.onap.so.bpmn.common;
+
+import static org.onap.so.bpmn.common.BPMNUtil.waitForWorkflowToFinish;
+import static org.onap.so.bpmn.mock.StubResponseDatabase.mockUpdateRequestDB;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.onap.so.BaseIntegrationTest;
+
+/**
+ * Unit test for CompleteMsoProcess.bpmn.
+ */
+
+public class CompleteMsoProcessIT extends BaseIntegrationTest {
+	
+	private void executeFlow(String inputRequestFile) throws InterruptedException {
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("CompleteMsoProcessRequest",inputRequestFile);
+		variables.put("mso-request-id", UUID.randomUUID().toString());
+		String processId = invokeSubProcess( "CompleteMsoProcess", variables);
+		waitForWorkflowToFinish(processEngine,processId);
+		logEnd();
+	}	
+	
+	@Test
+	public void msoCompletionRequestWithNotificationUrl_200() throws Exception {
+		logStart();	
+		
+		//Execute Flow
+		executeFlow(gMsoCompletionRequestWithNotificationurl());
+		
+		//Verify Error
+		String CMSO_ResponseCode = BPMNUtil.getVariable(processEngine, "CompleteMsoProcess", "CMSO_ResponseCode");
+		Assert.assertEquals("200", CMSO_ResponseCode);
+		Assert.assertTrue((boolean) BPMNUtil.getRawVariable(processEngine, "CompleteMsoProcess", "CMSO_SuccessIndicator"));
+		logEnd();
+	}
+
+	@Test
+	public void msoCompletionRequestWithNoNotificationurl() throws Exception {
+		logStart();	
+		
+		//Execute Flow
+		executeFlow(gMsoCompletionRequestWithNoNotificationurl());
+		
+		//Verify Error
+		String CMSO_ResponseCode = BPMNUtil.getVariable(processEngine, "CompleteMsoProcess", "CMSO_ResponseCode");
+		Assert.assertEquals("200", CMSO_ResponseCode);	
+		Assert.assertTrue((boolean) BPMNUtil.getRawVariable(processEngine, "CompleteMsoProcess", "CMSO_SuccessIndicator"));
+		logEnd();
+	}
+
+	@Test		
+	public void msoCompletionRequestWithNotificationurlNoRequestId() throws Exception {
+		logStart();	
+		
+		//Execute Flow
+		executeFlow(gMsoCompletionRequestWithNotificationurlNoRequestId());
+		
+		//Verify Error
+		String CMSO_ResponseCode = BPMNUtil.getVariable(processEngine, "CompleteMsoProcess", "CMSO_ResponseCode");
+		Assert.assertEquals("200", CMSO_ResponseCode);
+		Assert.assertTrue((boolean) BPMNUtil.getRawVariable(processEngine, "CompleteMsoProcess", "CMSO_SuccessIndicator"));
+		logEnd();	
+	}
+	
+	@Test		
+	public void msoCompletionRequestWithNoNotificationurlNoRequestId() throws Exception {
+		logStart();
+		
+		//Execute Flow
+		executeFlow(gMsoCompletionRequestWithNoNotificationurlNoRequestId());
+		
+		//Verify Error
+		String CMSO_ResponseCode = BPMNUtil.getVariable(processEngine, "CompleteMsoProcess", "CMSO_ResponseCode");
+		Assert.assertEquals("200", CMSO_ResponseCode);
+		Assert.assertTrue((boolean) BPMNUtil.getRawVariable(processEngine, "CompleteMsoProcess", "CMSO_SuccessIndicator"));
+		logEnd();
+	}	
+
+	public String gMsoCompletionRequestWithNotificationurl() {		
+		String xml = ""
+				+ "<sdncadapterworkflow:MsoCompletionRequest xmlns:ns=\"http://openecomp.org/mso/request/types/v1\" xmlns:sdncadapterworkflow=\"http://ecomp.openecomp.org.com/mso/workflow/schema/v1\">"
+				+ "		<ns:request-information>"
+				+ "			<ns:request-id>STUW105_5002</ns:request-id>"
+				+ "			<ns:request-action>RequestAction</ns:request-action>"				
+				+ "			<ns:request-sub-action>COMPLETE</ns:request-sub-action>"
+				+ "			<ns:source>SOURCE</ns:source>"
+				+ "			<ns:notification-url>https://t3nap1a1.snt.bst.bls.com:9004/sdncontroller-sdncontroller-inbound-ws-war/sdncontroller-sdncontroller-inbound-ws.wsdl</ns:notification-url>"				
+				+ "			<ns:order-number>10205000</ns:order-number>"				
+				+ "			<ns:order-version>1</ns:order-version>"
+				+ "		</ns:request-information>"				
+				+ "		<sdncadapterworkflow:mso-bpel-name>BPELNAME</sdncadapterworkflow:mso-bpel-name>"
+				+ "</sdncadapterworkflow:MsoCompletionRequest>";
+		
+		return xml;
+	}
+		
+
+
+	public String gMsoCompletionRequestWithNoNotificationurl() {
+		//Generated the below XML from ActiveVOS moduler ... Using the generate sample XML feature in ActiveVOS
+		String xml = ""
+				+ "<sdncadapterworkflow:MsoCompletionRequest xmlns:ns=\"http://openecomp.org/mso/request/types/v1\" xmlns:sdncadapterworkflow=\"http://openecomp.org/mso/workflow/schema/v1\">"
+				+ "		<ns:request-information>"
+				+ "			<ns:request-id>STUW105_5002</ns:request-id>"
+				+ "			<ns:request-action>RequestAction</ns:request-action>"				
+				+ "			<ns:request-sub-action>COMPLETE</ns:request-sub-action>"
+				+ "			<ns:source>SOURCE</ns:source>"
+				+ "			<ns:notification-url></ns:notification-url>"				
+				+ "			<ns:order-number>10205000</ns:order-number>"				
+				+ "			<ns:order-version>1</ns:order-version>"
+				+ "		</ns:request-information>"				
+				+ "		<sdncadapterworkflow:mso-bpel-name>BPELNAME</sdncadapterworkflow:mso-bpel-name>"
+				+ "</sdncadapterworkflow:MsoCompletionRequest>";
+		
+		return xml;
+	}
+	
+	public String gMsoCompletionRequestWithNoNotificationurlNoRequestId() {
+		//Generated the below XML from ActiveVOS moduler ... Using the generate sample XML feature in ActiveVOS
+		String xml = ""
+				+ "<sdncadapterworkflow:MsoCompletionRequest xmlns:ns=\"http://openecomp.org/mso/request/types/v1\" xmlns:sdncadapterworkflow=\"http://openecomp.org/mso/workflow/schema/v1\">"
+				+ "		<ns:request-information>"
+				+ "			<ns:request-id></ns:request-id>"
+				+ "			<ns:request-action>RequestAction</ns:request-action>"
+				+ "			<ns:request-sub-action>COMPLETE</ns:request-sub-action>"
+				+ "			<ns:source>SOURCE</ns:source>"
+				+ "			<ns:notification-url></ns:notification-url>"				
+				+ "			<ns:order-number>10205000</ns:order-number>"				
+				+ "			<ns:order-version>1</ns:order-version>"
+				+ "		</ns:request-information>"				
+				+ "		<sdncadapterworkflow:mso-bpel-name>BPELNAME</sdncadapterworkflow:mso-bpel-name>"
+				+ "</sdncadapterworkflow:MsoCompletionRequest>";
+		
+		return xml;
+	}	
+	
+	public String gMsoCompletionRequestWithNotificationurlNoRequestId() {
+		//Generated the below XML from ActiveVOS moduler ... Using the generate sample XML feature in ActiveVOS
+		String xml = ""
+				+ "<sdncadapterworkflow:MsoCompletionRequest xmlns:ns=\"http://openecomp.org/mso/request/types/v1\" xmlns:sdncadapterworkflow=\"http://openecomp.org/mso/workflow/schema/v1\">"
+				+ "		<ns:request-information>"
+				+ "			<ns:request-id></ns:request-id>"
+				+ "			<ns:request-action>RequestAction</ns:request-action>"				
+				+ "			<ns:request-sub-action>COMPLETE</ns:request-sub-action>"
+				+ "			<ns:source>SOURCE</ns:source>"
+				+ "			<ns:notification-url>https://t3nap1a1.snt.bst.bls.com:9004/sdncontroller-sdncontroller-inbound-ws-war/sdncontroller-sdncontroller-inbound-ws.wsdl</ns:notification-url>"				
+				+ "			<ns:order-number>10205000</ns:order-number>"				
+				+ "			<ns:order-version>1</ns:order-version>"
+				+ "		</ns:request-information>"				
+				+ "		<sdncadapterworkflow:mso-bpel-name>BPELNAME</sdncadapterworkflow:mso-bpel-name>"
+				+ "</sdncadapterworkflow:MsoCompletionRequest>";
+		
+		return xml;
+	}	
+}
+
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ConfirmVolumeGroupNameIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ConfirmVolumeGroupNameIT.java
new file mode 100644
index 0000000..0ef856b
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ConfirmVolumeGroupNameIT.java
@@ -0,0 +1,116 @@
+/*- 
+ * ============LICENSE_START======================================================= 
+ * ONAP - SO 
+ * ================================================================================ 
+ * Copyright (C) 2017 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.onap.so.bpmn.common;
+
+import static org.junit.Assert.assertEquals;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetVolumeGroupById;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.RuntimeService;
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.onap.so.BaseIntegrationTest;
+
+/**
+ * Unit test cases for ConfirmVolumeGroupName.bpmn
+ */
+
+public class ConfirmVolumeGroupNameIT extends BaseIntegrationTest {
+	/**
+	 * Sunny day scenario.
+	 * 
+	 * @throws Exception
+	 */
+	@Test	
+	public void sunnyDay() throws Exception {
+		logStart();
+		MockGetVolumeGroupById("MDTWNJ21", "VOLUME_GROUP_ID_1", "aai-volume-group-id-info.xml");		
+		
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("isDebugLogEnabled","true");
+		variables.put("ConfirmVolumeGroupName_volumeGroupId", "VOLUME_GROUP_ID_1");
+		variables.put("ConfirmVolumeGroupName_volumeGroupName", "VOLUME_GROUP_ID_1_NAME");
+		variables.put("ConfirmVolumeGroupName_aicCloudRegion", "MDTWNJ21");
+		variables.put("mso-request-id", UUID.randomUUID().toString());
+		String processId = invokeSubProcess("ConfirmVolumeGroupName", variables);
+		String responseCode = BPMNUtil.getVariable(processEngine, "ConfirmVolumeGroupName", "CVGN_queryVolumeGroupResponseCode",processId);
+					
+		assertEquals("200", responseCode);
+	
+		logEnd();
+	}
+	
+	/**
+	 * Rainy day scenario - nonexisting volume group id.
+	 * 
+	 * @throws Exception
+	 */
+	@Test
+	public void rainyDayNoVolumeGroupId() throws Exception {
+		logStart();
+		
+		// does not exist would return a 404 from AAI
+		MockGetVolumeGroupById("MDTWNJ21", "VOLUME_GROUP_ID_THAT_DOES_NOT_EXIST", "aai-volume-group-id-info.xml", 404);
+					
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("isDebugLogEnabled","true");
+		variables.put("ConfirmVolumeGroupName_aicCloudRegion", "MDTWNJ21");
+		variables.put("ConfirmVolumeGroupName_volumeGroupId", "VOLUME_GROUP_ID_THAT_DOES_NOT_EXIST");
+		variables.put("ConfirmVolumeGroupName_volumeGroupName", "cee6d136-e378-4678-a024-2cd15f0ee0cg");
+		variables.put("mso-request-id", UUID.randomUUID().toString());
+		String processId = invokeSubProcess("ConfirmVolumeGroupName", variables);	
+		String responseCode = BPMNUtil.getVariable(processEngine, "ConfirmVolumeGroupName", "CVGN_queryVolumeGroupResponseCode",processId);
+					
+		assertEquals("404", responseCode);
+		
+		logEnd();
+	}
+	
+	/**
+	 * Rainy day scenario - volume group name does not match the name in AAI
+	 *
+	 * 
+	 * @throws Exception
+	 */
+	@Test
+	public void rainyDayNameDoesNotMatch() throws Exception {
+		logStart();
+		
+		MockGetVolumeGroupById("MDTWNJ21", "VOLUME_GROUP_ID_1", "aai-volume-group-id-info.xml", 200);
+				
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("isDebugLogEnabled","true");
+		variables.put("ConfirmVolumeGroupName_volumeGroupId", "VOLUME_GROUP_ID_1");
+		variables.put("ConfirmVolumeGroupName_volumeGroupName", "BAD_VOLUME_GROUP_NAME");
+		variables.put("ConfirmVolumeGroupName_aicCloudRegion", "MDTWNJ21");
+		variables.put("mso-request-id", UUID.randomUUID().toString());
+		String processId = invokeSubProcess("ConfirmVolumeGroupName", variables);		
+		String volumeGroupNameMatches = BPMNUtil.getVariable(processEngine, "ConfirmVolumeGroupName", "CVGN_volumeGroupNameMatches",processId);
+		
+		assertEquals("false", volumeGroupNameMatches);
+		
+		logEnd();
+	}
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ConfirmVolumeGroupTenantIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ConfirmVolumeGroupTenantIT.java
new file mode 100644
index 0000000..af9ab7d
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ConfirmVolumeGroupTenantIT.java
@@ -0,0 +1,88 @@
+/*
+ * © 2014 AT&T Intellectual Property. All rights reserved. Used under license from AT&T Intellectual Property.
+ */
+/*- 
+ * ============LICENSE_START======================================================= 
+ * ONAP - SO 
+ * ================================================================================ 
+ * Copyright (C) 2017 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.onap.so.bpmn.common;
+
+import static org.junit.Assert.assertEquals;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetVolumeGroupById;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.junit.Test;
+import org.onap.so.BaseIntegrationTest;
+
+/**
+ * Please describe the ConfirmVolumeGroupTenantTest.java class
+ *
+ */
+
+public class ConfirmVolumeGroupTenantIT extends BaseIntegrationTest {
+
+	@Test	
+	public void testRemoveLayer3Service_success() throws Exception{
+		MockGetVolumeGroupById("MDTWNJ21", "a8399879-31b3-4973-be26-0a0cbe776b58", "CRTGVNF_queryAAIResponseVolume.xml");
+
+		Map<String, Object> variables = new HashMap<>();
+		setVariables(variables);
+
+		String processId = invokeSubProcess("ConfirmVolumeGroupTenant", variables);	
+
+		String actualNameMatch = BPMNUtil.getVariable(processEngine, "ConfirmVolumeGroupTenant", "groupNamesMatch",processId);
+		String actualIdMatch = BPMNUtil.getVariable(processEngine, "ConfirmVolumeGroupTenant", "tenantIdsMatch",processId);
+		String actualResponse = BPMNUtil.getVariable(processEngine, "ConfirmVolumeGroupTenant", "volumeHeatStackId",processId);
+
+		assertEquals("Response", "true", actualNameMatch);
+		assertEquals("Response", "true", actualIdMatch);
+		assertEquals("Response", "MoG_CinderVolumes_2/19387dc6-060f-446e-b41f-dcfd29c73845", actualResponse);
+	}
+
+	@Test	
+	public void testRemoveLayer3Service_idsNotMatch() throws Exception{
+		MockGetVolumeGroupById("MDTWNJ21", "a8399879-31b3-4973-be26-0a0cbe776b58", "CRTGVNF_queryAAIResponseVolume_idsNotMatch.xml");
+
+		Map<String, Object> variables = new HashMap<>();
+		setVariables(variables);
+
+		String processId = invokeSubProcess("ConfirmVolumeGroupTenant", variables);	
+		
+
+		String actualNameMatch = BPMNUtil.getVariable(processEngine, "ConfirmVolumeGroupTenant", "groupNamesMatch",processId);
+		String actualIdMatch = BPMNUtil.getVariable(processEngine, "ConfirmVolumeGroupTenant", "tenantIdsMatch",processId);
+		String actualResponse = BPMNUtil.getVariable(processEngine, "ConfirmVolumeGroupTenant", "WorkflowException",processId);
+
+		assertEquals("Response", "true", actualNameMatch);
+		assertEquals("Response", "false", actualIdMatch);
+		assertEquals("Response", "WorkflowException[processKey=ConfirmVolumeGroupTenant,errorCode=1,errorMessage=Volume Group a8399879-31b3-4973-be26-0a0cbe776b58 does not belong to your tenant,workStep=*]", actualResponse);
+
+	}
+
+	private void setVariables(Map<String, Object> variables) {
+		variables.put("isDebugLogEnabled", "true");
+		variables.put("volumeGroupId","a8399879-31b3-4973-be26-0a0cbe776b58");
+		variables.put("tenantId", "7dd5365547234ee8937416c65507d266");
+		variables.put("aicCloudRegion", "MDTWNJ21");
+		variables.put("mso-request-id", UUID.randomUUID().toString());
+	}
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CreateAAIVfModuleIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CreateAAIVfModuleIT.java
new file mode 100644
index 0000000..fd38ff0
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CreateAAIVfModuleIT.java
@@ -0,0 +1,267 @@
+/*- 
+ * ============LICENSE_START======================================================= 
+ * ONAP - SO 
+ * ================================================================================ 
+ * Copyright (C) 2017 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.onap.so.bpmn.common;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.containing;
+import static com.github.tomakehurst.wiremock.client.WireMock.put;
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching;
+
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.RuntimeService;
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.onap.so.BaseIntegrationTest;
+import org.onap.so.bpmn.core.WorkflowException;
+import org.onap.so.logger.MsoLogger;
+
+/**
+ * Unit test for CreateAAIVfModule.bpmn.
+ */
+
+public class CreateAAIVfModuleIT extends BaseIntegrationTest {
+	
+	MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,CreateAAIVfModuleIT.class);
+	
+	@Test	
+	public void  TestCreateGenericVnfSuccess_200() {
+
+		new MockAAIGenericVnfSearch();
+		MockAAICreateGenericVnf();
+		MockAAIVfModulePUT(true);
+					
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("mso-request-id", UUID.randomUUID().toString());
+		variables.put("isDebugLogEnabled","true");
+		variables.put("isVidRequest", "false");
+		variables.put("vnfName", "STMTN5MMSC22");
+		variables.put("serviceId", "00000000-0000-0000-0000-000000000000");
+		variables.put("personaModelId", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+		variables.put("personaModelVersion", "1.0");
+		variables.put("vfModuleName", "STMTN5MMSC22-MMSC::module-0-0");
+		variables.put("vfModuleModelName", "MMSC::module-0");
+		
+		String processId = invokeSubProcess("CreateAAIVfModule", variables);
+		String response = BPMNUtil.getVariable(processEngine, "CreateAAIVfModule", "CAAIVfMod_createVfModuleResponseCode",processId);
+		String responseCode = BPMNUtil.getVariable(processEngine, "CreateAAIVfModule", "CAAIVfMod_createVfModuleResponseCode",processId);
+		Assert.assertEquals("201", responseCode);
+		logger.debug(response);
+	}
+
+	@Test	
+	public void  TestCreateVfModuleSuccess_200() {
+		// create Add-on VF Module for existing Generic VNF
+		new MockAAIGenericVnfSearch();
+		MockAAICreateGenericVnf();
+		MockAAIVfModulePUT(true);					
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("mso-request-id", UUID.randomUUID().toString());
+		variables.put("isDebugLogEnabled","true");
+		variables.put("isVidRequest", "false");
+		variables.put("vnfId", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+		variables.put("serviceId", "00000000-0000-0000-0000-000000000000");
+		variables.put("personaModelId", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+		variables.put("personaModelVersion", "1.0");
+		variables.put("vfModuleName", "STMTN5MMSC21-MMSC::module-1-0");
+		variables.put("vfModuleModelName", "STMTN5MMSC21-MMSC::model-1-0");
+		String processId = invokeSubProcess("CreateAAIVfModule", variables);
+		String response = BPMNUtil.getVariable(processEngine, "CreateAAIVfModule", "CAAIVfMod_createVfModuleResponseCode",processId);
+		String responseCode = BPMNUtil.getVariable(processEngine, "CreateAAIVfModule", "CAAIVfMod_createVfModuleResponseCode",processId);
+		Assert.assertEquals("201", responseCode);
+		logger.debug(response);
+	}
+
+	@Test		
+	public void  TestQueryGenericVnfFailure_5000() {
+		new MockAAIGenericVnfSearch();
+		MockAAICreateGenericVnf();
+		MockAAIVfModulePUT(true);
+					
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("mso-request-id", UUID.randomUUID().toString());
+		variables.put("isDebugLogEnabled","true");		
+		variables.put("isVidRequest", "false");
+		variables.put("vnfName", "STMTN5MMSC23");
+		variables.put("serviceId", "00000000-0000-0000-0000-000000000000");
+		variables.put("personaModelId", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+		variables.put("personaModelVersion", "1.0");
+		variables.put("vfModuleName", "STMTN5MMSC23-MMSC::module-0-0");
+		variables.put("vfModuleModelName", "MMSC::module-0");
+		String processId = invokeSubProcess("CreateAAIVfModule", variables);		
+		WorkflowException exception = BPMNUtil.getRawVariable(processEngine, "CreateAAIVfModule", "WorkflowException",processId);
+		Assert.assertEquals(500, exception.getErrorCode());
+		Assert.assertEquals(true, exception.getErrorMessage().contains("Error occurred attempting to query AAI"));
+		logger.debug(exception.getErrorMessage());
+	}
+
+	@Test	
+	public void  TestCreateDupGenericVnfFailure_1002() {
+		new MockAAIGenericVnfSearch();
+		MockAAICreateGenericVnf();
+		MockAAIVfModulePUT(true);
+			
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("mso-request-id", UUID.randomUUID().toString());
+		variables.put("isDebugLogEnabled","true");		
+		variables.put("isVidRequest", "false");
+		variables.put("vnfName", "STMTN5MMSC21");
+		variables.put("serviceId", "00000000-0000-0000-0000-000000000000");
+		variables.put("personaModelId", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+		variables.put("personaModelVersion", "1.0");
+		variables.put("vfModuleName", "STMTN5MMSC21-MMSC::module-0-0");
+		variables.put("vfModuleModelName", "MMSC::module-0");
+		String processId = invokeSubProcess("CreateAAIVfModule", variables);
+		WorkflowException exception = BPMNUtil.getRawVariable(processEngine, "CreateAAIVfModule", "WorkflowException",processId);
+		Assert.assertEquals(1002, exception.getErrorCode());
+		Assert.assertEquals(true, exception.getErrorMessage().contains("Invalid request for new Generic VNF which already exists"));
+		logger.debug(exception.getErrorMessage());
+	}
+
+	@Test		
+	public void  TestCreateDupVfModuleFailure_1002() {
+		new MockAAIGenericVnfSearch();
+		MockAAICreateGenericVnf();
+		MockAAIVfModulePUT(true);
+			
+		Map<String, Object> variables = new HashMap<>(); 
+		variables.put("mso-request-id", UUID.randomUUID().toString());
+		variables.put("isDebugLogEnabled","true");		
+		variables.put("isVidRequest", "false");
+		variables.put("vnfId", "2f6aee38-1e2a-11e6-82d1-ffc7d9ee8aa4");
+		variables.put("serviceId", "00000000-0000-0000-0000-000000000000");
+		variables.put("personaModelId", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+		variables.put("personaModelVersion", "1.0");
+		variables.put("vfModuleName", "STMTN5MMSC20-MMSC::module-1-0");
+		variables.put("vfModuleModelName", "STMTN5MMSC20-MMSC::model-1-0");
+		String processId = invokeSubProcess("CreateAAIVfModule", variables);
+		WorkflowException exception = BPMNUtil.getRawVariable(processEngine, "CreateAAIVfModule", "WorkflowException",processId);
+		Assert.assertEquals(1002, exception.getErrorCode());
+		Assert.assertEquals(true, exception.getErrorMessage().contains("already exists for Generic VNF"));
+		logger.debug(exception.getErrorMessage());
+	}
+	
+	@Test		
+	public void  TestCreateGenericVnfFailure_5000() {
+		new MockAAIGenericVnfSearch();
+		MockAAICreateGenericVnf();
+		MockAAIVfModulePUT(true);
+			
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("mso-request-id", UUID.randomUUID().toString());
+		variables.put("isDebugLogEnabled","true");		
+		variables.put("isVidRequest", "false");
+		variables.put("vnfName", "STMTN5MMSC22");
+		variables.put("serviceId", "99999999-9999-9999-9999-999999999999");
+		variables.put("personaModelId", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+		variables.put("personaModelVersion", "1.0");
+		variables.put("vfModuleName", "STMTN5MMSC22-PCRF::module-1-0");
+		variables.put("vfModuleModelName", "PCRF::module-0");
+		String processId = invokeSubProcess("CreateAAIVfModule", variables);
+		WorkflowException exception = BPMNUtil.getRawVariable(processEngine, "CreateAAIVfModule", "WorkflowException",processId);
+		Assert.assertEquals(5000, exception.getErrorCode());
+		Assert.assertEquals(true, exception.getErrorMessage().contains("<messageId>SVC3002</messageId>"));
+		logger.debug(exception.getErrorMessage());
+	}
+
+	@Test	
+	public void  TestCreateGenericVnfFailure_1002() {
+		new MockAAIGenericVnfSearch();
+		MockAAICreateGenericVnf();
+		MockAAIVfModulePUT(true);
+			
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("mso-request-id", UUID.randomUUID().toString());
+		variables.put("isDebugLogEnabled","true");		
+		variables.put("isVidRequest", "false");
+		variables.put("vnfId", "768073c7-f41f-4822-9323-b75962763d74");
+		variables.put("serviceId", "00000000-0000-0000-0000-000000000000");
+		variables.put("personaModelId", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+		variables.put("personaModelVersion", "1.0");
+		variables.put("vfModuleName", "STMTN5MMSC22-PCRF::module-1-0");
+		variables.put("vfModuleModelName", "PCRF::module-0");
+		String processId = invokeSubProcess("CreateAAIVfModule", variables);
+		WorkflowException exception = BPMNUtil.getRawVariable(processEngine, "CreateAAIVfModule", "WorkflowException",processId);
+		Assert.assertEquals(1002, exception.getErrorCode());
+		Assert.assertEquals(true, exception.getErrorMessage().contains("Generic VNF Not Found"));
+		logger.debug(exception.getErrorMessage());
+	}
+
+	@Test	
+	public void  TestCreateVfModuleFailure_5000() {
+		new MockAAIGenericVnfSearch();
+		MockAAICreateGenericVnf();
+		MockAAIVfModulePUT(true);
+			
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("isDebugLogEnabled","true");		
+		variables.put("isVidRequest", "false");
+		variables.put("vnfId", "a27ce5a9-29c4-4c22-a017-6615ac73c721");
+		variables.put("serviceId", "99999999-9999-9999-9999-999999999999");
+		variables.put("personaModelId", "973ed047-d251-4fb9-bf1a-65b8949e0a73");
+		variables.put("personaModelVersion", "1.0");
+		variables.put("vfModuleName", "STMTN5MMSC21-PCRF::module-1-0");
+		variables.put("vfModuleModelName", "STMTN5MMSC21-PCRF::model-1-0");
+		variables.put("mso-request-id", UUID.randomUUID().toString());
+		String processId = invokeSubProcess("CreateAAIVfModule", variables);
+		WorkflowException exception = BPMNUtil.getRawVariable(processEngine, "CreateAAIVfModule", "WorkflowException",processId);
+		Assert.assertEquals(5000, exception.getErrorCode());
+		Assert.assertEquals(true, exception.getErrorMessage().contains("<messageId>SVC3002</messageId>"));
+		logger.debug(exception.getErrorMessage());
+	}
+
+	public static void MockAAICreateGenericVnf(){
+		stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*"))
+				.withRequestBody(containing("<service-id>00000000-0000-0000-0000-000000000000</service-id>"))
+				.willReturn(aResponse()
+						.withStatus(201)));
+		stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*"))
+				.withRequestBody(containing("<service-id>99999999-9999-9999-9999-999999999999</service-id>"))
+				.willReturn(aResponse()
+						.withStatus(500)
+						.withHeader("Content-Type", "text/xml")
+						.withBodyFile("aaiFault.xml")));
+	}
+	
+	// start of mocks used locally and by other VF Module unit tests
+	public static void MockAAIVfModulePUT(boolean isCreate){
+		stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*/vf-modules/vf-module/.*"))
+				.withRequestBody(containing("MMSC"))
+				.willReturn(aResponse()
+						.withStatus(isCreate ? 201 : 200)));
+		stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*/vf-modules/vf-module/.*"))
+				.withRequestBody(containing("PCRF"))
+				.willReturn(aResponse()
+						.withStatus(500)
+						.withHeader("Content-Type", "text/xml")
+						.withBodyFile("aaiFault.xml")));
+		stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721"))				
+				.willReturn(aResponse()
+					.withStatus(200)));
+	}
+	
+}
\ No newline at end of file
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CreateAAIVfModuleVolumeGroupIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CreateAAIVfModuleVolumeGroupIT.java
new file mode 100644
index 0000000..6af705f
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CreateAAIVfModuleVolumeGroupIT.java
@@ -0,0 +1,132 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common;
+
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithPriority;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetVfModuleId;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutVfModuleId;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutVfModuleIdNoResponse;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.onap.so.BaseIntegrationTest;
+import org.onap.so.bpmn.mock.FileUtil;
+import org.onap.so.logger.MsoLogger;
+
+/**
+ * Unit tests for CreateAAIVfModuleVolumeGroup.bpmn.
+ */
+
+public class CreateAAIVfModuleVolumeGroupIT extends BaseIntegrationTest {
+
+	MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,CreateAAIVfModuleVolumeGroupIT.class);
+
+	/**
+	 * Test the happy path through the flow.
+	 */
+	@Test
+	public void happyPath() throws IOException {
+
+		logStart();
+
+		String updateAAIVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/CreateAAIVfModuleVolumeGroupRequest.xml");
+		MockGetGenericVnfByIdWithPriority("skask", "lukewarm", 200, "VfModularity/VfModule-lukewarm.xml", 2);
+		MockPutVfModuleIdNoResponse("skask", "PCRF", "lukewarm");
+
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("mso-request-id", "999-99-9999");
+		variables.put("isDebugLogEnabled","true");
+		variables.put("CreateAAIVfModuleVolumeGroupRequest", updateAAIVfModuleRequest);
+		invokeSubProcess("CreateAAIVfModuleVolumeGroup", businessKey, variables);
+
+		Assert.assertTrue(isProcessEnded(businessKey));
+		String response = (String) getVariableFromHistory(businessKey, "CAAIVfModVG_updateVfModuleResponse");
+		Integer responseCode = (Integer) getVariableFromHistory(businessKey, "CAAIVfModVG_updateVfModuleResponseCode");
+		logger.debug("Subflow response code: " + responseCode);
+		logger.debug("Subflow response: " + response);
+		Assert.assertEquals(200, responseCode.intValue());
+
+		logEnd();
+	}
+
+	/**
+	 * Test the case where the GET to AAI returns a 404.
+	 */
+	@Test
+	public void badGet() throws IOException {
+
+		logStart();
+
+		String updateAAIVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/CreateAAIVfModuleVolumeGroupRequest.xml");
+		MockGetVfModuleId("skask", ".*", "VfModularity/VfModule-supercool.xml", 404);
+
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("mso-request-id", "999-99-9999");
+		variables.put("isDebugLogEnabled","true");
+		variables.put("CreateAAIVfModuleVolumeGroupRequest", updateAAIVfModuleRequest);
+		invokeSubProcess("CreateAAIVfModuleVolumeGroup", businessKey, variables);
+		Assert.assertTrue(isProcessEnded(businessKey));
+		String response = (String) getVariableFromHistory(businessKey, "CAAIVfModVG_getVfModuleResponse");
+		Integer responseCode = (Integer) getVariableFromHistory(businessKey, "CAAIVfModVG_getVfModuleResponseCode");
+		logger.debug("Subflow response code: " + responseCode);
+		logger.debug("Subflow response: " + response);
+		Assert.assertEquals(404, responseCode.intValue());
+
+		logEnd();
+	}
+
+	/**
+	 * Test the case where the GET to AAI is successful, but he subsequent PUT returns 404.
+	 */
+	@Test
+	public void badPatch() throws IOException {
+
+		logStart();
+
+		String updateAAIVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/CreateAAIVfModuleVolumeGroupRequest.xml");
+		MockGetVfModuleId("skask", "lukewarm", "VfModularity/VfModule-lukewarm.xml", 200);
+		MockPutVfModuleId("skask", "lukewarm", 404);
+
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("mso-request-id", "999-99-9999");
+		variables.put("isDebugLogEnabled","true");
+		variables.put("CreateAAIVfModuleVolumeGroupRequest", updateAAIVfModuleRequest);
+		invokeSubProcess("CreateAAIVfModuleVolumeGroup", businessKey, variables);
+
+		Assert.assertTrue(isProcessEnded(businessKey));
+		String response = (String) getVariableFromHistory(businessKey, "CAAIVfModVG_updateVfModuleResponse");
+		Integer responseCode = (Integer) getVariableFromHistory(businessKey, "CAAIVfModVG_updateVfModuleResponseCode");
+		logger.debug("Subflow response code: " + responseCode);
+		logger.debug("Subflow response: " + response);
+		Assert.assertEquals(404, responseCode.intValue());
+
+		logEnd();
+	}
+}
+
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/DecomposeServiceIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/DecomposeServiceIT.java
new file mode 100644
index 0000000..7acaf44
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/DecomposeServiceIT.java
@@ -0,0 +1,95 @@
+/*- 
+ * ============LICENSE_START======================================================= 
+ * ONAP - SO 
+ * ================================================================================ 
+ * Copyright (C) 2017 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.onap.so.bpmn.common;
+
+import static org.onap.so.bpmn.mock.StubResponseDatabase.MockGetServiceResourcesCatalogData;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.onap.so.BaseIntegrationTest;
+
+/**
+ * Unit Test for the DecomposeService Flow
+ *
+ */
+
+public class DecomposeServiceIT extends BaseIntegrationTest {
+
+
+	public DecomposeServiceIT() throws IOException {
+
+	}
+
+	@Test	
+	public void testDecomposeService_success() throws Exception{
+		MockGetServiceResourcesCatalogData("cmw-123-456-789", "1.0", "/getCatalogServiceResourcesDataWithConfig.json");
+
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesSuccess(variables, "testRequestId123", "ff5256d2-5a33-55df-13ab-12abad84e7ff");
+		invokeSubProcess("DecomposeService", businessKey, variables);
+
+		waitForProcessEnd(businessKey, 10000);
+
+		Assert.assertTrue(isProcessEnded(businessKey));
+
+	}
+	
+	//@Test
+	@Test
+	public void testDecomposeService_success_partial() throws Exception{
+		MockGetServiceResourcesCatalogData("cmw-123-456-789", "1.0", "/getCatalogServiceResourcesDataNoNetwork.json");
+
+
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesSuccess(variables, "testRequestId123", "ff5256d2-5a33-55df-13ab-12abad84e7ff");
+		invokeSubProcess("DecomposeService", businessKey, variables);
+
+		waitForProcessEnd(businessKey, 10000);
+
+		Assert.assertTrue(isProcessEnded(businessKey));
+
+	}
+
+	private void setVariablesSuccess(Map<String, Object> variables, String requestId, String siId) {
+		variables.put("isDebugLogEnabled", "true");
+		variables.put("mso-request-id", requestId);
+		variables.put("msoRequestId", requestId);
+		variables.put("serviceInstanceId",siId);
+
+		String serviceModelInfo = "{ "+ "\"modelType\": \"service\"," +
+				"\"modelInvariantUuid\": \"cmw-123-456-789\"," +
+				"\"modelVersionId\": \"ab6478e5-ea33-3346-ac12-ab121484a3fe\"," +
+				"\"modelName\": \"ServicevSAMP12\"," +
+				"\"modelVersion\": \"1.0\"," +
+				"}";
+		variables.put("serviceModelInfo", serviceModelInfo);
+
+	}
+
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/DeleteAAIVfModuleIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/DeleteAAIVfModuleIT.java
new file mode 100644
index 0000000..27b39ae
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/DeleteAAIVfModuleIT.java
@@ -0,0 +1,288 @@
+/*- 
+ * ============LICENSE_START======================================================= 
+ * ONAP - SO 
+ * ================================================================================ 
+ * Copyright (C) 2017 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.onap.so.bpmn.common;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.delete;
+import static com.github.tomakehurst.wiremock.client.WireMock.get;
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.RuntimeService;
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.onap.so.BaseIntegrationTest;
+import org.onap.so.bpmn.core.WorkflowException;
+import org.onap.so.logger.MsoLogger;
+
+/**
+ * Unit test for DeleteAAIVfModule.bpmn.
+ */
+
+public class DeleteAAIVfModuleIT extends BaseIntegrationTest {
+	private static final String EOL = "\n";
+	
+	MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,DeleteAAIVfModuleIT.class);
+	
+	@Test	
+	public void  TestDeleteGenericVnfSuccess_200() {
+		// delete the Base Module and Generic Vnf
+		// vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c721, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a73
+		new MockAAIGenericVnfSearch();
+		new MockAAIDeleteGenericVnf();
+		new MockAAIDeleteVfModule();
+		
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("isDebugLogEnabled","true");
+		variables.put("mso-request-id", UUID.randomUUID().toString());
+		variables.put("DeleteAAIVfModuleRequest","<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\"> <request-info> <action>DELETE_VF_MODULE</action> <source>PORTAL</source> </request-info> <vnf-inputs> <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id> <vnf-name>STMTN5MMSC21</vnf-name> <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id> <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name> </vnf-inputs> <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/> </vnf-request>");
+		String processId = invokeSubProcess("DeleteAAIVfModule", variables);
+		String response = BPMNUtil.getVariable(processEngine, "DeleteAAIVfModule", "DAAIVfMod_deleteGenericVnfResponseCode",processId);
+		String responseCode = BPMNUtil.getVariable(processEngine, "DeleteAAIVfModule", "DAAIVfMod_deleteGenericVnfResponseCode",processId);
+		Assert.assertEquals("200", responseCode);
+		logger.debug(response);
+	}
+
+	@Test	
+	public void  TestDeleteVfModuleSuccess_200() {
+		// delete Add-on Vf Module for existing Generic Vnf
+		// vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c720, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a75
+		String request =
+			"<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\">" + EOL +
+			"  <request-info>" + EOL +
+			"    <action>DELETE_VF_MODULE</action>" + EOL +
+			"    <source>PORTAL</source>" + EOL +
+			"  </request-info>" + EOL +
+			"  <vnf-inputs>" + EOL +
+			"    <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c720</vnf-id>" + EOL +
+			"    <vnf-name>STMTN5MMSC20</vnf-name>" + EOL +
+			"    <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a75</vf-module-id>" + EOL +
+			"    <vf-module-name>STMTN5MMSC20-MMSC::module-1-0</vf-module-name>" + EOL +
+			"  </vnf-inputs>" + EOL +
+			"  <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
+			"</vnf-request>" + EOL;
+
+		new MockAAIGenericVnfSearch();
+		new MockAAIDeleteGenericVnf();
+		new MockAAIDeleteVfModule();
+		
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("isDebugLogEnabled","true");
+		variables.put("mso-request-id", UUID.randomUUID().toString());
+		variables.put("DeleteAAIVfModuleRequest",request);
+		String processId = invokeSubProcess("DeleteAAIVfModule", variables);
+		String response = BPMNUtil.getVariable(processEngine, "DeleteAAIVfModule", "DAAIVfMod_deleteVfModuleResponseCode",processId);
+		String responseCode = BPMNUtil.getVariable(processEngine, "DeleteAAIVfModule", "DAAIVfMod_deleteVfModuleResponseCode",processId);
+		Assert.assertEquals("200", responseCode);
+		logger.debug(response);
+	}
+
+	@Test	
+	public void  TestQueryGenericVnfFailure_5000() {
+		// query Generic Vnf failure (non-404) with A&AI
+		// vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c723, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a71
+		String request =
+			"<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\">" + EOL +
+			"  <request-info>" + EOL +
+			"    <action>DELETE_VF_MODULE</action>" + EOL +
+			"    <source>PORTAL</source>" + EOL +
+			"  </request-info>" + EOL +
+			"  <vnf-inputs>" + EOL +
+			"    <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c723</vnf-id>" + EOL +
+			"    <vnf-name>STMTN5MMSC23</vnf-name>" + EOL +
+			"    <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a71</vf-module-id>" + EOL +
+			"    <vf-module-name>STMTN5MMSC20-MMSC::module-1-0</vf-module-name>" + EOL +
+			"  </vnf-inputs>" + EOL +
+			"  <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
+			"</vnf-request>" + EOL;
+		new MockAAIGenericVnfSearch();
+		new MockAAIDeleteGenericVnf();
+		new MockAAIDeleteVfModule();
+		
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("isDebugLogEnabled","true");
+		variables.put("mso-request-id", UUID.randomUUID().toString());
+		variables.put("DeleteAAIVfModuleRequest",request);
+		String processId = invokeSubProcess("DeleteAAIVfModule", variables);
+		WorkflowException exception = BPMNUtil.getRawVariable(processEngine, "DeleteAAIVfModule", "WorkflowException",processId);
+		Assert.assertEquals(5000, exception.getErrorCode());
+		Assert.assertEquals(true, exception.getErrorMessage().contains("<messageId>SVC3002</messageId>"));
+		logger.debug(exception.getErrorMessage());
+	}
+
+	@Test	
+	public void  TestQueryGenericVnfFailure_1002() {
+		// attempt to delete Vf Module for Generic Vnf that does not exist (A&AI returns 404)
+		// vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c722, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a72
+		String request =
+			"<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\">" + EOL +
+			"  <request-info>" + EOL +
+			"    <action>DELETE_VF_MODULE</action>" + EOL +
+			"    <source>PORTAL</source>" + EOL +
+			"  </request-info>" + EOL +
+			"  <vnf-inputs>" + EOL +
+			"    <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c722</vnf-id>" + EOL +
+			"    <vnf-name>STMTN5MMSC22</vnf-name>" + EOL +
+			"    <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a72</vf-module-id>" + EOL +
+			"    <vf-module-name>STMTN5MMSC22-MMSC::module-1-0</vf-module-name>" + EOL +
+			"  </vnf-inputs>" + EOL +
+			"  <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
+			"</vnf-request>" + EOL;
+		new MockAAIGenericVnfSearch();
+		new MockAAIDeleteGenericVnf();
+		new MockAAIDeleteVfModule();
+		
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("isDebugLogEnabled","true");
+		variables.put("mso-request-id", UUID.randomUUID().toString());
+		variables.put("DeleteAAIVfModuleRequest",request);
+		String processId = invokeSubProcess("DeleteAAIVfModule", variables);
+		WorkflowException exception = BPMNUtil.getRawVariable(processEngine, "DeleteAAIVfModule", "WorkflowException",processId);
+		Assert.assertEquals(1002, exception.getErrorCode());
+		Assert.assertEquals(true, exception.getErrorMessage().contains("Generic VNF Not Found"));
+		logger.debug(exception.getErrorMessage());
+	}
+
+	@Test	
+	public void  TestDeleteGenericVnfFailure_5000() {
+		// A&AI failure (non-200) when attempting to delete a Generic Vnf
+		// vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c718, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a78
+		String request =
+			"<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\">" + EOL +
+			"  <request-info>" + EOL +
+			"    <action>DELETE_VF_MODULE</action>" + EOL +
+			"    <source>PORTAL</source>" + EOL +
+			"  </request-info>" + EOL +
+			"  <vnf-inputs>" + EOL +
+			"    <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c718</vnf-id>" + EOL +
+			"    <vnf-name>STMTN5MMSC18</vnf-name>" + EOL +
+			"    <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a78</vf-module-id>" + EOL +
+			"    <vf-module-name>STMTN5MMSC18-MMSC::module-0-0</vf-module-name>" + EOL +
+			"  </vnf-inputs>" + EOL +
+			"  <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
+			"</vnf-request>" + EOL;
+		new MockAAIGenericVnfSearch();
+		new MockAAIDeleteGenericVnf();
+		new MockAAIDeleteVfModule();
+		
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("isDebugLogEnabled","true");
+		variables.put("mso-request-id", UUID.randomUUID().toString());
+		variables.put("DeleteAAIVfModuleRequest",request);
+		String processId = invokeSubProcess("DeleteAAIVfModule", variables);
+		WorkflowException exception = BPMNUtil.getRawVariable(processEngine, "DeleteAAIVfModule", "WorkflowException",processId);
+		Assert.assertEquals(5000, exception.getErrorCode());
+		Assert.assertEquals(true, exception.getErrorMessage().contains("<messageId>SVC3002</messageId>"));
+		logger.debug(exception.getErrorMessage());
+	}
+	
+	@Test	
+	public void  TestDeleteVfModuleFailure_5000() {
+		// A&AI failure (non-200) when attempting to delete a Vf Module
+		// vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c719, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a77
+		String request =
+			"<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\">" + EOL +
+			"  <request-info>" + EOL +
+			"    <action>DELETE_VF_MODULE</action>" + EOL +
+			"    <source>PORTAL</source>" + EOL +
+			"  </request-info>" + EOL +
+			"  <vnf-inputs>" + EOL +
+			"    <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c719</vnf-id>" + EOL +
+			"    <vnf-name>STMTN5MMSC19</vnf-name>" + EOL +
+			"    <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a77</vf-module-id>" + EOL +
+			"    <vf-module-name>STMTN5MMSC19-MMSC::module-1-0</vf-module-name>" + EOL +
+			"  </vnf-inputs>" + EOL +
+			"  <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
+			"</vnf-request>" + EOL;
+		new MockAAIGenericVnfSearch();
+		new MockAAIDeleteGenericVnf();
+		new MockAAIDeleteVfModule();
+		
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("isDebugLogEnabled","true");
+		variables.put("mso-request-id", UUID.randomUUID().toString());
+		variables.put("DeleteAAIVfModuleRequest",request);
+		String processId = invokeSubProcess("DeleteAAIVfModule", variables);
+		WorkflowException exception = BPMNUtil.getRawVariable(processEngine, "DeleteAAIVfModule", "WorkflowException",processId);
+		Assert.assertEquals(5000, exception.getErrorCode());
+		Assert.assertEquals(true, exception.getErrorMessage().contains("<messageId>SVC3002</messageId>"));
+		logger.debug(exception.getErrorMessage());
+	}
+	
+	@Test	
+	public void  TestDeleteVfModuleFailure_1002_1() {
+		// failure attempting to delete Base Module when not the last Vf Module
+		// vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c720, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a74
+		String request =
+			"<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\">" + EOL +
+			"  <request-info>" + EOL +
+			"    <action>DELETE_VF_MODULE</action>" + EOL +
+			"    <source>PORTAL</source>" + EOL +
+			"  </request-info>" + EOL +
+			"  <vnf-inputs>" + EOL +
+			"    <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c720</vnf-id>" + EOL +
+			"    <vnf-name>STMTN5MMSC20</vnf-name>" + EOL +
+			"    <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a74</vf-module-id>" + EOL +
+			"    <vf-module-name>STMTN5MMSC20-MMSC::module-0-0</vf-module-name>" + EOL +
+			"  </vnf-inputs>" + EOL +
+			"  <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
+			"</vnf-request>" + EOL;
+		new MockAAIGenericVnfSearch();
+		new MockAAIDeleteGenericVnf();
+		new MockAAIDeleteVfModule();
+		
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("isDebugLogEnabled","true");
+		variables.put("mso-request-id", UUID.randomUUID().toString());
+		variables.put("DeleteAAIVfModuleRequest",request);
+		String processId = invokeSubProcess("DeleteAAIVfModule", variables);
+		WorkflowException exception = BPMNUtil.getRawVariable(processEngine, "DeleteAAIVfModule", "WorkflowException",processId);
+		Assert.assertEquals(1002, exception.getErrorCode());
+		Assert.assertEquals(true, exception.getErrorMessage().contains("is Base Module, not Last Module"));
+		logger.debug(exception.getErrorMessage());
+	}
+
+	@Test	
+	public void  TestDeleteVfModuleFailure_1002_2() {
+		// failure attempting to delete a Vf Module that does not exist (A&AI returns 404)
+		// vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c720, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a76
+		new MockAAIGenericVnfSearch();
+		new MockAAIDeleteGenericVnf();
+		new MockAAIDeleteVfModule();
+		
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("isDebugLogEnabled","true");
+		variables.put("mso-request-id", UUID.randomUUID().toString());
+		variables.put("DeleteAAIVfModuleRequest","<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\"> <request-info> <action>DELETE_VF_MODULE</action> <source>PORTAL</source> </request-info> <vnf-inputs> <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c720</vnf-id> <vnf-name>STMTN5MMSC20</vnf-name> <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a76</vf-module-id> <vf-module-name>STMTN5MMSC20-MMSC::module-2-0</vf-module-name> </vnf-inputs> <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/> </vnf-request>");
+		String processId = invokeSubProcess("DeleteAAIVfModule", variables);
+		WorkflowException exception = BPMNUtil.getRawVariable(processEngine, "DeleteAAIVfModule", "WorkflowException",processId);
+		Assert.assertEquals(1002, exception.getErrorCode());
+		Assert.assertEquals(true, exception.getErrorMessage().contains("does not exist for Generic Vnf Id"));
+		logger.debug(exception.getErrorMessage());
+	}
+}
+
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/FalloutHandlerIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/FalloutHandlerIT.java
new file mode 100644
index 0000000..a6d2654
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/FalloutHandlerIT.java
@@ -0,0 +1,224 @@
+/*- 
+ * ============LICENSE_START======================================================= 
+ * ONAP - SO 
+ * ================================================================================ 
+ * Copyright (C) 2017 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.onap.so.bpmn.common;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.post;
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
+import static org.onap.so.bpmn.common.BPMNUtil.waitForWorkflowToFinish;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.onap.so.BaseIntegrationTest;
+import org.onap.so.logger.MsoLogger;
+
+/**
+ * Unit test for FalloutHandler.bpmn.
+ */
+
+public class FalloutHandlerIT extends BaseIntegrationTest {
+	
+	MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,FalloutHandlerIT.class);
+	
+	
+	private void setupMocks() {
+		stubFor(post(urlEqualTo("/dbadapters/AttRequestsDbAdapter"))
+				.willReturn(aResponse()
+				.withStatus(200)
+				.withHeader("Content-Type", "text/xml")
+				.withBody("<DbTag>Notified</DbTag>")));
+		stubFor(post(urlEqualTo("/dbadapters/RequestsDbAdapter"))
+				.willReturn(aResponse()
+				.withStatus(200)
+				.withHeader("Content-Type", "text/xml")
+				.withBody("<DbTag>Notified</DbTag>")));
+	}	
+	
+	private String executeFlow(String inputRequestFile) throws InterruptedException {	
+		
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("FalloutHandlerRequest",inputRequestFile);		variables.put("mso-request-id", UUID.randomUUID().toString());
+		String processId = invokeSubProcess( "FalloutHandler", variables);
+		waitForWorkflowToFinish(processEngine,processId);
+		logEnd();
+		return processId;
+	}	
+	
+	@Test		
+	public void msoFalloutHandlerWithNotificationurl_200() throws Exception{		
+		//Setup Mocks
+		setupMocks();
+		//Execute Flow
+		String processId = executeFlow(gMsoFalloutHandlerWithNotificationurl());
+		//Verify Error
+		String FH_ResponseCode = BPMNUtil.getVariable(processEngine, "FalloutHandler", "FH_ResponseCode",processId);
+		Assert.assertEquals("200", FH_ResponseCode);
+		Assert.assertTrue((boolean) BPMNUtil.getRawVariable(processEngine, "FalloutHandler", "FH_SuccessIndicator",processId)); 
+	}
+	
+	public String gMsoFalloutHandlerWithNotificationurl() {
+		//Generated the below XML from ActiveVOS moduler ... Using the generate sample XML feature in ActiveVOS
+		String xml = ""
+				+ "<sdncadapterworkflow:FalloutHandlerRequest xmlns:sdncadapterworkflow=\"http://org.onap/so/workflow/schema/v1\" xmlns:ns7=\"http://org.onap/so/request/types/v1\">"
+				+ "		<ns7:request-information>"
+				+ "			<ns7:request-id>1020_STUW105_5002</ns7:request-id>"
+				+ "			<ns7:request-action>requestAction</ns7:request-action>"
+				+ "			<ns7:request-sub-action>CANCEL</ns7:request-sub-action>"
+				+ "			<ns7:source>source</ns7:source>"
+				+ "			<ns7:notification-url>http://localhost:28090/CCD/StatusNotification</ns7:notification-url>"
+				+ "			<ns7:order-number>10205000</ns7:order-number>"
+				+ "			<ns7:order-version>1</ns7:order-version>"
+				+ "		</ns7:request-information>"
+				+ "		<sdncadapterworkflow:WorkflowException>"
+				+ "			<sdncadapterworkflow:ErrorMessage>Some Error Message - Fallout Handler</sdncadapterworkflow:ErrorMessage>"
+				+ "			<sdncadapterworkflow:ErrorCode>Some Error Code - Fallout Handler</sdncadapterworkflow:ErrorCode>"
+				+ "			<sdncadapterworkflow:SourceSystemErrorCode>Some Source System Error Code- Fallout Handler</sdncadapterworkflow:SourceSystemErrorCode>"
+				+ "		</sdncadapterworkflow:WorkflowException>"
+				+ "</sdncadapterworkflow:FalloutHandlerRequest>";
+		
+		return xml;
+
+	}	
+	
+
+
+
+	@Test		
+	public void msoFalloutHandlerWithNoNotificationurl() throws Exception{
+	
+		//Setup Mocks
+		setupMocks();
+		//Execute Flow
+		executeFlow(gMsoFalloutHandlerWithNoNotificationurl());
+		//Verify Error
+		String FH_ResponseCode = BPMNUtil.getVariable(processEngine, "FalloutHandler", "FH_ResponseCode");
+		Assert.assertEquals("200", FH_ResponseCode);
+		Assert.assertTrue((boolean) BPMNUtil.getRawVariable(processEngine, "FalloutHandler", "FH_SuccessIndicator")); 
+	}
+	
+	public String gMsoFalloutHandlerWithNoNotificationurl() {
+		//Generated the below XML from ActiveVOS moduler ... Using the generate sample XML feature in ActiveVOS
+		String xml = ""
+				+ "<sdncadapterworkflow:FalloutHandlerRequest xmlns:sdncadapterworkflow=\"http://org.onap/so/workflow/schema/v1\" xmlns:ns7=\"http://org.onap/so/request/types/v1\">"
+				+ "		<ns7:request-information>"
+				+ "			<ns7:request-id>1020_STUW105_5002</ns7:request-id>"
+				+ "			<ns7:request-action>requestAction</ns7:request-action>"
+				+ "			<ns7:request-sub-action>CANCEL</ns7:request-sub-action>"
+				+ "			<ns7:source>source</ns7:source>"
+				+ "			<ns7:notification-url></ns7:notification-url>"
+				+ "			<ns7:order-number>10205000</ns7:order-number>"
+				+ "			<ns7:order-version>1</ns7:order-version>"
+				+ "		</ns7:request-information>"
+				+ "		<sdncadapterworkflow:WorkflowException>"
+				+ "			<sdncadapterworkflow:ErrorMessage>Some Error Message - Fallout Handler</sdncadapterworkflow:ErrorMessage>"
+				+ "			<sdncadapterworkflow:ErrorCode>Some Error Code - Fallout Handler</sdncadapterworkflow:ErrorCode>"
+				+ "			<sdncadapterworkflow:SourceSystemErrorCode>Some Source System Error Code- Fallout Handler</sdncadapterworkflow:SourceSystemErrorCode>"
+				+ "		</sdncadapterworkflow:WorkflowException>"
+				+ "</sdncadapterworkflow:FalloutHandlerRequest>";
+		
+		return xml;
+	}	
+	
+	@Test		
+	
+	public void msoFalloutHandlerWithNotificationurlNoRequestId() throws Exception{
+		String method = getClass().getSimpleName() + "." + new Object() {
+		}.getClass().getEnclosingMethod().getName();
+		logger.debug("STARTED TEST: " + method);		
+		//Setup Mocks
+		setupMocks();
+		//Execute Flow
+		executeFlow(gMsoFalloutHandlerWithNotificationurlNoRequestId());
+		//Verify Error		
+		String FH_ResponseCode = BPMNUtil.getVariable(processEngine, "FalloutHandler", "FH_ResponseCode");
+		Assert.assertEquals("200", FH_ResponseCode);
+		Assert.assertTrue((boolean) BPMNUtil.getRawVariable(processEngine, "FalloutHandler", "FH_SuccessIndicator")); 
+	}
+
+	public String gMsoFalloutHandlerWithNotificationurlNoRequestId() {
+		//Generated the below XML from ActiveVOS moduler ... Using the generate sample XML feature in ActiveVOS
+		String xml = ""
+				+ "<sdncadapterworkflow:FalloutHandlerRequest xmlns:sdncadapterworkflow=\"http://org.onap/so/workflow/schema/v1\" xmlns:ns7=\"http://org.onap/so/request/types/v1\">"
+				+ "		<ns7:request-information>"
+				+ "			<ns7:request-id></ns7:request-id>"
+				+ "			<ns7:request-action>requestAction</ns7:request-action>"
+				+ "			<ns7:request-sub-action>CANCEL</ns7:request-sub-action>"
+				+ "			<ns7:source>source</ns7:source>"
+				+ "			<ns7:notification-url>www.test.com</ns7:notification-url>"
+				+ "			<ns7:order-number>10205000</ns7:order-number>"
+				+ "			<ns7:order-version>1</ns7:order-version>"
+				+ "		</ns7:request-information>"
+				+ "		<sdncadapterworkflow:WorkflowException>"
+				+ "			<sdncadapterworkflow:ErrorMessage>Some Error Message - Fallout Handler</sdncadapterworkflow:ErrorMessage>"
+				+ "			<sdncadapterworkflow:ErrorCode>Some Error Code - Fallout Handler</sdncadapterworkflow:ErrorCode>"
+				+ "			<sdncadapterworkflow:SourceSystemErrorCode>Some Source System Error Code- Fallout Handler</sdncadapterworkflow:SourceSystemErrorCode>"
+				+ "		</sdncadapterworkflow:WorkflowException>"
+				+ "</sdncadapterworkflow:FalloutHandlerRequest>";
+		
+		return xml;
+	}		
+	
+	@Test		
+	
+	public void msoFalloutHandlerWithNoNotificationurlNoRequestId() throws Exception{
+		String method = getClass().getSimpleName() + "." + new Object() {
+		}.getClass().getEnclosingMethod().getName();
+		logger.debug("STARTED TEST: " + method);		
+		//Setup Mocks
+		setupMocks();
+		//Execute Flow
+		executeFlow(gMsoFalloutHandlerWithNoNotificationurlNoRequestId());
+		//Verify Error
+		String FH_ResponseCode = BPMNUtil.getVariable(processEngine, "FalloutHandler", "FH_ResponseCode");
+		Assert.assertEquals("200", FH_ResponseCode);
+		Assert.assertTrue((boolean) BPMNUtil.getRawVariable(processEngine, "FalloutHandler", "FH_SuccessIndicator")); 
+	}	
+	
+	public String gMsoFalloutHandlerWithNoNotificationurlNoRequestId() {
+		//Generated the below XML from ActiveVOS moduler ... Using the generate sample XML feature in ActiveVOS
+		String xml = ""
+				+ "<sdncadapterworkflow:FalloutHandlerRequest xmlns:sdncadapterworkflow=\"http://org.onap/so/workflow/schema/v1\" xmlns:ns7=\"http://org.onap/so/request/types/v1\">"
+				+ "		<ns7:request-information>"
+				+ "			<ns7:request-id></ns7:request-id>"
+				+ "			<ns7:request-action>requestAction</ns7:request-action>"
+				+ "			<ns7:request-sub-action>CANCEL</ns7:request-sub-action>"
+				+ "			<ns7:source>source</ns7:source>"
+				+ "			<ns7:notification-url></ns7:notification-url>"
+				+ "			<ns7:order-number>10205000</ns7:order-number>"
+				+ "			<ns7:order-version>1</ns7:order-version>"
+				+ "		</ns7:request-information>"
+				+ "		<sdncadapterworkflow:WorkflowException>"
+				+ "			<sdncadapterworkflow:ErrorMessage>Some Error Message - Fallout Handler</sdncadapterworkflow:ErrorMessage>"
+				+ "			<sdncadapterworkflow:ErrorCode>Some Error Code - Fallout Handler</sdncadapterworkflow:ErrorCode>"
+				+ "			<sdncadapterworkflow:SourceSystemErrorCode>Some Source System Error Code- Fallout Handler</sdncadapterworkflow:SourceSystemErrorCode>"
+				+ "		</sdncadapterworkflow:WorkflowException>"
+				+ "</sdncadapterworkflow:FalloutHandlerRequest>";
+		
+		return xml;
+	}	
+	
+}
+
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/GenerateVfModuleNameIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/GenerateVfModuleNameIT.java
new file mode 100644
index 0000000..fa8823a
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/GenerateVfModuleNameIT.java
@@ -0,0 +1,78 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common;
+
+import static org.junit.Assert.assertNotNull;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetGenericVnfById;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.camunda.bpm.engine.RuntimeService;
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.onap.so.BaseIntegrationTest;
+
+/**
+ * Unit test for GenerateVfModuleName.bpmn.
+ */
+
+public class GenerateVfModuleNameIT extends BaseIntegrationTest {
+	private static final String EOL = "\n";
+	
+	@Test	
+	public void  TestGenerateVfModuleNameSuvvess() {
+		// 
+		String request =
+			"<vnf-request xmlns=\"http://ecomp.att.com/mso/infra/vnf-request/v1\">" + EOL +
+			"  <request-info>" + EOL +
+			"    <action>CREATE_VF_MODULE</action>" + EOL +
+			"    <source>PORTAL</source>" + EOL +
+			"  </request-info>" + EOL +
+			"  <vnf-inputs>" + EOL +
+			"    <vnf-name>STMTN5MMSC22</vnf-name>" + EOL +
+			"    <vf-module-name>STMTN5MMSC22-MMSC::module-0-0</vf-module-name>" + EOL +
+			"    <vf-module-model-name>MMSC::module-0</vf-module-model-name>" + EOL +
+			"    <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</persona-model-id>" + EOL +
+			"    <persona-model-version>1.0</persona-model-version>" + EOL +
+			"    <service-id>00000000-0000-0000-0000-000000000000</service-id>" + EOL +
+			"    <aic-node-clli>MDTWNJ21</aic-node-clli>" + EOL +
+			"    <tenant-id>fba1bd1e195a404cacb9ce17a9b2b421</tenant-id>" + EOL +
+			"  </vnf-inputs>" + EOL +
+			"  <vnf-params xmlns:tns=\"http://ecomp.att.com/mso/infra/vnf-request/v1\"/>" + EOL +
+			"</vnf-request>" + EOL;
+
+		MockGetGenericVnfById(".*", "GenericFlows/getGenericVnfByNameResponse.xml");
+		RuntimeService runtimeService = processEngine.getRuntimeService();				
+		Map<String, Object> variables = new HashMap<String, Object>();		
+		variables.put("isDebugLogEnabled","true");		
+		variables.put("vnfName", "STMTN5MMSC20");
+		variables.put("vfModuleLabel", "ModuleLabel1");
+		variables.put("personaModelId", "extrovert");
+		variables.put("vnfId", "12345678-f41f-4822-9323-b75962763d74");
+		
+		runtimeService.startProcessInstanceByKey("GenerateVfModuleName", variables);
+		String response = BPMNUtil.getVariable(processEngine, "GenerateVfModuleName", "vfModuleName");
+		
+		assertNotNull(response);
+	}
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/GenericGetServiceIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/GenericGetServiceIT.java
new file mode 100644
index 0000000..38d05fe
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/GenericGetServiceIT.java
@@ -0,0 +1,560 @@
+/*
+ * © 2014 AT&T Intellectual Property. All rights reserved. Used under license from AT&T Intellectual Property.
+ */
+/*- 
+ * ============LICENSE_START======================================================= 
+ * ONAP - SO 
+ * ================================================================================ 
+ * Copyright (C) 2017 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.onap.so.bpmn.common;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetServiceInstance;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetServiceInstance_404;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetServiceInstance_500;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetServiceSubscription;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceById;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceById_404;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceById_500;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceByName;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceByName_404;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceByName_500;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.junit.Test;
+import org.onap.so.BaseIntegrationTest;
+
+
+/**
+ * Unit Test for the GenericGetService Sub Flow
+ */
+
+public class GenericGetServiceIT extends BaseIntegrationTest {
+
+
+	@Test
+	public void testGenericGetService_success_serviceInstance() throws Exception{
+		MockGetServiceInstance("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, "SDN-ETHERNET-INTERNET", "123456789");
+		String processId = invokeSubProcess( "GenericGetService", variables);
+		
+		String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
+		String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
+		String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
+		String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
+		String response = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowResponse",processId);
+		String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
+		assertEquals("true", successIndicator);
+		assertEquals("true", found);
+		assertEquals("false", obtainUrl);
+		assertEquals("false", byName);
+		assertNotNull(response);
+		assertEquals(null, workflowException);
+	}
+
+
+	@Test
+	
+	public void testGenericGetService_success_serviceSubscription() throws Exception{
+
+		MockGetServiceSubscription("1604-MVM-26", "SDN-ETHERNET-INTERNET", "GenericFlows/getServiceSubscription.xml");
+
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesSubscription(variables, "", null , "1604-MVM-26", "SDN-ETHERNET-INTERNET");
+
+		String processId = invokeSubProcess( "GenericGetService", variables);
+		
+
+		String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
+		String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
+		String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
+		String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
+		String response = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowResponse",processId);
+		String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
+
+		assertEquals("true", successIndicator);
+		assertEquals("true", found);
+		assertEquals("false", obtainUrl);
+		assertEquals("false", byName);
+		assertNotNull(response);
+		assertEquals(null, workflowException);
+	}
+
+	@Test
+	
+	public void testGenericGetService_success_serviceInstance_byName() throws Exception{
+
+		MockNodeQueryServiceInstanceByName("1604-MVM-26", "GenericFlows/getSIUrlByName.xml");
+		MockGetServiceInstance("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");
+
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesInstance(variables, null, "1604-MVM-26", null, null);
+
+		String processId = invokeSubProcess( "GenericGetService", variables);
+		
+
+		String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
+		String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
+		String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
+		String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
+		String response = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowResponse",processId);
+		String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
+		String siUrlResponseCode = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainSIUrlResponseCode",processId);
+
+		assertEquals("true", successIndicator);
+		assertEquals("true", found);
+		assertEquals("true", obtainUrl);
+		assertEquals("true", byName);
+		assertNotNull(response);
+		assertEquals("200", siUrlResponseCode);
+		assertEquals(null, workflowException);
+	}
+
+	@Test
+	
+	public void testGenericGetService_success_serviceInstance_byId() throws Exception{
+
+		MockNodeQueryServiceInstanceById("MIS%2F1604%2F0026%2FSW_INTERNET", "GenericFlows/getSIUrlById.xml");
+		MockGetServiceInstance("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");
+
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, null, null);
+
+		String processId = invokeSubProcess( "GenericGetService", variables);
+		
+
+		String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
+		String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
+		String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
+		String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
+		String response = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowResponse",processId);
+		String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
+		String siUrlResponseCode = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_genericQueryResponseCode",processId);
+
+		assertEquals("true", successIndicator);
+		assertEquals("true", found);
+		assertEquals("true", obtainUrl);
+		assertEquals("false", byName);
+		assertNotNull(response);
+		assertEquals("200", siUrlResponseCode);
+		assertEquals(null, workflowException);
+	}
+
+	@Test
+	
+	public void testGenericGetService_success_serviceInstance_404Response() throws Exception{
+
+		MockGetServiceInstance_404("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET");
+
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, "SDN-ETHERNET-INTERNET", "123456789");
+
+		String processId = invokeSubProcess( "GenericGetService", variables);
+		
+
+		String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
+		String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
+		String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
+		String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
+		String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
+
+		assertEquals("true", successIndicator);
+		assertEquals("false", found);
+		assertEquals("false", obtainUrl);
+		assertEquals("false", byName);
+		assertEquals(null, workflowException);
+	}
+
+	@Test
+	
+	public void testGenericGetService_success_serviceSubscription404() throws Exception{
+		MockGetServiceSubscription("SDN-ETHERNET-INTERNET", "1604-MVM-26", 404);
+		
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesSubscription(variables, "", "", "SDN-ETHERNET-INTERNET", "1604-MVM-26");
+
+		String processId = invokeSubProcess( "GenericGetService", variables);
+		
+
+		String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
+		String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
+		String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
+		String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
+		String response = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowResponse",processId);
+		String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
+
+		assertEquals("true", successIndicator);
+		assertEquals("false", found);
+		assertEquals("false", obtainUrl);
+		assertEquals("false", byName);
+		assertNotNull(response);
+		assertEquals(null, workflowException);
+	}
+
+	@Test
+	
+	public void testGenericGetService_success_serviceInstanceByName404() throws Exception{
+
+		MockNodeQueryServiceInstanceByName_404("1604-MVM-26");
+
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesInstance(variables, "", "1604-MVM-26", null, null);
+
+		String processId = invokeSubProcess( "GenericGetService", variables);
+		
+
+		String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
+		String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
+		String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
+		String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
+		String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
+		String siUrlResponseCode = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainSIUrlResponseCode",processId);
+
+		assertEquals("true", successIndicator);
+		assertEquals("false", found);
+		assertEquals("true", obtainUrl);
+		assertEquals("true", byName);
+		assertEquals("404", siUrlResponseCode);
+		assertEquals(null, workflowException);
+	}
+
+	@Test
+	
+	public void testGenericGetService_success_serviceInstanceById404() throws Exception{
+
+		MockNodeQueryServiceInstanceById_404("MIS%2F1604%2F0026%2FSW_INTERNET");
+
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, null, null);
+
+		String processId = invokeSubProcess( "GenericGetService", variables);
+		
+
+		String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
+		String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
+		String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
+		String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
+		String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
+		String siUrlResponseCode = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_genericQueryResponseCode",processId);
+
+		assertEquals("true", successIndicator);
+		assertEquals("false", found);
+		assertEquals("true", obtainUrl);
+		assertEquals("false", byName);
+		assertEquals("404", siUrlResponseCode);
+		assertEquals(null, workflowException);
+	}
+
+	@Test
+	
+	public void testGenericGetService_success_serviceInstanceEmptyResponse() throws Exception{
+
+		MockGetServiceInstance("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET");
+
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, "SDN-ETHERNET-INTERNET", "123456789");
+
+		String processId = invokeSubProcess( "GenericGetService", variables);
+		
+
+		String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
+		String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
+		String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
+		String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
+		String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
+
+		assertEquals("true", successIndicator);
+		assertEquals("false", found);
+		assertEquals("false", obtainUrl);
+		assertEquals("false", byName);
+		assertEquals(null, workflowException);
+	}
+
+	@Test
+	
+	public void testGenericGetService_success_serviceInstanceByNameEmpty() throws Exception{
+		MockNodeQueryServiceInstanceByName("1604-MVM-26", "");
+		
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesInstance(variables, "", "1604-MVM-26", null, null);
+
+		String processId = invokeSubProcess( "GenericGetService", variables);
+		
+
+		String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
+		String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
+		String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
+		String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
+		String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
+		String siUrlResponseCode = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainSIUrlResponseCode",processId);
+
+		assertEquals("true", successIndicator);
+		assertEquals("false", found);
+		assertEquals("true", obtainUrl);
+		assertEquals("true", byName);
+		assertEquals("200", siUrlResponseCode);
+		assertEquals(null, workflowException);
+	}
+
+	@Test
+	
+	public void testGenericGetService_success_serviceInstanceByIdEmpty() throws Exception{
+
+	        MockNodeQueryServiceInstanceById("MIS[%]2F1604[%]2F0026[%]2FSW_INTERNET", "");
+
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, null, null);
+
+		String processId = invokeSubProcess( "GenericGetService", variables);
+		
+
+		String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
+		String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
+		String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
+		String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
+		String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
+		String siUrlResponseCode = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_genericQueryResponseCode",processId);
+
+		assertEquals("true", successIndicator);
+		assertEquals("false", found);
+		assertEquals("true", obtainUrl);
+		assertEquals("false", byName);
+		assertEquals("200", siUrlResponseCode);
+		assertEquals(null, workflowException);
+	}
+
+
+	@Test
+	
+	public void testGenericGetService_error_serviceInstanceInvalidVariables() throws Exception{
+
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesInstance(variables, null, null, "SDN-ETHERNET-INTERNET", null);
+
+		String processId = invokeSubProcess( "GenericGetService", variables);
+		
+
+		String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
+		String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
+		String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
+		String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
+		String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
+
+		String expectedWorkflowException = "WorkflowException[processKey=GenericGetService,errorCode=500,errorMessage=Incoming serviceInstanceId and serviceInstanceName are null. ServiceInstanceId or ServiceInstanceName is required to Get a service-instance.,workStep=*]";
+
+		assertEquals("false", successIndicator);
+		assertEquals("false", found);
+		assertEquals("false", obtainUrl);
+		assertEquals("false", byName);
+		assertEquals(expectedWorkflowException, workflowException);
+	}
+
+	@Test
+	
+	public void testGenericGetService_success_serviceSubscriptionInvalidVariables() throws Exception{
+
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesSubscription(variables, "", "", "SDN-ETHERNET-INTERNET", null);
+
+		String processId = invokeSubProcess( "GenericGetService", variables);
+		
+
+		String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
+		String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
+		String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
+		String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
+		String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
+
+		String expectedWorkflowException = "WorkflowException[processKey=GenericGetService,errorCode=500,errorMessage=Incoming ServiceType or GlobalCustomerId is null. These variables are required to Get a service-subscription.,workStep=*]";
+
+
+		assertEquals("false", successIndicator);
+		assertEquals("false", found);
+		assertEquals("false", obtainUrl);
+		assertEquals("false", byName);
+		assertEquals(expectedWorkflowException, workflowException);
+	}
+
+	@Test
+	
+	public void testGenericGetService_error_serviceInstance_getSIBadResponse() throws Exception{
+
+		MockGetServiceInstance_500("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET");
+
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", "1604-MVM-26", "SDN-ETHERNET-INTERNET", "123456789");
+
+		String processId = invokeSubProcess( "GenericGetService", variables);
+		
+
+		String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
+		String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
+		String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
+		String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
+		String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
+
+		String expectedWorkflowException = "WorkflowException[processKey=GenericGetService,errorCode=500,errorMessage=Received a bad response from AAI,workStep=*]";
+
+		assertEquals("false", successIndicator);
+		assertEquals("false", found);
+		assertEquals("false", obtainUrl);
+		assertEquals("false", byName);
+		assertEquals(expectedWorkflowException, workflowException);
+	}
+
+	@Test
+	
+	public void testGenericGetService_error_serviceInstance_getUrlByIdBadResponse() throws Exception{
+
+		MockNodeQueryServiceInstanceById_500("MIS%2F1604%2F0026%2FSW_INTERNET");
+
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, null, null);
+
+		String processId = invokeSubProcess( "GenericGetService", variables);
+		
+
+		String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
+		String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
+		String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
+		String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
+		String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
+		String siUrlResponseCode = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_genericQueryResponseCode",processId);
+
+		String expectedWorkflowException = "WorkflowException[processKey=GenericGetService,errorCode=500,errorMessage=Received a bad response from AAI,workStep=*]";
+
+		assertEquals("false", successIndicator);
+		assertEquals("false", found);
+		assertEquals("true", obtainUrl);
+		assertEquals("false", byName);
+		assertEquals("500", siUrlResponseCode);
+		assertEquals(expectedWorkflowException, workflowException);
+	}
+
+	@Test
+	
+	public void testGenericGetService_error_serviceInstance_getUrlByNameBadResponse() throws Exception{
+
+		MockNodeQueryServiceInstanceByName_500("1604-MVM-26");
+
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesInstance(variables, null, "1604-MVM-26", null, null);
+
+		String processId = invokeSubProcess( "GenericGetService", variables);
+		
+
+		String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
+		String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
+		String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
+		String obtainUrl = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainObjectsUrl",processId);
+		String byName = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainServiceInstanceUrlByName",processId);
+		String siUrlResponseCode = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainSIUrlResponseCode",processId);
+
+		String expectedWorkflowException = "WorkflowException[processKey=GenericGetService,errorCode=500,errorMessage=Received a bad response from AAI,workStep=*]";
+
+		assertEquals("false", successIndicator);
+		assertEquals("false", found);
+		assertEquals("true", obtainUrl);
+		assertEquals("true", byName);
+		assertEquals("500", siUrlResponseCode);
+		assertEquals(expectedWorkflowException, workflowException);
+	}
+
+    @Test
+    
+    public void testGenericGetService_success_serviceInstance_byNameServicePresent() throws Exception{
+
+        MockNodeQueryServiceInstanceByName("1604-MVM-26", "GenericFlows/getSIUrlByNameMultiCustomer.xml");
+        MockGetServiceInstance("AbcBank", "ABC-ST", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");
+
+        Map<String, Object> variables = new HashMap<>();
+        setVariablesInstance(variables, null, "1604-MVM-26", "XyCorporation", null);
+
+        String processId = invokeSubProcess( "GenericGetService", variables);
+        
+
+        String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
+        String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
+        String resourceLink = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_resourceLink",processId);
+        String response = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowResponse",processId);
+        String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
+        String siUrlResponseCode = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainSIUrlResponseCode",processId);
+
+        assertEquals("true", successIndicator);
+        assertEquals("true", found);
+		assertNotNull(resourceLink);
+        assertNotNull(response);
+        assertEquals("200", siUrlResponseCode);
+        assertEquals(null, workflowException);
+    }
+
+	@Test
+	
+	public void testGenericGetService_success_serviceInstance_byNameServiceNotPresent() throws Exception{
+
+		MockNodeQueryServiceInstanceByName("1604-MVM-26", "GenericFlows/getSIUrlByNameMultiCustomer.xml");
+		MockGetServiceInstance("CorporationNotPresent", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");
+
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesInstance(variables, null, "1604-MVM-26", "CorporationNotPresent", null);
+
+		String processId = invokeSubProcess( "GenericGetService", variables);
+		
+
+		String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_SuccessIndicator",processId);
+		String found = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_FoundIndicator",processId);
+		String resourceLink = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_resourceLink",processId);
+		String response = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowResponse",processId);
+		String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetService", "WorkflowException",processId);
+		String siUrlResponseCode = BPMNUtil.getVariable(processEngine, "GenericGetService", "GENGS_obtainSIUrlResponseCode",processId);
+
+		assertEquals("true", successIndicator);
+		assertEquals("false", found);
+		assertEquals(null, resourceLink);
+		assertEquals("  ", response);
+		assertEquals("200", siUrlResponseCode);
+		assertEquals(null, workflowException);
+	}
+
+	private void setVariablesInstance(Map<String, Object> variables, String siId, String siName, String globalCustId, String serviceType) {
+		variables.put("isDebugLogEnabled", "true");
+		variables.put("GENGS_serviceInstanceId", siId);
+		variables.put("GENGS_serviceInstanceName", siName);
+		variables.put("GENGS_globalCustomerId",globalCustId);
+		variables.put("GENGS_serviceType", serviceType);
+		variables.put("GENGS_type", "service-instance");
+		variables.put("mso-request-id", UUID.randomUUID().toString());
+	}
+
+	private void setVariablesSubscription(Map<String, Object> variables, String siId, String siName, String globalCustId, String serviceType) {
+		variables.put("isDebugLogEnabled", "true");
+		variables.put("GENGS_serviceInstanceId", siId);
+		variables.put("GENGS_serviceInstanceName", siName);
+		variables.put("GENGS_globalCustomerId",globalCustId);
+		variables.put("GENGS_serviceType", serviceType);
+		variables.put("GENGS_type", "service-subscription");
+		variables.put("mso-request-id", UUID.randomUUID().toString());
+	}
+
+
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/GenericGetVnfIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/GenericGetVnfIT.java
new file mode 100644
index 0000000..10c0640
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/GenericGetVnfIT.java
@@ -0,0 +1,190 @@
+/*
+ * © 2014 AT&T Intellectual Property. All rights reserved. Used under license from AT&T Intellectual Property.
+ */
+/*- 
+ * ============LICENSE_START======================================================= 
+ * ONAP - SO 
+ * ================================================================================ 
+ * Copyright (C) 2017 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.onap.so.bpmn.common;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetGenericVceByNameWithDepth;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithDepth;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetGenericVnfById_500;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetGenericVnfByNameWithDepth;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetVceById;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.junit.Test;
+import org.onap.so.BaseIntegrationTest;
+
+/**
+ * Please describe the GenericGetVnfTest.java class
+ *
+ */
+
+public class GenericGetVnfIT extends BaseIntegrationTest {
+
+	@Test
+	
+	public void testGenericGetVnf_success_genericVnf() throws Exception{
+		MockGetGenericVnfByIdWithDepth("testVnfId123", 1, "GenericFlows/getGenericVnfByNameResponse.xml");
+
+		Map<String, Object> variables = new HashMap<>();
+		setVariables(variables, "testVnfId123", "testVnfName123", "generic-vnf");
+
+		String processId = invokeSubProcess(  "GenericGetVnf", variables);
+		
+
+		String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetVnf", "GENGV_SuccessIndicator",processId);
+		String found = BPMNUtil.getVariable(processEngine, "GenericGetVnf", "GENGV_FoundIndicator",processId);
+		String vnf = BPMNUtil.getVariable(processEngine, "GenericGetVnf", "GENGV_vnf",processId);
+		String byName = BPMNUtil.getVariable(processEngine, "GenericGetVnf", "GENGV_getVnfByName",processId);
+		String response = BPMNUtil.getVariable(processEngine, "GenericGetVnf", "WorkflowResponse",processId);
+		String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetVnf", "WorkflowException",processId);
+
+		assertEquals("true", successIndicator);
+		assertEquals("true", found);
+		assertEquals("false", byName);
+		assertNotNull(response);
+		assertNotNull(vnf);
+		assertEquals(null, workflowException);
+
+	}
+
+	@Test
+	
+	public void testGenericGetVnf_success_vce() throws Exception{
+		MockGetVceById("testVnfId123[?]depth=1", "GenericFlows/getVceResponse.xml");
+
+		Map<String, Object> variables = new HashMap<>();
+		setVariables(variables, "testVnfId123", "testVnfName123", "vce");
+
+		String processId = invokeSubProcess(  "GenericGetVnf", variables);
+		
+
+		String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetVnf", "GENGV_SuccessIndicator",processId);
+		String found = BPMNUtil.getVariable(processEngine, "GenericGetVnf", "GENGV_FoundIndicator",processId);
+		String vnf = BPMNUtil.getVariable(processEngine, "GenericGetVnf", "GENGV_vnf",processId);
+		String byName = BPMNUtil.getVariable(processEngine, "GenericGetVnf", "GENGV_getVnfByName",processId);
+		String response = BPMNUtil.getVariable(processEngine, "GenericGetVnf", "WorkflowResponse",processId);
+		String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetVnf", "WorkflowException",processId);
+
+		assertEquals("true", successIndicator);
+		assertEquals("true", found);
+		assertEquals("false", byName);
+		assertNotNull(response);
+		assertNotNull(vnf);
+		assertEquals(null, workflowException);
+
+	}
+
+	@Test
+	
+	public void testGenericGetVnf_success_genericVnfByName() throws Exception{
+		MockGetGenericVnfByNameWithDepth("testVnfName123", 1, "GenericFlows/getGenericVnfResponse.xml");
+
+		Map<String, Object> variables = new HashMap<>();
+		setVariables(variables, "", "testVnfName123", "generic-vnf");
+
+		String processId = invokeSubProcess(  "GenericGetVnf", variables);
+		
+
+		String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetVnf", "GENGV_SuccessIndicator",processId);
+		String found = BPMNUtil.getVariable(processEngine, "GenericGetVnf", "GENGV_FoundIndicator",processId);
+		String vnf = BPMNUtil.getVariable(processEngine, "GenericGetVnf", "GENGV_vnf",processId);
+		String byName = BPMNUtil.getVariable(processEngine, "GenericGetVnf", "GENGV_getVnfByName",processId);
+		String response = BPMNUtil.getVariable(processEngine, "GenericGetVnf", "WorkflowResponse",processId);
+		String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetVnf", "WorkflowException",processId);
+
+		assertEquals("true", successIndicator);
+		assertEquals("true", found);
+		assertEquals("true", byName);
+		assertNotNull(response);
+		assertNotNull(vnf);
+		assertEquals(null, workflowException);
+
+	}
+
+	@Test
+	
+	public void testGenericGetVnf_success_vceByName() throws Exception{
+		MockGetGenericVceByNameWithDepth("testVnfName123", 1, "GenericFlows/getVceByNameResponse.xml");
+
+		Map<String, Object> variables = new HashMap<>();
+		setVariables(variables, null, "testVnfName123", "vce");
+
+		String processId = invokeSubProcess(  "GenericGetVnf", variables);
+		
+
+		String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetVnf", "GENGV_SuccessIndicator",processId);
+		String found = BPMNUtil.getVariable(processEngine, "GenericGetVnf", "GENGV_FoundIndicator",processId);
+		String vnf = BPMNUtil.getVariable(processEngine, "GenericGetVnf", "GENGV_vnf",processId);
+		String byName = BPMNUtil.getVariable(processEngine, "GenericGetVnf", "GENGV_getVnfByName",processId);
+		String response = BPMNUtil.getVariable(processEngine, "GenericGetVnf", "WorkflowResponse",processId);
+		String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetVnf", "WorkflowException",processId);
+
+		assertEquals("true", successIndicator);
+		assertEquals("true", found);
+		assertEquals("true", byName);
+		assertNotNull(response);
+		assertNotNull(vnf);
+		assertEquals(null, workflowException);
+
+	}
+
+	
+
+	@Test
+	public void testGenericGetVnf_error_genericVnf500() throws Exception{
+
+		MockGetGenericVnfById_500("testVnfId123_500");
+
+		Map<String, Object> variables = new HashMap<>();
+		setVariables(variables, "testVnfId123_500", "testVnfId123_500", "generic-vnf");
+
+		String processId = invokeSubProcess(  "GenericGetVnf", variables);
+		
+
+		String successIndicator = BPMNUtil.getVariable(processEngine, "GenericGetVnf", "GENGV_SuccessIndicator",processId);
+		String found = BPMNUtil.getVariable(processEngine, "GenericGetVnf", "GENGV_FoundIndicator",processId);
+		String workflowException = BPMNUtil.getVariable(processEngine, "GenericGetVnf", "WorkflowException",processId);
+		String byName = BPMNUtil.getVariable(processEngine, "GenericGetVnf", "GENGV_getVnfByName",processId);
+
+		String expectedWorkflowException = "WorkflowException[processKey=GenericGetVnf,errorCode=500,errorMessage=Received a bad response from AAI,workStep=*]";
+
+		assertEquals("false", successIndicator);
+		assertEquals("false", found);
+		assertEquals("false", byName);
+
+		assertEquals(expectedWorkflowException, workflowException);
+	}
+
+	private void setVariables(Map<String, Object> variables, String vnfId, String vnfName, String type) {
+		variables.put("isDebugLogEnabled", "true");
+		variables.put("GENGV_vnfId", vnfId);
+		variables.put("GENGV_vnfName",vnfName);
+		variables.put("GENGV_type", type);
+		variables.put("mso-request-id", UUID.randomUUID().toString());
+	}
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ManualHandlingIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ManualHandlingIT.java
new file mode 100644
index 0000000..744ef9b
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ManualHandlingIT.java
@@ -0,0 +1,96 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common;
+
+import static org.onap.so.bpmn.mock.StubResponseDatabase.MockPostRequestDB;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.TaskService;
+import org.camunda.bpm.engine.task.Task;
+import org.camunda.bpm.engine.task.TaskQuery;
+import org.junit.Assert;
+import org.junit.Test;
+import org.onap.so.BaseIntegrationTest;
+import org.onap.so.logger.MsoLogger;
+
+/**
+ * Unit test for RainyDayHandler.bpmn.
+ */
+public class ManualHandlingIT extends BaseIntegrationTest {
+	MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,ManualHandlingIT.class);
+	
+	@Test
+	public void  TestManualHandlingSuccess() {
+		MockPostRequestDB();
+		
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("isDebugLogEnabled","true");
+		variables.put("msoRequestId", "testRequestId");
+		variables.put("serviceType", "X");
+		variables.put("vnfType", "Y");
+		variables.put("currentActivity", "BB1");
+		variables.put("workStep", "1");
+		variables.put("failedActivity", "AAI");
+		variables.put("vnfName", "vSAMP12");
+		variables.put("errorCode", "123");
+		variables.put("errorText", "update failed");
+		variables.put("validResponses", "Rollback");
+		variables.put("vnfName", "vSAMP1");
+
+
+		String businessKey = UUID.randomUUID().toString();
+		invokeSubProcess("ManualHandling", businessKey, variables);
+		
+		try {
+			Thread.sleep(5);
+		} catch (Exception e) {
+
+		}
+
+		TaskService taskService = processEngine.getTaskService();
+
+		TaskQuery q = taskService.createTaskQuery();
+
+		List<Task> tasks = q.orderByTaskCreateTime().asc().list();
+		
+		for (Task task : tasks) {
+			logger.debug("TASK ID: " + task.getId());
+			logger.debug("TASK NAME: " + task.getName());
+			
+			try {
+				logger.debug("Completing the task");
+				Map<String,Object> completeVariables = new HashMap<>();
+				completeVariables.put("responseValue", "skip");
+				taskService.complete(task.getId(), completeVariables);
+			} catch(Exception e) {
+				logger.debug("GOT EXCEPTION: " + e.getMessage());
+			}
+		}
+		
+		waitForProcessEnd(businessKey, 100000);
+		
+		Assert.assertTrue(isProcessEnded(businessKey));
+	}
+}
\ No newline at end of file
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/MockAAIDeleteGenericVnf.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/MockAAIDeleteGenericVnf.java
new file mode 100644
index 0000000..819962f
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/MockAAIDeleteGenericVnf.java
@@ -0,0 +1,39 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 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.onap.so.bpmn.common;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.delete;
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching;
+
+public class MockAAIDeleteGenericVnf {
+	public MockAAIDeleteGenericVnf(){
+		stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721/[?]resource-version=0000021"))
+				.willReturn(aResponse()
+						.withStatus(200)));
+		stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c718/[?]resource-version=0000018"))
+				.willReturn(aResponse()
+						.withStatus(500)
+						.withHeader("Content-Type", "text/xml")
+						.withBodyFile("aaiFault.xml")));
+	}
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/MockAAIDeleteVfModule.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/MockAAIDeleteVfModule.java
new file mode 100644
index 0000000..9cb10a0
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/MockAAIDeleteVfModule.java
@@ -0,0 +1,53 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 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.onap.so.bpmn.common;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.delete;
+import static com.github.tomakehurst.wiremock.client.WireMock.get;
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching;
+
+public class MockAAIDeleteVfModule {
+	
+	public MockAAIDeleteVfModule()
+	{
+		stubFor(delete(urlMatching(
+				"/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721/vf-modules/vf-module/973ed047-d251-4fb9-bf1a-65b8949e0a73/[?]resource-version=0000073"))
+						.willReturn(aResponse().withStatus(200)));
+		stubFor(delete(urlMatching(
+				"/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c720/vf-modules/vf-module/973ed047-d251-4fb9-bf1a-65b8949e0a75/[?]resource-version=0000075"))
+						.willReturn(aResponse().withStatus(200)));
+		stubFor(delete(urlMatching(
+				"/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c718/vf-modules/vf-module/973ed047-d251-4fb9-bf1a-65b8949e0a78/[?]resource-version=0000078"))
+						.willReturn(aResponse().withStatus(200)));
+		stubFor(delete(urlMatching(
+				"/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c719/vf-modules/vf-module/973ed047-d251-4fb9-bf1a-65b8949e0a77/[?]resource-version=0000077"))
+						.willReturn(aResponse().withStatus(500).withHeader("Content-Type", "text/xml")
+								.withBodyFile("aaiFault.xml")));
+		stubFor(get(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy\\?network-policy-fqdn=.*"))
+				.willReturn(aResponse().withStatus(200).withHeader("Content-Type", "text/xml")
+						.withBodyFile("VfModularity/QueryNetworkPolicy_AAIResponse_Success.xml")));
+
+		stubFor(delete(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy/.*"))
+				.willReturn(aResponse().withStatus(200)));
+	}
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/MockAAIGenericVnfSearch.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/MockAAIGenericVnfSearch.java
new file mode 100644
index 0000000..b46d528
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/MockAAIGenericVnfSearch.java
@@ -0,0 +1,340 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 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.onap.so.bpmn.common;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.get;
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching;
+
+public class MockAAIGenericVnfSearch {
+	
+	private static final String EOL = "\n";
+
+	public MockAAIGenericVnfSearch(){
+		String body;
+		
+		// The following stubs are for CreateAAIVfModule and UpdateAAIVfModule
+	
+		stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/[?]vnf-name=STMTN5MMSC23&depth=1"))
+				.willReturn(aResponse()
+						.withStatus(500)
+						.withHeader("Content-Type", "text/xml")
+						.withBodyFile("aaiFault.xml")));
+	
+		stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/[?]vnf-name=STMTN5MMSC22&depth=1"))
+				.willReturn(aResponse()
+						.withStatus(404)
+						.withHeader("Content-Type", "text/xml")
+						.withBody("Generic VNF Not Found")));
+		stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/768073c7-f41f-4822-9323-b75962763d74[?]depth=1"))
+				.willReturn(aResponse()
+						.withStatus(404)
+						.withHeader("Content-Type", "text/xml")
+						.withBody("Generic VNF Not Found")));
+	
+		body =
+			"<generic-vnf xmlns=\"http://com.aai.inventory/v7\">" + EOL +
+			"  <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
+			"  <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
+			"  <vnf-type>mmsc-capacity</vnf-type>" + EOL +
+			"  <service-id>SDN-MOBILITY</service-id>" + EOL +
+			"  <equipment-role>vMMSC</equipment-role>" + EOL +
+			"  <orchestration-status>pending-create</orchestration-status>" + EOL +
+			"  <in-maint>false</in-maint>" + EOL +
+			"  <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
+			"  <resource-version>1508691</resource-version>" + EOL +
+			"  <vf-modules>" + EOL +
+			"    <vf-module>" + EOL +
+			"      <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
+			"      <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
+			"      <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</persona-model-id>" + EOL +
+			"      <persona-model-version>1.0</persona-model-version>" + EOL +
+			"      <is-base-vf-module>true</is-base-vf-module>" + EOL +
+			"      <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+			"      <orchestration-status>pending-create</orchestration-status>" + EOL +
+			"      <resource-version>1508692</resource-version>" + EOL +
+			"    </vf-module>" + EOL +
+			"  </vf-modules>" + EOL +
+			"  <relationship-list/>" + EOL +
+			"  <l-interfaces/>" + EOL +
+			"  <lag-interfaces/>" + EOL +
+			"</generic-vnf>" + EOL;
+		stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/[?]vnf-name=STMTN5MMSC21&depth=1"))
+				.willReturn(aResponse()
+						.withStatus(200)
+						.withHeader("Content-Type", "text/xml")
+						.withBody(body)));
+		stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721[?]depth=1"))
+				.willReturn(aResponse()
+						.withStatus(200)
+						.withHeader("Content-Type", "text/xml")
+						.withBody(body)));
+	
+		body =
+			"<generic-vnf xmlns=\"http://org.openecomp.aai.inventory/v7\">" + EOL +
+			"  <vnf-id>2f6aee38-1e2a-11e6-82d1-ffc7d9ee8aa4</vnf-id>" + EOL +
+			"  <vnf-name>STMTN5MMSC20</vnf-name>" + EOL +
+			"  <vnf-type>mmsc-capacity</vnf-type>" + EOL +
+			"  <service-id>SDN-MOBILITY</service-id>" + EOL +
+			"  <equipment-role>vMMSC</equipment-role>" + EOL +
+			"  <orchestration-status>pending-create</orchestration-status>" + EOL +
+			"  <in-maint>false</in-maint>" + EOL +
+			"  <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
+			"  <resource-version>1508691</resource-version>" + EOL +
+			"  <vf-modules>" + EOL +
+			"    <vf-module>" + EOL +
+			"      <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
+			"      <vf-module-name>STMTN5MMSC20-MMSC::module-0-0</vf-module-name>" + EOL +
+			"      <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</persona-model-id>" + EOL +
+			"      <persona-model-version>1.0</persona-model-version>" + EOL +
+			"      <is-base-vf-module>true</is-base-vf-module>" + EOL +
+			"      <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+			"      <orchestration-status>pending-create</orchestration-status>" + EOL +
+			"      <resource-version>1508692</resource-version>" + EOL +
+			"    </vf-module>" + EOL +
+			"    <vf-module>" + EOL +
+			"      <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a74</vf-module-id>" + EOL +
+			"      <vf-module-name>STMTN5MMSC20-MMSC::module-1-0</vf-module-name>" + EOL +
+			"      <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a74</persona-model-id>" + EOL +
+			"      <persona-model-version>1.0</persona-model-version>" + EOL +
+			"      <is-base-vf-module>false</is-base-vf-module>" + EOL +
+			"      <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+			"      <orchestration-status>pending-create</orchestration-status>" + EOL +
+			"      <resource-version>1508692</resource-version>" + EOL +
+			"    </vf-module>" + EOL +
+			"  </vf-modules>" + EOL +
+			"  <relationship-list/>" + EOL +
+			"  <l-interfaces/>" + EOL +
+			"  <lag-interfaces/>" + EOL +
+			"</generic-vnf>" + EOL;
+		stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/[?]vnf-name=STMTN5MMSC20&depth=1"))
+				.willReturn(aResponse()
+						.withStatus(200)
+						.withHeader("Content-Type", "text/xml")
+						.withBody(body)));
+		stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/2f6aee38-1e2a-11e6-82d1-ffc7d9ee8aa4[?]depth=1"))
+				.willReturn(aResponse()
+						.withStatus(200)
+						.withHeader("Content-Type", "text/xml")
+						.withBody(body)));
+	
+		// The following stubs are for DeleteAAIVfModule
+	
+		stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c723[?]depth=1"))
+				.willReturn(aResponse()
+						.withStatus(500)
+						.withHeader("Content-Type", "text/xml")
+						.withBodyFile("aaiFault.xml")));
+	
+		stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c722[?]depth=1"))
+				.willReturn(aResponse()
+						.withStatus(404)
+						.withHeader("Content-Type", "text/xml")
+						.withBody("Generic VNF Not Found")));
+	
+		body =
+				"<generic-vnf xmlns=\"http://org.openecomp.aai.inventory/v7\">" + EOL +
+				"  <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
+				"  <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
+				"  <vnf-type>mmsc-capacity</vnf-type>" + EOL +
+				"  <service-id>SDN-MOBILITY</service-id>" + EOL +
+				"  <equipment-role>vMMSC</equipment-role>" + EOL +
+				"  <orchestration-status>pending-create</orchestration-status>" + EOL +
+				"  <in-maint>false</in-maint>" + EOL +
+				"  <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
+				"  <resource-version>0000021</resource-version>" + EOL +
+				"  <vf-modules>" + EOL +
+				"    <vf-module>" + EOL +
+				"      <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
+				"      <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
+				"      <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</persona-model-id>" + EOL +
+				"      <persona-model-version>1.0</persona-model-version>" + EOL +
+				"      <is-base-vf-module>true</is-base-vf-module>" + EOL +
+				"      <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+				"      <orchestration-status>pending-create</orchestration-status>" + EOL +
+				"      <resource-version>0000073</resource-version>" + EOL +
+				"    </vf-module>" + EOL +
+				"  </vf-modules>" + EOL +
+				"  <relationship-list/>" + EOL +
+				"  <l-interfaces/>" + EOL +
+				"  <lag-interfaces/>" + EOL +
+				"</generic-vnf>" + EOL;
+		stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721[?]depth=1"))
+				.willReturn(aResponse()
+						.withStatus(200)
+						.withHeader("Content-Type", "text/xml")
+						.withBody(body)));
+	
+		body =
+			"<generic-vnf xmlns=\"http://org.openecomp.aai.inventory/v7\">" + EOL +
+			"  <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c720</vnf-id>" + EOL +
+			"  <vnf-name>STMTN5MMSC20</vnf-name>" + EOL +
+			"  <vnf-type>mmsc-capacity</vnf-type>" + EOL +
+			"  <service-id>SDN-MOBILITY</service-id>" + EOL +
+			"  <equipment-role>vMMSC</equipment-role>" + EOL +
+			"  <orchestration-status>pending-create</orchestration-status>" + EOL +
+			"  <in-maint>false</in-maint>" + EOL +
+			"  <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
+			"  <resource-version>0000020</resource-version>" + EOL +
+			"  <vf-modules>" + EOL +
+			"    <vf-module>" + EOL +
+			"      <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a74</vf-module-id>" + EOL +
+			"      <vf-module-name>STMTN5MMSC20-MMSC::module-0-0</vf-module-name>" + EOL +
+			"      <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a74</persona-model-id>" + EOL +
+			"      <persona-model-version>1.0</persona-model-version>" + EOL +
+			"      <is-base-vf-module>true</is-base-vf-module>" + EOL +
+			"      <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+			"      <orchestration-status>pending-create</orchestration-status>" + EOL +
+			"      <resource-version>0000074</resource-version>" + EOL +
+			"    </vf-module>" + EOL +
+			"    <vf-module>" + EOL +
+			"      <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a75</vf-module-id>" + EOL +
+			"      <vf-module-name>STMTN5MMSC20-MMSC::module-1-0</vf-module-name>" + EOL +
+			"      <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a75</persona-model-id>" + EOL +
+			"      <persona-model-version>1.0</persona-model-version>" + EOL +
+			"      <is-base-vf-module>false</is-base-vf-module>" + EOL +
+			"      <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+			"      <orchestration-status>pending-create</orchestration-status>" + EOL +
+			"      <resource-version>0000075</resource-version>" + EOL +
+			"    </vf-module>" + EOL +
+			"  </vf-modules>" + EOL +
+			"  <relationship-list/>" + EOL +
+			"  <l-interfaces/>" + EOL +
+			"  <lag-interfaces/>" + EOL +
+			"</generic-vnf>" + EOL;
+		stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c720[?]depth=1"))
+				.willReturn(aResponse()
+						.withStatus(200)
+						.withHeader("Content-Type", "text/xml")
+						.withBody(body)));
+	
+		body =
+			"<generic-vnf xmlns=\"http://org.openecomp.aai.inventory/v7\">" + EOL +
+			"  <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c719</vnf-id>" + EOL +
+			"  <vnf-name>STMTN5MMSC19</vnf-name>" + EOL +
+			"  <vnf-type>mmsc-capacity</vnf-type>" + EOL +
+			"  <service-id>SDN-MOBILITY</service-id>" + EOL +
+			"  <equipment-role>vMMSC</equipment-role>" + EOL +
+			"  <orchestration-status>pending-create</orchestration-status>" + EOL +
+			"  <in-maint>false</in-maint>" + EOL +
+			"  <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
+			"  <resource-version>0000019</resource-version>" + EOL +
+			"  <vf-modules>" + EOL +
+			"    <vf-module>" + EOL +
+			"      <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a76</vf-module-id>" + EOL +
+			"      <vf-module-name>STMTN5MMSC19-MMSC::module-0-0</vf-module-name>" + EOL +
+			"      <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a76</persona-model-id>" + EOL +
+			"      <persona-model-version>1.0</persona-model-version>" + EOL +
+			"      <is-base-vf-module>true</is-base-vf-module>" + EOL +
+			"      <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+			"      <orchestration-status>pending-create</orchestration-status>" + EOL +
+			"      <resource-version>0000076</resource-version>" + EOL +
+			"    </vf-module>" + EOL +
+			"    <vf-module>" + EOL +
+			"      <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a77</vf-module-id>" + EOL +
+			"      <vf-module-name>STMTN5MMSC19-MMSC::module-1-0</vf-module-name>" + EOL +
+			"      <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a77</persona-model-id>" + EOL +
+			"      <persona-model-version>1.0</persona-model-version>" + EOL +
+			"      <is-base-vf-module>false</is-base-vf-module>" + EOL +
+			"      <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+			"      <orchestration-status>pending-create</orchestration-status>" + EOL +
+			"      <resource-version>0000077</resource-version>" + EOL +
+			"    </vf-module>" + EOL +
+			"  </vf-modules>" + EOL +
+			"  <relationship-list/>" + EOL +
+			"  <l-interfaces/>" + EOL +
+			"  <lag-interfaces/>" + EOL +
+			"</generic-vnf>" + EOL;
+		stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c719[?]depth=1"))
+				.willReturn(aResponse()
+						.withStatus(200)
+						.withHeader("Content-Type", "text/xml")
+						.withBody(body)));
+	
+		body =
+			"<generic-vnf xmlns=\"http://org.openecomp.aai.inventory/v7\">" + EOL +
+			"  <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c718</vnf-id>" + EOL +
+			"  <vnf-name>STMTN5MMSC18</vnf-name>" + EOL +
+			"  <vnf-type>mmsc-capacity</vnf-type>" + EOL +
+			"  <service-id>SDN-MOBILITY</service-id>" + EOL +
+			"  <equipment-role>vMMSC</equipment-role>" + EOL +
+			"  <orchestration-status>pending-create</orchestration-status>" + EOL +
+			"  <in-maint>false</in-maint>" + EOL +
+			"  <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
+			"  <resource-version>0000018</resource-version>" + EOL +
+			"  <vf-modules>" + EOL +
+			"    <vf-module>" + EOL +
+			"      <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a78</vf-module-id>" + EOL +
+			"      <vf-module-name>STMTN5MMSC18-MMSC::module-0-0</vf-module-name>" + EOL +
+			"      <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a78</persona-model-id>" + EOL +
+			"      <persona-model-version>1.0</persona-model-version>" + EOL +
+			"      <is-base-vf-module>true</is-base-vf-module>" + EOL +
+			"      <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+			"      <orchestration-status>pending-create</orchestration-status>" + EOL +
+			"      <resource-version>0000078</resource-version>" + EOL +
+			"    </vf-module>" + EOL +
+			"  </vf-modules>" + EOL +
+			"  <relationship-list/>" + EOL +
+			"  <l-interfaces/>" + EOL +
+			"  <lag-interfaces/>" + EOL +
+			"</generic-vnf>" + EOL;
+		stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c718[?]depth=1"))
+				.willReturn(aResponse()
+						.withStatus(200)
+						.withHeader("Content-Type", "text/xml")
+						.withBody(body)));
+	
+		body =
+			"<generic-vnf xmlns=\"http://org.openecomp.aai.inventory/v7\">" + EOL +
+			"  <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id>" + EOL +
+			"  <vnf-name>STMTN5MMSC21</vnf-name>" + EOL +
+			"  <vnf-type>mmsc-capacity</vnf-type>" + EOL +
+			"  <service-id>SDN-MOBILITY</service-id>" + EOL +
+			"  <equipment-role>vMMSC</equipment-role>" + EOL +
+			"  <orchestration-status>pending-create</orchestration-status>" + EOL +
+			"  <in-maint>false</in-maint>" + EOL +
+			"  <is-closed-loop-disabled>false</is-closed-loop-disabled>" + EOL +
+			"  <resource-version>0000021</resource-version>" + EOL +
+			"  <vf-modules>" + EOL +
+			"    <vf-module>" + EOL +
+			"      <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id>" + EOL +
+			"      <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name>" + EOL +
+			"      <persona-model-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</persona-model-id>" + EOL +
+			"      <persona-model-version>1.0</persona-model-version>" + EOL +
+			"      <is-base-vf-module>true</is-base-vf-module>" + EOL +
+			"      <heat-stack-id>FILLED-IN-BY-MSO</heat-stack-id>" + EOL +
+			"      <orchestration-status>pending-create</orchestration-status>" + EOL +
+			"      <resource-version>0000073</resource-version>" + EOL +
+			"    </vf-module>" + EOL +
+			"  </vf-modules>" + EOL +
+			"  <relationship-list/>" + EOL +
+			"  <l-interfaces/>" + EOL +
+			"  <lag-interfaces/>" + EOL +
+			"</generic-vnf>" + EOL;
+		stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721/vf-modules/vf-module/973ed047-d251-4fb9-bf1a-65b8949e0a73"))
+				.willReturn(aResponse()
+						.withStatus(200)
+						.withHeader("Content-Type", "text/xml")
+						.withBody(body)));
+	
+	}
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/MockLoggerDelegate.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/MockLoggerDelegate.java
new file mode 100644
index 0000000..6a9ff2a
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/MockLoggerDelegate.java
@@ -0,0 +1,35 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 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.onap.so.bpmn.common;
+
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.camunda.bpm.engine.delegate.JavaDelegate;
+
+public class MockLoggerDelegate implements JavaDelegate {
+	@Override
+	public void execute(DelegateExecution execution) throws Exception {
+		System.out.println("\n\n ..." + MockLoggerDelegate.class.getName() + " invoked by " + "processDefinitionId="
+				+ execution.getProcessDefinitionId() + ", activtyId=" + execution.getCurrentActivityId()
+				+ ", activtyName='" + execution.getCurrentActivityName() + "'" + ", processInstanceId="
+				+ execution.getProcessInstanceId() + ", businessKey=" + execution.getProcessBusinessKey()
+				+ ", executionId=" + execution.getId() + " \n\n");
+	}
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/OofHomingIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/OofHomingIT.java
new file mode 100644
index 0000000..9bcc559
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/OofHomingIT.java
@@ -0,0 +1,761 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.onap.so.bpmn.mock.StubResponseDatabase.MockGetServiceResourcesCatalogDataByModelUuid;
+import static org.onap.so.bpmn.mock.StubResponseOof.mockOof;
+import static org.onap.so.bpmn.mock.StubResponseOof.mockOof_500;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import org.junit.Ignore;
+import org.junit.Test;
+import org.onap.so.BaseIntegrationTest;
+import org.onap.so.bpmn.core.WorkflowException;
+import org.onap.so.bpmn.core.domain.AllottedResource;
+import org.onap.so.bpmn.core.domain.CloudFlavor;
+import org.onap.so.bpmn.core.domain.HomingSolution;
+import org.onap.so.bpmn.core.domain.ModelInfo;
+import org.onap.so.bpmn.core.domain.NetworkResource;
+import org.onap.so.bpmn.core.domain.Resource;
+import org.onap.so.bpmn.core.domain.ServiceDecomposition;
+import org.onap.so.bpmn.core.domain.ServiceInstance;
+import org.onap.so.bpmn.core.domain.VnfResource;
+import org.onap.so.bpmn.mock.FileUtil;
+
+
+/**
+ * Test the OOF Homing subflow building block.
+ */
+@Ignore
+public class OofHomingIT extends BaseIntegrationTest {
+
+    ServiceDecomposition serviceDecomposition = new ServiceDecomposition();
+    String subscriber = "";
+    String subscriber2 = "";
+
+    private final CallbackSet callbacks = new CallbackSet();
+
+    public OofHomingIT() throws IOException {
+        String oofCallback = FileUtil.readResourceFile("__files/BuildingBlocks/oofCallbackInfraVnf.json");
+        String oofCallback2 = FileUtil.readResourceFile("__files/BuildingBlocks/oofCallback2AR1Vnf.json");
+        String oofCallback3 = FileUtil.readResourceFile("__files/BuildingBlocks/oofCallback2AR1Vnf2Net.json");
+
+        String oofCallbackNoSolution = FileUtil.
+                readResourceFile("__files/BuildingBlocks/oofCallbackNoSolutionFound.json");
+        String oofCallbackPolicyException = FileUtil.
+                readResourceFile("__files/BuildingBlocks/oofCallbackPolicyException.json");
+        String oofCallbackServiceException = FileUtil.
+                readResourceFile("__files/BuildingBlocks/oofCallbackServiceException.json");
+
+        callbacks.put("oof", JSON, "oofResponse", oofCallback);
+        callbacks.put("oof2", JSON, "oofResponse", oofCallback2);
+        callbacks.put("oof3", JSON, "oofResponse", oofCallback3);
+        callbacks.put("oofNoSol", JSON, "oofResponse", oofCallbackNoSolution);
+        callbacks.put("oofPolicyEx", JSON, "oofResponse", oofCallbackPolicyException);
+        callbacks.put("oofServiceEx", JSON, "oofResponse", oofCallbackServiceException);
+
+        // Service Model
+        ModelInfo sModel = new ModelInfo();
+        sModel.setModelCustomizationName("testModelCustomizationName");
+        sModel.setModelInstanceName("testModelInstanceName");
+        sModel.setModelInvariantUuid("testModelInvariantId");
+        sModel.setModelName("testModelName");
+        sModel.setModelUuid("testModelUuid");
+        sModel.setModelVersion("testModelVersion");
+        // Service Instance
+        ServiceInstance si = new ServiceInstance();
+        si.setInstanceId("testServiceInstanceId123");
+        // Allotted Resources
+        List<AllottedResource> arList = new ArrayList<AllottedResource>();
+        AllottedResource ar = new AllottedResource();
+        ar.setResourceId("testResourceIdAR");
+        ar.setNfFunction("testARFunctionName");
+        ModelInfo arModel = new ModelInfo();
+        arModel.setModelCustomizationUuid("testModelCustomizationUuidAR");
+        arModel.setModelInvariantUuid("testModelInvariantIdAR");
+        arModel.setModelName("testModelNameAR");
+        arModel.setModelVersion("testModelVersionAR");
+        arModel.setModelUuid("testARModelUuid");
+        arModel.setModelType("testModelTypeAR");
+        ar.setModelInfo(arModel);
+        AllottedResource ar2 = new AllottedResource();
+        ar2.setResourceId("testResourceIdAR2");
+        ar2.setNfFunction("testAR2FunctionName");
+        ModelInfo arModel2 = new ModelInfo();
+        arModel2.setModelCustomizationUuid("testModelCustomizationUuidAR2");
+        arModel2.setModelInvariantUuid("testModelInvariantIdAR2");
+        arModel2.setModelName("testModelNameAR2");
+        arModel2.setModelVersion("testModelVersionAR2");
+        arModel2.setModelUuid("testAr2ModelUuid");
+        arModel2.setModelType("testModelTypeAR2");
+        ar2.setModelInfo(arModel2);
+        arList.add(ar);
+        arList.add(ar2);
+        // Vnfs
+        List<VnfResource> vnfList = new ArrayList<VnfResource>();
+        VnfResource vnf = new VnfResource();
+        vnf.setResourceId("testResourceIdVNF");
+        vnf.setNfFunction("testVnfFunctionName");
+        ArrayList<CloudFlavor> flavors = new ArrayList<>();
+        CloudFlavor flavor1 = new CloudFlavor("flavorLabel1xxx", "vimFlavorxxx");
+        CloudFlavor flavor2 = new CloudFlavor("flavorLabel2xxx", "vimFlavorxxx");
+        flavors.add(flavor1);
+        flavors.add(flavor2);
+        vnf.getHomingSolution().setFlavors(flavors);
+        ModelInfo vnfModel = new ModelInfo();
+        vnfModel.setModelCustomizationUuid("testModelCustomizationUuidVNF");
+        vnfModel.setModelInvariantUuid("testModelInvariantIdVNF");
+        vnfModel.setModelName("testModelNameVNF");
+        vnfModel.setModelVersion("testModelVersionVNF");
+        vnfModel.setModelUuid("testVnfModelUuid");
+        vnfModel.setModelType("testModelTypeVNF");
+        vnf.setModelInfo(vnfModel);
+        vnfList.add(vnf);
+        System.out.println("SERVICE DECOMP: " + serviceDecomposition.getServiceResourcesJsonString());
+        serviceDecomposition.setModelInfo(sModel);
+        serviceDecomposition.setAllottedResources(arList);
+        serviceDecomposition.setVnfResources(vnfList);
+        serviceDecomposition.setServiceInstance(si);
+
+        // Subscriber
+        subscriber = "{\"globalSubscriberId\": \"SUB12_0322_DS_1201\",\"subscriberCommonSiteId\": \"DALTX0101\",\"subscriberName\": \"SUB_12_0322_DS_1201\"}";
+        subscriber2 = "{\"globalSubscriberId\": \"SUB12_0322_DS_1201\",\"subscriberName\": \"SUB_12_0322_DS_1201\"}";
+    }
+
+    @Test    
+    public void testHoming_success_2AR1Vnf() throws Exception {
+
+        mockOof();
+
+        String businessKey = UUID.randomUUID().toString();
+        Map<String, Object> variables = new HashMap<>();
+        setVariables(variables);
+
+        invokeSubProcess("Homing", businessKey, variables);
+
+        injectWorkflowMessages(callbacks, "oof2");
+
+        waitForProcessEnd(businessKey, 10000);
+
+        //Get Variables
+        WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey,
+                "WorkflowException");
+        ServiceDecomposition serviceDecompositionExp = (ServiceDecomposition) getVariableFromHistory(businessKey,
+                "serviceDecomposition");
+        String expectedOofRequest = (String) getVariableFromHistory(businessKey, "oofRequest");
+
+        Resource resourceAR = serviceDecompositionExp.getServiceResource("testResourceIdAR");
+        HomingSolution resourceARHoming = resourceAR.getHomingSolution();
+        Resource resourceAR2 = serviceDecompositionExp.getServiceResource("testResourceIdAR2");
+        HomingSolution resourceARHoming2 = resourceAR2.getHomingSolution();
+        Resource resourceVNF = serviceDecompositionExp.getServiceResource("testResourceIdVNF");
+        HomingSolution resourceVNFHoming = resourceVNF.getHomingSolution();
+        String resourceARHomingString = resourceARHoming.toString();
+        resourceARHomingString = resourceARHomingString.replaceAll("\\s+", " ");
+        String resourceARHoming2String = resourceARHoming2.toString();
+        resourceARHoming2String = resourceARHoming2String.replaceAll("\\s+", " ");
+        String resourceVNFHomingString = resourceVNFHoming.toString();
+        resourceVNFHomingString = resourceVNFHomingString.replaceAll("\\s+", " ");
+        expectedOofRequest = expectedOofRequest.replaceAll("\\s+", "");
+
+        assertNull(workflowException);
+        assertEquals(homingSolutionService("service", "testSIID1", "MDTNJ01",
+                resourceARHoming.getVnf().getResourceId(),"aic", "dfwtx",
+                "\"f1d563e8-e714-4393-8f99-cc480144a05e\", \"j1d563e8-e714-4393-8f99-cc480144a05e\"",
+                "\"s1d563e8-e714-4393-8f99-cc480144a05e\", \"b1d563e8-e714-4393-8f99-cc480144a05e\""),
+                resourceARHomingString);
+        assertEquals(homingSolutionService("service", "testSIID2", "testVnfHostname2",
+                resourceARHoming2.getVnf().getResourceId(),"aic", "testCloudRegionId2",
+                null, null), resourceARHoming2String);
+        assertEquals(homingSolutionCloud("cloud","aic", "testCloudRegionId3",
+                true, "\"91d563e8-e714-4393-8f99-cc480144a05e\", \"21d563e8-e714-4393-8f99-cc480144a05e\"",
+                "\"31d563e8-e714-4393-8f99-cc480144a05e\", \"71d563e8-e714-4393-8f99-cc480144a05e\""),
+                resourceVNFHomingString);
+        assertEquals(verifyOofRequest(), expectedOofRequest);
+    }
+
+    @Test  
+    public void testHoming_success_2AR1Vnf2Net() throws Exception {
+
+        mockOof();
+
+        String businessKey = UUID.randomUUID().toString();
+        Map<String, Object> variables = new HashMap<>();
+        setVariables2(variables);
+
+        invokeSubProcess("Homing", businessKey, variables);
+
+        injectWorkflowMessages(callbacks, "oof3");
+
+        waitForProcessEnd(businessKey, 10000);
+
+        //Get Variables
+        WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey,
+                "WorkflowException");
+        ServiceDecomposition serviceDecompositionExp = (ServiceDecomposition) getVariableFromHistory(businessKey,
+                "serviceDecomposition");
+        String expectedOofRequest = (String) getVariableFromHistory(businessKey, "oofRequest");
+
+        Resource resourceAR = serviceDecompositionExp.getServiceResource("testResourceIdAR");
+        HomingSolution resourceARHoming = resourceAR.getHomingSolution();
+        Resource resourceAR2 = serviceDecompositionExp.getServiceResource("testResourceIdAR2");
+        HomingSolution resourceARHoming2 = resourceAR2.getHomingSolution();
+        Resource resourceVNF = serviceDecompositionExp.getServiceResource("testResourceIdVNF");
+        HomingSolution resourceVNFHoming = resourceVNF.getHomingSolution();
+        Resource resourceNet = serviceDecompositionExp.getServiceResource("testResourceIdNet");
+        HomingSolution resourceNetHoming = resourceNet.getHomingSolution();
+        Resource resourceNet2 = serviceDecompositionExp.getServiceResource("testResourceIdNet2");
+        HomingSolution resourceNetHoming2 = resourceNet2.getHomingSolution();
+
+        String resourceARHomingString = resourceARHoming.toString();
+        resourceARHomingString = resourceARHomingString.replaceAll("\\s+", " ");
+        String resourceARHoming2String = resourceARHoming2.toString();
+        resourceARHoming2String = resourceARHoming2String.replaceAll("\\s+", " ");
+        String resourceVNFHomingString = resourceVNFHoming.toString();
+        resourceVNFHomingString = resourceVNFHomingString.replaceAll("\\s+", " ");
+        String resourceNetHomingString = resourceNetHoming.toString();
+        resourceNetHomingString = resourceNetHomingString.replaceAll("\\s+", " ");
+        String resourceNetHoming2String = resourceNetHoming2.toString();
+        resourceNetHoming2String = resourceNetHoming2String.replaceAll("\\s+", " ");
+        expectedOofRequest = expectedOofRequest.replaceAll("\\s+", "");
+
+
+        assertNull(workflowException);
+        assertEquals(homingSolutionService("service", "testSIID1", "MDTNJ01",
+                resourceARHoming.getVnf().getResourceId(),"aic", "dfwtx",
+                "\"f1d563e8-e714-4393-8f99-cc480144a05e\", \"j1d563e8-e714-4393-8f99-cc480144a05e\"",
+                "\"s1d563e8-e714-4393-8f99-cc480144a05e\", \"b1d563e8-e714-4393-8f99-cc480144a05e\""),
+                resourceARHomingString);
+        assertEquals(homingSolutionService("service", "testSIID2", "testVnfHostname2",
+                resourceARHoming2.getVnf().getResourceId(),
+                "aic", "testCloudRegionId2",
+                null, null), resourceARHoming2String);
+        assertEquals(homingSolutionCloud("cloud","aic",
+                "testCloudRegionId3",
+                true, "\"91d563e8-e714-4393-8f99-cc480144a05e\", \"21d563e8-e714-4393-8f99-cc480144a05e\"",
+                "\"31d563e8-e714-4393-8f99-cc480144a05e\", \"71d563e8-e714-4393-8f99-cc480144a05e\""),
+                resourceVNFHomingString);
+        assertEquals(homingSolutionService("service", "testServiceInstanceIdNet",
+                "testVnfHostNameNet", resourceNetHoming.getVnf().getResourceId(),"aic",
+                "testCloudRegionIdNet",
+                null, null), resourceNetHomingString);
+        assertEquals(homingSolutionCloud("cloud", "aic",
+                "testCloudRegionIdNet2",
+                false, "\"f1d563e8-e714-4393-8f99-cc480144a05n\", \"j1d563e8-e714-4393-8f99-cc480144a05n\"",
+                "\"s1d563e8-e714-4393-8f99-cc480144a05n\", \"b1d563e8-e714-4393-8f99-cc480144a05n\""),
+                resourceNetHoming2String);
+        assertEquals(verifyOofRequest(), expectedOofRequest);
+
+    }
+
+    @Test
+    public void testHoming_success_vnfResourceList() throws Exception {
+
+        // Create a Service Decomposition
+        MockGetServiceResourcesCatalogDataByModelUuid("2f7f309d-c842-4644-a2e4-34167be5eeb4",
+                "/BuildingBlocks/oofCatalogResp.json");
+        String busKey = UUID.randomUUID().toString();
+        Map<String, Object> vars = new HashMap<>();
+        setVariablesForServiceDecomposition(vars, "testRequestId123",
+                "ff5256d2-5a33-55df-13ab-12abad84e7ff");
+        invokeSubProcess("DecomposeService", busKey, vars);
+
+        ServiceDecomposition sd = (ServiceDecomposition) getVariableFromHistory(busKey, "serviceDecomposition");
+        System.out.println("In testHoming_success_vnfResourceList, ServiceDecomposition = " + sd);
+        List<VnfResource> vnfResourceList = sd.getVnfResources();
+        vnfResourceList.get(0).setResourceId("test-resource-id-000");
+
+        // Invoke Homing
+
+        mockOof();
+
+        String businessKey = UUID.randomUUID().toString();
+        Map<String, Object> variables = new HashMap<>();
+        variables.put("homingService", "oof");
+        variables.put("isDebugLogEnabled", "true");
+        variables.put("msoRequestId", "testRequestId");
+        variables.put("serviceInstanceId", "testServiceInstanceId");
+        variables.put("serviceDecomposition", sd);
+        variables.put("subscriberInfo", subscriber2);
+        HashMap customerLocation = new HashMap<String, Object>();
+        customerLocation.put("customerLatitude", "32.89748");
+        customerLocation.put("customerLongitude", "-97.040443");
+        customerLocation.put("customerName", "xyz");
+        variables.put("customerLatitude", "32.89748");
+        variables.put("customerLongitude", "-97.040443");
+        variables.put("customerName", "xyz");
+        variables.put("customerLocation", customerLocation);
+        variables.put("cloudOwner", "amazon");
+        variables.put("cloudRegionId", "TNZED");
+
+        invokeSubProcess("Homing", businessKey, variables);
+        injectWorkflowMessages(callbacks, "oof3");
+        waitForProcessEnd(businessKey, 10000);
+
+        //Get Variables
+
+        WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey,
+                "WorkflowException");
+        ServiceDecomposition serviceDecompositionExp = (ServiceDecomposition) getVariableFromHistory(businessKey,
+                "serviceDecomposition");
+        System.out.println("serviceDecompositionExp is: " + serviceDecompositionExp);
+
+        Resource resourceVnf = serviceDecompositionExp.getServiceResource("test-resource-id-000");
+        System.out.println("resourceVnf is: " + resourceVnf);
+        HomingSolution resourceVnfHoming = resourceVnf.getHomingSolution();
+
+        String resourceVnfHomingString = resourceVnfHoming.toString();
+        System.out.println("resourceVnfHomingString is: " + resourceVnfHomingString);
+        resourceVnfHomingString = resourceVnfHomingString.replaceAll("\\s+", " ");
+        System.out.println("Now resourceVnfHomingString is: " + resourceVnfHomingString);
+
+        assertNull(workflowException);
+
+        //Verify request
+        String oofRequest = (String) getVariableFromHistory(businessKey, "oofRequest");
+        System.out.println("oofRequest is: " + oofRequest);
+        assertEquals(FileUtil.readResourceFile("__files/BuildingBlocks/oofRequest_infravnf").
+                replaceAll("\n", "").replaceAll("\r", "").
+                replaceAll("\t", ""), oofRequest.replaceAll("\n", "").
+                replaceAll("\r", "").replaceAll("\t", ""));
+
+        //System.out.println("resourceVnfHoming.getVnf().getResourceId() is: " + resourceVnfHoming.getVnf().getResourceId());
+
+        assertEquals(homingSolutionService("service", "service-instance-01234",
+                "MDTNJ01", "test-resource-id-000","att-aic",
+                "mtmnj1a",
+                "\"f1d563e8-e714-4393-8f99-cc480144a05e\"," +
+                        " \"j1d563e8-e714-4393-8f99-cc480144a05e\"",
+                "\"s1d563e8-e714-4393-8f99-cc480144a05e\"," +
+                        " \"b1d563e8-e714-4393-8f99-cc480144a05e\""), resourceVnfHomingString);
+    }
+
+    @Test   
+    public void testHoming_success_existingLicense() throws Exception {
+
+        mockOof();
+
+        String businessKey = UUID.randomUUID().toString();
+        Map<String, Object> variables = new HashMap<String, Object>();
+        setVariablesExistingLicense(variables);
+
+        invokeSubProcess("Homing", businessKey, variables);
+
+        injectWorkflowMessages(callbacks, "sniro");
+
+        waitForProcessEnd(businessKey, 10000);
+
+        //Get Variables
+        WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
+        ServiceDecomposition serviceDecompositionExp = (ServiceDecomposition) getVariableFromHistory(businessKey, "serviceDecomposition");
+        String oofRequest = (String) getVariableFromHistory(businessKey, "sniroRequest");
+
+        Resource resourceAR = serviceDecompositionExp.getServiceResource("testResourceIdAR");
+        HomingSolution resourceARHoming = (HomingSolution) resourceAR.getHomingSolution();
+        Resource resourceAR2 = serviceDecompositionExp.getServiceResource("testResourceIdAR2");
+        HomingSolution resourceARHoming2 = (HomingSolution) resourceAR2.getHomingSolution();
+        Resource resourceVNF = serviceDecompositionExp.getServiceResource("testResourceIdVNF");
+        HomingSolution resourceVNFHoming = (HomingSolution) resourceVNF.getHomingSolution();
+        String resourceARHomingString = resourceARHoming.toString();
+        resourceARHomingString = resourceARHomingString.replaceAll("\\s+", " ");
+        String resourceARHoming2String = resourceARHoming2.toString();
+        resourceARHoming2String = resourceARHoming2String.replaceAll("\\s+", " ");
+        String resourceVNFHomingString = resourceVNFHoming.toString();
+        resourceVNFHomingString = resourceVNFHomingString.replaceAll("\\s+", " ");
+        oofRequest = oofRequest.replaceAll("\\s+", "");
+
+        assertNull(workflowException);
+        assertEquals(homingSolutionService("service", "testSIID1", "MDTNJ01",
+                "aic", "dfwtx", "KDTNJ01",
+                "\"f1d563e8-e714-4393-8f99-cc480144a05e\", \"j1d563e8-e714-4393-8f99-cc480144a05e\"",
+                "\"s1d563e8-e714-4393-8f99-cc480144a05e\", \"b1d563e8-e714-4393-8f99-cc480144a05e\""),
+                resourceARHomingString);
+        assertEquals(homingSolutionService("service", "testSIID2", "testVnfHostname2",
+                resourceARHoming2.getVnf().getResourceId(),"aic", "testCloudRegionId2",
+                null, null), resourceARHoming2String);
+        assertEquals(homingSolutionCloud("cloud", "aic",
+                "testCloudRegionId3",
+                false, "\"91d563e8-e714-4393-8f99-cc480144a05e\", \"21d563e8-e714-4393-8f99-cc480144a05e\"",
+                "\"31d563e8-e714-4393-8f99-cc480144a05e\", \"71d563e8-e714-4393-8f99-cc480144a05e\""),
+                resourceVNFHomingString);
+        assertEquals(verifyOofRequestExistingLicense(), oofRequest);
+
+    }
+
+    @Test  
+    public void testHoming_error_inputVariable() throws Exception {
+
+        String businessKey = UUID.randomUUID().toString();
+        Map<String, Object> variables = new HashMap<>();
+        setVariables3(variables);
+
+        invokeSubProcess("Homing", businessKey, variables);
+
+        waitForProcessEnd(businessKey, 10000);
+
+        //Get Variables
+        WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey,
+                "WorkflowException");
+
+        assertEquals("WorkflowException[processKey=Homing,errorCode=4000,errorMessage=A required " +
+                "input variable is missing or null,workStep=*]", workflowException.toString());
+    }
+
+    @Test  
+    public void testHoming_error_badResponse() throws Exception {
+        mockOof_500();
+
+        String businessKey = UUID.randomUUID().toString();
+        Map<String, Object> variables = new HashMap<>();
+        setVariables(variables);
+
+        invokeSubProcess("Homing", businessKey, variables);
+
+        waitForProcessEnd(businessKey, 10000);
+
+        //Get Variables
+        WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey,
+                "WorkflowException");
+
+        assertEquals("WorkflowException[processKey=Homing,errorCode=401,errorMessage=Internal Error - BasicAuth value null,workStep=*]", workflowException.toString());
+    }
+
+    @Test   
+    public void testHoming_error_oofNoSolution() throws Exception {
+        mockOof();
+
+        String businessKey = UUID.randomUUID().toString();
+        Map<String, Object> variables = new HashMap<>();
+        setVariables(variables);
+
+        invokeSubProcess("Homing", businessKey, variables);
+
+        injectWorkflowMessages(callbacks, "oofNoSol");
+
+        waitForProcessEnd(businessKey, 10000);
+
+        //Get Variables
+        WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey,
+                "WorkflowException");
+        Boolean errorMatch = workflowException.toString().contains("WorkflowException[processKey=Homing,errorCode=400,errorMessage=OOF Async Callback " +
+                        "Response contains error: Unable to find any candidate for demand *** Response:");
+        assert(errorMatch);
+    }
+
+    @Test  
+    public void testHoming_error_oofPolicyException() throws Exception {
+        mockOof();
+
+        String businessKey = UUID.randomUUID().toString();
+        Map<String, Object> variables = new HashMap<>();
+        setVariables(variables);
+
+        invokeSubProcess("Homing", businessKey, variables);
+
+        injectWorkflowMessages(callbacks, "oofPolicyEx");
+
+        waitForProcessEnd(businessKey, 10000);
+
+        //Get Variables
+        WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey,
+                "WorkflowException");
+
+        assertEquals("WorkflowException[processKey=Homing,errorCode=400,errorMessage=OOF Async Callback " +
+                "Response contains a Request Error Policy Exception: Message content size exceeds the allowable " +
+                "limit]", workflowException.toString());
+    }
+
+    @Test   
+    public void testHoming_error_oofServiceException() throws Exception {
+        mockOof();
+
+        String businessKey = UUID.randomUUID().toString();
+        Map<String, Object> variables = new HashMap<>();
+        setVariables(variables);
+
+        invokeSubProcess("Homing", businessKey, variables);
+        injectWorkflowMessages(callbacks, "oofServiceEx");
+        waitForProcessEnd(businessKey, 10000);
+
+        //Get Variables
+        WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey,
+                "WorkflowException");
+
+        assertEquals("WorkflowException[processKey=Homing,errorCode=400,errorMessage=OOF Async Callback " +
+                        "Response contains a Request Error Service Exception: OOF PlacementError: " +
+                        "requests.exceptions.HTTPError: 404 Client Error: Not Found for " +
+                        "url: http://192.168.171.200:8091/v1/plans/97b4e303-5f75-492c-8fb2-21098281c8b8]",
+                workflowException.toString());
+    }
+
+
+    private void setVariables(Map<String, Object> variables) {
+        variables.put("homingService", "oof");
+        HashMap customerLocation = new HashMap<String, Object>();
+        customerLocation.put("customerLatitude", "32.89748");
+        customerLocation.put("customerLongitude", "-97.040443");
+        customerLocation.put("customerName", "xyz");
+        variables.put("customerLatitude", "32.89748");
+        variables.put("customerLongitude", "-97.040443");
+        variables.put("customerName", "xyz");
+        variables.put("customerLocation", customerLocation);
+        variables.put("cloudOwner", "amazon");
+        variables.put("cloudRegionId", "TNZED");
+        variables.put("vgMuxInfraModelInvariantId", "testModelInvariantIdAR");
+        variables.put("vgMuxInfraModelId", "testArModelUuid");
+        //	variables.put("mso-request-id", "testRequestId");
+        variables.put("msoRequestId", "testRequestId");
+        variables.put("serviceInstanceId", "testServiceInstanceId123");
+        variables.put("serviceInstanceName", "testServiceName");
+        variables.put("serviceDecomposition", serviceDecomposition);
+        variables.put("subscriberInfo", subscriber2);
+    }
+
+    private void setVariables2(Map<String, Object> variables) {
+        List<NetworkResource> netList = new ArrayList<NetworkResource>();
+        NetworkResource net = new NetworkResource();
+        net.setResourceId("testResourceIdNet");
+        ModelInfo netModel = new ModelInfo();
+        netModel.setModelCustomizationUuid("testModelCustomizationUuidNet");
+        netModel.setModelInvariantUuid("testModelInvariantIdNet");
+        netModel.setModelName("testModelNameNet");
+        netModel.setModelVersion("testModelVersionNet");
+        net.setModelInfo(netModel);
+        netList.add(net);
+        NetworkResource net2 = new NetworkResource();
+        net2.setResourceId("testResourceIdNet2");
+        ModelInfo netModel2 = new ModelInfo();
+        netModel2.setModelCustomizationUuid("testModelCustomizationUuidNet2");
+        netModel2.setModelCustomizationName("testModelCustomizationNameNet2");
+        netModel2.setModelInvariantUuid("testModelInvariantIdNet2");
+        netModel2.setModelName("testModelNameNet2");
+        netModel2.setModelVersion("testModelVersionNet2");
+        net2.setModelInfo(netModel2);
+        netList.add(net2);
+        serviceDecomposition.setNetworkResources(netList);
+
+        variables.put("homingService", "oof");
+        HashMap customerLocation = new HashMap<String, Object>();
+        customerLocation.put("customerLatitude", "32.89748");
+        customerLocation.put("customerLongitude", "-97.040443");
+        customerLocation.put("customerName", "xyz");
+        variables.put("customerLatitude", "32.89748");
+        variables.put("customerLongitude", "-97.040443");
+        variables.put("customerName", "xyz");
+        variables.put("customerLocation", customerLocation);
+        variables.put("cloudOwner", "amazon");
+        variables.put("cloudRegionId", "TNZED");
+        variables.put("vgMuxInfraModelInvariantId", "testModelInvariantIdAR");
+        variables.put("vgMuxInfraModelId", "testArModelUuid");
+        variables.put("isDebugLogEnabled", "true");
+        variables.put("msoRequestId", "testRequestId");
+        variables.put("serviceInstanceId", "testServiceInstanceId123");
+        variables.put("serviceInstanceName", "testServiceName");
+        variables.put("serviceDecomposition", serviceDecomposition);
+        variables.put("subscriberInfo", subscriber2);
+    }
+
+    private void setVariables3(Map<String, Object> variables) {
+        variables.put("homingService", "oof");
+        HashMap customerLocation = new HashMap<String, Object>();
+        customerLocation.put("customerLatitude", "32.89748");
+        customerLocation.put("customerLongitude", "-97.040443");
+        customerLocation.put("customerName", "xyz");
+        variables.put("customerLatitude", "32.89748");
+        variables.put("customerLongitude", "-97.040443");
+        variables.put("customerName", "xyz");
+        variables.put("customerLocation", customerLocation);
+        variables.put("cloudOwner", "amazon");
+        variables.put("cloudRegionId", "TNZED");
+        variables.put("vgMuxInfraModelInvariantId", "testModelInvariantIdAR");
+        variables.put("vgMuxInfraModelId", "testArModelUuid");
+        variables.put("isDebugLogEnabled", "true");
+        //	variables.put("mso-request-id", "testRequestId");
+        variables.put("msoRequestId", "testRequestId");
+        variables.put("serviceInstanceId", "testServiceInstanceId123");
+        variables.put("serviceInstanceName", "testServiceName");
+        variables.put("serviceDecomposition", null);
+        variables.put("subscriberInfo", subscriber2);
+    }
+
+    private void setVariablesExistingLicense(Map<String, Object> variables) {
+        HomingSolution currentHomingSolution = new HomingSolution();
+        serviceDecomposition.getVnfResources().get(0).setCurrentHomingSolution(currentHomingSolution);
+        serviceDecomposition.getVnfResources().get(0).getCurrentHomingSolution().getLicense().addEntitlementPool("testEntitlementPoolId1");
+        serviceDecomposition.getVnfResources().get(0).getCurrentHomingSolution().getLicense().addEntitlementPool("testEntitlementPoolId2");
+
+        serviceDecomposition.getVnfResources().get(0).getCurrentHomingSolution().getLicense().addLicenseKeyGroup("testLicenseKeyGroupId1");
+        serviceDecomposition.getVnfResources().get(0).getCurrentHomingSolution().getLicense().addLicenseKeyGroup("testLicenseKeyGroupId2");
+
+        variables.put("isDebugLogEnabled", "true");
+        variables.put("msoRequestId", "testRequestId");
+        variables.put("serviceInstanceId", "testServiceInstanceId");
+        variables.put("serviceDecomposition", serviceDecomposition);
+        variables.put("subscriberInfo", subscriber2);
+
+    }
+
+    private String homingSolutionService(String type, String serviceInstanceId, String vnfHostname,
+                                         String vnfResourceId, String cloudOwner,
+                                         String cloudRegionId, String enList,
+                                         String licenseList){
+
+        String solution = "";
+        if(enList == null){
+            solution = "{ \"homingSolution\" : { \"inventoryType\" : \"" + type + "\", \"serviceInstanceId\" : \"" +
+                    serviceInstanceId + "\", \"cloudOwner\" : \"" + cloudOwner + "\", \"cloudRegionId\" : \"" +
+                    cloudRegionId + "\", " + "\"vnf\" : { \"resourceId\" : \"" + vnfResourceId +
+                    "\", \"resourceType\" : \"VNF\", \"resourceInstance\" : { }, \"homingSolution\" : { \"license\" :" +
+                    " { }, \"rehome\" : false }, \"vnfHostname\" : \"" + vnfHostname + "\" }, \"license\" : { }," +
+                    " \"rehome\" : false } }";
+        }else{
+            //language=JSON
+            solution = "{ \"homingSolution\" : { \"inventoryType\" : \"" + type + "\", \"serviceInstanceId\" : \"" +
+                    serviceInstanceId + "\", \"cloudOwner\" : \"" + cloudOwner + "\", \"cloudRegionId\" : \"" +
+                    cloudRegionId + "\", \"vnf\" : { \"resourceId\" : \"" + vnfResourceId + "\", \"resourceType\" :" +
+                    " \"VNF\", \"resourceInstance\" : { }, \"homingSolution\" : { \"license\" : { }, \"rehome\" :" +
+                    " false }, \"vnfHostname\" : \"" + vnfHostname + "\" }, \"license\" : { \"entitlementPoolList\" :" +
+                    " [ " + enList + " ], \"licenseKeyGroupList\" : [ " + licenseList + " ] }, \"rehome\" : false } }";
+        }
+        return solution;
+    }
+
+    private String homingSolutionCloud(String type, String cloudOwner,
+                                       String cloudRegionId, Boolean flavors, String enList,
+                                       String licenseList){
+        String solution = "";
+        if(enList == null){
+            solution = "{ \"homingSolution\" : { \"inventoryType\" : \"" + type + "\", \"cloudOwner\" : \"" +
+                    cloudOwner + "\", \"cloudRegionId\" : \"" + cloudRegionId +
+                    "\", \"license\" : { }, \"rehome\" : false } }";
+        } else if (flavors && enList == null){
+            solution = "{ \"homingSolution\" : { \"inventoryType\" : \"" + type + "\", \"cloudOwner\" : \"" +
+                    cloudOwner + "\", \"cloudRegionId\" : \"" + cloudRegionId +
+                    "\", \"flavors\" :  [ { \"flavorLabel\" : \"flavorLabel2xxx\", \"flavor\" : \"vimFlavorxxx\" }, " +
+                    "{ \"flavorLabel\" : \"flavorLabel1xxx\", \"flavor\" : \"vimFlavorxxx\" } ], " +
+                    "\"license\" : { }, \"rehome\" : false } }";
+        } else if (flavors) {
+            solution = "{ \"homingSolution\" : { \"inventoryType\" : \"" + type + "\", \"cloudOwner\" : \"" +
+                    cloudOwner + "\", \"cloudRegionId\" : \"" + cloudRegionId +
+                    "\", \"flavors\" : [ { \"flavorLabel\" : \"flavorLabel2xxx\", \"flavor\" : \"vimFlavorxxx\" }, " +
+                    "{ \"flavorLabel\" : \"flavorLabel1xxx\", \"flavor\" : \"vimFlavorxxx\" } ], " +
+                    "\"license\" : { \"entitlementPoolList\" : [ " + enList +  " ], \"licenseKeyGroupList\" : [ " +
+                    licenseList +  " ] }, \"rehome\" : false } }";
+        } else {
+            solution = "{ \"homingSolution\" : { \"inventoryType\" : \"" + type + "\", \"cloudOwner\" : \"" +
+                    cloudOwner + "\", \"cloudRegionId\" : \"" + cloudRegionId +
+                    "\", \"license\" : { \"entitlementPoolList\" : [ " + enList +  " ], \"licenseKeyGroupList\" : [ " +
+                    licenseList +  " ] }, \"rehome\" : false } }";
+        }
+        return solution;
+    }
+
+    private void setVariablesForServiceDecomposition(Map<String, Object> variables, String requestId, String siId) {
+        variables.put("homingService", "oof");
+        variables.put("isDebugLogEnabled", "true");
+        variables.put("mso-request-id", requestId);
+        variables.put("msoRequestId", requestId);
+        variables.put("serviceInstanceId", siId);
+        HashMap customerLocation = new HashMap<String, Object>();
+        customerLocation.put("customerLatitude", "32.89748");
+        customerLocation.put("customerLongitude", "-97.040443");
+        customerLocation.put("customerName", "xyz");
+        variables.put("customerLatitude", "32.89748");
+        variables.put("customerLongitude", "-97.040443");
+        variables.put("customerName", "xyz");
+        variables.put("customerLocation", customerLocation);
+        variables.put("cloudOwner", "amazon");
+        variables.put("cloudRegionId", "TNZED");
+
+
+        String serviceModelInfo = "{\"modelInvariantId\":\"1cc4e2e4-eb6e-404d-a66f-c8733cedcce8\",\"modelUuid\":" +
+                "\"2f7f309d-c842-4644-a2e4-34167be5eeb4\",\"modelName\":\"vCPE Service\",\"modelVersion\":\"2.0\",}";
+        variables.put("serviceModelInfo", serviceModelInfo);
+    }
+
+    private String verifyOofRequest() {
+        String request = "{\"requestInfo\":{\"transactionId\":\"testRequestId\",\"requestId\":\"testRequestId\"," +
+                "\"callbackUrl\":\"http://localhost:28090/workflows/messages/message/oofResponse/testRequestId\"," +
+                "\"sourceId\":\"so\",\"requestType\":\"create\",\"numSolutions\":1,\"optimizers\":[\"placement\"]," +
+                "\"timeout\":600},\"placementInfo\":{\"requestParameters\":{\"customerLatitude\":" +
+                "\"32.89748\",\"customerLongitude\":\"-97.040443\",\"customerName\":\"xyz\"},\"subscriberInfo\":" +
+                "{\"globalSubscriberId\":\"SUB12_0322_DS_1201\",\"subscriberName\":\"SUB_12_0322_DS_1201\"," +
+                "\"subscriberCommonSiteId\":\"\"},\"placementDemands\":[{\"resourceModuleName\":\"testARFunctionName\"" +
+                ",\"serviceResourceId\":\"testResourceIdAR\",\"tenantId\":" +
+                "\"\",\"resourceModelInfo\":{\"modelInvariantId\":\"no-resourceModelInvariantId\"," +
+                "\"modelVersionId\":\"no-resourceModelVersionId\",\"modelName\":\"\",\"modelType\":" +
+                "\"\",\"modelVersion\":\"\",\"modelCustomizationName\":\"\"}}," +
+                "{\"resourceModuleName\":\"testAR2FunctionName\",\"serviceResourceId\":\"testResourceIdAR2\"," +
+                "\"tenantId\":\"\",\"resourceModelInfo\":{\"modelInvariantId\":\"no-resourceModelInvariantId\"," +
+                "\"modelVersionId\":\"no-resourceModelVersionId\",\"modelName\":\"\"," +
+                "\"modelType\":\"\",\"modelVersion\":\"\"," +
+                "\"modelCustomizationName\":\"\"}},{\"resourceModuleName\":\"testVnfFunctionName\",\"serviceResourceId\":\"" +
+                "testResourceIdVNF\",\"tenantId\":\"\",\"resourceModelInfo\":{\"modelInvariantId\"" +
+                ":\"testModelInvariantIdVNF\",\"modelVersionId\":\"testVnfModelUuid\",\"modelName\":\"" +
+                "testModelNameVNF\",\"modelType\":\"testModelTypeVNF\",\"modelVersion\":\"testModelVersionVNF\"" +
+                ",\"modelCustomizationName\":\"\"}}]},\"serviceInfo\":" +
+                "{\"serviceInstanceId\":\"testServiceInstanceId123\"," +
+                "\"serviceName\":\"testServiceName\",\"modelInfo\":{\"modelType\":\"\",\"modelInvariantId\":" +
+                "\"testModelInvariantId\",\"modelVersionId\":\"testModelUuid\",\"modelName\":\"testModelName\"," +
+                "\"modelVersion\":\"testModelVersion\",\"modelCustomizationName\":\"" +
+                "\"}}}";
+        return request;
+    }
+
+    private String verifyOofRequestExistingLicense(){
+        String request = "{\"requestInfo\":{\"transactionId\":\"testRequestId\",\"requestId\":\"testRequestId\"," +
+                "\"callbackUrl\":\"http://localhost:28090/workflows/messages/message/SNIROResponse/testRequestId\"," +
+                "\"sourceId\":\"mso\",\"requestType\":\"speedchanged\",\"optimizer\":[\"placement\",\"license\"]," +
+                "\"numSolutions\":1,\"timeout\":1800},\"placementInfo\":{\"serviceModelInfo\":{\"modelType\":\"\"," +
+                "\"modelInvariantId\":\"testModelInvariantId\",\"modelVersionId\":\"testModelUuid\",\"modelName\":" +
+                "\"testModelName\",\"modelVersion\":\"testModelVersion\"},\"subscriberInfo\":" +
+                "{\"globalSubscriberId\":\"SUB12_0322_DS_1201\",\"subscriberName\":\"SUB_12_0322_DS_1201\"," +
+                "\"subscriberCommonSiteId\":\"\"},\"demandInfo\":{\"placementDemand\":[{\"resourceInstanceType\":" +
+                "\"ALLOTTED_RESOURCE\",\"serviceResourceId\":\"testResourceIdAR\",\"resourceModuleName\":\"\"," +
+                "\"resourceModelInfo\":{\"modelCustomizationId\":\"testModelCustomizationUuidAR\"," +
+                "\"modelInvariantId\":\"testModelInvariantIdAR\",\"modelName\":\"testModelNameAR\"," +
+                "\"modelVersion\":\"testModelVersionAR\",\"modelVersionId\":\"testARModelUuid\",\"modelType\":" +
+                "\"testModelTypeAR\"},\"tenantId\":\"\",\"tenantName\":\"\"},{\"resourceInstanceType\":" +
+                "\"ALLOTTED_RESOURCE\",\"serviceResourceId\":\"testResourceIdAR2\",\"resourceModuleName\":" +
+                "\"\",\"resourceModelInfo\":{\"modelCustomizationId\":\"testModelCustomizationUuidAR2\"," +
+                "\"modelInvariantId\":\"testModelInvariantIdAR2\",\"modelName\":\"testModelNameAR2\"," +
+                "\"modelVersion\":\"testModelVersionAR2\",\"modelVersionId\":\"testAr2ModelUuid\"," +
+                "\"modelType\":\"testModelTypeAR2\"},\"tenantId\":\"\",\"tenantName\":\"\"}],\"licenseDemand\":" +
+                "[{\"resourceInstanceType\":\"VNF\",\"serviceResourceId\":\"testResourceIdVNF\"," +
+                "\"resourceModuleName\":\"\",\"resourceModelInfo\":{\"modelCustomizationId\":" +
+                "\"testModelCustomizationUuidVNF\",\"modelInvariantId\":\"testModelInvariantIdVNF\"," +
+                "\"modelName\":\"testModelNameVNF\",\"modelVersion\":\"testModelVersionVNF\"," +
+                "\"modelVersionId\":\"testVnfModelUuid\",\"modelType\":\"testModelTypeVNF\"}," +
+                "\"existingLicense\":[{\"entitlementPoolUUID\":[\"testEntitlementPoolId1\"," +
+                "\"testEntitlementPoolId2\"],\"licenseKeyGroupUUID\":[\"testLicenseKeyGroupId1\"," +
+                "\"testLicenseKeyGroupId2\"]}]}]},\"policyId\":[],\"serviceInstanceId\":" +
+                "\"testServiceInstanceId123\",\"orderInfo\":\"{\\\"requestParameters\\\":null}\"}}";
+        return request;
+    }
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/OofHomingTestIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/OofHomingTestIT.java
new file mode 100644
index 0000000..33e4443
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/OofHomingTestIT.java
@@ -0,0 +1,771 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common;
+
+
+import org.junit.Ignore;
+import org.junit.Test;
+import org.onap.so.BaseIntegrationTest;
+import org.onap.so.bpmn.core.WorkflowException;
+import org.onap.so.bpmn.core.domain.AllottedResource;
+import org.onap.so.bpmn.core.domain.CloudFlavor;
+import org.onap.so.bpmn.core.domain.HomingSolution;
+import org.onap.so.bpmn.core.domain.ModelInfo;
+import org.onap.so.bpmn.core.domain.NetworkResource;
+import org.onap.so.bpmn.core.domain.Resource;
+import org.onap.so.bpmn.core.domain.ServiceDecomposition;
+import org.onap.so.bpmn.core.domain.ServiceInstance;
+import org.onap.so.bpmn.core.domain.VnfResource;
+import org.onap.so.bpmn.mock.FileUtil;
+import org.onap.so.logger.MsoLogger;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.onap.so.bpmn.mock.StubResponseDatabase.MockGetServiceResourcesCatalogDataByModelUuid;
+import static org.onap.so.bpmn.mock.StubResponseOof.mockOof;
+import static org.onap.so.bpmn.mock.StubResponseOof.mockOof_500;
+
+
+/**
+ * Test the OOF Homing subflow building block.
+ */
+@Ignore
+public class OofHomingTestIT extends BaseIntegrationTest {
+
+	MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,CreateAAIVfModuleIT.class);
+
+    ServiceDecomposition serviceDecomposition = new ServiceDecomposition();
+    String subscriber = "";
+    String subscriber2 = "";
+
+    private final CallbackSet callbacks = new CallbackSet();
+
+    public OofHomingTestIT() throws IOException {
+        String oofCallback = FileUtil.readResourceFile("__files/BuildingBlocks/oofCallbackInfraVnf");
+        String oofCallback2 = FileUtil.readResourceFile("__files/BuildingBlocks/oofCallback2AR1Vnf");
+        String oofCallback3 = FileUtil.readResourceFile("__files/BuildingBlocks/oofCallback2AR1Vnf2Net");
+
+        String oofCallbackNoSolution = FileUtil.
+                readResourceFile("__files/BuildingBlocks/oofCallbackNoSolutionFound");
+        String oofCallbackPolicyException = FileUtil.
+                readResourceFile("__files/BuildingBlocks/oofCallbackPolicyException");
+        String oofCallbackServiceException = FileUtil.
+                readResourceFile("__files/BuildingBlocks/oofCallbackServiceException");
+
+        callbacks.put("oof", JSON, "oofResponse", oofCallback);
+        callbacks.put("oof2", JSON, "oofResponse", oofCallback2);
+        callbacks.put("oof3", JSON, "oofResponse", oofCallback3);
+        callbacks.put("oofNoSol", JSON, "oofResponse", oofCallbackNoSolution);
+        callbacks.put("oofPolicyEx", JSON, "oofResponse", oofCallbackPolicyException);
+        callbacks.put("oofServiceEx", JSON, "oofResponse", oofCallbackServiceException);
+
+        // Service Model
+        ModelInfo sModel = new ModelInfo();
+        sModel.setModelCustomizationName("testModelCustomizationName");
+        sModel.setModelInstanceName("testModelInstanceName");
+        sModel.setModelInvariantUuid("testModelInvariantId");
+        sModel.setModelName("testModelName");
+        sModel.setModelUuid("testModelUuid");
+        sModel.setModelVersion("testModelVersion");
+        // Service Instance
+        ServiceInstance si = new ServiceInstance();
+        si.setInstanceId("testServiceInstanceId123");
+        // Allotted Resources
+        List<AllottedResource> arList = new ArrayList<AllottedResource>();
+        AllottedResource ar = new AllottedResource();
+        ar.setResourceId("testResourceIdAR");
+        ar.setResourceInstanceName("testARInstanceName");
+        ModelInfo arModel = new ModelInfo();
+        arModel.setModelCustomizationUuid("testModelCustomizationUuidAR");
+        arModel.setModelInvariantUuid("testModelInvariantIdAR");
+        arModel.setModelName("testModelNameAR");
+        arModel.setModelVersion("testModelVersionAR");
+        arModel.setModelUuid("testARModelUuid");
+        arModel.setModelType("testModelTypeAR");
+        ar.setModelInfo(arModel);
+        AllottedResource ar2 = new AllottedResource();
+        ar2.setResourceId("testResourceIdAR2");
+        ar2.setResourceInstanceName("testAR2InstanceName");
+        ModelInfo arModel2 = new ModelInfo();
+        arModel2.setModelCustomizationUuid("testModelCustomizationUuidAR2");
+        arModel2.setModelInvariantUuid("testModelInvariantIdAR2");
+        arModel2.setModelName("testModelNameAR2");
+        arModel2.setModelVersion("testModelVersionAR2");
+        arModel2.setModelUuid("testAr2ModelUuid");
+        arModel2.setModelType("testModelTypeAR2");
+        ar2.setModelInfo(arModel2);
+        arList.add(ar);
+        arList.add(ar2);
+        // Vnfs
+        List<VnfResource> vnfList = new ArrayList<VnfResource>();
+        VnfResource vnf = new VnfResource();
+        vnf.setResourceId("testResourceIdVNF");
+        vnf.setResourceInstanceName("testVnfInstanceName");
+        ArrayList<CloudFlavor> flavors = new ArrayList<>();
+        CloudFlavor flavor1 = new CloudFlavor("flavorLabel1xxx", "vimFlavorxxx");
+        CloudFlavor flavor2 = new CloudFlavor("flavorLabel2xxx", "vimFlavorxxx");
+        flavors.add(flavor1);
+        flavors.add(flavor2);
+        vnf.getHomingSolution().setFlavors(flavors);
+        ModelInfo vnfModel = new ModelInfo();
+        vnfModel.setModelCustomizationUuid("testModelCustomizationUuidVNF");
+        vnfModel.setModelInvariantUuid("testModelInvariantIdVNF");
+        vnfModel.setModelName("testModelNameVNF");
+        vnfModel.setModelVersion("testModelVersionVNF");
+        vnfModel.setModelUuid("testVnfModelUuid");
+        vnfModel.setModelType("testModelTypeVNF");
+        vnf.setModelInfo(vnfModel);
+        vnfList.add(vnf);
+        logger.debug("SERVICE DECOMP: " + serviceDecomposition.getServiceResourcesJsonString());
+        serviceDecomposition.setModelInfo(sModel);
+        serviceDecomposition.setAllottedResources(arList);
+        serviceDecomposition.setVnfResources(vnfList);
+        serviceDecomposition.setServiceInstance(si);
+
+        // Subscriber
+        subscriber = "{\"globalSubscriberId\": \"SUB12_0322_DS_1201\",\"subscriberCommonSiteId\": \"DALTX0101\",\"subscriberName\": \"SUB_12_0322_DS_1201\"}";
+        subscriber2 = "{\"globalSubscriberId\": \"SUB12_0322_DS_1201\",\"subscriberName\": \"SUB_12_0322_DS_1201\"}";
+    }
+
+    @Test
+
+    public void testHoming_success_2AR1Vnf() throws Exception {
+
+        mockOof();
+
+        String businessKey = UUID.randomUUID().toString();
+        Map<String, Object> variables = new HashMap<>();
+        setVariables(variables);
+
+       invokeSubProcess("Homing", businessKey, variables);
+
+        injectWorkflowMessages(callbacks, "oof2");
+
+        waitForProcessEnd(businessKey, 10000);
+
+        //Get Variables
+        WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey,
+                "WorkflowException");
+        ServiceDecomposition serviceDecompositionExp = (ServiceDecomposition) getVariableFromHistory(businessKey,
+                "serviceDecomposition");
+        String expectedOofRequest = (String) getVariableFromHistory(businessKey, "oofRequest");
+
+        Resource resourceAR = serviceDecompositionExp.getServiceResource("testResourceIdAR");
+        HomingSolution resourceARHoming = resourceAR.getHomingSolution();
+        Resource resourceAR2 = serviceDecompositionExp.getServiceResource("testResourceIdAR2");
+        HomingSolution resourceARHoming2 = resourceAR2.getHomingSolution();
+        Resource resourceVNF = serviceDecompositionExp.getServiceResource("testResourceIdVNF");
+        HomingSolution resourceVNFHoming = resourceVNF.getHomingSolution();
+        String resourceARHomingString = resourceARHoming.toString();
+        resourceARHomingString = resourceARHomingString.replaceAll("\\s+", " ");
+        String resourceARHoming2String = resourceARHoming2.toString();
+        resourceARHoming2String = resourceARHoming2String.replaceAll("\\s+", " ");
+        String resourceVNFHomingString = resourceVNFHoming.toString();
+        resourceVNFHomingString = resourceVNFHomingString.replaceAll("\\s+", " ");
+        expectedOofRequest = expectedOofRequest.replaceAll("\\s+", "");
+
+        assertNull(workflowException);
+        assertEquals(homingSolutionService("service", "testSIID1", "MDTNJ01",
+                resourceARHoming.getVnf().getResourceId(),"aic", "dfwtx",
+                "\"f1d563e8-e714-4393-8f99-cc480144a05e\", \"j1d563e8-e714-4393-8f99-cc480144a05e\"",
+                "\"s1d563e8-e714-4393-8f99-cc480144a05e\", \"b1d563e8-e714-4393-8f99-cc480144a05e\""),
+                resourceARHomingString);
+        assertEquals(homingSolutionService("service", "testSIID2", "testVnfHostname2",
+                resourceARHoming2.getVnf().getResourceId(),"aic", "testCloudRegionId2",
+                null, null), resourceARHoming2String);
+        assertEquals(homingSolutionCloud("cloud","aic", "testCloudRegionId3",
+                true, "\"91d563e8-e714-4393-8f99-cc480144a05e\", \"21d563e8-e714-4393-8f99-cc480144a05e\"",
+                "\"31d563e8-e714-4393-8f99-cc480144a05e\", \"71d563e8-e714-4393-8f99-cc480144a05e\""),
+                resourceVNFHomingString);
+        assertEquals(verifyOofRequest(), expectedOofRequest);
+    }
+
+    @Test
+
+    public void testHoming_success_2AR1Vnf2Net() throws Exception {
+
+        mockOof();
+
+        String businessKey = UUID.randomUUID().toString();
+        Map<String, Object> variables = new HashMap<>();
+        setVariables2(variables);
+
+       invokeSubProcess("Homing", businessKey, variables);
+
+        injectWorkflowMessages(callbacks, "oof3");
+
+        waitForProcessEnd(businessKey, 10000);
+
+        //Get Variables
+        WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey,
+                "WorkflowException");
+        ServiceDecomposition serviceDecompositionExp = (ServiceDecomposition) getVariableFromHistory(businessKey,
+                "serviceDecomposition");
+        String expectedOofRequest = (String) getVariableFromHistory(businessKey, "oofRequest");
+
+        Resource resourceAR = serviceDecompositionExp.getServiceResource("testResourceIdAR");
+        HomingSolution resourceARHoming = resourceAR.getHomingSolution();
+        Resource resourceAR2 = serviceDecompositionExp.getServiceResource("testResourceIdAR2");
+        HomingSolution resourceARHoming2 = resourceAR2.getHomingSolution();
+        Resource resourceVNF = serviceDecompositionExp.getServiceResource("testResourceIdVNF");
+        HomingSolution resourceVNFHoming = resourceVNF.getHomingSolution();
+        Resource resourceNet = serviceDecompositionExp.getServiceResource("testResourceIdNet");
+        HomingSolution resourceNetHoming = resourceNet.getHomingSolution();
+        Resource resourceNet2 = serviceDecompositionExp.getServiceResource("testResourceIdNet2");
+        HomingSolution resourceNetHoming2 = resourceNet2.getHomingSolution();
+
+        String resourceARHomingString = resourceARHoming.toString();
+        resourceARHomingString = resourceARHomingString.replaceAll("\\s+", " ");
+        String resourceARHoming2String = resourceARHoming2.toString();
+        resourceARHoming2String = resourceARHoming2String.replaceAll("\\s+", " ");
+        String resourceVNFHomingString = resourceVNFHoming.toString();
+        resourceVNFHomingString = resourceVNFHomingString.replaceAll("\\s+", " ");
+        String resourceNetHomingString = resourceNetHoming.toString();
+        resourceNetHomingString = resourceNetHomingString.replaceAll("\\s+", " ");
+        String resourceNetHoming2String = resourceNetHoming2.toString();
+        resourceNetHoming2String = resourceNetHoming2String.replaceAll("\\s+", " ");
+        expectedOofRequest = expectedOofRequest.replaceAll("\\s+", "");
+
+
+        assertNull(workflowException);
+        assertEquals(homingSolutionService("service", "testSIID1", "MDTNJ01",
+                resourceARHoming.getVnf().getResourceId(),"aic", "dfwtx",
+                "\"f1d563e8-e714-4393-8f99-cc480144a05e\", \"j1d563e8-e714-4393-8f99-cc480144a05e\"",
+                "\"s1d563e8-e714-4393-8f99-cc480144a05e\", \"b1d563e8-e714-4393-8f99-cc480144a05e\""),
+                resourceARHomingString);
+        assertEquals(homingSolutionService("service", "testSIID2", "testVnfHostname2",
+                resourceARHoming2.getVnf().getResourceId(),
+                "aic", "testCloudRegionId2",
+                null, null), resourceARHoming2String);
+        assertEquals(homingSolutionCloud("cloud","aic",
+                "testCloudRegionId3",
+                true, "\"91d563e8-e714-4393-8f99-cc480144a05e\", \"21d563e8-e714-4393-8f99-cc480144a05e\"",
+                "\"31d563e8-e714-4393-8f99-cc480144a05e\", \"71d563e8-e714-4393-8f99-cc480144a05e\""),
+                resourceVNFHomingString);
+        assertEquals(homingSolutionService("service", "testServiceInstanceIdNet",
+                "testVnfHostNameNet", resourceNetHoming.getVnf().getResourceId(),"aic",
+                "testCloudRegionIdNet",
+                null, null), resourceNetHomingString);
+        assertEquals(homingSolutionCloud("cloud", "aic",
+                "testCloudRegionIdNet2",
+                false, "\"f1d563e8-e714-4393-8f99-cc480144a05n\", \"j1d563e8-e714-4393-8f99-cc480144a05n\"",
+                "\"s1d563e8-e714-4393-8f99-cc480144a05n\", \"b1d563e8-e714-4393-8f99-cc480144a05n\""),
+                resourceNetHoming2String);
+        assertEquals(verifyOofRequest(), expectedOofRequest);
+
+    }
+
+    @Test
+
+
+    public void testHoming_success_vnfResourceList() throws Exception {
+
+        // Create a Service Decomposition
+        MockGetServiceResourcesCatalogDataByModelUuid("2f7f309d-c842-4644-a2e4-34167be5eeb4",
+                "/BuildingBlocks/oofCatalogResp.json");
+        String busKey = UUID.randomUUID().toString();
+        Map<String, Object> vars = new HashMap<>();
+        setVariablesForServiceDecomposition(vars, "testRequestId123",
+                "ff5256d2-5a33-55df-13ab-12abad84e7ff");
+        invokeSubProcess("DecomposeService", busKey, vars);
+
+        ServiceDecomposition sd = (ServiceDecomposition) getVariableFromHistory(busKey,
+                "serviceDecomposition");
+        logger.debug("In testHoming_success_vnfResourceList, ServiceDecomposition = " + sd);
+        List<VnfResource> vnfResourceList = sd.getVnfResources();
+//logger.debug(" vnfResourceList = " + vnfResourceList);
+        vnfResourceList.get(0).setResourceId("test-resource-id-000");
+
+        // Invoke Homing
+
+        mockOof();
+
+        String businessKey = UUID.randomUUID().toString();
+        Map<String, Object> variables = new HashMap<>();
+        variables.put("homingService", "oof");
+        variables.put("isDebugLogEnabled", "true");
+        variables.put("msoRequestId", "testRequestId");
+        variables.put("serviceInstanceId", "testServiceInstanceId");
+        variables.put("serviceDecomposition", sd);
+        variables.put("subscriberInfo", subscriber2);
+        HashMap customerLocation = new HashMap<String, Object>();
+        customerLocation.put("customerLatitude", "32.89748");
+        customerLocation.put("customerLongitude", "-97.040443");
+        customerLocation.put("customerName", "xyz");
+        variables.put("customerLatitude", "32.89748");
+        variables.put("customerLongitude", "-97.040443");
+        variables.put("customerName", "xyz");
+        variables.put("customerLocation", customerLocation);
+        variables.put("cloudOwner", "amazon");
+        variables.put("cloudRegionId", "TNZED");
+
+        invokeSubProcess("Homing", businessKey, variables);
+        injectWorkflowMessages(callbacks, "oof3");
+        waitForProcessEnd(businessKey, 10000);
+
+        //Get Variables
+
+        WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey,
+                "WorkflowException");
+        ServiceDecomposition serviceDecompositionExp = (ServiceDecomposition) getVariableFromHistory(businessKey,
+                "serviceDecomposition");
+        logger.debug("serviceDecompositionExp is: " + serviceDecompositionExp);
+
+        Resource resourceVnf = serviceDecompositionExp.getServiceResource("test-resource-id-000");
+        logger.debug("resourceVnf is: " + resourceVnf);
+        HomingSolution resourceVnfHoming = resourceVnf.getHomingSolution();
+
+        String resourceVnfHomingString = resourceVnfHoming.toString();
+        logger.debug("resourceVnfHomingString is: " + resourceVnfHomingString);
+        resourceVnfHomingString = resourceVnfHomingString.replaceAll("\\s+", " ");
+        logger.debug("Now resourceVnfHomingString is: " + resourceVnfHomingString);
+
+        assertNull(workflowException);
+
+        //Verify request
+        String oofRequest = (String) getVariableFromHistory(businessKey, "oofRequest");
+        logger.debug("oofRequest is: " + oofRequest);
+        assertEquals(FileUtil.readResourceFile("__files/BuildingBlocks/oofRequest_infravnf").
+                replaceAll("\n", "").replaceAll("\r", "").
+                replaceAll("\t", ""), oofRequest.replaceAll("\n", "").
+                replaceAll("\r", "").replaceAll("\t", ""));
+
+        //logger.debug("resourceVnfHoming.getVnf().getResourceId() is: " + resourceVnfHoming.getVnf().getResourceId());
+
+        assertEquals(homingSolutionService("service", "service-instance-01234",
+                "MDTNJ01", "test-resource-id-000","att-aic",
+                "mtmnj1a",
+                "\"f1d563e8-e714-4393-8f99-cc480144a05e\"," +
+                        " \"j1d563e8-e714-4393-8f99-cc480144a05e\"",
+                "\"s1d563e8-e714-4393-8f99-cc480144a05e\"," +
+                        " \"b1d563e8-e714-4393-8f99-cc480144a05e\""), resourceVnfHomingString);
+    }
+
+    @Test
+    public void testHoming_success_existingLicense() throws Exception {
+
+        mockOof();
+
+        String businessKey = UUID.randomUUID().toString();
+        Map<String, Object> variables = new HashMap<String, Object>();
+        setVariablesExistingLicense(variables);
+
+        invokeSubProcess("Homing", businessKey, variables);
+
+        injectWorkflowMessages(callbacks, "sniro");
+
+        waitForProcessEnd(businessKey, 10000);
+
+        //Get Variables
+        WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
+        ServiceDecomposition serviceDecompositionExp = (ServiceDecomposition) getVariableFromHistory(businessKey, "serviceDecomposition");
+        String oofRequest = (String) getVariableFromHistory(businessKey, "sniroRequest");
+
+        Resource resourceAR = serviceDecompositionExp.getServiceResource("testResourceIdAR");
+        HomingSolution resourceARHoming = (HomingSolution) resourceAR.getHomingSolution();
+        Resource resourceAR2 = serviceDecompositionExp.getServiceResource("testResourceIdAR2");
+        HomingSolution resourceARHoming2 = (HomingSolution) resourceAR2.getHomingSolution();
+        Resource resourceVNF = serviceDecompositionExp.getServiceResource("testResourceIdVNF");
+        HomingSolution resourceVNFHoming = (HomingSolution) resourceVNF.getHomingSolution();
+        String resourceARHomingString = resourceARHoming.toString();
+        resourceARHomingString = resourceARHomingString.replaceAll("\\s+", " ");
+        String resourceARHoming2String = resourceARHoming2.toString();
+        resourceARHoming2String = resourceARHoming2String.replaceAll("\\s+", " ");
+        String resourceVNFHomingString = resourceVNFHoming.toString();
+        resourceVNFHomingString = resourceVNFHomingString.replaceAll("\\s+", " ");
+        oofRequest = oofRequest.replaceAll("\\s+", "");
+
+        assertNull(workflowException);
+        assertEquals(homingSolutionService("service", "testSIID1", "MDTNJ01",
+                "aic", "dfwtx", "KDTNJ01",
+                "\"f1d563e8-e714-4393-8f99-cc480144a05e\", \"j1d563e8-e714-4393-8f99-cc480144a05e\"",
+                "\"s1d563e8-e714-4393-8f99-cc480144a05e\", \"b1d563e8-e714-4393-8f99-cc480144a05e\""),
+                resourceARHomingString);
+        assertEquals(homingSolutionService("service", "testSIID2", "testVnfHostname2",
+                resourceARHoming2.getVnf().getResourceId(),"aic", "testCloudRegionId2",
+                null, null), resourceARHoming2String);
+        assertEquals(homingSolutionCloud("cloud", "aic",
+                "testCloudRegionId3",
+                false, "\"91d563e8-e714-4393-8f99-cc480144a05e\", \"21d563e8-e714-4393-8f99-cc480144a05e\"",
+                "\"31d563e8-e714-4393-8f99-cc480144a05e\", \"71d563e8-e714-4393-8f99-cc480144a05e\""),
+                resourceVNFHomingString);
+        assertEquals(verifyOofRequestExistingLicense(), oofRequest);
+
+    }
+
+    @Test
+
+    public void testHoming_error_inputVariable() throws Exception {
+
+        String businessKey = UUID.randomUUID().toString();
+        Map<String, Object> variables = new HashMap<>();
+        setVariables3(variables);
+
+        invokeSubProcess("Homing", businessKey, variables);
+
+        waitForProcessEnd(businessKey, 10000);
+
+        //Get Variables
+        WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey,
+                "WorkflowException");
+
+        assertEquals("WorkflowException[processKey=Homing,errorCode=4000,errorMessage=A required " +
+                "input variable is missing or null]", workflowException.toString());
+    }
+
+    @Test
+
+    public void testHoming_error_badResponse() throws Exception {
+        mockOof_500();
+
+        String businessKey = UUID.randomUUID().toString();
+        Map<String, Object> variables = new HashMap<>();
+        setVariables(variables);
+
+        invokeSubProcess("Homing", businessKey, variables);
+
+        waitForProcessEnd(businessKey, 10000);
+
+        //Get Variables
+        WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey,
+                "WorkflowException");
+
+        assertEquals("WorkflowException[processKey=Homing,errorCode=500,errorMessage=Received a " +
+                "Bad Sync Response from Sniro/OOF.]", workflowException.toString());
+    }
+
+    @Test
+
+    public void testHoming_error_oofNoSolution() throws Exception {
+        mockOof();
+
+        String businessKey = UUID.randomUUID().toString();
+        Map<String, Object> variables = new HashMap<>();
+        setVariables(variables);
+
+        invokeSubProcess("Homing", businessKey, variables);
+
+        injectWorkflowMessages(callbacks, "oofNoSol");
+
+        waitForProcessEnd(businessKey, 10000);
+
+        //Get Variables
+        WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey,
+                "WorkflowException");
+
+        assertEquals("WorkflowException[processKey=Homing,errorCode=400,errorMessage=No solution found " +
+                "for plan 08e1b8cf-144a-4bac-b293-d5e2eedc97e8]", workflowException.toString());
+    }
+
+    @Test
+
+    public void testHoming_error_oofPolicyException() throws Exception {
+        mockOof();
+
+        String businessKey = UUID.randomUUID().toString();
+        Map<String, Object> variables = new HashMap<>();
+        setVariables(variables);
+
+        invokeSubProcess("Homing", businessKey, variables);
+
+        injectWorkflowMessages(callbacks, "oofPolicyEx");
+
+        waitForProcessEnd(businessKey, 10000);
+
+        //Get Variables
+        WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey,
+                "WorkflowException");
+
+        assertEquals("WorkflowException[processKey=Homing,errorCode=400,errorMessage=OOF Async Callback " +
+                "Response contains a Request Error Policy Exception: Message content size exceeds the allowable " +
+                "limit]", workflowException.toString());
+    }
+
+    @Test
+
+    public void testHoming_error_oofServiceException() throws Exception {
+        mockOof();
+
+        String businessKey = UUID.randomUUID().toString();
+        Map<String, Object> variables = new HashMap<>();
+        setVariables(variables);
+
+        invokeSubProcess("Homing", businessKey, variables);
+
+        injectWorkflowMessages(callbacks, "oofServiceEx");
+
+        waitForProcessEnd(businessKey, 10000);
+
+        //Get Variables
+        WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey,
+                "WorkflowException");
+
+        assertEquals("WorkflowException[processKey=Homing,errorCode=400,errorMessage=OOF Async Callback " +
+                        "Response contains a Request Error Service Exception: OOF PlacementError: " +
+                        "requests.exceptions.HTTPError: 404 Client Error: Not Found for " +
+                        "url: http://192.168.171.200:8091/v1/plans/97b4e303-5f75-492c-8fb2-21098281c8b8]",
+                workflowException.toString());
+    }
+
+
+    private void setVariables(Map<String, Object> variables) {
+        variables.put("homingService", "oof");
+        HashMap customerLocation = new HashMap<String, Object>();
+        customerLocation.put("customerLatitude", "32.89748");
+        customerLocation.put("customerLongitude", "-97.040443");
+        customerLocation.put("customerName", "xyz");
+        variables.put("customerLatitude", "32.89748");
+        variables.put("customerLongitude", "-97.040443");
+        variables.put("customerName", "xyz");
+        variables.put("customerLocation", customerLocation);
+        variables.put("cloudOwner", "amazon");
+        variables.put("cloudRegionId", "TNZED");
+        variables.put("isDebugLogEnabled", "true");
+        //	variables.put("mso-request-id", "testRequestId");
+        variables.put("msoRequestId", "testRequestId");
+        variables.put("serviceInstanceId", "testServiceInstanceId");
+        variables.put("serviceDecomposition", serviceDecomposition);
+        variables.put("subscriberInfo", subscriber2);
+    }
+
+    private void setVariables2(Map<String, Object> variables) {
+        List<NetworkResource> netList = new ArrayList<NetworkResource>();
+        NetworkResource net = new NetworkResource();
+        net.setResourceId("testResourceIdNet");
+        ModelInfo netModel = new ModelInfo();
+        netModel.setModelCustomizationUuid("testModelCustomizationUuidNet");
+        netModel.setModelInvariantUuid("testModelInvariantIdNet");
+        netModel.setModelName("testModelNameNet");
+        netModel.setModelVersion("testModelVersionNet");
+        net.setModelInfo(netModel);
+        netList.add(net);
+        NetworkResource net2 = new NetworkResource();
+        net2.setResourceId("testResourceIdNet2");
+        ModelInfo netModel2 = new ModelInfo();
+        netModel2.setModelCustomizationUuid("testModelCustomizationUuidNet2");
+        netModel2.setModelCustomizationName("testModelCustomizationNameNet2");
+        netModel2.setModelInvariantUuid("testModelInvariantIdNet2");
+        netModel2.setModelName("testModelNameNet2");
+        netModel2.setModelVersion("testModelVersionNet2");
+        net2.setModelInfo(netModel2);
+        netList.add(net2);
+        serviceDecomposition.setNetworkResources(netList);
+
+        variables.put("homingService", "oof");
+        HashMap customerLocation = new HashMap<String, Object>();
+        customerLocation.put("customerLatitude", "32.89748");
+        customerLocation.put("customerLongitude", "-97.040443");
+        customerLocation.put("customerName", "xyz");
+        variables.put("customerLatitude", "32.89748");
+        variables.put("customerLongitude", "-97.040443");
+        variables.put("customerName", "xyz");
+        variables.put("customerLocation", customerLocation);
+        variables.put("cloudOwner", "amazon");
+        variables.put("cloudRegionId", "TNZED");
+        variables.put("isDebugLogEnabled", "true");
+        variables.put("msoRequestId", "testRequestId");
+        variables.put("serviceInstanceId", "testServiceInstanceId");
+        variables.put("serviceDecomposition", serviceDecomposition);
+        variables.put("subscriberInfo", subscriber2);
+    }
+
+    private void setVariables3(Map<String, Object> variables) {
+        variables.put("homingService", "oof");
+        HashMap customerLocation = new HashMap<String, Object>();
+        customerLocation.put("customerLatitude", "32.89748");
+        customerLocation.put("customerLongitude", "-97.040443");
+        customerLocation.put("customerName", "xyz");
+        variables.put("customerLatitude", "32.89748");
+        variables.put("customerLongitude", "-97.040443");
+        variables.put("customerName", "xyz");
+        variables.put("customerLocation", customerLocation);
+        variables.put("cloudOwner", "amazon");
+        variables.put("cloudRegionId", "TNZED");
+        variables.put("isDebugLogEnabled", "true");
+        //	variables.put("mso-request-id", "testRequestId");
+        variables.put("msoRequestId", "testRequestId");
+        variables.put("serviceInstanceId", "testServiceInstanceId");
+        variables.put("serviceDecomposition", null);
+        variables.put("subscriberInfo", subscriber2);
+    }
+
+    private void setVariablesExistingLicense(Map<String, Object> variables) {
+        HomingSolution currentHomingSolution = new HomingSolution();
+        serviceDecomposition.getVnfResources().get(0).setCurrentHomingSolution(currentHomingSolution);
+        serviceDecomposition.getVnfResources().get(0).getCurrentHomingSolution().getLicense().addEntitlementPool("testEntitlementPoolId1");
+        serviceDecomposition.getVnfResources().get(0).getCurrentHomingSolution().getLicense().addEntitlementPool("testEntitlementPoolId2");
+
+        serviceDecomposition.getVnfResources().get(0).getCurrentHomingSolution().getLicense().addLicenseKeyGroup("testLicenseKeyGroupId1");
+        serviceDecomposition.getVnfResources().get(0).getCurrentHomingSolution().getLicense().addLicenseKeyGroup("testLicenseKeyGroupId2");
+
+        variables.put("isDebugLogEnabled", "true");
+        variables.put("msoRequestId", "testRequestId");
+        variables.put("serviceInstanceId", "testServiceInstanceId");
+        variables.put("serviceDecomposition", serviceDecomposition);
+        variables.put("subscriberInfo", subscriber2);
+
+    }
+
+    private String homingSolutionService(String type, String serviceInstanceId, String vnfHostname,
+                                         String vnfResourceId, String cloudOwner,
+                                         String cloudRegionId, String enList,
+                                         String licenseList){
+
+        String solution = "";
+        if(enList == null){
+            solution = "{ \"homingSolution\" : { \"inventoryType\" : \"" + type + "\", \"serviceInstanceId\" : \"" +
+                    serviceInstanceId + "\", \"cloudOwner\" : \"" + cloudOwner + "\", \"cloudRegionId\" : \"" +
+                    cloudRegionId + "\", " + "\"vnf\" : { \"resourceId\" : \"" + vnfResourceId +
+                    "\", \"resourceType\" : \"VNF\", \"resourceInstance\" : { }, \"homingSolution\" : { \"license\" :" +
+                    " { }, \"rehome\" : false }, \"vnfHostname\" : \"" + vnfHostname + "\" }, \"license\" : { }," +
+                    " \"rehome\" : false } }";
+        }else{
+            //language=JSON
+            solution = "{ \"homingSolution\" : { \"inventoryType\" : \"" + type + "\", \"serviceInstanceId\" : \"" +
+                    serviceInstanceId + "\", \"cloudOwner\" : \"" + cloudOwner + "\", \"cloudRegionId\" : \"" +
+                    cloudRegionId + "\", \"vnf\" : { \"resourceId\" : \"" + vnfResourceId + "\", \"resourceType\" :" +
+                    " \"VNF\", \"resourceInstance\" : { }, \"homingSolution\" : { \"license\" : { }, \"rehome\" :" +
+                    " false }, \"vnfHostname\" : \"" + vnfHostname + "\" }, \"license\" : { \"entitlementPoolList\" :" +
+                    " [ " + enList + " ], \"licenseKeyGroupList\" : [ " + licenseList + " ] }, \"rehome\" : false } }";
+        }
+        return solution;
+    }
+
+    private String homingSolutionCloud(String type, String cloudOwner,
+                                       String cloudRegionId, Boolean flavors, String enList,
+                                       String licenseList){
+        String solution = "";
+        if(enList == null){
+            solution = "{ \"homingSolution\" : { \"inventoryType\" : \"" + type + "\", \"cloudOwner\" : \"" +
+                    cloudOwner + "\", \"cloudRegionId\" : \"" + cloudRegionId +
+                    "\", \"license\" : { }, \"rehome\" : false } }";
+        } else if (flavors && enList == null){
+            solution = "{ \"homingSolution\" : { \"inventoryType\" : \"" + type + "\", \"cloudOwner\" : \"" +
+                    cloudOwner + "\", \"cloudRegionId\" : \"" + cloudRegionId +
+                    "\", \"flavors\" :  [ { \"flavorLabel\" : \"flavorLabel2xxx\", \"flavor\" : \"vimFlavorxxx\" }, " +
+                    "{ \"flavorLabel\" : \"flavorLabel1xxx\", \"flavor\" : \"vimFlavorxxx\" } ], " +
+                    "\"license\" : { }, \"rehome\" : false } }";
+        } else if (flavors) {
+            solution = "{ \"homingSolution\" : { \"inventoryType\" : \"" + type + "\", \"cloudOwner\" : \"" +
+                    cloudOwner + "\", \"cloudRegionId\" : \"" + cloudRegionId +
+                    "\", \"flavors\" : [ { \"flavorLabel\" : \"flavorLabel2xxx\", \"flavor\" : \"vimFlavorxxx\" }, " +
+                    "{ \"flavorLabel\" : \"flavorLabel1xxx\", \"flavor\" : \"vimFlavorxxx\" } ], " +
+                    "\"license\" : { \"entitlementPoolList\" : [ " + enList +  " ], \"licenseKeyGroupList\" : [ " +
+                    licenseList +  " ] }, \"rehome\" : false } }";
+        } else {
+            solution = "{ \"homingSolution\" : { \"inventoryType\" : \"" + type + "\", \"cloudOwner\" : \"" +
+                    cloudOwner + "\", \"cloudRegionId\" : \"" + cloudRegionId +
+                    "\", \"license\" : { \"entitlementPoolList\" : [ " + enList +  " ], \"licenseKeyGroupList\" : [ " +
+                    licenseList +  " ] }, \"rehome\" : false } }";
+        }
+        return solution;
+    }
+
+    private void setVariablesForServiceDecomposition(Map<String, Object> variables, String requestId, String siId) {
+        variables.put("homingService", "oof");
+        variables.put("isDebugLogEnabled", "true");
+        variables.put("mso-request-id", requestId);
+        variables.put("msoRequestId", requestId);
+        variables.put("serviceInstanceId", siId);
+        HashMap customerLocation = new HashMap<String, Object>();
+        customerLocation.put("customerLatitude", "32.89748");
+        customerLocation.put("customerLongitude", "-97.040443");
+        customerLocation.put("customerName", "xyz");
+        variables.put("customerLatitude", "32.89748");
+        variables.put("customerLongitude", "-97.040443");
+        variables.put("customerName", "xyz");
+        variables.put("customerLocation", customerLocation);
+        variables.put("cloudOwner", "amazon");
+        variables.put("cloudRegionId", "TNZED");
+
+
+        String serviceModelInfo = "{\"modelInvariantId\":\"1cc4e2e4-eb6e-404d-a66f-c8733cedcce8\",\"modelUuid\":" +
+                "\"2f7f309d-c842-4644-a2e4-34167be5eeb4\",\"modelName\":\"vCPE Service\",\"modelVersion\":\"2.0\",}";
+        variables.put("serviceModelInfo", serviceModelInfo);
+    }
+
+    private String verifyOofRequest() {
+        String request = "{\"requestInfo\":{\"transactionId\":\"testRequestId\",\"requestId\":\"testRequestId\"," +
+                "\"callbackUrl\":\"http://localhost:28090/workflows/messages/message/oofResponse/testRequestId\"," +
+                "\"sourceId\":\"so\",\"requestType\":\"create\",\"numSolutions\":1,\"optimizers\":[\"placement\"]," +
+                "\"timeout\":600},\"placementInfo\":{\"requestParameters\":{\"customerLatitude\":" +
+                "\"32.89748\",\"customerLongitude\":\"-97.040443\",\"customerName\":\"xyz\"},\"subscriberInfo\":" +
+                "{\"globalSubscriberId\":\"SUB12_0322_DS_1201\",\"subscriberName\":\"SUB_12_0322_DS_1201\"," +
+                "\"subscriberCommonSiteId\":\"\"},\"placementDemands\":[{\"resourceModuleName\":\"ALLOTTED_RESOURCE\"" +
+                ",\"serviceResourceId\":\"testResourceIdAR\",\"tenantId\":" +
+                "\"null\",\"resourceModelInfo\":{\"modelInvariantId\":\"testModelInvariantIdAR\"," +
+                "\"modelVersionId\":\"testARModelUuid\",\"modelName\":\"testModelNameAR\",\"modelType\":" +
+                "\"testModelTypeAR\",\"modelVersion\":\"testModelVersionAR\",\"modelCustomizationName\":\"\"}}," +
+                "{\"resourceModuleName\":\"ALLOTTED_RESOURCE\",\"serviceResourceId\":\"testResourceIdAR2\"," +
+                "\"tenantId\":\"null\",\"resourceModelInfo\":{\"modelInvariantId\":\"testModelInvariantIdAR2\"," +
+                "\"modelVersionId\":\"testAr2ModelUuid\",\"modelName\":\"testModelNameAR2\"," +
+                "\"modelType\":\"testModelTypeAR2\",\"modelVersion\":\"testModelVersionAR2\"," +
+                "\"modelCustomizationName\":\"\"}}]},\"serviceInfo\":" +
+                "{\"serviceInstanceId\":\"testServiceInstanceId123\"," +
+                "\"serviceName\":\"null\",\"modelInfo\":{\"modelType\":\"\",\"modelInvariantId\":" +
+                "\"testModelInvariantId\",\"modelVersionId\":\"testModelUuid\",\"modelName\":\"testModelName\"," +
+                "\"modelVersion\":\"testModelVersion\",\"modelCustomizationName\":\"" +
+                "\"}},\"licenseInfo\":{\"licenseDemands\":[{\"resourceModuleName\":\"VNF\",\"serviceResourceId\":" +
+                "\"testResourceIdVNF\",\"resourceInstanceType\":\"VNF\",\"resourceModelInfo\":{\"modelInvariantId\":" +
+                "\"testModelInvariantIdVNF\",\"modelVersionId\":\"testVnfModelUuid\",\"modelName\":" +
+                "\"testModelNameVNF\",\"modelType\":\"testModelTypeVNF\",\"modelVersion\":\"testModelVersionVNF\"," +
+                "\"modelCustomizationName\":\"\"}}]}}";
+        return request;
+    }
+
+    private String verifyOofRequestExistingLicense(){
+        String request = "{\"requestInfo\":{\"transactionId\":\"testRequestId\",\"requestId\":\"testRequestId\"," +
+                "\"callbackUrl\":\"http://localhost:28090/workflows/messages/message/SNIROResponse/testRequestId\"," +
+                "\"sourceId\":\"mso\",\"requestType\":\"speedchanged\",\"optimizer\":[\"placement\",\"license\"]," +
+                "\"numSolutions\":1,\"timeout\":1800},\"placementInfo\":{\"serviceModelInfo\":{\"modelType\":\"\"," +
+                "\"modelInvariantId\":\"testModelInvariantId\",\"modelVersionId\":\"testModelUuid\",\"modelName\":" +
+                "\"testModelName\",\"modelVersion\":\"testModelVersion\"},\"subscriberInfo\":" +
+                "{\"globalSubscriberId\":\"SUB12_0322_DS_1201\",\"subscriberName\":\"SUB_12_0322_DS_1201\"," +
+                "\"subscriberCommonSiteId\":\"\"},\"demandInfo\":{\"placementDemand\":[{\"resourceInstanceType\":" +
+                "\"ALLOTTED_RESOURCE\",\"serviceResourceId\":\"testResourceIdAR\",\"resourceModuleName\":\"\"," +
+                "\"resourceModelInfo\":{\"modelCustomizationId\":\"testModelCustomizationUuidAR\"," +
+                "\"modelInvariantId\":\"testModelInvariantIdAR\",\"modelName\":\"testModelNameAR\"," +
+                "\"modelVersion\":\"testModelVersionAR\",\"modelVersionId\":\"testARModelUuid\",\"modelType\":" +
+                "\"testModelTypeAR\"},\"tenantId\":\"\",\"tenantName\":\"\"},{\"resourceInstanceType\":" +
+                "\"ALLOTTED_RESOURCE\",\"serviceResourceId\":\"testResourceIdAR2\",\"resourceModuleName\":" +
+                "\"\",\"resourceModelInfo\":{\"modelCustomizationId\":\"testModelCustomizationUuidAR2\"," +
+                "\"modelInvariantId\":\"testModelInvariantIdAR2\",\"modelName\":\"testModelNameAR2\"," +
+                "\"modelVersion\":\"testModelVersionAR2\",\"modelVersionId\":\"testAr2ModelUuid\"," +
+                "\"modelType\":\"testModelTypeAR2\"},\"tenantId\":\"\",\"tenantName\":\"\"}],\"licenseDemand\":" +
+                "[{\"resourceInstanceType\":\"VNF\",\"serviceResourceId\":\"testResourceIdVNF\"," +
+                "\"resourceModuleName\":\"\",\"resourceModelInfo\":{\"modelCustomizationId\":" +
+                "\"testModelCustomizationUuidVNF\",\"modelInvariantId\":\"testModelInvariantIdVNF\"," +
+                "\"modelName\":\"testModelNameVNF\",\"modelVersion\":\"testModelVersionVNF\"," +
+                "\"modelVersionId\":\"testVnfModelUuid\",\"modelType\":\"testModelTypeVNF\"}," +
+                "\"existingLicense\":[{\"entitlementPoolUUID\":[\"testEntitlementPoolId1\"," +
+                "\"testEntitlementPoolId2\"],\"licenseKeyGroupUUID\":[\"testLicenseKeyGroupId1\"," +
+                "\"testLicenseKeyGroupId2\"]}]}]},\"policyId\":[],\"serviceInstanceId\":" +
+                "\"testServiceInstanceId123\",\"orderInfo\":\"{\\\"requestParameters\\\":null}\"}}";
+        return request;
+    }
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/PrepareUpdateAAIVfModuleIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/PrepareUpdateAAIVfModuleIT.java
new file mode 100644
index 0000000..b8ae341
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/PrepareUpdateAAIVfModuleIT.java
@@ -0,0 +1,208 @@
+/*- 
+ * ============LICENSE_START======================================================= 
+ * ONAP - SO 
+ * ================================================================================ 
+ * Copyright (C) 2017 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.onap.so.bpmn.common;
+
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockAAIVfModuleBadPatch;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithDepth;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetGenericVnfById_404;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPatchVfModuleId;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutGenericVnf;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.onap.so.BaseIntegrationTest;
+import org.onap.so.bpmn.core.WorkflowException;
+import org.onap.so.bpmn.mock.FileUtil;
+import org.onap.so.logger.MsoLogger;
+
+/**
+ * Unit tests for PrepareUpdateAAIVfModule.bpmn.
+ */
+
+public class PrepareUpdateAAIVfModuleIT extends BaseIntegrationTest {
+	
+	MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,PrepareUpdateAAIVfModuleIT.class);
+	
+	/**
+	 * Test the happy path through the flow.
+	 */
+	@Test	
+	
+	public void happyPath() throws IOException {
+		
+		logStart();
+		
+		String prepareUpdateAAIVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/PrepareUpdateAAIVfModuleRequest.xml"); 
+		
+		MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
+		MockPutGenericVnf("/skask/vf-modules/vf-module/supercool", "PCRF", 200);
+		MockPatchVfModuleId("skask", "supercool");
+		
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+	variables.put("mso-request-id", UUID.randomUUID().toString());
+		variables.put("isDebugLogEnabled","true");
+		variables.put("PrepareUpdateAAIVfModuleRequest", prepareUpdateAAIVfModuleRequest);
+		invokeSubProcess("PrepareUpdateAAIVfModule", businessKey, variables);
+		
+		Assert.assertTrue(isProcessEnded(businessKey));
+		String response = (String) getVariableFromHistory(businessKey, "PUAAIVfMod_updateVfModuleResponse");
+		Integer responseCode = (Integer) getVariableFromHistory(businessKey, "PUAAIVfMod_updateVfModuleResponseCode");
+		logger.debug("Subflow response code: " + responseCode);
+		logger.debug("Subflow response: " + response);
+		Assert.assertEquals(200, responseCode.intValue());
+		String heatStackId = (String) getVariableFromHistory(businessKey, "PUAAIVfMod_heatStackId");
+		logger.debug("Ouput heat-stack-id:" + heatStackId);
+		Assert.assertEquals("slowburn", heatStackId);
+		
+		logEnd();
+	}
+	
+	/**
+	 * Test the case where the GET to AAI returns a 404.
+	 */
+	@Test	
+	
+	public void badGet() throws IOException {
+		
+		logStart();
+		
+		String prepareUpdateAAIVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/PrepareUpdateAAIVfModuleRequest.xml"); 
+		MockGetGenericVnfById_404("skask[?]depth=1");
+		
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+	variables.put("mso-request-id", UUID.randomUUID().toString());
+		variables.put("isDebugLogEnabled","true");
+		variables.put("PrepareUpdateAAIVfModuleRequest", prepareUpdateAAIVfModuleRequest);
+		invokeSubProcess("PrepareUpdateAAIVfModule", businessKey, variables);
+		
+		Assert.assertTrue(isProcessEnded(businessKey));
+		String response = (String) getVariableFromHistory(businessKey, "PUAAIVfMod_getVnfResponse");
+		Integer responseCode = (Integer) getVariableFromHistory(businessKey, "PUAAIVfMod_getVnfResponseCode");
+		WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
+		logger.debug("Subflow response code: " + responseCode);
+		logger.debug("Subflow response: " + response);
+		Assert.assertEquals(404, responseCode.intValue());
+		Assert.assertNotNull(workflowException);
+		logger.debug("Subflow WorkflowException error message: " + workflowException.getErrorMessage());
+		
+		logEnd();
+	}
+	
+	/**
+	 * Test the case where the validation of the VF Module fails.
+	 */
+	@Test	
+	
+	public void failValidation1() throws IOException {
+		
+		logStart();
+		
+		String prepareUpdateAAIVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/PrepareUpdateAAIVfModuleRequest.xml").replaceFirst("supercool", "lukewarm");
+		
+		MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
+		
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+	variables.put("mso-request-id", UUID.randomUUID().toString());
+		variables.put("isDebugLogEnabled","true");
+		variables.put("PrepareUpdateAAIVfModuleRequest", prepareUpdateAAIVfModuleRequest);
+		invokeSubProcess("PrepareUpdateAAIVfModule", businessKey, variables);
+		
+		WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
+		Assert.assertNotNull(workflowException);
+		logger.debug("Subflow WorkflowException error message: " + workflowException.getErrorMessage());
+		Assert.assertTrue(workflowException.getErrorMessage().startsWith("VF Module validation error: Orchestration"));
+		
+		logEnd();
+	}
+	
+	/**
+	 * Test the case where the validation of the VF Module fails.
+	 */
+	@Test	
+	
+	public void failValidation2() throws IOException {
+		
+		logStart();
+		
+		String prepareUpdateAAIVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/PrepareUpdateAAIVfModuleRequest.xml").replaceFirst("supercool", "notsocool");
+		
+		MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");		
+		
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+	variables.put("mso-request-id", UUID.randomUUID().toString());
+		variables.put("isDebugLogEnabled","true");
+		variables.put("PrepareUpdateAAIVfModuleRequest", prepareUpdateAAIVfModuleRequest);
+		invokeSubProcess("PrepareUpdateAAIVfModule", businessKey, variables);
+			
+		WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
+		Assert.assertNotNull(workflowException);
+		logger.debug("Subflow WorkflowException error message: " + workflowException.getErrorMessage());
+		Assert.assertTrue(workflowException.getErrorMessage().startsWith("VF Module validation error: VF Module"));
+		
+		logEnd();
+	}
+
+	/**
+	 * Test the case where the GET to AAI is successful, but the subsequent PUT returns 404.
+	 */
+	@Test	
+	
+	public void badPatch() throws IOException {
+		
+		logStart();
+		
+		String prepareUpdateAAIVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/PrepareUpdateAAIVfModuleRequest.xml"); 
+		
+		MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
+		MockAAIVfModuleBadPatch("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/skask/vf-modules/vf-module/supercool", 404);
+		
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("mso-request-id", UUID.randomUUID().toString());
+		variables.put("isDebugLogEnabled","true");
+		variables.put("PrepareUpdateAAIVfModuleRequest", prepareUpdateAAIVfModuleRequest);
+		invokeSubProcess("PrepareUpdateAAIVfModule", businessKey, variables);
+		
+		Assert.assertTrue(isProcessEnded(businessKey));
+		String response = (String) getVariableFromHistory(businessKey, "PUAAIVfMod_updateVfModuleResponse");
+		Integer responseCode = (Integer) getVariableFromHistory(businessKey, "PUAAIVfMod_updateVfModuleResponseCode");
+		WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
+		logger.debug("Subflow response code: " + responseCode);
+		logger.debug("Subflow response: " + response);
+		Assert.assertEquals(404, responseCode.intValue());
+		Assert.assertNotNull(workflowException);
+		logger.debug("Subflow WorkflowException error message: " + workflowException.getErrorMessage());
+		
+		logEnd();
+	}
+}
+
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/RainyDayHandlerIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/RainyDayHandlerIT.java
new file mode 100644
index 0000000..7b85edf
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/RainyDayHandlerIT.java
@@ -0,0 +1,69 @@
+/*- 
+ * ============LICENSE_START======================================================= 
+ * ONAP - SO 
+ * ================================================================================ 
+ * Copyright (C) 2017 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.onap.so.bpmn.common;
+
+import static org.onap.so.bpmn.mock.StubResponsePolicy.MockPolicyAbort;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.onap.so.BaseIntegrationTest;
+
+/**
+ * Unit test for RainyDayHandler.bpmn.
+ */
+
+public class RainyDayHandlerIT extends BaseIntegrationTest {
+	
+	@Test	
+	
+	public void  TestRainyDayHandlingSuccess() {
+
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("isDebugLogEnabled","true");
+		variables.put("msoRequestId", "testRequestId");
+		variables.put("serviceType", "X");
+		variables.put("vnfType", "Y");
+		variables.put("currentActivity", "BB1");		
+		variables.put("workStep", "1");
+		variables.put("failedActivity", "");
+		variables.put("errorCode", "123");
+		variables.put("errorText", "update failed");
+		variables.put("vnfName", "vSAMP1");
+		
+		MockPolicyAbort();
+		
+		
+		String businessKey = UUID.randomUUID().toString();
+		invokeSubProcess("RainyDayHandler", businessKey, variables);
+
+		waitForProcessEnd(businessKey, 10000);
+
+		Assert.assertTrue(isProcessEnded(businessKey));
+		
+	}
+
+	
+	
+}
\ No newline at end of file
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ReceiveWorkflowMessageTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ReceiveWorkflowMessageTest.java
new file mode 100644
index 0000000..7f3e884
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ReceiveWorkflowMessageTest.java
@@ -0,0 +1,145 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.onap.so.bpmn.common.WorkflowTest;
+import org.onap.so.bpmn.common.WorkflowTest.CallbackSet;
+import org.onap.so.bpmn.core.WorkflowException;
+
+/**
+ * Unit tests for SDNCAdapterRestV1.
+ */
+@Ignore
+public class ReceiveWorkflowMessageTest extends WorkflowTest {
+
+	private static final String EOL = "\n";
+
+	private final CallbackSet callbacks = new CallbackSet();
+
+	public ReceiveWorkflowMessageTest() throws IOException {
+		callbacks.put("sdnc-event-success", JSON, "SDNCAEvent",
+			"{" + EOL +
+			"  \"SDNCEvent\": {" + EOL +
+			"    \"eventType\": \"evenType\"," + EOL +
+			"    \"eventCorrelatorType\": \"HOST-NAME\"," + EOL +
+			"    \"eventCorrelator\": \"((CORRELATOR))\"," + EOL +
+			"    \"params\": {" + EOL +
+			"      \"success-indicator\":\"Y\"" + EOL +
+			"	 }" +EOL +
+			"  }" + EOL +
+			"}" + EOL);
+
+		callbacks.put("sdnc-event-fail", JSON, "SDNCAEvent",
+			"{" + EOL +
+			"  \"SDNCEvent\": {" + EOL +
+			"    \"eventType\": \"evenType\"," + EOL +
+			"    \"eventCorrelatorType\": \"HOST-NAME\"," + EOL +
+			"    \"eventCorrelator\": \"((CORRELATOR))\"," + EOL +
+			"    \"params\": {" + EOL +
+			"      \"success-indicator\":\"N\"," + EOL +
+			"      \"error-message\":\"SOMETHING BAD HAPPENED\"" + EOL +
+			"	 }" +EOL +
+			"  }" + EOL +
+			"}" + EOL);
+	}
+
+	/**
+	 * Test the happy path.
+	 */
+	@Test
+	@Deployment(resources = {
+		"subprocess/ReceiveWorkflowMessage.bpmn"
+		})
+	public void happyPath() throws Exception {
+
+		logStart();
+
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("mso-request-id", "dffbae0e-5588-4bd6-9749-b0f0adb52312");
+		variables.put("isDebugLogEnabled", "true");
+		variables.put("RCVWFMSG_timeout", "PT1M");
+		variables.put("RCVWFMSG_messageType", "SDNCAEvent");
+		variables.put("RCVWFMSG_correlator", "USOSTCDALTX0101UJZZ31");
+
+		invokeSubProcess("ReceiveWorkflowMessage", businessKey, variables);
+		injectWorkflowMessages(callbacks, "sdnc-event-success");
+		waitForProcessEnd(businessKey, 10000);
+
+		String response = (String) getVariableFromHistory(businessKey, "WorkflowResponse");
+		System.out.println("Response:\n" + response);
+		assertTrue(response.contains("\"SDNCEvent\""));
+		assertTrue((boolean)getVariableFromHistory(businessKey, "RCVWFMSG_SuccessIndicator"));
+
+		logEnd();
+	}
+
+	/**
+	 * Test the timeout scenario.
+	 */
+	@Test
+	@Deployment(resources = {
+		"subprocess/ReceiveWorkflowMessage.bpmn"
+		})
+	public void timeout() throws Exception {
+
+		logStart();
+
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("mso-request-id", "dffbae0e-5588-4bd6-9749-b0f0adb52312");
+		variables.put("isDebugLogEnabled", "true");
+		variables.put("RCVWFMSG_timeout", "PT5S");
+		variables.put("RCVWFMSG_messageType", "SDNCAEvent");
+		variables.put("RCVWFMSG_correlator", "USOSTCDALTX0101UJZZ31");
+
+		invokeSubProcess("ReceiveWorkflowMessage", businessKey, variables);
+
+		// No injection
+
+		waitForProcessEnd(businessKey, 10000);
+
+		// There is no response from SDNC, so the flow doesn't set WorkflowResponse.
+		String response = (String) getVariableFromHistory(businessKey, "WorkflowResponse");
+		assertNull(response);
+		WorkflowException wfe = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
+		assertNotNull(wfe);
+		System.out.println(wfe.toString());
+		assertEquals("Receive Workflow Message Timeout Error", wfe.getErrorMessage());
+		assertFalse((boolean)getVariableFromHistory(businessKey, "RCVWFMSG_SuccessIndicator"));
+
+		logEnd();
+	}
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SDNCAdapterCallbackRule.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SDNCAdapterCallbackRule.java
new file mode 100644
index 0000000..dc5c36f
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SDNCAdapterCallbackRule.java
@@ -0,0 +1,84 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common;
+
+import javax.xml.ws.Endpoint;
+
+import org.camunda.bpm.engine.ProcessEngineServices;
+import org.junit.rules.TestRule;
+import org.junit.runner.Description;
+import org.junit.runners.model.Statement;
+import org.onap.so.bpmn.common.workflow.service.SDNCAdapterCallbackServiceImpl;
+
+/**
+ * A JUnit rule that starts the SDNC Adapter Callback Service before
+ * every test, and tears it down after every test.  Example:
+ * <pre>
+ *     @Rule
+ *     public final SDNCAdapterCallbackRule sdncAdapterCallbackRule =
+ *         new SDNCAdapterCallbackRule(processEngineRule);
+ * </pre>
+ */
+public class SDNCAdapterCallbackRule implements TestRule {
+	public static final String DEFAULT_ENDPOINT_URL =
+		"http://localhost:28080/mso/SDNCAdapterCallbackService";
+
+	private final ProcessEngineServices processEngineServices;
+	private final String endpointUrl;
+
+	public SDNCAdapterCallbackRule(ProcessEngineServices processEngineServices) {
+		this(processEngineServices, DEFAULT_ENDPOINT_URL);
+	}
+
+	public SDNCAdapterCallbackRule(ProcessEngineServices processEngineServices,
+			String endpointUrl) {
+		this.processEngineServices = processEngineServices;
+		this.endpointUrl = endpointUrl;
+	}
+
+	@Override
+	public Statement apply(final Statement baseStmt, Description description) {
+		return new Statement() {
+			@Override
+			public void evaluate() throws Throwable {
+				Endpoint endpoint = null;
+
+				try {
+					SDNCAdapterCallbackServiceImpl sdncCallbackService = new SDNCAdapterCallbackServiceImpl();
+					sdncCallbackService.setProcessEngineServices4junit(processEngineServices);
+
+					System.setProperty("com.sun.xml.ws.transport.http.HttpAdapter.dump", "true");
+					System.setProperty("com.sun.xml.internal.ws.transport.http.HttpAdapter.dump", "true");
+
+					System.out.println("Publishing Endpoint - " + endpointUrl);
+					endpoint = Endpoint.publish(endpointUrl, sdncCallbackService);
+
+					baseStmt.evaluate();
+				} finally {
+					if (endpoint != null) {
+						System.out.println("Stopping Endpoint - " + endpointUrl);
+						endpoint.stop();
+					}
+				}
+			}
+		};
+	}
+}
\ No newline at end of file
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SDNCAdapterRestV2IT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SDNCAdapterRestV2IT.java
new file mode 100644
index 0000000..baf41d1
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SDNCAdapterRestV2IT.java
@@ -0,0 +1,120 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.post;
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.onap.so.BaseIntegrationTest;
+import org.onap.so.bpmn.mock.FileUtil;
+import org.onap.so.logger.MsoLogger;
+
+/**
+ * Unit tests for SDNCAdapterRestV2.bpmn.
+ *
+ * This version of SDNCAdapterRest allows for interim notifications to be sent for
+ * any non-final response received from SDNC.
+ */
+
+public class SDNCAdapterRestV2IT extends BaseIntegrationTest {
+
+	private final CallbackSet callbacks = new CallbackSet();
+
+	MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,SDNCAdapterRestV2IT.class);
+
+
+	/**
+	 * Constructor. Insert callbacks.
+	 *
+	 * @throws IOException
+	 */
+	public SDNCAdapterRestV2IT() throws IOException {
+		String sdncCallbackFinal = FileUtil.readResourceFile("__files/SDNCAdapterRestCallbackFinal.json");
+		String sdncCallbackNonFinal = FileUtil.readResourceFile("__files/SDNCAdapterRestCallbackNonFinal.json");
+		callbacks.put("nonfinal", sdncCallbackNonFinal);
+		callbacks.put("final", sdncCallbackFinal);
+	}
+
+	/**
+	 * Test the success path through the subflow.
+	 */
+	@Test
+	@Ignore
+	public void success() throws IOException {
+		logStart();
+		mocks();
+
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<String, Object>();
+		variables.put("mso-request-id", "a4383a52-b9de-4bc4-bedf-02f3f9466535");
+		variables.put("mso-service-instance-id", "fd8bcdbb-b799-43ce-a7ff-ed8f2965a3b5");
+		variables.put("isDebugLogEnabled", "true");
+		variables.put("SDNCREST_Request",
+			FileUtil.readResourceFile("__files/SDNCAdapterRestV2Request.json"));
+		variables.put("SDNCREST_InterimNotification1",
+			FileUtil.readResourceFile("__files/SDNCInterimNotification1.json"));
+
+		invokeSubProcess("SDNCAdapterRestV2", businessKey, variables);
+
+		injectSDNCRestCallbacks(callbacks, "nonfinal");
+
+		// First non-final response will have done a notification
+		Object interimNotification = getVariableFromHistory(businessKey, "SDNCREST_interimNotification");
+		Assert.assertNotNull(interimNotification);
+
+		injectSDNCRestCallbacks(callbacks, "nonfinal");
+
+		// Second non-final response will not have done a notification
+		interimNotification = getVariableFromHistory(businessKey, "SDNCREST_interimNotification");
+		Assert.assertNull(interimNotification);
+
+		injectSDNCRestCallbacks(callbacks, "final");
+
+		interimNotification = this.getVariableFromHistory(businessKey, "SDNCREST_interimNotification");
+		Assert.assertNull(interimNotification);
+
+		waitForProcessEnd(businessKey, 10000);
+
+		Assert.assertTrue(isProcessEnded(businessKey));
+
+		logEnd();
+	}
+
+	/**
+	 * Defines WireMock stubs needed by these tests.
+	 */
+	private void mocks() {
+		stubFor(post(urlEqualTo("/SDNCAdapter/v1/sdnc"))
+			.willReturn(aResponse()
+				.withStatus(202)
+				.withHeader("Content-Type", "application/json")));
+	}
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SPIPropertiesTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SPIPropertiesTest.java
new file mode 100644
index 0000000..9239889
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SPIPropertiesTest.java
@@ -0,0 +1,69 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.onap.so.client.RestPropertiesLoader;
+import org.onap.so.client.aai.AAIProperties;
+import org.onap.so.client.dmaap.DmaapProperties;
+import org.onap.so.client.dmaap.DmaapPropertiesLoader;
+import org.onap.so.client.sdno.dmaap.SDNOHealthCheckDmaapConsumer;
+
+public class SPIPropertiesTest {
+
+	@BeforeClass
+	public static void beforeClass() {
+		System.setProperty("mso.config.path", "src/test/resources");
+	}
+	
+	@Test
+	public void notEqual() {
+		DmaapProperties one = DmaapPropertiesLoader.getInstance().getNewImpl();
+		DmaapProperties two = DmaapPropertiesLoader.getInstance().getNewImpl();
+		assertNotEquals(one, two);
+	}
+	@Test
+	public void equal() {
+		DmaapProperties one = DmaapPropertiesLoader.getInstance().getImpl();
+		DmaapProperties two = DmaapPropertiesLoader.getInstance().getImpl();
+		assertEquals(one, two);
+	}
+	@Test
+	public void restNotEqual() {
+		AAIProperties one = RestPropertiesLoader.getInstance().getNewImpl(AAIProperties.class);
+		AAIProperties two = RestPropertiesLoader.getInstance().getNewImpl(AAIProperties.class);
+		assertNotEquals(one, two);
+	}
+	@Test
+	public void restEqual() {
+		AAIProperties one = RestPropertiesLoader.getInstance().getImpl(AAIProperties.class);
+		AAIProperties two = RestPropertiesLoader.getInstance().getImpl(AAIProperties.class);
+		assertEquals(one, two);
+	}
+	
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SniroHomingV1IT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SniroHomingV1IT.java
new file mode 100644
index 0000000..f780b69
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SniroHomingV1IT.java
@@ -0,0 +1,549 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common;
+
+import static org.onap.so.bpmn.mock.StubResponseDatabase.MockGetServiceResourcesCatalogDataByModelUuid;
+import static org.onap.so.bpmn.mock.StubResponseSNIRO.*;
+import static org.junit.Assert.*;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.onap.so.BaseIntegrationTest;
+import org.onap.so.bpmn.core.WorkflowException;
+import org.onap.so.bpmn.core.domain.*;
+import org.onap.so.bpmn.mock.FileUtil;
+import org.onap.so.logger.MsoLogger;
+
+
+/**
+ * Test the SNIRO Homing subflow building block.
+ */
+@Ignore
+public class SniroHomingV1IT extends BaseIntegrationTest {
+	
+	MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,SniroHomingV1IT.class);
+	
+
+	ServiceDecomposition serviceDecomposition = new ServiceDecomposition();
+	String subscriber = "";
+	String subscriber2 = "";
+
+	private final CallbackSet callbacks = new CallbackSet();
+
+	public SniroHomingV1IT() throws IOException {
+		String sniroCallback = FileUtil.readResourceFile("__files/BuildingBlocks/sniroCallback2AR1Vnf");
+		String sniroCallback2 = FileUtil.readResourceFile("__files/BuildingBlocks/sniroCallback2AR1Vnf2Net");
+		String sniroCallback3 = FileUtil.readResourceFile("__files/BuildingBlocks/sniroCallbackInfraVnf");
+		String sniroCallbackNoSolution = FileUtil.readResourceFile("__files/BuildingBlocks/sniroCallbackNoSolutionFound");
+		String sniroCallbackPolicyException = FileUtil.readResourceFile("__files/BuildingBlocks/sniroCallbackPolicyException");
+		String sniroCallbackServiceException = FileUtil.readResourceFile("__files/BuildingBlocks/sniroCallbackServiceException");
+		callbacks.put("sniro", JSON, "SNIROResponse", sniroCallback);
+		callbacks.put("sniro2", JSON, "SNIROResponse", sniroCallback2);
+		callbacks.put("sniro3", JSON, "SNIROResponse", sniroCallback3);
+		callbacks.put("sniroNoSol", JSON, "SNIROResponse", sniroCallbackNoSolution);
+		callbacks.put("sniroPolicyEx", JSON, "SNIROResponse", sniroCallbackPolicyException);
+		callbacks.put("sniroServiceEx", JSON, "SNIROResponse", sniroCallbackServiceException);
+
+		// Service Model
+		ModelInfo sModel = new ModelInfo();
+		sModel.setModelCustomizationUuid("testModelCustomizationUuid");
+		sModel.setModelInstanceName("testModelInstanceName");
+		sModel.setModelInvariantUuid("testModelInvariantId");
+		sModel.setModelName("testModelName");
+		sModel.setModelUuid("testModelUuid");
+		sModel.setModelVersion("testModelVersion");
+		// Service Instance
+		ServiceInstance si = new ServiceInstance();
+		si.setInstanceId("testServiceInstanceId123");
+		// Allotted Resources
+		List<AllottedResource> arList = new ArrayList<AllottedResource>();
+		AllottedResource ar = new AllottedResource();
+		ar.setResourceId("testResourceIdAR");
+		ar.setResourceInstanceName("testARInstanceName");
+		ModelInfo arModel = new ModelInfo();
+		arModel.setModelCustomizationUuid("testModelCustomizationUuidAR");
+		arModel.setModelInvariantUuid("testModelInvariantIdAR");
+		arModel.setModelName("testModelNameAR");
+		arModel.setModelVersion("testModelVersionAR");
+		arModel.setModelUuid("testARModelUuid");
+		arModel.setModelType("testModelTypeAR");
+		ar.setModelInfo(arModel);
+		AllottedResource ar2 = new AllottedResource();
+		ar2.setResourceId("testResourceIdAR2");
+		ar2.setResourceInstanceName("testAR2InstanceName");
+		ModelInfo arModel2 = new ModelInfo();
+		arModel2.setModelCustomizationUuid("testModelCustomizationUuidAR2");
+		arModel2.setModelInvariantUuid("testModelInvariantIdAR2");
+		arModel2.setModelName("testModelNameAR2");
+		arModel2.setModelVersion("testModelVersionAR2");
+		arModel2.setModelUuid("testAr2ModelUuid");
+		arModel2.setModelType("testModelTypeAR2");
+		ar2.setModelInfo(arModel2);
+		arList.add(ar);
+		arList.add(ar2);
+		// Vnfs
+		List<VnfResource> vnfList = new ArrayList<VnfResource>();
+		VnfResource vnf = new VnfResource();
+		vnf.setResourceId("testResourceIdVNF");
+		vnf.setResourceInstanceName("testVnfInstanceName");
+		ModelInfo vnfModel = new ModelInfo();
+		vnfModel.setModelCustomizationUuid("testModelCustomizationUuidVNF");
+		vnfModel.setModelInvariantUuid("testModelInvariantIdVNF");
+		vnfModel.setModelName("testModelNameVNF");
+		vnfModel.setModelVersion("testModelVersionVNF");
+		vnfModel.setModelUuid("testVnfModelUuid");
+		vnfModel.setModelType("testModelTypeVNF");
+		vnf.setModelInfo(vnfModel);
+		vnfList.add(vnf);
+		logger.debug("SERVICE DECOMP: " + serviceDecomposition.getServiceResourcesJsonString());
+		serviceDecomposition.setModelInfo(sModel);
+		serviceDecomposition.setAllottedResources(arList);
+		serviceDecomposition.setVnfResources(vnfList);
+		serviceDecomposition.setServiceInstance(si);
+
+		// Subscriber
+		subscriber = "{\"globalSubscriberId\": \"SUB12_0322_DS_1201\",\"subscriberCommonSiteId\": \"DALTX0101\",\"subscriberName\": \"SUB_12_0322_DS_1201\"}";
+		subscriber2 = "{\"globalSubscriberId\": \"SUB12_0322_DS_1201\",\"subscriberName\": \"SUB_12_0322_DS_1201\"}";
+	}
+
+	@Test
+	 // 1802 merge
+	
+	public void testHoming_success_2AR1Vnf() throws Exception {
+
+		mockSNIRO();
+
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		setVariables(variables);
+
+		invokeSubProcess("Homing", businessKey, variables);
+
+		injectWorkflowMessages(callbacks, "sniro");
+
+		waitForProcessEnd(businessKey, 10000);
+
+		//Get Variables
+		WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
+		ServiceDecomposition serviceDecompositionExp = (ServiceDecomposition) getVariableFromHistory(businessKey, "serviceDecomposition");
+		String expectedSniroRequest = (String) getVariableFromHistory(businessKey, "sniroRequest");
+
+		Resource resourceAR = serviceDecompositionExp.getServiceResource("testResourceIdAR");
+		HomingSolution resourceARHoming = resourceAR.getHomingSolution();
+		Resource resourceAR2 = serviceDecompositionExp.getServiceResource("testResourceIdAR2");
+		HomingSolution resourceARHoming2 = resourceAR2.getHomingSolution();
+		Resource resourceVNF = serviceDecompositionExp.getServiceResource("testResourceIdVNF");
+		HomingSolution resourceVNFHoming = resourceVNF.getHomingSolution();
+		String resourceARHomingString = resourceARHoming.toString();
+		resourceARHomingString = resourceARHomingString.replaceAll("\\s+", " ");
+		String resourceARHoming2String = resourceARHoming2.toString();
+		resourceARHoming2String = resourceARHoming2String.replaceAll("\\s+", " ");
+		String resourceVNFHomingString = resourceVNFHoming.toString();
+		resourceVNFHomingString = resourceVNFHomingString.replaceAll("\\s+", " ");
+		expectedSniroRequest = expectedSniroRequest.replaceAll("\\s+", "");
+
+		assertNull(workflowException);
+		assertEquals(homingSolutionService("service", "testSIID1", "MDTNJ01", "aic", "dfwtx", "KDTNJ01", "3.0", "\"f1d563e8-e714-4393-8f99-cc480144a05e\", \"j1d563e8-e714-4393-8f99-cc480144a05e\"", "\"s1d563e8-e714-4393-8f99-cc480144a05e\", \"b1d563e8-e714-4393-8f99-cc480144a05e\""), resourceARHomingString);
+		assertEquals(homingSolutionService("service", "testSIID2", "testVnfHostname2", "aic", "testCloudRegionId2", "testAicClli2", "3.0", null, null), resourceARHoming2String);
+		assertEquals(homingSolutionCloud("cloud", "", "", "aic", "testCloudRegionId3", "testAicClli3", "3.0", "\"91d563e8-e714-4393-8f99-cc480144a05e\", \"21d563e8-e714-4393-8f99-cc480144a05e\"", "\"31d563e8-e714-4393-8f99-cc480144a05e\", \"71d563e8-e714-4393-8f99-cc480144a05e\""), resourceVNFHomingString);
+		assertEquals(verifySniroRequest(), expectedSniroRequest);
+
+	}
+
+	@Test
+	 // 1802 merge
+	
+	public void testHoming_success_2AR1Vnf2Net() throws Exception {
+
+		mockSNIRO();
+
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		setVariables2(variables);
+
+		invokeSubProcess("Homing", businessKey, variables);
+
+		injectWorkflowMessages(callbacks, "sniro2");
+
+		waitForProcessEnd(businessKey, 10000);
+
+		//Get Variables
+		WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
+		ServiceDecomposition serviceDecompositionExp = (ServiceDecomposition) getVariableFromHistory(businessKey, "serviceDecomposition");
+		String expectedSniroRequest = (String) getVariableFromHistory(businessKey, "sniroRequest");
+
+		Resource resourceAR = serviceDecompositionExp.getServiceResource("testResourceIdAR");
+		HomingSolution resourceARHoming = resourceAR.getHomingSolution();
+		Resource resourceAR2 = serviceDecompositionExp.getServiceResource("testResourceIdAR2");
+		HomingSolution resourceARHoming2 = resourceAR2.getHomingSolution();
+		Resource resourceVNF = serviceDecompositionExp.getServiceResource("testResourceIdVNF");
+		HomingSolution resourceVNFHoming = resourceVNF.getHomingSolution();
+		Resource resourceNet = serviceDecompositionExp.getServiceResource("testResourceIdNet");
+		HomingSolution resourceNetHoming = resourceNet.getHomingSolution();
+		Resource resourceNet2 = serviceDecompositionExp.getServiceResource("testResourceIdNet2");
+		HomingSolution resourceNetHoming2 = resourceNet2.getHomingSolution();
+
+		String resourceARHomingString = resourceARHoming.toString();
+		resourceARHomingString = resourceARHomingString.replaceAll("\\s+", " ");
+		String resourceARHoming2String = resourceARHoming2.toString();
+		resourceARHoming2String = resourceARHoming2String.replaceAll("\\s+", " ");
+		String resourceVNFHomingString = resourceVNFHoming.toString();
+		resourceVNFHomingString = resourceVNFHomingString.replaceAll("\\s+", " ");
+		String resourceNetHomingString = resourceNetHoming.toString();
+		resourceNetHomingString = resourceNetHomingString.replaceAll("\\s+", " ");
+		String resourceNetHoming2String = resourceNetHoming2.toString();
+		resourceNetHoming2String = resourceNetHoming2String.replaceAll("\\s+", " ");
+		expectedSniroRequest = expectedSniroRequest.replaceAll("\\s+", "");
+
+		assertNull(workflowException);
+		assertEquals(homingSolutionService("service", "testSIID1", "MDTNJ01", "aic", "dfwtx", "KDTNJ01", "3.0", "\"f1d563e8-e714-4393-8f99-cc480144a05e\", \"j1d563e8-e714-4393-8f99-cc480144a05e\"", "\"s1d563e8-e714-4393-8f99-cc480144a05e\", \"b1d563e8-e714-4393-8f99-cc480144a05e\""), resourceARHomingString);
+		assertEquals(homingSolutionService("service", "testSIID2", "testVnfHostname2", "aic", "testCloudRegionId2", "testAicClli2", "3.0", null, null), resourceARHoming2String);
+		assertEquals(homingSolutionCloud("cloud", "", "", "aic", "testCloudRegionId3", "testAicClli3", "3.0", "\"91d563e8-e714-4393-8f99-cc480144a05e\", \"21d563e8-e714-4393-8f99-cc480144a05e\"", "\"31d563e8-e714-4393-8f99-cc480144a05e\", \"71d563e8-e714-4393-8f99-cc480144a05e\""), resourceVNFHomingString);
+		assertEquals(homingSolutionService("service", "testServiceInstanceIdNet", "testVnfHostNameNet", "aic", "testCloudRegionIdNet", "testAicClliNet", "3.0", null, null), resourceNetHomingString);
+		assertEquals(homingSolutionCloud("cloud", "", "", "aic", "testCloudRegionIdNet2", "testAicClliNet2", "3.0", "\"f1d563e8-e714-4393-8f99-cc480144a05n\", \"j1d563e8-e714-4393-8f99-cc480144a05n\"", "\"s1d563e8-e714-4393-8f99-cc480144a05n\", \"b1d563e8-e714-4393-8f99-cc480144a05n\""), resourceNetHoming2String);
+		assertEquals(verifySniroRequest(), expectedSniroRequest);
+	}
+
+	@Test
+	 // 1802 merge
+	
+	public void testHoming_success_vnfResourceList() throws Exception {
+
+		// Create a Service Decomposition 
+		MockGetServiceResourcesCatalogDataByModelUuid("2f7f309d-c842-4644-a2e4-34167be5eeb4", "/BuildingBlocks/catalogResp.json");
+		String busKey = UUID.randomUUID().toString();
+		Map<String, Object> vars = new HashMap<>();
+		setVariablesForServiceDecomposition(vars, "testRequestId123", "ff5256d2-5a33-55df-13ab-12abad84e7ff");
+		invokeSubProcess("DecomposeService", busKey, vars);
+
+		ServiceDecomposition sd = (ServiceDecomposition) getVariableFromHistory(busKey, "serviceDecomposition");
+		List<VnfResource> vnfResourceList = sd.getVnfResources();
+		vnfResourceList.get(0).setResourceId("test-resource-id-000");
+
+		// Invoke Homing
+
+		mockSNIRO();
+
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("homingService", "sniro");
+		variables.put("isDebugLogEnabled", "true");
+		variables.put("msoRequestId", "testRequestId");
+		variables.put("serviceInstanceId", "testServiceInstanceId");
+		variables.put("serviceDecomposition", sd);
+		variables.put("subscriberInfo", subscriber2);
+
+		invokeSubProcess("Homing", businessKey, variables);
+		injectWorkflowMessages(callbacks, "sniro3");
+		waitForProcessEnd(businessKey, 10000);
+
+		//Get Variables
+
+		WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
+		ServiceDecomposition serviceDecompositionExp = (ServiceDecomposition) getVariableFromHistory(businessKey, "serviceDecomposition");
+
+		Resource resourceVnf = serviceDecompositionExp.getServiceResource("test-resource-id-000");
+		HomingSolution resourceVnfHoming = resourceVnf.getHomingSolution();
+
+		String resourceVnfHomingString = resourceVnfHoming.toString();
+		resourceVnfHomingString = resourceVnfHomingString.replaceAll("\\s+", " ");
+
+		assertNull(workflowException);
+
+		//Verify request
+		String sniroRequest = (String) getVariableFromHistory(businessKey, "sniroRequest");
+		assertEquals(FileUtil.readResourceFile("__files/BuildingBlocks/sniroRequest_infravnf").replaceAll("\n", "").replaceAll("\r", "").replaceAll("\t", ""), sniroRequest.replaceAll("\n", "").replaceAll("\r", "").replaceAll("\t", ""));
+
+		assertEquals(homingSolutionService("service", "service-instance-01234", "MDTNJ01", "att-aic", "mtmnj1a", "KDTNJ01", "3.0", "\"f1d563e8-e714-4393-8f99-cc480144a05e\", \"j1d563e8-e714-4393-8f99-cc480144a05e\"", "\"s1d563e8-e714-4393-8f99-cc480144a05e\", \"b1d563e8-e714-4393-8f99-cc480144a05e\""), resourceVnfHomingString);
+	}
+
+	@Test
+	
+	public void testHoming_success_existingLicense() throws Exception {
+
+		mockSNIRO();
+
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<String, Object>();
+		setVariablesExistingLicense(variables);
+
+		invokeSubProcess("Homing", businessKey, variables);
+
+		injectWorkflowMessages(callbacks, "sniro");
+
+		waitForProcessEnd(businessKey, 10000);
+
+		//Get Variables
+		WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
+		ServiceDecomposition serviceDecompositionExp = (ServiceDecomposition) getVariableFromHistory(businessKey, "serviceDecomposition");
+		String sniroRequest = (String) getVariableFromHistory(businessKey, "sniroRequest");
+
+		Resource resourceAR = serviceDecompositionExp.getServiceResource("testResourceIdAR");
+		HomingSolution resourceARHoming = resourceAR.getHomingSolution();
+		Resource resourceAR2 = serviceDecompositionExp.getServiceResource("testResourceIdAR2");
+		HomingSolution resourceARHoming2 = resourceAR2.getHomingSolution();
+		Resource resourceVNF = serviceDecompositionExp.getServiceResource("testResourceIdVNF");
+		HomingSolution resourceVNFHoming = resourceVNF.getHomingSolution();
+		String resourceARHomingString = resourceARHoming.toString();
+		resourceARHomingString = resourceARHomingString.replaceAll("\\s+", " ");
+		String resourceARHoming2String = resourceARHoming2.toString();
+		resourceARHoming2String = resourceARHoming2String.replaceAll("\\s+", " ");
+		String resourceVNFHomingString = resourceVNFHoming.toString();
+		resourceVNFHomingString = resourceVNFHomingString.replaceAll("\\s+", " ");
+		sniroRequest = sniroRequest.replaceAll("\\s+", "");
+
+		assertNull(workflowException);
+		assertEquals(homingSolutionService("service", "testSIID1", "MDTNJ01", "aic", "dfwtx", "KDTNJ01", "3.0", "\"f1d563e8-e714-4393-8f99-cc480144a05e\", \"j1d563e8-e714-4393-8f99-cc480144a05e\"", "\"s1d563e8-e714-4393-8f99-cc480144a05e\", \"b1d563e8-e714-4393-8f99-cc480144a05e\""), resourceARHomingString);
+		assertEquals(homingSolutionService("service", "testSIID2", "testVnfHostname2", "aic", "testCloudRegionId2", "testAicClli2", "3.0", null, null), resourceARHoming2String);
+		assertEquals(homingSolutionCloud("cloud", "", "", "aic", "testCloudRegionId3", "testAicClli3", "3.0", "\"91d563e8-e714-4393-8f99-cc480144a05e\", \"21d563e8-e714-4393-8f99-cc480144a05e\"", "\"31d563e8-e714-4393-8f99-cc480144a05e\", \"71d563e8-e714-4393-8f99-cc480144a05e\""), resourceVNFHomingString);
+		assertEquals(verifySniroRequest_existingLicense(), sniroRequest);
+
+	}
+
+
+	@Test
+	
+	public void testHoming_error_inputVariable() throws Exception {
+
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		setVariables3(variables);
+
+		invokeSubProcess("Homing", businessKey, variables);
+
+		waitForProcessEnd(businessKey, 10000);
+
+		//Get Variables
+		WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
+
+		assertEquals("WorkflowException[processKey=Homing,errorCode=4000,errorMessage=A required input variable is missing or null]", workflowException.toString());
+	}
+
+	@Test
+	
+	public void testHoming_error_badResponse() throws Exception {
+		mockSNIRO_500();
+
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		setVariables(variables);
+
+		invokeSubProcess("Homing", businessKey, variables);
+
+		waitForProcessEnd(businessKey, 10000);
+
+		//Get Variables
+		WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
+
+		assertEquals("WorkflowException[processKey=Homing,errorCode=500,errorMessage=Received a Bad Sync Response from Sniro/OOF.]", workflowException.toString());
+	}
+
+	@Test
+	 // 1802 merge
+	
+	public void testHoming_error_sniroNoSolution() throws Exception {
+		mockSNIRO();
+
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		setVariables(variables);
+
+		invokeSubProcess("Homing", businessKey, variables);
+
+		injectWorkflowMessages(callbacks, "sniroNoSol");
+
+		waitForProcessEnd(businessKey, 10000);
+
+		//Get Variables
+		WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
+
+		assertEquals("WorkflowException[processKey=Homing,errorCode=400,errorMessage=No solution found for plan 08e1b8cf-144a-4bac-b293-d5e2eedc97e8]", workflowException.toString());
+	}
+
+	@Test
+	
+	public void testHoming_error_sniroPolicyException() throws Exception {
+		mockSNIRO();
+
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		setVariables(variables);
+
+		invokeSubProcess("Homing", businessKey, variables);
+
+		injectWorkflowMessages(callbacks, "sniroPolicyEx");
+
+		waitForProcessEnd(businessKey, 10000);
+
+		//Get Variables
+		WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
+
+		assertEquals("WorkflowException[processKey=Homing,errorCode=400,errorMessage=Sniro Async Callback Response contains a Request Error Policy Exception: Message content size exceeds the allowable limit]", workflowException.toString());
+	}
+
+	@Test
+	
+	public void testHoming_error_sniroServiceException() throws Exception {
+		mockSNIRO();
+
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		setVariables(variables);
+
+		invokeSubProcess("Homing", businessKey, variables);
+
+		injectWorkflowMessages(callbacks, "sniroServiceEx");
+
+		waitForProcessEnd(businessKey, 10000);
+
+		//Get Variables
+		WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
+
+		assertEquals("WorkflowException[processKey=Homing,errorCode=400,errorMessage=Sniro Async Callback Response contains a Request Error Service Exception: SNIROPlacementError: requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http://135.21.171.200:8091/v1/plans/97b4e303-5f75-492c-8fb2-21098281c8b8]", workflowException.toString());
+	}
+
+
+
+	private void setVariables(Map<String, Object> variables) {
+		variables.put("homingService", "sniro");
+		variables.put("isDebugLogEnabled", "true");
+	//	variables.put("mso-request-id", "testRequestId");
+		variables.put("msoRequestId", "testRequestId");
+		variables.put("serviceInstanceId", "testServiceInstanceId");
+		variables.put("serviceDecomposition", serviceDecomposition);
+		variables.put("subscriberInfo", subscriber2);
+
+	}
+
+	private void setVariables2(Map<String, Object> variables) {
+		List<NetworkResource> netList = new ArrayList<NetworkResource>();
+		NetworkResource net = new NetworkResource();
+		net.setResourceId("testResourceIdNet");
+		ModelInfo netModel = new ModelInfo();
+		netModel.setModelCustomizationUuid("testModelCustomizationUuidNet");
+		netModel.setModelInvariantUuid("testModelInvariantIdNet");
+		netModel.setModelName("testModelNameNet");
+		netModel.setModelVersion("testModelVersionNet");
+		net.setModelInfo(netModel);
+		netList.add(net);
+		NetworkResource net2 = new NetworkResource();
+		net2.setResourceId("testResourceIdNet2");
+		ModelInfo netModel2 = new ModelInfo();
+		netModel2.setModelCustomizationUuid("testModelCustomizationUuidNet2");
+		netModel2.setModelInvariantUuid("testModelInvariantIdNet2");
+		netModel2.setModelName("testModelNameNet2");
+		netModel2.setModelVersion("testModelVersionNet2");
+		net2.setModelInfo(netModel2);
+		netList.add(net2);
+		serviceDecomposition.setNetworkResources(netList);
+
+		variables.put("homingService", "sniro");
+		variables.put("isDebugLogEnabled", "true");
+		variables.put("msoRequestId", "testRequestId");
+		variables.put("serviceInstanceId", "testServiceInstanceId");
+		variables.put("serviceDecomposition", serviceDecomposition);
+		variables.put("subscriberInfo", subscriber2);
+	}
+
+	private void setVariables3(Map<String, Object> variables) {
+		variables.put("homingService", "sniro");
+		variables.put("isDebugLogEnabled", "true");
+	//	variables.put("mso-request-id", "testRequestId");
+		variables.put("msoRequestId", "testRequestId");
+		variables.put("serviceInstanceId", "testServiceInstanceId");
+		variables.put("serviceDecomposition", null);
+		variables.put("subscriberInfo", subscriber2);
+
+	}
+
+	private void setVariablesExistingLicense(Map<String, Object> variables) {
+		HomingSolution currentHomingSolution = new HomingSolution();
+		serviceDecomposition.getVnfResources().get(0).setCurrentHomingSolution(currentHomingSolution);
+		serviceDecomposition.getVnfResources().get(0).getCurrentHomingSolution().getLicense().addEntitlementPool("testEntitlementPoolId1");
+		serviceDecomposition.getVnfResources().get(0).getCurrentHomingSolution().getLicense().addEntitlementPool("testEntitlementPoolId2");
+
+		serviceDecomposition.getVnfResources().get(0).getCurrentHomingSolution().getLicense().addLicenseKeyGroup("testLicenseKeyGroupId1");
+		serviceDecomposition.getVnfResources().get(0).getCurrentHomingSolution().getLicense().addLicenseKeyGroup("testLicenseKeyGroupId2");
+
+		variables.put("isDebugLogEnabled", "true");
+	//	variables.put("mso-request-id", "testRequestId");
+		variables.put("msoRequestId", "testRequestId");
+		variables.put("serviceInstanceId", "testServiceInstanceId");
+		variables.put("serviceDecomposition", serviceDecomposition);
+		variables.put("subscriberInfo", subscriber2);
+
+	}
+
+	private String homingSolutionService(String type, String serviceInstanceId, String vnfHostname, String cloudOwner, String cloudRegionId, String aicClli, String aicVersion, String enList, String licenseList){
+		String solution = "";
+		if(enList == null){
+			solution = "{ \"homingSolution\" : { \"inventoryType\" : \"" + type + "\", \"serviceInstanceId\" : \"" + serviceInstanceId + "\", \"vnfHostname\" : \"" + vnfHostname + "\", \"cloudOwner\" : \"" + cloudOwner + "\", \"cloudRegionId\" : \"" + cloudRegionId + "\", \"aicClli\" : \"" + aicClli + "\", \"aicVersion\" : \"" + aicVersion + "\", \"license\" : { }, \"rehome\" : false } }";
+		}else{
+			solution = "{ \"homingSolution\" : { \"inventoryType\" : \"" + type + "\", \"serviceInstanceId\" : \"" + serviceInstanceId + "\", \"vnfHostname\" : \"" + vnfHostname + "\", \"cloudOwner\" : \"" + cloudOwner + "\", \"cloudRegionId\" : \"" + cloudRegionId + "\", \"aicClli\" : \"" + aicClli + "\", \"aicVersion\" : \"" + aicVersion + "\", \"license\" : { \"entitlementPoolList\" : [ " + enList +  " ], \"licenseKeyGroupList\" : [ " + licenseList +  " ] }, \"rehome\" : false } }";
+		}
+		return solution;
+	}
+
+	private String homingSolutionCloud(String type, String serviceInstanceId, String vnfHostname, String cloudOwner, String cloudRegionId, String aicClli, String aicVersion, String enList, String licenseList){
+		String solution = "";
+		if(enList == null){
+			solution = "{ \"homingSolution\" : { \"inventoryType\" : \"" + type + "\", \"cloudOwner\" : \"" + cloudOwner + "\", \"cloudRegionId\" : \"" + cloudRegionId + "\", \"aicClli\" : \"" + aicClli + "\", \"aicVersion\" : \"" + aicVersion + "\", \"license\" : { }, \"rehome\" : false } }";
+		}else{
+			solution = "{ \"homingSolution\" : { \"inventoryType\" : \"" + type + "\", \"cloudOwner\" : \"" + cloudOwner + "\", \"cloudRegionId\" : \"" + cloudRegionId + "\", \"aicClli\" : \"" + aicClli + "\", \"aicVersion\" : \"" + aicVersion + "\", \"license\" : { \"entitlementPoolList\" : [ " + enList +  " ], \"licenseKeyGroupList\" : [ " + licenseList +  " ] }, \"rehome\" : false } }";
+		}
+		return solution;
+	}
+
+	private void setVariablesForServiceDecomposition(Map<String, Object> variables, String requestId, String siId) {
+		variables.put("homingService", "sniro");
+		variables.put("isDebugLogEnabled", "true");
+		variables.put("mso-request-id", requestId);
+		variables.put("msoRequestId", requestId);
+		variables.put("serviceInstanceId",siId);
+
+		String serviceModelInfo = "{ "+ "\"modelType\": \"service\"," +
+				"\"modelInvariantUuid\": \"1cc4e2e4-eb6e-404d-a66f-c8733cedcce8\"," +
+				"\"modelUuid\": \"2f7f309d-c842-4644-a2e4-34167be5eeb4\"," +
+				"\"modelName\": \"ADIOD vRouter vCE 011017 Service\"," +
+				"\"modelVersion\": \"5.0\"," +
+				"}";
+		variables.put("serviceModelInfo", serviceModelInfo);
+	}
+
+	private String verifySniroRequest(){
+		String request = "{\"requestInfo\":{\"transactionId\":\"testRequestId\",\"requestId\":\"testRequestId\",\"callbackUrl\":\"http://localhost:28090/workflows/messages/message/SNIROResponse/testRequestId\",\"sourceId\":\"mso\",\"requestType\":\"initial\",\"optimizer\":[\"placement\",\"license\"],\"numSolutions\":1,\"timeout\":1800},\"placementInfo\":{\"serviceModelInfo\":{\"modelType\":\"\",\"modelInvariantId\":\"testModelInvariantId\",\"modelVersionId\":\"testModelUuid\",\"modelName\":\"testModelName\",\"modelVersion\":\"testModelVersion\"},\"subscriberInfo\":{\"globalSubscriberId\":\"SUB12_0322_DS_1201\",\"subscriberName\":\"SUB_12_0322_DS_1201\",\"subscriberCommonSiteId\":\"\"},\"demandInfo\":{\"placementDemand\":[{\"resourceInstanceType\":\"ALLOTTED_RESOURCE\",\"serviceResourceId\":\"testResourceIdAR\",\"resourceModuleName\":\"\",\"resourceModelInfo\":{\"modelCustomizationId\":\"testModelCustomizationUuidAR\",\"modelInvariantId\":\"testModelInvariantIdAR\",\"modelName\":\"testModelNameAR\",\"modelVersion\":\"testModelVersionAR\",\"modelVersionId\":\"testARModelUuid\",\"modelType\":\"testModelTypeAR\"},\"tenantId\":\"\",\"tenantName\":\"\"},{\"resourceInstanceType\":\"ALLOTTED_RESOURCE\",\"serviceResourceId\":\"testResourceIdAR2\",\"resourceModuleName\":\"\",\"resourceModelInfo\":{\"modelCustomizationId\":\"testModelCustomizationUuidAR2\",\"modelInvariantId\":\"testModelInvariantIdAR2\",\"modelName\":\"testModelNameAR2\",\"modelVersion\":\"testModelVersionAR2\",\"modelVersionId\":\"testAr2ModelUuid\",\"modelType\":\"testModelTypeAR2\"},\"tenantId\":\"\",\"tenantName\":\"\"}],\"licenseDemand\":[{\"resourceInstanceType\":\"VNF\",\"serviceResourceId\":\"testResourceIdVNF\",\"resourceModuleName\":\"\",\"resourceModelInfo\":{\"modelCustomizationId\":\"testModelCustomizationUuidVNF\",\"modelInvariantId\":\"testModelInvariantIdVNF\",\"modelName\":\"testModelNameVNF\",\"modelVersion\":\"testModelVersionVNF\",\"modelVersionId\":\"testVnfModelUuid\",\"modelType\":\"testModelTypeVNF\"}}]},\"policyId\":[],\"serviceInstanceId\":\"testServiceInstanceId123\",\"orderInfo\":\"{\\\"requestParameters\\\":null}\"}}";
+		return request;
+	}
+
+	private String verifySniroRequest_existingLicense(){
+		String request = "{\"requestInfo\":{\"transactionId\":\"testRequestId\",\"requestId\":\"testRequestId\",\"callbackUrl\":\"http://localhost:28090/workflows/messages/message/SNIROResponse/testRequestId\",\"sourceId\":\"mso\",\"requestType\":\"speedchanged\",\"optimizer\":[\"placement\",\"license\"],\"numSolutions\":1,\"timeout\":1800},\"placementInfo\":{\"serviceModelInfo\":{\"modelType\":\"\",\"modelInvariantId\":\"testModelInvariantId\",\"modelVersionId\":\"testModelUuid\",\"modelName\":\"testModelName\",\"modelVersion\":\"testModelVersion\"},\"subscriberInfo\":{\"globalSubscriberId\":\"SUB12_0322_DS_1201\",\"subscriberName\":\"SUB_12_0322_DS_1201\",\"subscriberCommonSiteId\":\"\"},\"demandInfo\":{\"placementDemand\":[{\"resourceInstanceType\":\"ALLOTTED_RESOURCE\",\"serviceResourceId\":\"testResourceIdAR\",\"resourceModuleName\":\"\",\"resourceModelInfo\":{\"modelCustomizationId\":\"testModelCustomizationUuidAR\",\"modelInvariantId\":\"testModelInvariantIdAR\",\"modelName\":\"testModelNameAR\",\"modelVersion\":\"testModelVersionAR\",\"modelVersionId\":\"testARModelUuid\",\"modelType\":\"testModelTypeAR\"},\"tenantId\":\"\",\"tenantName\":\"\"},{\"resourceInstanceType\":\"ALLOTTED_RESOURCE\",\"serviceResourceId\":\"testResourceIdAR2\",\"resourceModuleName\":\"\",\"resourceModelInfo\":{\"modelCustomizationId\":\"testModelCustomizationUuidAR2\",\"modelInvariantId\":\"testModelInvariantIdAR2\",\"modelName\":\"testModelNameAR2\",\"modelVersion\":\"testModelVersionAR2\",\"modelVersionId\":\"testAr2ModelUuid\",\"modelType\":\"testModelTypeAR2\"},\"tenantId\":\"\",\"tenantName\":\"\"}],\"licenseDemand\":[{\"resourceInstanceType\":\"VNF\",\"serviceResourceId\":\"testResourceIdVNF\",\"resourceModuleName\":\"\",\"resourceModelInfo\":{\"modelCustomizationId\":\"testModelCustomizationUuidVNF\",\"modelInvariantId\":\"testModelInvariantIdVNF\",\"modelName\":\"testModelNameVNF\",\"modelVersion\":\"testModelVersionVNF\",\"modelVersionId\":\"testVnfModelUuid\",\"modelType\":\"testModelTypeVNF\"},\"existingLicense\":[{\"entitlementPoolUUID\":[\"testEntitlementPoolId1\",\"testEntitlementPoolId2\"],\"licenseKeyGroupUUID\":[\"testLicenseKeyGroupId1\",\"testLicenseKeyGroupId2\"]}]}]},\"policyId\":[],\"serviceInstanceId\":\"testServiceInstanceId123\",\"orderInfo\":\"{\\\"requestParameters\\\":null}\"}}";
+		return request;
+	}
+
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIGenericVnfIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIGenericVnfIT.java
new file mode 100644
index 0000000..e1a265b
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIGenericVnfIT.java
@@ -0,0 +1,174 @@
+/*- 
+ * ============LICENSE_START======================================================= 
+ * ONAP - SO 
+ * ================================================================================ 
+ * Copyright (C) 2017 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.onap.so.bpmn.common;
+
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockAAIVfModuleBadPatch;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithDepth;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetGenericVnfById_404;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPatchGenericVnf;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutGenericVnf;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutGenericVnf_Bad;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.onap.so.BaseIntegrationTest;
+import org.onap.so.bpmn.core.WorkflowException;
+import org.onap.so.bpmn.mock.FileUtil;
+import org.onap.so.logger.MsoLogger;
+
+/**
+ * Unit tests for UpdateAAIGenericVnf bpmn.
+ */
+
+public class UpdateAAIGenericVnfIT extends BaseIntegrationTest {
+	
+	MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,CreateAAIVfModuleIT.class);
+	
+		
+	/**
+	 * Test the happy path through the flow.
+	 */
+	@Test	
+	
+	public void happyPath() throws IOException {
+		logStart();
+		
+		String updateAAIGenericVnfRequest =	FileUtil.readResourceFile("__files/VfModularity/UpdateAAIGenericVnfRequest.xml"); 
+		MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
+		MockPutGenericVnf("/skask", 200);
+		MockPatchGenericVnf("skask");
+		
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("mso-request-id", UUID.randomUUID().toString());
+		variables.put("isDebugLogEnabled","true");
+		variables.put("UpdateAAIGenericVnfRequest", updateAAIGenericVnfRequest);
+		invokeSubProcess("UpdateAAIGenericVnf", businessKey, variables);
+		
+		Assert.assertTrue(isProcessEnded(businessKey));
+		String response = (String) getVariableFromHistory(businessKey, "UAAIGenVnf_updateGenericVnfResponse");
+		Integer responseCode = (Integer) getVariableFromHistory(businessKey, "UAAIGenVnf_updateGenericVnfResponseCode");
+		logger.debug("Subflow response code: " + responseCode);
+		logger.debug("Subflow response: " + response);
+		Assert.assertEquals(200, responseCode.intValue());
+		
+		logEnd();
+	}
+
+	/**
+	 * Test the happy path through the flow.
+	 */
+	@Test	
+	
+	public void personaMismatch() throws IOException {
+		
+		logStart();
+		
+		String updateAAIGenericVnfRequest =	FileUtil.readResourceFile("__files/VfModularity/UpdateAAIGenericVnfRequest.xml"); 
+		updateAAIGenericVnfRequest = updateAAIGenericVnfRequest.replaceFirst("introvert", "extrovert");
+		
+		MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
+		
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("mso-request-id", UUID.randomUUID().toString());
+		variables.put("isDebugLogEnabled","true");
+		variables.put("UpdateAAIGenericVnfRequest", updateAAIGenericVnfRequest);
+		invokeSubProcess("UpdateAAIGenericVnf", businessKey, variables);
+		
+		Assert.assertTrue(isProcessEnded(businessKey));
+		WorkflowException workflowException = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
+		logger.debug("Workflow Exception: " + workflowException);
+		Assert.assertNotNull(workflowException);
+		
+		logEnd();
+	}
+
+	/**
+	 * Test the case where the GET to AAI returns a 404.
+	 */
+	@Test	
+	
+	public void badGet() throws IOException {
+		
+		logStart();
+		
+		String updateAAIGenericVnfRequest = FileUtil.readResourceFile("__files/VfModularity/UpdateAAIGenericVnfRequest.xml"); 
+		
+		MockGetGenericVnfById_404("skask[?]depth=1");
+		
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("mso-request-id", UUID.randomUUID().toString());
+		variables.put("isDebugLogEnabled","true");
+		variables.put("UpdateAAIGenericVnfRequest", updateAAIGenericVnfRequest);
+		invokeSubProcess("UpdateAAIGenericVnf", businessKey, variables);
+		
+		Assert.assertTrue(isProcessEnded(businessKey));
+		String response = (String) getVariableFromHistory(businessKey, "UAAIGenVnf_getGenericVnfResponse");
+		Integer responseCode = (Integer) getVariableFromHistory(businessKey, "UAAIGenVnf_getGenericVnfResponseCode");
+		logger.debug("Subflow response code: " + responseCode);
+		logger.debug("Subflow response: " + response);
+		Assert.assertEquals(404, responseCode.intValue());
+		
+		logEnd();
+	}
+
+	/**
+	 * Test the case where the GET to AAI is successful, but he subsequent PUT returns 404.
+	 */
+	@Test	
+	
+	public void badPatch() throws IOException {
+		
+		logStart();
+		
+		String updateAAIGenericVnfRequest = FileUtil.readResourceFile("__files/VfModularity/UpdateAAIGenericVnfRequest.xml"); 
+		
+		MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
+		MockPutGenericVnf_Bad("skask", 404);
+		MockAAIVfModuleBadPatch("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/skask", 404);
+		
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("mso-request-id", UUID.randomUUID().toString());
+		variables.put("isDebugLogEnabled","true");
+		variables.put("UpdateAAIGenericVnfRequest", updateAAIGenericVnfRequest);
+		invokeSubProcess("UpdateAAIGenericVnf", businessKey, variables);
+		
+		Assert.assertTrue(isProcessEnded(businessKey));
+		String response = (String) getVariableFromHistory(businessKey, "UAAIGenVnf_updateGenericVnfResponse");
+		Integer responseCode = (Integer) getVariableFromHistory(businessKey, "UAAIGenVnf_updateGenericVnfResponseCode");
+		logger.debug("Subflow response code: " + responseCode);
+		logger.debug("Subflow response: " + response);
+		Assert.assertEquals(404, responseCode.intValue());
+		
+		logEnd();
+	}
+}
+
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIVfModuleIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIVfModuleIT.java
new file mode 100644
index 0000000..3ff2657
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIVfModuleIT.java
@@ -0,0 +1,142 @@
+/*- 
+ * ============LICENSE_START======================================================= 
+ * ONAP - SO 
+ * ================================================================================ 
+ * Copyright (C) 2017 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.onap.so.bpmn.common;
+
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockAAIVfModuleBadPatch;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetGenericVnfById;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithPriority;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetGenericVnfById_404;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPatchVfModuleId;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutGenericVnf;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.onap.so.BaseIntegrationTest;
+import org.onap.so.bpmn.mock.FileUtil;
+import org.onap.so.logger.MsoLogger;
+
+/**
+ * Unit tests for UpdateAAIVfModuleTest.bpmn.
+ */
+
+public class UpdateAAIVfModuleIT extends BaseIntegrationTest {
+	
+	MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,CreateAAIVfModuleIT.class);
+	
+		
+	/**
+	 * Test the happy path through the flow.
+	 */
+	@Test	
+	
+	public void happyPath() throws IOException {
+		logStart();
+		
+		String updateAAIVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/UpdateAAIVfModuleRequest.xml"); 
+		MockGetGenericVnfByIdWithPriority("/skask/vf-modules/vf-module/supercool", 200, "VfModularity/VfModule-supercool.xml");
+		MockPutGenericVnf("/skask/vf-modules/vf-module/supercool", "PCRF", 200);
+		MockPatchVfModuleId("skask", "supercool");
+		
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("mso-request-id", UUID.randomUUID().toString());
+		variables.put("isDebugLogEnabled","true");
+		variables.put("UpdateAAIVfModuleRequest", updateAAIVfModuleRequest);
+		invokeSubProcess("UpdateAAIVfModule", businessKey, variables);
+		
+		Assert.assertTrue(isProcessEnded(businessKey));
+		String response = (String) getVariableFromHistory(businessKey, "UAAIVfMod_updateVfModuleResponse");
+		Integer responseCode = (Integer) getVariableFromHistory(businessKey, "UAAIVfMod_updateVfModuleResponseCode");
+		logger.debug("Subflow response code: " + responseCode);
+		logger.debug("Subflow response: " + response);
+		Assert.assertEquals(200, responseCode.intValue());
+		
+		logEnd();
+	}
+
+	/**
+	 * Test the case where the GET to AAI returns a 404.
+	 */
+	@Test	
+	
+	public void badGet() throws IOException {
+		
+		logStart();
+		
+		String updateAAIVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/UpdateAAIVfModuleRequest.xml"); 
+		MockGetGenericVnfById("/skask/vf-modules/vf-module/.*", "VfModularity/VfModule-supercool.xml", 404);
+		
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("mso-request-id", UUID.randomUUID().toString());
+		variables.put("isDebugLogEnabled","true");
+		variables.put("UpdateAAIVfModuleRequest", updateAAIVfModuleRequest);
+		invokeSubProcess("UpdateAAIVfModule", businessKey, variables);
+		
+		Assert.assertTrue(isProcessEnded(businessKey));
+		String response = (String) getVariableFromHistory(businessKey, "UAAIVfMod_getVfModuleResponse");
+		Integer responseCode = (Integer) getVariableFromHistory(businessKey, "UAAIVfMod_getVfModuleResponseCode");
+		logger.debug("Subflow response code: " + responseCode);
+		logger.debug("Subflow response: " + response);
+		Assert.assertEquals(404, responseCode.intValue());
+		
+		logEnd();
+	}
+
+	/**
+	 * Test the case where the GET to AAI is successful, but he subsequent PUT returns 404.
+	 */
+	@Test	
+	
+	public void badPatch() throws IOException {
+		
+		logStart();
+		
+		String updateAAIVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/UpdateAAIVfModuleRequest.xml"); 
+		MockGetGenericVnfById_404("/skask/vf-modules/vf-module/supercool");
+		MockGetGenericVnfById("/skask/vf-modules/vf-module/supercool", "VfModularity/VfModule-supercool.xml", 200);
+		MockAAIVfModuleBadPatch("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/skask/vf-modules/vf-module/supercool", 404);
+		
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("mso-request-id", UUID.randomUUID().toString());
+		variables.put("isDebugLogEnabled","true");
+		variables.put("UpdateAAIVfModuleRequest", updateAAIVfModuleRequest);
+		invokeSubProcess("UpdateAAIVfModule", businessKey, variables);
+		
+		Assert.assertTrue(isProcessEnded(businessKey));
+		String response = (String) getVariableFromHistory(businessKey, "UAAIVfMod_updateVfModuleResponse");
+		Integer responseCode = (Integer) getVariableFromHistory(businessKey, "UAAIVfMod_updateVfModuleResponseCode");
+		logger.debug("Subflow response code: " + responseCode);
+		logger.debug("Subflow response: " + response);
+		Assert.assertEquals(404, responseCode.intValue());
+		
+		logEnd();
+	}
+}
+
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/VnfAdapterRestV1IT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/VnfAdapterRestV1IT.java
new file mode 100644
index 0000000..fc15e92
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/VnfAdapterRestV1IT.java
@@ -0,0 +1,386 @@
+/*- 
+ * ============LICENSE_START======================================================= 
+ * ONAP - SO 
+ * ================================================================================ 
+ * Copyright (C) 2017 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.onap.so.bpmn.common;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.onap.so.bpmn.mock.StubResponseVNFAdapter.mockVNFDelete;
+import static org.onap.so.bpmn.mock.StubResponseVNFAdapter.mockVNFPost;
+import static org.onap.so.bpmn.mock.StubResponseVNFAdapter.mockVNFPut;
+import static org.onap.so.bpmn.mock.StubResponseVNFAdapter.mockVNFRollbackDelete;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.onap.so.BaseIntegrationTest;
+import org.onap.so.bpmn.core.WorkflowException;
+import org.onap.so.logger.MsoLogger;
+
+/**
+ * Unit tests for VnfAdapterRestV1.
+ */
+
+public class VnfAdapterRestV1IT extends BaseIntegrationTest {
+	
+	MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL,VnfAdapterRestV1IT.class);
+	
+
+	private static final String EOL = "\n";
+
+	private final CallbackSet callbacks = new CallbackSet();
+
+	private final String CREATE_VF_MODULE_REQUEST =
+		"<createVfModuleRequest>" + EOL +
+		"  <cloudSiteId>cloudSiteId</cloudSiteId>" + EOL +
+		"  <tenantId>tenantId</tenantId>" + EOL +
+		"  <vnfId>vnfId</vnfId>" + EOL +
+		"  <vfModuleName>vfModuleName</vfModuleName>" + EOL +
+		"  <vfModuleId>vfModuleId</vfModuleId>" + EOL +
+		"  <vnfType>vnfType</vnfType>" + EOL +
+		"  <vnfVersion>vnfVersion</vnfVersion>" + EOL +
+		"  <vfModuleType>vfModuleType</vfModuleType>" + EOL +
+		"  <volumeGroupId>volumeGroupId</volumeGroupId>" + EOL +
+		"  <volumeGroupStackId>volumeGroupStackId</volumeGroupStackId>" + EOL +
+		"  <baseVfModuleId>baseVfModuleId</baseVfModuleId>" + EOL +
+		"  <baseVfModuleStackId>baseVfModuleStackId</baseVfModuleStackId>" + EOL +
+		"  <skipAAI>true</skipAAI>" + EOL +
+		"  <backout>false</backout>" + EOL +
+		"  <failIfExists>true</failIfExists>" + EOL +
+		"  <vfModuleParams>" + EOL +
+		"    <entry>" + EOL +
+		"      <key>key1</key>" + EOL +
+		"      <value>value1</value>" + EOL +
+		"    </entry>" + EOL +
+		"    <entry>" + EOL +
+		"      <key>key2</key>" + EOL +
+		"      <value>value2</value>" + EOL +
+		"    </entry>" + EOL +
+		"  </vfModuleParams>" + EOL +
+		"  <msoRequest>" + EOL +
+		"    <requestId>requestId</requestId>" + EOL +
+		"    <serviceInstanceId>serviceInstanceId</serviceInstanceId>" + EOL +
+		"  </msoRequest>" + EOL +
+		"  <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
+		"  <notificationUrl>http://localhost:28080/mso/WorkflowMessage</notificationUrl>" + EOL +
+		"</createVfModuleRequest>" + EOL;
+
+	private final String UPDATE_VF_MODULE_REQUEST =
+		"<updateVfModuleRequest>" + EOL +
+		"  <cloudSiteId>cloudSiteId</cloudSiteId>" + EOL +
+		"  <tenantId>tenantId</tenantId>" + EOL +
+		"  <vnfId>vnfId</vnfId>" + EOL +
+		"  <vfModuleName>vfModuleName</vfModuleName>" + EOL +
+		"  <vfModuleId>vfModuleId</vfModuleId>" + EOL +
+		"  <vfModuleStackId>vfModuleStackId</vfModuleStackId>" + EOL +
+		"  <vnfType>vnfType</vnfType>" + EOL +
+		"  <vnfVersion>vnfVersion</vnfVersion>" + EOL +
+		"  <vfModuleType>vfModuleType</vfModuleType>" + EOL +
+		"  <volumeGroupId>volumeGroupId</volumeGroupId>" + EOL +
+		"  <volumeGroupStackId>volumeGroupStackId</volumeGroupStackId>" + EOL +
+		"  <baseVfModuleId>baseVfModuleId</baseVfModuleId>" + EOL +
+		"  <baseVfModuleStackId>baseVfModuleStackId</baseVfModuleStackId>" + EOL +
+		"  <skipAAI>true</skipAAI>" + EOL +
+		"  <backout>false</backout>" + EOL +
+		"  <failIfExists>true</failIfExists>" + EOL +
+		"  <vfModuleParams>" + EOL +
+		"    <entry>" + EOL +
+		"      <key>key1</key>" + EOL +
+		"      <value>value1</value>" + EOL +
+		"    </entry>" + EOL +
+		"    <entry>" + EOL +
+		"      <key>key2</key>" + EOL +
+		"      <value>value2</value>" + EOL +
+		"    </entry>" + EOL +
+		"  </vfModuleParams>" + EOL +
+		"  <msoRequest>" + EOL +
+		"    <requestId>requestId</requestId>" + EOL +
+		"    <serviceInstanceId>serviceInstanceId</serviceInstanceId>" + EOL +
+		"  </msoRequest>" + EOL +
+		"  <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
+		"  <notificationUrl>http://localhost:28080/mso/WorkflowMessage</notificationUrl>" + EOL +
+		"</updateVfModuleRequest>" + EOL;
+
+	private final String DELETE_VF_MODULE_REQUEST =
+		"<deleteVfModuleRequest>" + EOL +
+		"  <cloudSiteId>cloudSiteId</cloudSiteId>" + EOL +
+		"  <tenantId>tenantId</tenantId>" + EOL +
+		"  <vnfId>vnfId</vnfId>" + EOL +
+		"  <vfModuleId>vfModuleId</vfModuleId>" + EOL +
+		"  <vfModuleStackId>vfModuleStackId</vfModuleStackId>" + EOL +
+		"  <skipAAI>true</skipAAI>" + EOL +
+		"  <msoRequest>" + EOL +
+		"    <requestId>requestId</requestId>" + EOL +
+		"    <serviceInstanceId>serviceInstanceId</serviceInstanceId>" + EOL +
+		"  </msoRequest>" + EOL +
+		"  <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
+		"  <notificationUrl>http://localhost:28080/mso/WorkflowMessage</notificationUrl>" + EOL +
+		"</deleteVfModuleRequest>" + EOL;
+
+	private final String ROLLBACK_VF_MODULE_REQUEST =
+			"<rollbackVfModuleRequest>" + EOL +
+			"  <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
+			"  <notificationUrl>http://localhost:28080/mso/WorkflowMessage</notificationUrl>" + EOL +
+			"  <skipAAI>true</skipAAI>" + EOL +
+			"  <vfModuleRollback>" + EOL +
+			"    <cloudSiteId>cloudSiteId</cloudSiteId>" + EOL +
+			"    <tenantId>tenantId</tenantId>" + EOL +
+			"    <vnfId>vnfId</vnfId>" + EOL +
+			"    <vfModuleId>vfModuleId</vfModuleId>" + EOL +
+			"    <vfModuleStackId>vfModuleStackId</vfModuleStackId>" + EOL +
+			"    <msoRequest>" + EOL +
+			"      <requestId>requestId</requestId>" + EOL +
+			"      <serviceInstanceId>serviceInstanceId</serviceInstanceId>" + EOL +
+			"    </msoRequest>" + EOL +
+			"    <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
+			"    <vfModuleCreated>true</vfModuleCreated>" + EOL +
+			"  </vfModuleRollback>" + EOL +
+			"</rollbackVfModuleRequest>" + EOL;
+
+	public VnfAdapterRestV1IT() throws IOException {
+		callbacks.put("createVfModule",
+			"<createVfModuleResponse>" + EOL +
+			"  <vnfId>vnfId</vnfId>" + EOL +
+			"  <vfModuleId>vfModuleId</vfModuleId>" + EOL +
+			"  <vfModuleStackId>vfModuleStackId</vfModuleStackId>" + EOL +
+			"  <vfModuleCreated>true</vfModuleCreated>" + EOL +
+			"  <vfModuleOutputs>" + EOL +
+			"    <entry>" + EOL +
+			"      <key>key1</key>" + EOL +
+			"      <value>value1</value>" + EOL +
+			"    </entry>" + EOL +
+			"    <entry>" + EOL +
+			"      <key>key2</key>" + EOL +
+			"      <value>value2</value>" + EOL +
+			"    </entry>" + EOL +
+			"  </vfModuleOutputs>" + EOL +
+			"  <rollback>" + EOL +
+			"    <vnfId>vnfId</vnfId>" + EOL +
+			"    <vfModuleId>vfModuleId</vfModuleId>" + EOL +
+			"    <vfModuleStackId>vfModuleStackId</vfModuleStackId>" + EOL +
+			"    <vfModuleCreated>true</vfModuleCreated>" + EOL +
+			"    <tenantId>tenantId</tenantId>" + EOL +
+			"    <cloudSiteId>cloudSiteId</cloudSiteId>" + EOL +
+			"    <msoRequest>" + EOL +
+			"      <requestId>requestId</requestId>" + EOL +
+			"      <serviceInstanceId>serviceInstanceId</serviceInstanceId>" + EOL +
+			"    </msoRequest>" + EOL +
+			"    <messageId>messageId</messageId>" + EOL +
+			"  </rollback>" + EOL +
+			"  <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
+			"</createVfModuleResponse>" + EOL);
+
+		callbacks.put("updateVfModule",
+			"<updateVfModuleResponse>" + EOL +
+			"  <vnfId>vnfId</vnfId>" + EOL +
+			"  <vfModuleId>vfModuleId</vfModuleId>" + EOL +
+			"  <vfModuleStackId>vfModuleStackId</vfModuleStackId>" + EOL +
+			"  <vfModuleOutputs>" + EOL +
+			"    <entry>" + EOL +
+			"      <key>key1</key>" + EOL +
+			"      <value>value1</value>" + EOL +
+			"    </entry>" + EOL +
+			"    <entry>" + EOL +
+			"      <key>key2</key>" + EOL +
+			"      <value>value2</value>" + EOL +
+			"    </entry>" + EOL +
+			"  </vfModuleOutputs>" + EOL +
+			"  <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
+			"</updateVfModuleResponse>" + EOL);
+
+		callbacks.put("deleteVfModule",
+			"<deleteVfModuleResponse>" + EOL +
+			"  <vnfId>vnfId</vnfId>" + EOL +
+			"  <vfModuleId>vfModuleId</vfModuleId>" + EOL +
+			"  <vfModuleDeleted>true</vfModuleDeleted>" + EOL +
+			"  <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
+			"</deleteVfModuleResponse>" + EOL);
+
+		callbacks.put("rollbackVfModule",
+			"<rollbackVfModuleResponse>" + EOL +
+			"  <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
+			"  <vfModuleRolledback>true</vfModuleRolledback>" + EOL +
+			"</rollbackVfModuleResponse>" + EOL);
+
+		callbacks.put("vfModuleException",
+			"<vfModuleException>" + EOL +
+			"  <message>message</message>" + EOL +
+			"  <category>category</category>" + EOL +
+			"  <rolledBack>false</rolledBack>" + EOL +
+			"  <messageId>{{MESSAGE-ID}}</messageId>" + EOL +
+			"</vfModuleException>" + EOL);
+	}
+
+	@Test
+	
+	public void testCreateVfModuleSuccess() throws Exception {
+		logStart();
+
+		mockVNFPost("", 202, "vnfId");
+
+		String requestId = "dffbae0e-5588-4bd6-9749-b0f0adb52312";
+		String messageId = requestId + "-" + System.currentTimeMillis();
+		String request = CREATE_VF_MODULE_REQUEST.replace("{{MESSAGE-ID}}", messageId);
+
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("mso-request-id", requestId);
+		variables.put("isDebugLogEnabled", "true");
+		variables.put("vnfAdapterRestV1Request", request);
+
+		invokeSubProcess("vnfAdapterRestV1", businessKey, variables);
+		injectVNFRestCallbacks(callbacks, "createVfModule");
+		waitForProcessEnd(businessKey, 10000);
+
+		String response = (String) getVariableFromHistory(businessKey, "vnfAdapterRestV1Response");
+		logger.debug("Response:\n" + response);
+		assertTrue(response!=null && response.contains("<createVfModuleResponse>"));
+		assertTrue((boolean) getVariableFromHistory(businessKey, "VNFREST_SuccessIndicator"));
+
+		logEnd();
+	}
+
+	@Test
+	
+	public void testUpdateVfModuleSuccess() throws Exception {
+		logStart();
+
+		mockVNFPut("/vfModuleId", 202);
+
+		String requestId = "dffbae0e-5588-4bd6-9749-b0f0adb52312";
+		String messageId = requestId + "-" + System.currentTimeMillis();
+		String request = UPDATE_VF_MODULE_REQUEST.replace("{{MESSAGE-ID}}", messageId);
+
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("mso-request-id", requestId);
+		variables.put("isDebugLogEnabled", "true");
+		variables.put("vnfAdapterRestV1Request", request);
+
+		invokeSubProcess("vnfAdapterRestV1", businessKey, variables);
+		injectVNFRestCallbacks(callbacks, "updateVfModule");
+		waitForProcessEnd(businessKey, 10000);
+
+		String response = (String) getVariableFromHistory(businessKey, "vnfAdapterRestV1Response");
+		logger.debug("Response:\n" + response);
+		assertTrue(response.contains("<updateVfModuleResponse>"));
+		assertTrue((boolean) getVariableFromHistory(businessKey, "VNFREST_SuccessIndicator"));
+
+		logEnd();
+	}
+
+	@Test
+	
+	public void testDeleteVfModuleSuccess() throws Exception {
+		logStart();
+
+		mockVNFDelete("vnfId", "/vfModuleId", 202);
+
+		String requestId = "dffbae0e-5588-4bd6-9749-b0f0adb52312";
+		String messageId = requestId + "-" + System.currentTimeMillis();
+		String request = DELETE_VF_MODULE_REQUEST.replace("{{MESSAGE-ID}}", messageId);
+
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("mso-request-id", requestId);
+		variables.put("isDebugLogEnabled", "true");
+		variables.put("vnfAdapterRestV1Request", request);
+
+		invokeSubProcess("vnfAdapterRestV1", businessKey, variables);
+		injectVNFRestCallbacks(callbacks, "deleteVfModule");
+		waitForProcessEnd(businessKey, 10000);
+
+		String response = (String) getVariableFromHistory(businessKey, "vnfAdapterRestV1Response");
+		logger.debug("Response:\n" + response);
+		assertTrue(response.contains("<deleteVfModuleResponse>"));
+		assertTrue((boolean) getVariableFromHistory(businessKey, "VNFREST_SuccessIndicator"));
+
+		logEnd();
+	}
+
+	@Test
+	
+	public void testRollbackVfModuleSuccess() throws Exception {
+		logStart();
+
+		mockVNFRollbackDelete("/vfModuleId", 202);
+
+		String requestId = "dffbae0e-5588-4bd6-9749-b0f0adb52312";
+		String messageId = requestId + "-" + System.currentTimeMillis();
+		String request = ROLLBACK_VF_MODULE_REQUEST.replace("{{MESSAGE-ID}}", messageId);
+
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("mso-request-id", requestId);
+		variables.put("isDebugLogEnabled", "true");
+		variables.put("vnfAdapterRestV1Request", request);
+
+		invokeSubProcess("vnfAdapterRestV1", businessKey, variables);
+		injectVNFRestCallbacks(callbacks, "rollbackVfModule");
+		waitForProcessEnd(businessKey, 10000);
+
+		String response = (String) getVariableFromHistory(businessKey, "vnfAdapterRestV1Response");
+		logger.debug("Response:\n" + response);
+		assertTrue(response.contains("<rollbackVfModuleResponse>"));
+		assertTrue((boolean) getVariableFromHistory(businessKey, "VNFREST_SuccessIndicator"));
+
+		logEnd();
+	}
+
+	@Test
+	
+	public void testCreateVfModuleException() throws Exception {
+		logStart();
+
+		mockVNFPost("", 202, "vnfId");
+
+		String requestId = "dffbae0e-5588-4bd6-9749-b0f0adb52312";
+		String messageId = requestId + "-" + System.currentTimeMillis();
+		String request = CREATE_VF_MODULE_REQUEST.replace("{{MESSAGE-ID}}", messageId);
+
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("mso-request-id", requestId);
+		variables.put("isDebugLogEnabled", "true");
+		variables.put("vnfAdapterRestV1Request", request);
+
+		invokeSubProcess("vnfAdapterRestV1", businessKey, variables);
+		injectVNFRestCallbacks(callbacks, "vfModuleException");
+		waitForProcessEnd(businessKey, 10000);
+
+		WorkflowException wfe = (WorkflowException) getVariableFromHistory(businessKey, "WorkflowException");
+		assertNotNull(wfe);
+		logger.debug(wfe.toString());
+
+		String response = (String) getVariableFromHistory(businessKey, "WorkflowResponse");
+		logger.debug("Response:\n" + response);
+		assertTrue(response.contains("<vfModuleException>"));
+		assertFalse((boolean) getVariableFromHistory(businessKey, "VNFREST_SuccessIndicator"));
+
+		logEnd();
+	}
+}
+
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowAsyncResourceTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowAsyncResourceTest.java
new file mode 100644
index 0000000..a746bbb
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowAsyncResourceTest.java
@@ -0,0 +1,84 @@
+/*- 
+ * ============LICENSE_START======================================================= 
+ * ONAP - SO 
+ * ================================================================================ 
+ * Copyright (C) 2017 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.onap.so.bpmn.common;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.camunda.bpm.engine.variable.impl.VariableMapImpl;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.onap.so.bpmn.common.workflow.context.WorkflowResponse;
+import org.onap.so.bpmn.common.workflow.service.WorkflowAsyncResource;
+
+@Ignore
+public class WorkflowAsyncResourceTest extends WorkflowTest {
+
+	@Test
+	@Deployment(resources = { "testAsyncResource.bpmn" })
+	public void asyncRequestSuccess() throws InterruptedException {
+		//it can be any request which asynchronously processed by the workflow
+		String request = "<aetgt:CreateTenantRequest xmlns:aetgt=\"http://org.onap/so/workflow/schema/v1\" xmlns:sdncadapterworkflow=\"http://org.onap/so/workflow/schema/v1\" xmlns:ns5=\"http://org.onap/so/request/types/v1\">  <msoservtypes:service-information xmlns:msoservtypes=\"http://org.onap/so/request/types/v1\">    <msoservtypes:service-type>SDN-ETHERNET-INTERNET</msoservtypes:service-type>    <msoservtypes:service-instance-id>HI/VLXM/950604//SW_INTERNET</msoservtypes:service-instance-id>    <msoservtypes:subscriber-name>SubName01</msoservtypes:subscriber-name> </msoservtypes:service-information> </aetgt:CreateTenantRequest>";
+
+		Map<String,String> variables = new HashMap<>();
+		variables.put("testAsyncRequestMsg", request);
+		variables.put("mso-request-id", UUID.randomUUID().toString());
+		variables.put("mso-service-request-timeout", "5");
+		
+		WorkflowResponse workflowResponse = BPMNUtil.executeAsyncWorkflow(processEngineRule, "testAsyncProcess", variables);
+		assertEquals("Received the request, the process is getting executed, request message<aetgt:CreateTenantRequest xmlns:aetgt=\"http://org.onap/so/workflow/schema/v1\" xmlns:sdncadapterworkflow=\"http://org.onap/so/workflow/schema/v1\" xmlns:ns5=\"http://org.onap/so/request/types/v1\">  <msoservtypes:service-information xmlns:msoservtypes=\"http://org.onap/so/request/types/v1\">    <msoservtypes:service-type>SDN-ETHERNET-INTERNET</msoservtypes:service-type>    <msoservtypes:service-instance-id>HI/VLXM/950604//SW_INTERNET</msoservtypes:service-instance-id>    <msoservtypes:subscriber-name>SubName01</msoservtypes:subscriber-name> </msoservtypes:service-information> </aetgt:CreateTenantRequest>", workflowResponse.getResponse());
+		assertEquals(200, workflowResponse.getMessageCode());
+	}
+
+	private void executeWorkflow(String request, String requestId, String processKey) throws InterruptedException {
+		WorkflowAsyncResource workflowResource = new WorkflowAsyncResource();
+		VariableMapImpl variableMap = new VariableMapImpl();
+
+		Map<String, Object> variableValueType = new HashMap<>();
+
+		Map<String, Object> requestMsg = new HashMap<>();
+		requestMsg.put("value", request);
+		requestMsg.put("type", "String");
+
+		Map<String, Object> msorequestId = new HashMap<>();
+		msorequestId.put("type", "String");
+		msorequestId.put("value",requestId);
+
+		Map<String, Object> timeout = new HashMap<>();
+		timeout.put("type", "String");
+		timeout.put("value","5"); 
+
+		variableValueType.put("testAsyncRequestMsg", requestMsg);
+		variableValueType.put("mso-request-id", msorequestId);
+		variableValueType.put("mso-service-request-timeout", timeout);
+
+		variableMap.put("variables", variableValueType);
+		
+		workflowResource.setProcessEngineServices4junit(processEngineRule);
+		workflowResource.startProcessInstanceByKey( processKey, variableMap);
+	}
+
+	
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowContextHolderTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowContextHolderTest.java
new file mode 100644
index 0000000..0efecac
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowContextHolderTest.java
@@ -0,0 +1,69 @@
+/*- 
+ * ============LICENSE_START======================================================= 
+ * ONAP - SO 
+ * ================================================================================ 
+ * Copyright (C) 2017 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.onap.so.bpmn.common;
+
+
+
+import java.util.UUID;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.onap.so.bpmn.common.workflow.context.WorkflowCallbackResponse;
+import org.onap.so.bpmn.common.workflow.context.WorkflowContext;
+import org.onap.so.bpmn.common.workflow.context.WorkflowContextHolder;
+import org.onap.so.bpmn.common.workflow.context.WorkflowResponse;
+
+
+public class WorkflowContextHolderTest {
+
+
+	@Test
+	public void testProcessCallback() throws Exception {
+		String requestId = UUID.randomUUID().toString();		
+		String message = "TEST MESSATGE";
+		String responseMessage = "Successfully processed request";
+		int testCode = 200;		
+		
+		
+		WorkflowContextHolder contextHolder = WorkflowContextHolder.getInstance();
+		 
+		WorkflowCallbackResponse callbackResponse = new WorkflowCallbackResponse();
+		callbackResponse.setMessage(message);
+		callbackResponse.setResponse(responseMessage);
+		callbackResponse.setStatusCode(testCode);
+		
+		contextHolder.processCallback("testAsyncProcess","process-instance-id",requestId,callbackResponse);
+		
+		//same object returned
+		WorkflowContext contextFound = contextHolder.getWorkflowContext(requestId);
+		if(contextFound == null)
+			throw new Exception("Expected to find Context Object");
+		
+		WorkflowResponse testResponse = contextFound.getWorkflowResponse();
+		Assert.assertEquals(200,testResponse.getMessageCode());
+		Assert.assertEquals(message, testResponse.getMessage());
+		Assert.assertEquals(responseMessage, testResponse.getResponse());
+		
+		
+
+	}
+
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java
new file mode 100644
index 0000000..8ebc80c
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java
@@ -0,0 +1,2215 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+import static org.onap.so.bpmn.core.json.JsonUtils.getJsonValue;
+import static org.onap.so.bpmn.core.json.JsonUtils.updJsonValue;
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.lang.management.ManagementFactory;
+import java.lang.management.RuntimeMXBean;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import javax.ws.rs.core.Response;
+import javax.xml.bind.JAXBException;
+import javax.xml.namespace.NamespaceContext;
+import javax.xml.namespace.QName;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpression;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+
+import org.camunda.bpm.engine.HistoryService;
+import org.camunda.bpm.engine.ProcessEngine;
+import org.camunda.bpm.engine.ProcessEngineException;
+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.test.ProcessEngineRule;
+import org.camunda.bpm.engine.variable.impl.VariableMapImpl;
+import org.custommonkey.xmlunit.DetailedDiff;
+import org.custommonkey.xmlunit.XMLUnit;
+import org.json.JSONArray;
+import org.json.JSONObject;
+import org.junit.Rule;
+import org.onap.so.bpmn.common.adapter.sdnc.CallbackHeader;
+import org.onap.so.bpmn.common.adapter.sdnc.SDNCAdapterCallbackRequest;
+import org.onap.so.bpmn.common.adapter.sdnc.SDNCAdapterResponse;
+import org.onap.so.bpmn.common.adapter.vnf.CreateVnfNotification;
+import org.onap.so.bpmn.common.adapter.vnf.DeleteVnfNotification;
+import org.onap.so.bpmn.common.adapter.vnf.MsoExceptionCategory;
+import org.onap.so.bpmn.common.adapter.vnf.MsoRequest;
+import org.onap.so.bpmn.common.adapter.vnf.UpdateVnfNotification;
+import org.onap.so.bpmn.common.adapter.vnf.VnfRollback;
+import org.onap.so.bpmn.common.workflow.context.WorkflowResponse;
+import org.onap.so.bpmn.common.workflow.service.SDNCAdapterCallbackServiceImpl;
+import org.onap.so.bpmn.common.workflow.service.VnfAdapterNotifyServiceImpl;
+import org.onap.so.bpmn.common.workflow.service.WorkflowAsyncResource;
+import org.onap.so.bpmn.common.workflow.service.WorkflowMessageResource;
+import org.onap.so.bpmn.common.workflow.service.WorkflowResource;
+import org.onap.so.bpmn.core.domain.Resource;
+import org.onap.so.bpmn.core.domain.ServiceDecomposition;
+import org.onap.so.logger.MsoLogger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+
+
+/**
+ * A base class for Workflow tests.
+ * <p>
+ * WireMock response transformers may be specified by declaring public
+ * static fields with the @WorkflowTestTransformer annotation. For example:
+ * <pre>
+ *     @WorkflowTestTransformer
+ *     public static final ResponseTransformer sdncAdapterMockTransformer =
+ *         new SDNCAdapterMockTransformer();
+ * </pre>
+ */
+
+public abstract class WorkflowTest {
+
+	private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, WorkflowTest.class);
+
+	//TODO this is not used anymore, can maybe be removed
+	@Rule
+	public ProcessEngineRule processEngineRule;
+
+	@Autowired
+	protected WorkflowResource workflowResourceSync;
+
+	@Autowired
+	protected ProcessEngine processEngine;
+
+	@Autowired
+	protected RuntimeService runtimeService;
+
+	@Autowired
+	protected HistoryService historyService;
+
+	@Autowired
+	private WorkflowAsyncResource workflowResource;
+
+	@Autowired
+	private WorkflowMessageResource workflowMessageResource;
+
+	@Autowired
+	SDNCAdapterCallbackServiceImpl callbackService;
+	/**
+	 * Content-Type for XML.
+	 */
+	protected static final String XML = "application/xml";
+
+	/**
+	 * Content-Type for JSON.
+	 */
+	protected static final String JSON = "application/json; charset=UTF-8";
+
+
+	/**
+	 * Constructor.
+	 */
+	public WorkflowTest() throws RuntimeException {
+	}
+
+	/**
+	 * The current request ID.  Normally set when an "invoke" method is called.
+	 */
+	protected volatile String msoRequestId = null;
+
+	/**
+	 * The current service instance ID.  Normally set when an "invoke" method
+	 * is called.
+	 */
+	protected volatile String msoServiceInstanceId = null;
+
+	/**
+	 * Logs a test start method.
+	 */
+	protected void logStart() {
+		msoLogger.debug("STARTED TEST");
+	}
+
+	/**
+	 * Logs a test end method.
+	 */
+	protected void logEnd() {
+		msoLogger.debug("ENDED TEST");
+	}
+
+	/**
+	 * Invokes a subprocess.
+	 * @param processKey the process key
+	 * @param businessKey a unique key that will identify the process instance
+	 * @param injectedVariables variables to inject into the process
+	 */
+	protected void invokeSubProcess(String processKey, String businessKey, Map<String, Object> injectedVariables) {
+		RuntimeMXBean runtimeMxBean = ManagementFactory.getRuntimeMXBean();
+		List<String> arguments = runtimeMxBean.getInputArguments();
+		msoLogger.debug("JVM args = " + arguments);
+
+		msoRequestId = (String) injectedVariables.get("mso-request-id");
+		String requestId = (String) injectedVariables.get("msoRequestId");
+
+		if (msoRequestId == null && requestId == null) {
+			String msg = "mso-request-id variable was not provided";
+			msoLogger.debug(msg);
+			fail(msg);
+		}
+
+		// Note: some scenarios don't have a service-instance-id, may be null
+		msoServiceInstanceId = (String) injectedVariables.get("mso-service-instance-id");
+
+
+		runtimeService.startProcessInstanceByKey(processKey, businessKey, injectedVariables);
+	}
+
+	protected String invokeSubProcess(String processKey,  Map<String, Object> injectedVariables) {
+		RuntimeMXBean runtimeMxBean = ManagementFactory.getRuntimeMXBean();
+		List<String> arguments = runtimeMxBean.getInputArguments();
+		msoLogger.debug("JVM args = " + arguments);
+
+		msoRequestId = (String) injectedVariables.get("mso-request-id");
+		String requestId = (String) injectedVariables.get("msoRequestId");
+
+		if (msoRequestId == null && requestId == null) {
+			String msg = "mso-request-id variable was not provided";
+			msoLogger.debug(msg);
+			fail(msg);
+		}
+
+		// Note: some scenarios don't have a service-instance-id, may be null
+		msoServiceInstanceId = (String) injectedVariables.get("mso-service-instance-id");
+
+
+		ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(processKey, msoRequestId, injectedVariables);
+		return processInstance.getId();
+	}
+
+	/**
+	 * Invokes an asynchronous process.
+	 * Errors are handled with junit assertions and will cause the test to fail.
+	 * @param processKey the process key
+	 * @param schemaVersion the API schema version, e.g. "v1"
+	 * @param businessKey a unique key that will identify the process instance
+	 * @param request the request
+	 * @return a TestAsyncResponse object associated with the test
+	 * @throws InterruptedException
+	 */
+	protected TestAsyncResponse invokeAsyncProcess(String processKey,
+			String schemaVersion, String businessKey, String request) throws InterruptedException {
+		return invokeAsyncProcess(processKey, schemaVersion, businessKey, request, null);
+	}
+
+	/**
+	 * Invokes an asynchronous process.
+	 * Errors are handled with junit assertions and will cause the test to fail.
+	 * @param processKey the process key
+	 * @param schemaVersion the API schema version, e.g. "v1"
+	 * @param businessKey a unique key that will identify the process instance
+	 * @param request the request
+	 * @param injectedVariables optional variables to inject into the process
+	 * @return a TestAsyncResponse object associated with the test
+	 * @throws InterruptedException
+	 */
+	protected TestAsyncResponse invokeAsyncProcess(String processKey,
+			String schemaVersion, String businessKey, String request,
+			Map<String, Object> injectedVariables) {
+
+		RuntimeMXBean runtimeMxBean = ManagementFactory.getRuntimeMXBean();
+		List<String> arguments = runtimeMxBean.getInputArguments();
+		msoLogger.debug("JVM args = " + arguments);
+
+		Map<String, Object> variables = createVariables(schemaVersion, businessKey,
+			request, injectedVariables, false);
+		VariableMapImpl variableMapImpl = createVariableMapImpl(variables);
+
+		msoLogger.debug("Sending " + request + " to " + processKey + " process");
+
+		TestAsyncResponse asyncResponse = new TestAsyncResponse();
+
+		asyncResponse.setResponse(workflowResource.startProcessInstanceByKey( processKey, variableMapImpl));
+
+		return asyncResponse;
+	}
+
+	/**
+	 * Invokes an asynchronous process.
+	 * Errors are handled with junit assertions and will cause the test to fail.
+	 * @param processKey the process key
+	 * @param schemaVersion the API schema version, e.g. "v1"
+	 * @param businessKey a unique key that will identify the process instance
+	 * @param request the request
+	 * @param injectedVariables optional variables to inject into the process
+	 * @param serviceInstantiationModel indicates whether this method is being
+	 * invoked for a flow that is designed using the service instantiation model
+	 * @return a TestAsyncResponse object associated with the test
+	 * @throws InterruptedException
+	 */
+	protected Response invokeAsyncProcess(String processKey,
+			String schemaVersion, String businessKey, String request,
+			Map<String, Object> injectedVariables, boolean serviceInstantiationModel) {
+
+		RuntimeMXBean runtimeMxBean = ManagementFactory.getRuntimeMXBean();
+		List<String> arguments = runtimeMxBean.getInputArguments();
+		msoLogger.debug("JVM args = " + arguments);
+
+		Map<String, Object> variables = createVariables(schemaVersion, businessKey,
+			request, injectedVariables, serviceInstantiationModel);
+		VariableMapImpl variableMapImpl = createVariableMapImpl(variables);
+
+		msoLogger.debug("Sending " + request + " to " + processKey + " process");
+
+		return workflowResource.startProcessInstanceByKey( processKey, variableMapImpl);
+
+	}
+
+	/**
+	 * Private helper method that creates a variable map for a request.
+	 * Errors are handled with junit assertions and will cause the test to fail.
+	 * @param schemaVersion the API schema version, e.g. "v1"
+	 * @param businessKey a unique key that will identify the process instance
+	 * @param request the request
+	 * @param injectedVariables optional variables to inject into the process
+	 * @param serviceInstantiationModel indicates whether this method is being
+	 * invoked for a flow that is designed using the service instantiation model
+	 * @return a variable map
+	 */
+	private Map<String, Object> createVariables(String schemaVersion,
+			String businessKey, String request, Map<String, Object> injectedVariables,
+			boolean serviceInstantiationModel) {
+
+		Map<String, Object> variables = new HashMap<>();
+
+		// These variables may be overridded by injected variables.
+		variables.put("mso-service-request-timeout", "180");
+		variables.put("isDebugLogEnabled", "true");
+
+		// These variables may not be overridded by injected variables.
+		String[] notAllowed = new String[] {
+				"mso-schema-version",
+				"mso-business-key",
+				"bpmnRequest",
+				"mso-request-id",
+				"mso-service-instance-id"
+		};
+
+		if (injectedVariables != null) {
+			for (String key : injectedVariables.keySet()) {
+				for (String var : notAllowed) {
+					if (var.equals(key)) {
+						String msg = "Cannot specify " + var + " in injected variables";
+						msoLogger.debug(msg);
+						fail(msg);
+					}
+				}
+
+				variables.put(key, injectedVariables.get(key));
+			}
+		}
+
+		variables.put("mso-schema-version", schemaVersion);
+		variables.put("mso-business-key", businessKey);
+		variables.put("bpmnRequest", request);
+
+		if (serviceInstantiationModel) {
+
+			/*
+			 * The request ID and the service instance ID are generated for flows
+			 * that follow the service instantiation model unless "requestId" and
+			 * "serviceInstanceId" are injected variables.
+			 */
+
+			try {
+				msoRequestId = (String) injectedVariables.get("requestId");
+				variables.put("mso-request-id", msoRequestId);
+				msoServiceInstanceId = (String) injectedVariables.get("serviceInstanceId");
+				variables.put("mso-service-instance-id", msoServiceInstanceId);
+			}
+			catch(Exception e) {
+			}
+			if (msoRequestId == null || msoRequestId.trim().equals("")) {
+				msoLogger.debug("No requestId element in injectedVariables");
+				variables.put("mso-request-id", UUID.randomUUID().toString());
+			}
+			if (msoServiceInstanceId == null || msoServiceInstanceId.trim().equals("")) {
+				msoLogger.debug("No seviceInstanceId element in injectedVariables");
+				variables.put("mso-service-instance-id", UUID.randomUUID().toString());
+			}
+
+		} else {
+			msoRequestId = getXMLTextElement(request, "request-id");
+
+			if (msoRequestId == null) {
+				//check in injected variables
+				try {
+					msoRequestId = (String) injectedVariables.get("requestId");
+				}
+				catch(Exception e) {
+				}
+				if (msoRequestId == null || msoRequestId.trim().equals("")) {
+					String msg = "No request-id element in " + request;
+					msoLogger.debug(msg);
+					fail(msg);
+				}
+			}
+
+			variables.put("mso-request-id", msoRequestId);
+
+			// Note: some request types don't have a service-instance-id
+			msoServiceInstanceId = getXMLTextElement(request, "service-instance-id");
+
+			if (msoServiceInstanceId != null) {
+				variables.put("mso-service-instance-id", msoServiceInstanceId);
+			}
+		}
+
+		return variables;
+	}
+
+	/**
+	 * Private helper method that creates a camunda VariableMapImpl from a simple
+	 * variable map.
+	 * @param variables the simple variable map
+	 * @return a VariableMap
+	 */
+	private VariableMapImpl createVariableMapImpl(Map<String, Object> variables) {
+		Map<String, Object> wrappedVariables = new HashMap<>();
+
+		for (String key : variables.keySet()) {
+			Object value = variables.get(key);
+			wrappedVariables.put(key, wrapVariableValue(value));
+		}
+
+		VariableMapImpl variableMapImpl = new VariableMapImpl();
+		variableMapImpl.put("variables", wrappedVariables);
+		return variableMapImpl;
+	}
+
+	/**
+	 * Private helper method that wraps a variable value for inclusion in a
+	 * camunda VariableMapImpl.
+	 * @param value the variable value
+	 * @return the wrapped variable
+	 */
+	private Map<String, Object> wrapVariableValue(Object value) {
+		HashMap<String, Object> valueMap = new HashMap<>();
+		valueMap.put("value", value);
+		return valueMap;
+	}
+
+	/**
+	 * Receives a response from an asynchronous process.
+	 * Errors are handled with junit assertions and will cause the test to fail.
+	 * @param businessKey the process business key
+	 * @param asyncResponse the TestAsyncResponse object associated with the test
+	 * @param timeout the timeout in milliseconds
+	 * @return the WorkflowResponse
+	 */
+	protected WorkflowResponse receiveResponse(String businessKey,
+			TestAsyncResponse asyncResponse, long timeout) {
+		msoLogger.debug("Waiting " + timeout + "ms for process with business key " + businessKey
+			+ " to send a response");
+
+		long now = System.currentTimeMillis() + timeout;
+		long endTime = now + timeout;
+
+		while (now <= endTime) {
+			Response response = asyncResponse.getResponse();
+
+			if (response != null) {
+				msoLogger.debug("Received a response from process with business key " + businessKey);
+
+				Object entity = response.getEntity();
+
+				if (!(entity instanceof WorkflowResponse)) {
+					String msg = "Response entity is " +
+						(entity == null ? "null" : entity.getClass().getName()) +
+						", expected WorkflowResponse";
+					msoLogger.debug(msg);
+					fail(msg);
+					return null; // unreachable
+				}
+
+				return (WorkflowResponse) entity;
+			}
+
+			try {
+				Thread.sleep(200);
+			} catch (InterruptedException e) {
+				String msg = "Interrupted waiting for a response from process with business key " +
+					businessKey;
+				msoLogger.debug(msg);
+				fail(msg);
+				return null; // unreachable
+			}
+
+			now = System.currentTimeMillis();
+		}
+
+		String msg = "No response received from process with business key " + businessKey +
+			" within " + timeout + "ms";
+		msoLogger.debug(msg);
+		fail("Process with business key " + businessKey + " did not end within 10000ms");
+		return null; // unreachable
+	}
+
+	/**
+	 * Runs a program to inject SDNC callback data into the test environment.
+	 * A program is essentially just a list of keys that identify callback data
+	 * to be injected, in sequence. An example program:
+	 * <pre>
+	 *     reserve, assign, delete:ERR
+	 * </pre>
+	 * Errors are handled with junit assertions and will cause the test to fail.
+	 * @param callbacks an object containing callback data for the program
+	 * @param program the program to execute
+	 */
+	protected void injectSDNCRestCallbacks(CallbackSet callbacks, String program) {
+
+		String[] cmds = program.replaceAll("\\s+", "").split(",");
+
+		for (String cmd : cmds) {
+			String action = cmd;
+			String modifier = "STD";
+
+			if (cmd.contains(":")) {
+				String[] parts = cmd.split(":");
+				action = parts[0];
+				modifier = parts[1];
+			}
+
+			String content = null;
+			String contentType = null;
+
+			if ("STD".equals(modifier)) {
+				CallbackData callbackData = callbacks.get(action);
+
+				if (callbackData == null) {
+					String msg = "No callback defined for '" + action + "' SDNC request";
+					msoLogger.debug(msg);
+					fail(msg);
+				}
+
+				content = callbackData.getContent();
+				contentType = callbackData.getContentType();
+			} else if ("ERR".equals(modifier)) {
+				content = "{\"SDNCServiceError\":{\"sdncRequestId\":\"((REQUEST-ID))\",\"responseCode\":\"500\",\"responseMessage\":\"SIMULATED ERROR FROM SDNC ADAPTER\",\"ackFinalIndicator\":\"Y\"}}";
+				contentType = JSON;
+			} else {
+				String msg = "Invalid SDNC program modifier: '" + modifier + "'";
+				msoLogger.debug(msg);
+				fail(msg);
+			}
+
+			if (contentType == null) {
+				// Default for backward compatibility with existing tests.
+				contentType = JSON;
+			}
+
+			if (!injectSDNCRestCallback(contentType, content, 10000)) {
+				fail("Failed to inject SDNC '" + action + "' callback");
+			}
+
+			try {
+				Thread.sleep(1000);
+			} catch (InterruptedException e) {
+				fail("Interrupted after injection of SDNC '" + action + "' callback");
+			}
+		}
+	}
+
+	/**
+	 * Runs a program to inject SDNC events into the test environment.
+	 * A program is essentially just a list of keys that identify event data
+	 * to be injected, in sequence. An example program:
+	 * <pre>
+	 *     event1, event2
+	 * </pre>
+	 * NOTE: Each callback must have a message type associated with it, e.g.
+	 * "SDNCAEvent".
+	 * Errors are handled with junit assertions and will cause the test to fail.
+	 * @param callbacks an object containing event data for the program
+	 * @param program the program to execute
+	 */
+	protected void injectSDNCEvents(CallbackSet callbacks, String program) {
+		injectWorkflowMessages(callbacks, program);
+	}
+
+	/**
+	 * Runs a program to inject SDNC callback data into the test environment.
+	 * A program is essentially just a list of keys that identify callback data
+	 * to be injected, in sequence. An example program:
+	 * <pre>
+	 *     reserve, assign, delete:ERR
+	 * </pre>
+	 * Errors are handled with junit assertions and will cause the test to fail.
+	 * @param callbacks an object containing callback data for the program
+	 * @param program the program to execute
+	 */
+	protected void injectSDNCCallbacks(CallbackSet callbacks, String program) {
+
+		String[] cmds = program.replaceAll("\\s+", "").split(",");
+
+		for (String cmd : cmds) {
+			String action = cmd;
+			String modifier = "STD";
+
+			if (cmd.contains(":")) {
+				String[] parts = cmd.split(":");
+				action = parts[0];
+				modifier = parts[1];
+			}
+
+			String content = null;
+			int respCode = 200;
+			String respMsg = "OK";
+
+			if ("STD".equals(modifier)) {
+				CallbackData callbackData = callbacks.get(action);
+
+				if (callbackData == null) {
+					String msg = "No callback defined for '" + action + "' SDNC request";
+					msoLogger.debug(msg);
+					fail(msg);
+				}
+
+				content = callbackData.getContent();
+				respCode = 200;
+				respMsg = "OK";
+			} else if ("CREATED".equals(modifier)) {
+				CallbackData callbackData = callbacks.get(action);
+
+				if (callbackData == null) {
+					String msg = "No callback defined for '" + action + "' SDNC request";
+					msoLogger.debug(msg);
+					fail(msg);
+				}
+
+				content = callbackData.getContent();
+				respCode = 201;
+				respMsg = "Created";
+			} else if ("ERR".equals(modifier)) {
+				content = "<svc-request-id>((REQUEST-ID))</svc-request-id><response-code>500</response-code><response-message>SIMULATED ERROR FROM SDNC ADAPTER</response-message>";
+				respCode = 500;
+				respMsg = "SERVER ERROR";
+			} else {
+				String msg = "Invalid SDNC program modifier: '" + modifier + "'";
+				msoLogger.debug(msg);
+				fail(msg);
+			}
+
+			if (!injectSDNCCallback(respCode, respMsg, content, 10000)) {
+				fail("Failed to inject SDNC '" + action + "' callback");
+			}
+
+			try {
+				Thread.sleep(1000);
+			} catch (InterruptedException e) {
+				fail("Interrupted after injection of SDNC '" + action + "' callback");
+			}
+		}
+	}
+
+	/**
+	 * Runs a program to inject VNF adapter REST callback data into the test environment.
+	 * A program is essentially just a list of keys that identify callback data
+	 * to be injected, in sequence. An example program:
+	 * <pre>
+	 *     create, rollback
+	 * </pre>
+	 * Errors are handled with junit assertions and will cause the test to fail.
+	 * @param callbacks an object containing callback data for the program
+	 * @param program the program to execute
+	 */
+	protected void injectVNFRestCallbacks(CallbackSet callbacks, String program) {
+
+		String[] cmds = program.replaceAll("\\s+", "").split(",");
+
+		for (String cmd : cmds) {
+			String action = cmd;
+			String modifier = "STD";
+
+			if (cmd.contains(":")) {
+				String[] parts = cmd.split(":");
+				action = parts[0];
+				modifier = parts[1];
+			}
+
+			String content = null;
+			String contentType = null;
+
+			if ("STD".equals(modifier)) {
+				CallbackData callbackData = callbacks.get(action);
+
+				if (callbackData == null) {
+					String msg = "No callback defined for '" + action + "' VNF REST request";
+					msoLogger.debug(msg);
+					fail(msg);
+				}
+
+				content = callbackData.getContent();
+				contentType = callbackData.getContentType();
+			} else if ("ERR".equals(modifier)) {
+				content = "SIMULATED ERROR FROM VNF ADAPTER";
+				contentType = "text/plain";
+			} else {
+				String msg = "Invalid VNF REST program modifier: '" + modifier + "'";
+				msoLogger.debug(msg);
+				fail(msg);
+			}
+
+			if (contentType == null) {
+				// Default for backward compatibility with existing tests.
+				contentType = XML;
+			}
+
+			if (!injectVnfAdapterRestCallback(contentType, content, 10000)) {
+				fail("Failed to inject VNF REST '" + action + "' callback");
+			}
+
+			try {
+				Thread.sleep(1000);
+			} catch (InterruptedException e) {
+				fail("Interrupted after injection of VNF REST '" + action + "' callback");
+			}
+		}
+	}
+
+	/**
+	 * Runs a program to inject VNF callback data into the test environment.
+	 * A program is essentially just a list of keys that identify callback data
+	 * to be injected, in sequence. An example program:
+	 * <pre>
+	 *     createVnf, deleteVnf
+	 * </pre>
+	 * Errors are handled with junit assertions and will cause the test to fail.
+	 * @param callbacks an object containing callback data for the program
+	 * @param program the program to execute
+	 */
+	protected void injectVNFCallbacks(CallbackSet callbacks, String program) {
+
+		String[] cmds = program.replaceAll("\\s+", "").split(",");
+
+		for (String cmd : cmds) {
+			String action = cmd;
+			String modifier = "STD";
+
+			if (cmd.contains(":")) {
+				String[] parts = cmd.split(":");
+				action = parts[0];
+				modifier = parts[1];
+			}
+
+			String content = null;
+
+			if ("STD".equals(modifier)) {
+				CallbackData callbackData = callbacks.get(action);
+
+				if (callbackData == null) {
+					String msg = "No callback defined for '" + action + "' VNF request";
+					msoLogger.debug(msg);
+					fail(msg);
+				}
+
+				content = callbackData.getContent();
+			} else if ("ERR".equals(modifier)) {
+				String msg = "Currently unsupported VNF program modifier: '" + modifier + "'";
+				msoLogger.debug(msg);
+				fail(msg);
+			} else {
+				String msg = "Invalid VNF program modifier: '" + modifier + "'";
+				msoLogger.debug(msg);
+				fail(msg);
+			}
+
+			boolean injected = false;
+
+			if (content.contains("createVnfNotification")) {
+				injected = injectCreateVNFCallback(content, 10000);
+			} else if (content.contains("deleteVnfNotification")) {
+				injected = injectDeleteVNFCallback(content, 10000);
+			} else if (content.contains("updateVnfNotification")) {
+				injected = injectUpdateVNFCallback(content, 10000);
+			}
+
+			if (!injected) {
+				String msg = "Failed to inject VNF '" + action + "' callback";
+				msoLogger.debug(msg);
+				fail(msg);
+			}
+
+			try {
+				Thread.sleep(1000);
+			} catch (InterruptedException e) {
+				fail("Interrupted after injection of VNF '" + action + "' callback");
+			}
+		}
+	}
+
+	/**
+	 * Waits for the number of running processes with the specified process
+	 * definition key to equal a particular count.
+	 * @param processKey the process definition key
+	 * @param count the desired count
+	 * @param timeout the timeout in milliseconds
+	 */
+	protected void waitForRunningProcessCount(String processKey, int count, long timeout) {
+		msoLogger.debug("Waiting " + timeout + "ms for there to be " + count + " "
+			+ processKey + " instances");
+
+		long now = System.currentTimeMillis() + timeout;
+		long endTime = now + timeout;
+		int last = -1;
+
+		while (now <= endTime) {
+			int actual = runtimeService
+				.createProcessInstanceQuery()
+				.processDefinitionKey(processKey)
+				.list().size();
+
+			if (actual != last) {
+				msoLogger.debug("There are now " + actual + " "
+					+ processKey + " instances");
+				last = actual;
+			}
+
+			if (actual == count) {
+				return;
+			}
+
+			try {
+				Thread.sleep(200);
+			} catch (InterruptedException e) {
+				String msg = "Interrupted waiting for there to be " + count + " "
+					+ processKey + " instances";
+				msoLogger.debug(msg);
+				fail(msg);
+			}
+
+			now = System.currentTimeMillis();
+		}
+
+		String msg = "Timed out waiting for there to be " + count + " "
+			+ processKey + " instances";
+		msoLogger.debug(msg);
+		fail(msg);
+	}
+
+	/**
+	 * Waits for the specified process variable to be set.
+	 * @param processKey the process definition key
+	 * @param variable the variable name
+	 * @param timeout the timeout in milliseconds
+	 * @return the variable value, or null if it cannot be obtained
+	 *         in the specified time
+	 */
+	protected Object getProcessVariable(String processKey, String variable,
+			long timeout) {
+
+		msoLogger.debug("Waiting " + timeout + "ms for "
+			+ processKey + "." + variable + " to be set");
+
+		long now = System.currentTimeMillis() + timeout;
+		long endTime = now + timeout;
+
+		ProcessInstance processInstance = null;
+		Object value = null;
+
+		while (value == null) {
+			if (now > endTime) {
+				if (processInstance == null) {
+					msoLogger.debug("Timed out waiting for "
+						+ processKey + " to start");
+				} else {
+					msoLogger.debug("Timed out waiting for "
+						+ processKey + "[" + processInstance.getId()
+						+ "]." + variable + " to be set");
+				}
+
+				return null;
+			}
+
+			if (processInstance == null) {
+				processInstance = runtimeService
+					.createProcessInstanceQuery()
+					.processDefinitionKey(processKey)
+					.singleResult();
+			}
+
+			if (processInstance != null) {
+				value = runtimeService
+					.getVariable(processInstance.getId(), variable);
+			}
+
+			try {
+				Thread.sleep(200);
+			} catch (InterruptedException e) {
+				msoLogger.debug("Interrupted waiting for "
+					+ processKey + "." + variable + " to be set");
+				return null;
+			}
+
+			now = System.currentTimeMillis();
+		}
+
+		msoLogger.debug(processKey + "["
+			+ processInstance.getId() + "]." + variable + "="
+			+ value);
+
+		return value;
+	}
+
+	/**
+	 * Injects a single SDNC adapter callback request. The specified callback data
+	 * may contain the placeholder string ((REQUEST-ID)) which is replaced with
+	 * the actual SDNC request ID. Note: this is not the requestId in the original
+	 * MSO request.
+	 * @param contentType the HTTP content type for the callback
+	 * @param content the content of the callback
+	 * @param timeout the timeout in milliseconds
+	 * @return true if the callback could be injected, false otherwise
+	 */
+	protected boolean injectSDNCRestCallback(String contentType, String content, long timeout) {
+		String sdncRequestId = (String) getProcessVariable("SDNCAdapterRestV1",
+			"SDNCAResponse_CORRELATOR", timeout);
+
+		if (sdncRequestId == null) {
+			return false;
+		}
+
+		content = content.replace("((REQUEST-ID))", sdncRequestId);
+		// Deprecated usage.  All test code should switch to the (( ... )) syntax.
+		content = content.replace("{{REQUEST-ID}}", sdncRequestId);
+
+		msoLogger.debug("Injecting SDNC adapter callback");
+
+		Response response = workflowMessageResource.deliver(contentType, "SDNCAResponse", sdncRequestId, content);
+		msoLogger.debug("Workflow response to SDNC adapter callback: " + response);
+		return true;
+	}
+
+	/**
+	 * Injects a single SDNC adapter callback request. The specified callback data
+	 * may contain the placeholder string ((REQUEST-ID)) which is replaced with
+	 * the actual SDNC request ID. Note: this is not the requestId in the original
+	 * MSO request.
+	 * @param content the content of the callback
+	 * @param respCode the response code (normally 200)
+	 * @param respMsg the response message (normally "OK")
+	 * @param timeout the timeout in milliseconds
+	 * @return true if the callback could be injected, false otherwise
+	 */
+	protected boolean injectSDNCCallback(int respCode, String respMsg,
+			String content, long timeout) {
+
+		String sdncRequestId = (String) getProcessVariable("sdncAdapter",
+			"SDNCA_requestId", timeout);
+
+		if (sdncRequestId == null) {
+			return false;
+		}
+
+		content = content.replace("((REQUEST-ID))", sdncRequestId);
+		// Deprecated usage.  All test code should switch to the (( ... )) syntax.
+		content = content.replace("{{REQUEST-ID}}", sdncRequestId);
+
+		// TODO this needs to be fixed. It is causing double tags and content
+		// Need to parse content before setting below since content includes not just RequestData or modify callback files to only contain RequestData contents.
+
+		msoLogger.debug("Injecting SDNC adapter callback");
+		CallbackHeader callbackHeader = new CallbackHeader();
+		callbackHeader.setRequestId(sdncRequestId);
+		callbackHeader.setResponseCode(String.valueOf(respCode));
+		callbackHeader.setResponseMessage(respMsg);
+		SDNCAdapterCallbackRequest sdncAdapterCallbackRequest = new SDNCAdapterCallbackRequest();
+		sdncAdapterCallbackRequest.setCallbackHeader(callbackHeader);
+		sdncAdapterCallbackRequest.setRequestData(content);
+		SDNCAdapterResponse sdncAdapterResponse = callbackService.sdncAdapterCallback(sdncAdapterCallbackRequest);
+		msoLogger.debug("Workflow response to SDNC adapter callback: " + sdncAdapterResponse);
+
+		return true;
+	}
+
+	/**
+	 * Injects a single VNF adapter callback request. The specified callback data
+	 * may contain the placeholder string ((MESSAGE-ID)) which is replaced with
+	 * the actual message ID. Note: this is not the requestId in the original
+	 * MSO request.
+	 * @param contentType the HTTP content type for the callback
+	 * @param content the content of the callback
+	 * @param timeout the timeout in milliseconds
+	 * @return true if the callback could be injected, false otherwise
+	 */
+	protected boolean injectVnfAdapterRestCallback(String contentType, String content, long timeout) {
+		String messageId = (String) getProcessVariable("vnfAdapterRestV1",
+			"VNFAResponse_CORRELATOR", timeout);
+
+		if (messageId == null) {
+			return false;
+		}
+
+		content = content.replace("((MESSAGE-ID))", messageId);
+		// Deprecated usage.  All test code should switch to the (( ... )) syntax.
+		content = content.replace("{{MESSAGE-ID}}", messageId);
+
+		msoLogger.debug("Injecting VNF adapter callback");
+
+		Response response = workflowMessageResource.deliver(contentType, "VNFAResponse", messageId, content);
+		msoLogger.debug("Workflow response to VNF adapter callback: " + response);
+		return true;
+	}
+
+	/**
+	 * Injects a Create VNF adapter callback request. The specified callback data
+	 * may contain the placeholder string ((MESSAGE-ID)) which is replaced with
+	 * the actual message ID.  It may also contain the placeholder string
+	 * ((REQUEST-ID)) which is replaced request ID of the original MSO request.
+	 * @param content the content of the callback
+	 * @param timeout the timeout in milliseconds
+	 * @return true if the callback could be injected, false otherwise
+	 * @throws JAXBException if the content does not adhere to the schema
+	 */
+	protected boolean injectCreateVNFCallback(String content, long timeout) {
+
+		String messageId = (String) getProcessVariable("vnfAdapterCreateV1",
+			"VNFC_messageId", timeout);
+
+		if (messageId == null) {
+			return false;
+		}
+
+		content = content.replace("((MESSAGE-ID))", messageId);
+		// Deprecated usage.  All test code should switch to the (( ... )) syntax.
+		content = content.replace("{{MESSAGE-ID}}", messageId);
+
+		if(content.contains("((REQUEST-ID))")){
+			content = content.replace("((REQUEST-ID))", msoRequestId);
+		// Deprecated usage.  All test code should switch to the (( ... )) syntax.
+			content = content.replace("{{REQUEST-ID}}", msoRequestId);
+		}
+
+		msoLogger.debug("Injecting VNF adapter callback");
+
+		// Is it possible to unmarshal this with JAXB?  I couldn't.
+
+		CreateVnfNotification createVnfNotification = new CreateVnfNotification();
+		XPathTool xpathTool = new VnfNotifyXPathTool();
+		xpathTool.setXML(content);
+
+		try {
+			String completed = xpathTool.evaluate(
+				"/tns:createVnfNotification/tns:completed/text()");
+			createVnfNotification.setCompleted("true".equals(completed));
+
+			String vnfId = xpathTool.evaluate(
+				"/tns:createVnfNotification/tns:vnfId/text()");
+			createVnfNotification.setVnfId(vnfId);
+
+			NodeList entries = (NodeList) xpathTool.evaluate(
+				"/tns:createVnfNotification/tns:outputs/tns:entry",
+				XPathConstants.NODESET);
+
+			CreateVnfNotificationOutputs outputs = new CreateVnfNotificationOutputs();
+
+			for (int i = 0; i < entries.getLength(); i++) {
+				Node node = entries.item(i);
+
+				if (node.getNodeType() == Node.ELEMENT_NODE) {
+					Element entry = (Element) node;
+					String key = entry.getElementsByTagNameNS("*", "key").item(0).getTextContent();
+					String value = entry.getElementsByTagNameNS("*", "value").item(0).getTextContent();
+					outputs.add(key, value);
+				}
+			}
+
+			createVnfNotification.setOutputs(outputs);
+
+			VnfRollback rollback = new VnfRollback();
+
+			String cloudSiteId = xpathTool.evaluate(
+				"/tns:createVnfNotification/tns:rollback/tns:cloudSiteId/text()");
+			rollback.setCloudSiteId(cloudSiteId);
+
+			String requestId = xpathTool.evaluate(
+				"/tns:createVnfNotification/tns:rollback/tns:msoRequest/tns:requestId/text()");
+			String serviceInstanceId = xpathTool.evaluate(
+				"/tns:createVnfNotification/tns:rollback/tns:msoRequest/tns:serviceInstanceId/text()");
+
+			if (requestId != null || serviceInstanceId != null) {
+				MsoRequest msoRequest = new MsoRequest();
+				msoRequest.setRequestId(requestId);
+				msoRequest.setServiceInstanceId(serviceInstanceId);
+				rollback.setMsoRequest(msoRequest);
+			}
+
+			String tenantCreated = xpathTool.evaluate(
+				"/tns:createVnfNotification/tns:rollback/tns:tenantCreated/text()");
+			rollback.setTenantCreated("true".equals(tenantCreated));
+
+			String tenantId = xpathTool.evaluate(
+				"/tns:createVnfNotification/tns:rollback/tns:tenantId/text()");
+			rollback.setTenantId(tenantId);
+
+			String vnfCreated = xpathTool.evaluate(
+				"/tns:createVnfNotification/tns:rollback/tns:vnfCreated/text()");
+			rollback.setVnfCreated("true".equals(vnfCreated));
+
+			String rollbackVnfId = xpathTool.evaluate(
+				"/tns:createVnfNotification/tns:rollback/tns:vnfId/text()");
+			rollback.setVnfId(rollbackVnfId);
+
+			createVnfNotification.setRollback(rollback);
+
+		} catch (Exception e) {
+			msoLogger.debug("Failed to unmarshal VNF callback content:");
+			msoLogger.debug(content);
+			return false;
+		}
+
+		VnfAdapterNotifyServiceImpl notifyService = new VnfAdapterNotifyServiceImpl();
+
+
+		notifyService.createVnfNotification(
+			messageId,
+			createVnfNotification.isCompleted(),
+			createVnfNotification.getException(),
+			createVnfNotification.getErrorMessage(),
+			createVnfNotification.getVnfId(),
+			createVnfNotification.getOutputs(),
+			createVnfNotification.getRollback());
+
+		return true;
+	}
+
+	/**
+	 * Injects a Delete VNF adapter callback request. The specified callback data
+	 * may contain the placeholder string ((MESSAGE-ID)) which is replaced with
+	 * the actual message ID.  It may also contain the placeholder string
+	 * ((REQUEST-ID)) which is replaced request ID of the original MSO request.
+	 * @param content the content of the callback
+	 * @param timeout the timeout in milliseconds
+	 * @return true if the callback could be injected, false otherwise
+	 * @throws JAXBException if the content does not adhere to the schema
+	 */
+	protected boolean injectDeleteVNFCallback(String content, long timeout) {
+
+		String messageId = (String) getProcessVariable("vnfAdapterDeleteV1",
+			"VNFDEL_uuid", timeout);
+
+		if (messageId == null) {
+			return false;
+		}
+
+		content = content.replace("((MESSAGE-ID))", messageId);
+		// Deprecated usage.  All test code should switch to the (( ... )) syntax.
+		content = content.replace("{{MESSAGE-ID}}", messageId);
+
+		msoLogger.debug("Injecting VNF adapter delete callback");
+
+		// Is it possible to unmarshal this with JAXB?  I couldn't.
+
+		DeleteVnfNotification deleteVnfNotification = new DeleteVnfNotification();
+		XPathTool xpathTool = new VnfNotifyXPathTool();
+		xpathTool.setXML(content);
+
+		try {
+			String completed = xpathTool.evaluate(
+				"/tns:deleteVnfNotification/tns:completed/text()");
+			deleteVnfNotification.setCompleted("true".equals(completed));
+			// if notification failure, set the exception and error message
+			if (deleteVnfNotification.isCompleted() == false) {
+				deleteVnfNotification.setException(MsoExceptionCategory.INTERNAL);
+				deleteVnfNotification.setErrorMessage(xpathTool.evaluate(
+						"/tns:deleteVnfNotification/tns:errorMessage/text()")) ;
+			}
+
+		} catch (Exception e) {
+			msoLogger.debug("Failed to unmarshal VNF Delete callback content:");
+			msoLogger.debug(content);
+			return false;
+		}
+
+		VnfAdapterNotifyServiceImpl notifyService = new VnfAdapterNotifyServiceImpl();
+
+
+		notifyService.deleteVnfNotification(
+			messageId,
+			deleteVnfNotification.isCompleted(),
+			deleteVnfNotification.getException(),
+			deleteVnfNotification.getErrorMessage());
+
+		return true;
+	}
+
+	/**
+	 * Injects a Update VNF adapter callback request. The specified callback data
+	 * may contain the placeholder string ((MESSAGE-ID)) which is replaced with
+	 * the actual message ID.  It may also contain the placeholder string
+	 * ((REQUEST-ID)) which is replaced request ID of the original MSO request.
+	 * @param content the content of the callback
+	 * @param timeout the timeout in milliseconds
+	 * @return true if the callback could be injected, false otherwise
+	 * @throws JAXBException if the content does not adhere to the schema
+	 */
+	protected boolean injectUpdateVNFCallback(String content, long timeout) {
+
+		String messageId = (String) getProcessVariable("vnfAdapterUpdate",
+			"VNFU_messageId", timeout);
+
+		if (messageId == null) {
+			return false;
+		}
+
+		content = content.replace("((MESSAGE-ID))", messageId);
+		// Deprecated usage.  All test code should switch to the (( ... )) syntax.
+		content = content.replace("{{MESSAGE-ID}}", messageId);
+
+		content = content.replace("((REQUEST-ID))", msoRequestId);
+		// Deprecated usage.  All test code should switch to the (( ... )) syntax.
+		content = content.replace("{{REQUEST-ID}}", msoRequestId);
+
+		msoLogger.debug("Injecting VNF adapter callback");
+
+		// Is it possible to unmarshal this with JAXB?  I couldn't.
+
+		UpdateVnfNotification updateVnfNotification = new UpdateVnfNotification();
+		XPathTool xpathTool = new VnfNotifyXPathTool();
+		xpathTool.setXML(content);
+
+		try {
+			String completed = xpathTool.evaluate(
+				"/tns:updateVnfNotification/tns:completed/text()");
+			updateVnfNotification.setCompleted("true".equals(completed));
+
+			NodeList entries = (NodeList) xpathTool.evaluate(
+				"/tns:updateVnfNotification/tns:outputs/tns:entry",
+				XPathConstants.NODESET);
+
+			UpdateVnfNotificationOutputs outputs = new UpdateVnfNotificationOutputs();
+
+			for (int i = 0; i < entries.getLength(); i++) {
+				Node node = entries.item(i);
+
+				if (node.getNodeType() == Node.ELEMENT_NODE) {
+					Element entry = (Element) node;
+					String key = entry.getElementsByTagNameNS("*", "key").item(0).getTextContent();
+					String value = entry.getElementsByTagNameNS("*", "value").item(0).getTextContent();
+					outputs.add(key, value);
+				}
+			}
+
+			updateVnfNotification.setOutputs(outputs);
+
+			VnfRollback rollback = new VnfRollback();
+
+			String cloudSiteId = xpathTool.evaluate(
+				"/tns:updateVnfNotification/tns:rollback/tns:cloudSiteId/text()");
+			rollback.setCloudSiteId(cloudSiteId);
+
+			String requestId = xpathTool.evaluate(
+				"/tns:updateVnfNotification/tns:rollback/tns:msoRequest/tns:requestId/text()");
+			String serviceInstanceId = xpathTool.evaluate(
+				"/tns:updateVnfNotification/tns:rollback/tns:msoRequest/tns:serviceInstanceId/text()");
+
+			if (requestId != null || serviceInstanceId != null) {
+				MsoRequest msoRequest = new MsoRequest();
+				msoRequest.setRequestId(requestId);
+				msoRequest.setServiceInstanceId(serviceInstanceId);
+				rollback.setMsoRequest(msoRequest);
+			}
+
+			String tenantCreated = xpathTool.evaluate(
+				"/tns:updateVnfNotification/tns:rollback/tns:tenantCreated/text()");
+			rollback.setTenantCreated("true".equals(tenantCreated));
+
+			String tenantId = xpathTool.evaluate(
+				"/tns:updateVnfNotification/tns:rollback/tns:tenantId/text()");
+			rollback.setTenantId(tenantId);
+
+			String vnfCreated = xpathTool.evaluate(
+				"/tns:updateVnfNotification/tns:rollback/tns:vnfCreated/text()");
+			rollback.setVnfCreated("true".equals(vnfCreated));
+
+			String rollbackVnfId = xpathTool.evaluate(
+				"/tns:updateVnfNotification/tns:rollback/tns:vnfId/text()");
+			rollback.setVnfId(rollbackVnfId);
+
+			updateVnfNotification.setRollback(rollback);
+
+		} catch (Exception e) {
+			msoLogger.debug("Failed to unmarshal VNF callback content:");
+			msoLogger.debug(content);
+			return false;
+		}
+
+		VnfAdapterNotifyServiceImpl notifyService = new VnfAdapterNotifyServiceImpl();
+
+
+		notifyService.updateVnfNotification(
+			messageId,
+			updateVnfNotification.isCompleted(),
+			updateVnfNotification.getException(),
+			updateVnfNotification.getErrorMessage(),
+			updateVnfNotification.getOutputs(),
+			updateVnfNotification.getRollback());
+
+		return true;
+	}
+
+	/**
+	 * Runs a program to inject workflow messages into the test environment.
+	 * A program is essentially just a list of keys that identify event data
+	 * to be injected, in sequence. An example program:
+	 * <pre>
+	 *     event1, event2
+	 * </pre>
+	 * Errors are handled with junit assertions and will cause the test to fail.
+	 * NOTE: Each callback must have a workflow message type associated with it.
+	 * @param callbacks an object containing event data for the program
+	 * @param program the program to execute
+	 */
+	protected void injectWorkflowMessages(CallbackSet callbacks, String program) {
+
+		String[] cmds = program.replaceAll("\\s+", "").split(",");
+
+		for (String cmd : cmds) {
+			String action = cmd;
+			String modifier = "STD";
+
+			if (cmd.contains(":")) {
+				String[] parts = cmd.split(":");
+				action = parts[0];
+				modifier = parts[1];
+			}
+
+			String messageType = null;
+			String content = null;
+			String contentType = null;
+
+			if ("STD".equals(modifier)) {
+				CallbackData callbackData = callbacks.get(action);
+
+				if (callbackData == null) {
+					String msg = "No '" + action + "' workflow message callback is defined";
+					msoLogger.debug(msg);
+					fail(msg);
+				}
+
+				messageType = callbackData.getMessageType();
+
+				if (messageType == null || messageType.trim().equals("")) {
+					String msg = "No workflow message type is defined in the '" + action + "' callback";
+					msoLogger.debug(msg);
+					fail(msg);
+				}
+
+				content = callbackData.getContent();
+				contentType = callbackData.getContentType();
+			} else {
+				String msg = "Invalid workflow message program modifier: '" + modifier + "'";
+				msoLogger.debug(msg);
+				fail(msg);
+			}
+
+			if (!injectWorkflowMessage(contentType, messageType, content, 10000)) {
+				fail("Failed to inject '" + action + "' workflow message");
+			}
+
+			try {
+				Thread.sleep(1000);
+			} catch (InterruptedException e) {
+				fail("Interrupted after injection of '" + action + "' workflow message");
+			}
+		}
+	}
+
+	/**
+	 * Injects a workflow message. The specified callback data may contain the
+	 * placeholder string ((CORRELATOR)) which is replaced with the actual
+	 * correlator value.
+	 * @param contentType the HTTP contentType for the message (possibly null)
+	 * @param messageType the message type
+	 * @param content the message content (possibly null)
+	 * @param timeout the timeout in milliseconds
+	 * @return true if the message could be injected, false otherwise
+	 */
+	protected boolean injectWorkflowMessage(String contentType, String messageType, String content, long timeout) {
+		String correlator = (String) getProcessVariable("ReceiveWorkflowMessage",
+			messageType + "_CORRELATOR", timeout);
+
+		if (correlator == null) {
+			return false;
+		}
+
+		if (content != null) {
+			content = content.replace("((CORRELATOR))", correlator);
+		}
+
+		msoLogger.debug("Injecting " + messageType + " message");
+
+		Response response = workflowMessageResource.deliver(contentType, messageType, correlator, content);
+		msoLogger.debug("Workflow response to " + messageType + " message: " + response);
+		return true;
+	}
+
+	/**
+	 * Runs a program to inject sniro workflow messages into the test environment.
+	 * A program is essentially just a list of keys that identify event data
+	 * to be injected, in sequence. For more details, see
+	 * injectSNIROCallbacks(String contentType, String messageType, String content, long timeout)
+	 *
+	 * Errors are handled with junit assertions and will cause the test to fail.
+	 * NOTE: Each callback must have a workflow message type associated with it.
+	 *
+	 * @param callbacks an object containing event data for the program
+	 * @param program the program to execute
+	 */
+	protected void injectSNIROCallbacks(CallbackSet callbacks, String program) {
+
+		String[] cmds = program.replaceAll("\\s+", "").split(",");
+
+		for (String cmd : cmds) {
+			String action = cmd;
+			String modifier = "STD";
+
+			if (cmd.contains(":")) {
+				String[] parts = cmd.split(":");
+				action = parts[0];
+				modifier = parts[1];
+			}
+
+			String messageType = null;
+			String content = null;
+			String contentType = null;
+
+			if ("STD".equals(modifier)) {
+				CallbackData callbackData = callbacks.get(action);
+
+				if (callbackData == null) {
+					String msg = "No '" + action + "' workflow message callback is defined";
+					msoLogger.debug(msg);
+					fail(msg);
+				}
+
+				messageType = callbackData.getMessageType();
+
+				if (messageType == null || messageType.trim().equals("")) {
+					String msg = "No workflow message type is defined in the '" + action + "' callback";
+					msoLogger.debug(msg);
+					fail(msg);
+				}
+
+				content = callbackData.getContent();
+				contentType = callbackData.getContentType();
+			} else {
+				String msg = "Invalid workflow message program modifier: '" + modifier + "'";
+				msoLogger.debug(msg);
+				fail(msg);
+			}
+
+			if (!injectSNIROCallbacks(contentType, messageType, content, 10000)) {
+				fail("Failed to inject '" + action + "' workflow message");
+			}
+
+			try {
+				Thread.sleep(1000);
+			} catch (InterruptedException e) {
+				fail("Interrupted after injection of '" + action + "' workflow message");
+			}
+		}
+	}
+
+	/**
+	 * Injects a sniro workflow message. The specified callback response may
+	 * contain the placeholder strings ((CORRELATOR)) and ((SERVICE_RESOURCE_ID))
+	 * The ((CORRELATOR)) is replaced with the actual correlator value from the
+	 * request. The ((SERVICE_RESOURCE_ID)) is replaced with the actual serviceResourceId
+	 * value from the sniro request. Currently this only works with sniro request
+	 * that contain only 1 resource.
+	 *
+	 * @param contentType the HTTP contentType for the message (possibly null)
+	 * @param messageType the message type
+	 * @param content the message content (possibly null)
+	 * @param timeout the timeout in milliseconds
+	 * @return true if the message could be injected, false otherwise
+	 */
+	protected boolean injectSNIROCallbacks(String contentType, String messageType, String content, long timeout) {
+		String correlator = (String) getProcessVariable("ReceiveWorkflowMessage",
+			messageType + "_CORRELATOR", timeout);
+
+		if (correlator == null) {
+			return false;
+		}
+		if (content != null) {
+			content = content.replace("((CORRELATOR))", correlator);
+			if(messageType.equalsIgnoreCase("SNIROResponse")){
+				ServiceDecomposition decomp = (ServiceDecomposition) getProcessVariable("Homing", "serviceDecomposition", timeout);
+				List<Resource> resourceList = decomp.getServiceResources();
+				if(resourceList.size() == 1){
+					String resourceId = "";
+					for(Resource resource:resourceList){
+						resourceId = resource.getResourceId();
+					}
+					String homingList = getJsonValue(content, "solutionInfo.placement");
+					JSONArray placementArr = null;
+					try {
+						placementArr = new JSONArray(homingList);
+					}
+					catch (Exception e) {
+						return false;
+					}
+					if(placementArr.length() == 1){
+						content = content.replace("((SERVICE_RESOURCE_ID))", resourceId);
+					}
+					String licenseInfoList = getJsonValue(content, "solutionInfo.licenseInfo");
+					JSONArray licenseArr = null;
+					try {
+						licenseArr = new JSONArray(licenseInfoList);
+					}
+					catch (Exception e) {
+						return false;
+					}
+					if(licenseArr.length() == 1){
+						content = content.replace("((SERVICE_RESOURCE_ID))", resourceId);
+					}
+				}
+				else {
+					try {
+						String homingList = getJsonValue(content, "solutionInfo.placementInfo");
+						String licenseInfoList = getJsonValue(content, "solutionInfo.licenseInfo");
+						JSONArray placementArr = new JSONArray(homingList);
+						JSONArray licenseArr = new JSONArray(licenseInfoList);
+						for (Resource resource: resourceList) {
+							String resourceModuleName = resource.getModelInfo().getModelInstanceName();
+							String resourceId = resource.getResourceId();
+
+							for (int i=0; i<placementArr.length(); i++) {
+								JSONObject placementObj = placementArr.getJSONObject(i);
+								String placementModuleName = placementObj.getString("resourceModuleName");
+								if (placementModuleName.equalsIgnoreCase(resourceModuleName)) {
+									String placementString = placementObj.toString();
+									placementString = placementString.replace("((SERVICE_RESOURCE_ID))", resourceId);
+									JSONObject newPlacementObj = new JSONObject(placementString);
+									placementArr.put(i, newPlacementObj);
+								}
+							}
+
+							for (int i=0; i<licenseArr.length(); i++) {
+								JSONObject licenseObj = licenseArr.getJSONObject(i);
+								String licenseModuleName = licenseObj.getString("resourceModuleName");
+								if (licenseModuleName.equalsIgnoreCase(resourceModuleName)) {
+									String licenseString = licenseObj.toString();
+									licenseString = licenseString.replace("((SERVICE_RESOURCE_ID))", resourceId);
+									JSONObject newLicenseObj = new JSONObject(licenseString);
+									licenseArr.put(i, newLicenseObj);
+								}
+							}
+						}
+						String newPlacementInfos = placementArr.toString();
+						String newLicenseInfos = licenseArr.toString();
+						content = updJsonValue(content, "solutionInfo.placementInfo", newPlacementInfos);
+						content = updJsonValue(content, "solutionInfo.licenseInfo", newLicenseInfos);
+					}
+					catch(Exception e) {
+						return false;
+					}
+
+				}
+			}
+		}
+		msoLogger.debug("Injecting " + messageType + " message");
+
+		Response response = workflowMessageResource.deliver(contentType, messageType, correlator, content);
+		msoLogger.debug("Workflow response to " + messageType + " message: " + response);
+		return true;
+	}
+
+
+	/**
+	 * Wait for the process to end.
+	 * @param businessKey the process business key
+	 * @param timeout the amount of time to wait, in milliseconds
+	 */
+	protected void waitForProcessEnd(String businessKey, long timeout) {
+		msoLogger.debug("Waiting " + timeout + "ms for process with business key " +
+			businessKey + " to end");
+
+		long now = System.currentTimeMillis() + timeout;
+		long endTime = now + timeout;
+
+		while (now <= endTime) {
+			if (isProcessEnded(businessKey)) {
+				msoLogger.debug("Process with business key " + businessKey + " has ended");
+				return;
+			}
+
+			try {
+				Thread.sleep(200);
+			} catch (InterruptedException e) {
+				String msg = "Interrupted waiting for process with business key " +
+					businessKey + " to end";
+				msoLogger.debug(msg);
+				fail(msg);
+			}
+
+			now = System.currentTimeMillis();
+		}
+
+		String msg = "Process with business key " + businessKey +
+			" did not end within " + timeout + "ms";
+		msoLogger.debug(msg);
+		fail(msg);
+	}
+
+	/**
+	 * Wait for the process to end. Must be used when multiple process instances exist with
+	 * this same business key such as when its passed to subflows or shared across multiple
+	 * processes.
+	 *
+	 * @param businessKey the process business key
+	 * @param processName the process definition name
+	 * @param timeout the amount of time to wait, in milliseconds
+	 * @author cb645j
+	 */
+	protected void waitForProcessEnd(String businessKey, String processName, long timeout) {
+		msoLogger.debug("Waiting " + timeout + "ms for process with business key " +
+			businessKey + " to end");
+
+		long now = System.currentTimeMillis() + timeout;
+		long endTime = now + timeout;
+
+		while (now <= endTime) {
+			if (isProcessEnded(businessKey, processName)) {
+				msoLogger.debug("Process with business key " + businessKey + " has ended");
+				return;
+			}
+
+			try {
+				Thread.sleep(200);
+			} catch (InterruptedException e) {
+				String msg = "Interrupted waiting for process with business key " +
+					businessKey + " to end";
+				msoLogger.debug(msg);
+				fail(msg);
+			}
+
+			now = System.currentTimeMillis();
+		}
+
+		String msg = "Process with business key " + businessKey +
+			" did not end within " + timeout + "ms";
+		msoLogger.debug(msg);
+		fail(msg);
+	}
+
+	/**
+	 * Verifies that the specified historic process variable has the specified value.
+	 * If the variable does not have the specified value, the test is failed.
+	 *
+	 * @param businessKey the process business key
+	 * @param variable the variable name
+	 * @param value the expected variable value
+	 */
+	protected void checkVariable(String businessKey, String variable, Object value) {
+		if (!isProcessEnded(businessKey)) {
+			fail("Cannot get historic variable " + variable + " because process with business key " +
+				businessKey + " has not ended");
+		}
+
+		Object variableValue = getVariableFromHistory(businessKey, variable);
+		assertEquals(value, variableValue);
+	}
+
+	/**
+	 * Checks to see if the specified process is ended.
+	 * @param businessKey the process business Key
+	 * @return true if the process is ended
+	 */
+	protected boolean isProcessEnded(String businessKey) {
+		HistoricProcessInstance processInstance = historyService
+			.createHistoricProcessInstanceQuery().processInstanceBusinessKey(businessKey).singleResult();
+		return processInstance != null && processInstance.getEndTime() != null;
+	}
+
+	/**
+	 * Checks to see if the specified process is ended.
+<<<<<<< HEAD:bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java
+	 * @param processInstanceId the process Instance Id
+	 * @return true if the process is ended
+	 */
+	protected boolean isProcessEndedByProcessInstanceId(String processInstanceId) {
+		HistoricProcessInstance processInstance = historyService
+				.createHistoricProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
+		return processInstance != null && processInstance.getEndTime() != null;
+	}
+
+	/**
+	 * Checks to see if the specified process is ended.
+=======
+>>>>>>> origin/release/1806.51:bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowTest.java
+	 * @author cb645j
+	 */
+	//TODO combine into 1
+	private boolean isProcessEnded(String businessKey, String processName) {
+		HistoricProcessInstance processInstance = historyService
+			.createHistoricProcessInstanceQuery().processInstanceBusinessKey(businessKey).processDefinitionName(processName).singleResult();
+		return processInstance != null && processInstance.getEndTime() != null;
+	}
+
+	/**
+	 * Gets a variable value from a historical process instance. The business key must be unique.
+	 *
+	 * @param businessKey the process business key
+	 * @param variableName the variable name
+	 * @return the variable value or null if the variable does not exist
+	 */
+	protected Object getVariableFromHistory(String businessKey, String variableName) {
+		try {
+			HistoricProcessInstance processInstance = historyService
+				.createHistoricProcessInstanceQuery().processInstanceBusinessKey(businessKey).singleResult();
+
+			if (processInstance == null) {
+				return null;
+			}
+
+			HistoricVariableInstance v = historyService
+				.createHistoricVariableInstanceQuery().processInstanceId(processInstance.getId())
+				.variableName(variableName).singleResult();
+			return v == null ? null : v.getValue();
+		} catch (Exception e) {
+			msoLogger.debug("Error retrieving variable " + variableName +
+				" from historical process with business key " + businessKey + ": " + e);
+			return null;
+		}
+	}
+
+	/**
+	 * Gets a variable value from a process instance based on businessKey and process name.
+	 * Must be used when multiple instances exist with the same business key such as when
+	 * business key is passed to subflows or shared across multiple processes. This method
+	 * can obtain variables from mainflows and from subflows.
+	 *
+	 * @param businessKey the process business key
+	 * @param processName the process definition name
+	 * @param variableName the variable name
+	 * @return the variable value or null if the variable does not exist
+	 * @author cb645j
+	 */
+	protected Object getVariableFromHistory(String businessKey, String processName, String variableName){
+		try{
+			HistoricProcessInstance processInstance = historyService.createHistoricProcessInstanceQuery().processInstanceBusinessKey(businessKey).processDefinitionName(processName)
+					.singleResult();
+
+			if(processInstance == null){
+				return null;
+			}
+			HistoricVariableInstance variable = historyService.createHistoricVariableInstanceQuery().processInstanceId(processInstance.getId()).variableName(variableName).singleResult();
+
+			return variable == null ? null : variable.getValue();
+		}catch(ProcessEngineException e){
+			msoLogger.debug("Multiple proccess instances exist with process name " + processName + " and business key " + businessKey + ". Must pass instance index as a parameter.");
+			return null;
+		}catch(Exception e){
+			msoLogger.debug("Error retrieving variable " + variableName + " from historical process for process " + processName + " with business key " + businessKey + ": " + e);
+			return null;
+		}
+	}
+
+	/**
+	 * Gets the value of a process variable from x instance of y process. Must be used when
+	 * multiple instances exist with the same business key AND process name. This method
+	 * shall be used primarily for obtaining subflow variables when the business key is
+	 * passed to the subflow AND the subflow is called multiple times in a given flow.
+	 *
+	 * @param businessKey the process business key
+	 * @param processName the name of the subflow that contains the variable
+	 * @param variableName the variable name
+	 * @param processInstanceIndex the instance in which the subprocess was called
+	 * @return the variable value or null if the variable does not exist
+	 * @author cb645j
+	 */
+	protected Object getVariableFromHistory(String businessKey, int subflowInstanceIndex, String processName, String variableName){
+		try{
+			List<HistoricProcessInstance> processInstanceList = historyService.createHistoricProcessInstanceQuery().processInstanceBusinessKey(businessKey).processDefinitionName(processName)
+					.list();
+
+			if(processInstanceList == null){
+				return null;
+			}
+			processInstanceList.sort((m1, m2) -> m1.getStartTime().compareTo(m2.getStartTime()));
+
+			HistoricProcessInstance processInstance = processInstanceList.get(subflowInstanceIndex);
+			HistoricVariableInstance variable = historyService.createHistoricVariableInstanceQuery().processInstanceId(processInstance.getId())
+					.variableName(variableName).singleResult();
+
+			return variable == null ? null : variable.getValue();
+		}catch(Exception e) {
+			msoLogger.debug("Error retrieving variable " + variableName + " from historical process for process " + processName + " with business key " + businessKey + ": " + e);
+			return null;
+		}
+	}
+
+
+	/**
+	 * Gets the value of a subflow variable from the specified subflow's
+	 * historical process instance.
+	 *
+	 * DEPRECATED - Use method getVariableFromHistory(businessKey, processName, variableName) instead
+	 *
+	 * @param subflowName - the name of the subflow that contains the variable
+	 * @param variableName the variable name
+	 *
+	 * @return the variable value, or null if the variable could not be obtained
+	 *
+	 */
+	@Deprecated
+	protected Object getVariableFromSubflowHistory(String subflowName, String variableName) {
+		try {
+			List<HistoricProcessInstance> processInstanceList = historyService
+					.createHistoricProcessInstanceQuery().processDefinitionName(subflowName).list();
+
+			if (processInstanceList == null) {
+				return null;
+			}
+
+			processInstanceList.sort((m1, m2) -> m1.getStartTime().compareTo(m2.getStartTime()));
+
+			HistoricProcessInstance processInstance = processInstanceList.get(0);
+
+			HistoricVariableInstance v = historyService
+				.createHistoricVariableInstanceQuery().processInstanceId(processInstance.getId())
+				.variableName(variableName).singleResult();
+			return v == null ? null : v.getValue();
+		} catch (Exception e) {
+			msoLogger.debug("Error retrieving variable " + variableName +
+					" from sub flow: " + subflowName + ", Exception is: " + e);
+			return null;
+		}
+	}
+
+	/**
+	 * Gets the value of a subflow variable from the subflow's
+	 * historical process x instance.
+	 *
+	 * DEPRECATED: Use method getVariableFromHistory(businessKey, processInstanceIndex, processName, variableName) instead
+	 *
+	 * @param subflowName - the name of the subflow that contains the variable
+	 * @param variableName the variable name
+	 * @param subflowInstanceIndex - the instance of the subflow (use when same subflow is called more than once from mainflow)
+	 *
+	 * @return the variable value, or null if the variable could not be obtained
+	 */
+	@Deprecated
+	protected Object getVariableFromSubflowHistory(int subflowInstanceIndex, String subflowName, String variableName) {
+		try {
+			List<HistoricProcessInstance> processInstanceList = historyService.createHistoricProcessInstanceQuery().processDefinitionName(subflowName).list();
+
+			if (processInstanceList == null) {
+				return null;
+			}
+
+			processInstanceList.sort((m1, m2) -> m1.getStartTime().compareTo(m2.getStartTime()));
+
+			HistoricProcessInstance processInstance = processInstanceList.get(subflowInstanceIndex);
+
+			HistoricVariableInstance v = historyService.createHistoricVariableInstanceQuery().processInstanceId(processInstance.getId())
+				.variableName(variableName).singleResult();
+			return v == null ? null : v.getValue();
+		} catch (Exception e) {
+			msoLogger.debug("Error retrieving variable " + variableName +
+				" from " + subflowInstanceIndex + " instance index of sub flow: " + subflowName + ", Exception is: " + e);
+			return null;
+		}
+	}
+
+	/**
+	 * Extracts text from an XML element. This method is not namespace aware
+	 * (namespaces are ignored).  The first matching element is selected.
+	 * @param xml the XML document or fragment
+	 * @param tag the desired element, e.g. "<name>"
+	 * @return the element text, or null if the element was not found
+	 */
+	protected String getXMLTextElement(String xml, String tag) {
+		xml = removeXMLNamespaces(xml);
+
+		if (!tag.startsWith("<")) {
+			tag = "<" + tag + ">";
+		}
+
+		int start = xml.indexOf(tag);
+
+		if (start == -1) {
+			return null;
+		}
+
+		int end = xml.indexOf('<', start + tag.length());
+
+		if (end == -1) {
+			return null;
+		}
+
+		return xml.substring(start + tag.length(), end);
+	}
+
+	/**
+	 * Removes namespace definitions and prefixes from XML, if any.
+	 */
+	private String removeXMLNamespaces(String xml) {
+		// remove xmlns declaration
+		xml = xml.replaceAll("xmlns.*?(\"|\').*?(\"|\')", "");
+
+		// remove opening tag prefix
+		xml = xml.replaceAll("(<)(\\w+:)(.*?>)", "$1$3");
+
+		// remove closing tags prefix
+		xml = xml.replaceAll("(</)(\\w+:)(.*?>)", "$1$3");
+
+		// remove extra spaces left when xmlns declarations are removed
+		xml = xml.replaceAll("\\s+>", ">");
+
+		return xml;
+	}
+
+	/**
+	 * Asserts that two XML documents are semantically equivalent.  Differences
+	 * in whitespace or in namespace usage do not affect the comparison.
+	 * @param expected the expected XML
+	 * @param actual the XML to test
+	 * @throws SAXException
+	 * @throws IOException
+	 */
+    public static void assertXMLEquals(String expected, String actual)
+    		throws SAXException, IOException {
+    	XMLUnit.setIgnoreWhitespace(true);
+    	XMLUnit.setIgnoreAttributeOrder(true);
+    	DetailedDiff diff = new DetailedDiff(XMLUnit.compareXML(expected, actual));
+    	List<?> allDifferences = diff.getAllDifferences();
+    	assertEquals("Differences found: " + diff.toString(), 0, allDifferences.size());
+    }
+
+	/**
+	 * A test implementation of AsynchronousResponse.
+	 */
+	public class TestAsyncResponse {
+		Response response = null;
+
+		/**
+		 * {@inheritDoc}
+		 */
+		public synchronized void setResponse(Response response) {
+			this.response = response;
+		}
+
+		/**
+		 * Gets the response.
+		 * @return the response, or null if none has been produced yet
+		 */
+		public synchronized Response getResponse() {
+			return response;
+		}
+	}
+
+	/**
+	 * An object that contains callback data for a "program".
+	 */
+	public class CallbackSet {
+		private final Map<String, CallbackData> map = new HashMap<>();
+
+		/**
+		 * Add untyped callback data to the set.
+		 * @param action the action with which the data is associated
+		 * @param content the callback data
+		 */
+		public void put(String action, String content) {
+			map.put(action, new CallbackData(null, null, content));
+		}
+
+		/**
+		 * Add callback data to the set.
+		 * @param action the action with which the data is associated
+		 * @param messageType the callback message type
+		 * @param content the callback data
+		 */
+		public void put(String action, String messageType, String content) {
+			map.put(action, new CallbackData(null, messageType, content));
+		}
+
+		/**
+		 * Add callback data to the set.
+		 * @param action the action with which the data is associated
+		 * @param contentType the callback HTTP content type
+		 * @param messageType the callback message type
+		 * @param content the callback data
+		 */
+		public void put(String action, String contentType, String messageType, String content) {
+			map.put(action, new CallbackData(contentType, messageType, content));
+		}
+
+		/**
+		 * Retrieve callback data from the set.
+		 * @param action the action with which the data is associated
+		 * @return the callback data, or null if there is none for the specified operation
+		 */
+		public CallbackData get(String action) {
+			return map.get(action);
+		}
+	}
+
+	/**
+	 * Represents a callback data item.
+	 */
+	public class CallbackData {
+		private final String contentType;
+		private final String messageType;
+		private final String content;
+
+		/**
+		 * Constructor
+		 * @param contentType the HTTP content type (optional)
+		 * @param messageType the callback message type (optional)
+		 * @param content the content
+		 */
+		public CallbackData(String contentType, String messageType, String content) {
+			this.contentType = contentType;
+			this.messageType = messageType;
+			this.content = content;
+		}
+
+		/**
+		 * Gets the callback HTTP content type, possibly null.
+		 */
+		public String getContentType() {
+			return contentType;
+		}
+
+		/**
+		 * Gets the callback message type, possibly null.
+		 */
+		public String getMessageType() {
+			return messageType;
+		}
+
+		/**
+		 * Gets the callback content.
+		 */
+		public String getContent() {
+			return content;
+		}
+	}
+
+	/**
+	 * A tool for evaluating XPath expressions.
+	 */
+	protected class XPathTool {
+		private final DocumentBuilderFactory factory;
+		private final SimpleNamespaceContext context = new SimpleNamespaceContext();
+		private final XPath xpath = XPathFactory.newInstance().newXPath();
+		private String xml = null;
+		private Document doc = null;
+
+		/**
+		 * Constructor.
+		 */
+		public XPathTool() {
+			factory = DocumentBuilderFactory.newInstance();
+			factory.setNamespaceAware(true);
+			xpath.setNamespaceContext(context);
+		}
+
+		/**
+		 * Adds a namespace.
+		 * @param prefix the namespace prefix
+		 * @param uri the namespace uri
+		 */
+		public synchronized void addNamespace(String prefix, String uri) {
+			context.add(prefix, uri);
+		}
+
+		/**
+		 * Sets the XML content to be operated on.
+		 * @param xml the XML content
+		 */
+		public synchronized void setXML(String xml) {
+			this.xml = xml;
+			this.doc = null;
+		}
+
+		/**
+		 * Returns the document object.
+		 * @return the document object, or null if XML has not been set
+		 * @throws SAXException
+		 * @throws IOException
+		 * @throws ParserConfigurationException
+		 */
+		public synchronized Document getDocument()
+				throws ParserConfigurationException, IOException, SAXException {
+			if (xml == null) {
+				return null;
+			}
+
+			buildDocument();
+			return doc;
+		}
+
+		/**
+		 * Evaluates the specified XPath expression and returns a string result.
+		 * This method throws exceptions on error.
+		 * @param expression the expression
+		 * @return the result object
+		 * @throws ParserConfigurationException
+		 * @throws IOException
+		 * @throws SAXException
+		 * @throws XPathExpressionException on error
+		 */
+		public synchronized String evaluate(String expression)
+				throws ParserConfigurationException, SAXException,
+				IOException, XPathExpressionException {
+			return (String) evaluate(expression, XPathConstants.STRING);
+		}
+
+		/**
+		 * Evaluates the specified XPath expression.
+		 * This method throws exceptions on error.
+		 * @param expression the expression
+		 * @param returnType the return type
+		 * @return the result object
+		 * @throws ParserConfigurationException
+		 * @throws IOException
+		 * @throws SAXException
+		 * @throws XPathExpressionException on error
+		 */
+		public synchronized Object evaluate(String expression, QName returnType)
+				throws ParserConfigurationException, SAXException,
+				IOException, XPathExpressionException {
+
+			buildDocument();
+			XPathExpression expr = xpath.compile(expression);
+			return expr.evaluate(doc, returnType);
+		}
+
+		/**
+		 * Private helper method that builds the document object.
+		 * Assumes the calling method is synchronized.
+		 * @throws ParserConfigurationException
+		 * @throws IOException
+		 * @throws SAXException
+		 */
+		private void buildDocument() throws ParserConfigurationException,
+				IOException, SAXException {
+			if (doc == null) {
+				if (xml == null) {
+					throw new IOException("XML input is null");
+				}
+
+				DocumentBuilder builder = factory.newDocumentBuilder();
+				InputSource source = new InputSource(new StringReader(xml));
+				doc = builder.parse(source);
+			}
+		}
+	}
+
+	/**
+	 * A NamespaceContext class based on a Map.
+	 */
+	private class SimpleNamespaceContext implements NamespaceContext {
+		private Map<String, String> prefixMap = new HashMap<>();
+		private Map<String, String> uriMap = new HashMap<>();
+
+		public synchronized void add(String prefix, String uri) {
+			prefixMap.put(prefix, uri);
+			uriMap.put(uri, prefix);
+		}
+
+		@Override
+		public synchronized String getNamespaceURI(String prefix) {
+			return prefixMap.get(prefix);
+		}
+
+		@Override
+		public Iterator<String> getPrefixes(String uri) {
+			List<String> list = new ArrayList<>();
+			String prefix = uriMap.get(uri);
+			if (prefix != null) {
+				list.add(prefix);
+			}
+			return list.iterator();
+		}
+
+		@Override
+		public String getPrefix(String uri) {
+			return uriMap.get(uri);
+		}
+	}
+
+	/**
+	 * A VnfNotify XPathTool.
+	 */
+	protected class VnfNotifyXPathTool extends XPathTool {
+		public VnfNotifyXPathTool() {
+			addNamespace("tns", "http://org.onap.so/vnfNotify");
+		}
+	}
+
+	/**
+	 * Helper class to make it easier to create this type.
+	 */
+	private static class CreateVnfNotificationOutputs
+			extends CreateVnfNotification.Outputs {
+		public void add(String key, String value) {
+			Entry entry = new Entry();
+			entry.setKey(key);
+			entry.setValue(value);
+			getEntry().add(entry);
+		}
+	}
+
+	/**
+	 * Helper class to make it easier to create this type.
+	 */
+	private static class UpdateVnfNotificationOutputs
+			extends UpdateVnfNotification.Outputs {
+		public void add(String key, String value) {
+			Entry entry = new Entry();
+			entry.setKey(key);
+			entry.setValue(value);
+			getEntry().add(entry);
+		}
+	}
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTestTransformer.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTestTransformer.java
new file mode 100644
index 0000000..dbad35a
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTestTransformer.java
@@ -0,0 +1,41 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.common;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Allows a subclass of WorkflowTest to specify one or more WireMock
+ * response transformers.  A transformer must be declared as a public
+ * static field in the subclass.  For example:
+ * <pre>
+ *     @WorkflowTestTransformer
+ *     public static final ResponseTransformer sdncAdapterMockTransformer =
+ *         new SDNCAdapterMockTransformer();
+ * </pre>
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.FIELD)
+public @interface WorkflowTestTransformer {
+}
\ No newline at end of file
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/FlakyTests.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/FlakyTests.java
new file mode 100644
index 0000000..5b5e17c
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/FlakyTests.java
@@ -0,0 +1,25 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 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.onap.so.bpmn.infrastructure;
+
+public interface FlakyTests {
+	 /* category marker */ 
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionTestImpl.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionTestImpl.java
new file mode 100644
index 0000000..7cb649d
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionTestImpl.java
@@ -0,0 +1,73 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.infrastructure.pnf.delegate;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+import org.onap.aai.domain.yang.Pnf;
+import org.onap.so.bpmn.infrastructure.pnf.implementation.AaiConnection;
+
+public class AaiConnectionTestImpl implements AaiConnection {
+
+    public static final String ID_WITH_ENTRY_AND_IP = "idWithEntryAndIp";
+    public static final String ID_WITH_IP_V6 = "idWithIpV6";
+    public static final String ID_WITHOUT_ENTRY = "IdWithoutEntry";
+    public static final String ID_WITH_ENTRY_NO_IP = "idWithEntryNoIp";
+    public static final String DEFAULT_IP = "1.2.3.4";
+    public static final String DEFAULT_IP_V6 = "2001:db8::ff00:42:8329";
+
+    private Map<String, Pnf> created = new HashMap<>();
+
+    @Override
+    public Optional<Pnf> getEntryFor(String correlationId) throws IOException {
+        if (Objects.equals(correlationId, ID_WITH_ENTRY_AND_IP)) {
+            Pnf pnf = new Pnf();
+            pnf.setIpaddressV4Oam(DEFAULT_IP);
+            return Optional.of(pnf);
+        } else if (Objects.equals(correlationId, ID_WITH_IP_V6)) {
+            Pnf pnf = new Pnf();
+            pnf.setIpaddressV6Oam(DEFAULT_IP_V6);
+            return Optional.of(pnf);
+        } else if (Objects.equals(correlationId, ID_WITH_ENTRY_NO_IP)) {
+            return Optional.of(new Pnf());
+        } else {
+            return Optional.empty();
+        }
+    }
+
+    @Override
+    public void createEntry(String correlationId, Pnf entry) throws IOException {
+        created.put(correlationId, entry);
+    }
+
+    public Map<String, Pnf> getCreated() {
+        return created;
+    }
+
+    public void reset() {
+        created.clear();
+    }
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionThrowingException.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionThrowingException.java
new file mode 100644
index 0000000..7df6757
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionThrowingException.java
@@ -0,0 +1,39 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.infrastructure.pnf.delegate;
+
+import java.io.IOException;
+import java.util.Optional;
+import org.onap.aai.domain.yang.Pnf;
+import org.onap.so.bpmn.infrastructure.pnf.implementation.AaiConnection;
+
+public class AaiConnectionThrowingException implements AaiConnection {
+
+    @Override
+    public Optional<Pnf> getEntryFor(String correlationId) throws IOException {
+        throw new IOException();
+    }
+
+    @Override
+    public void createEntry(String correlationId, Pnf entry) throws IOException {
+        throw new IOException();
+    }
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CancelDmaapSubscriptionTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CancelDmaapSubscriptionTest.java
new file mode 100644
index 0000000..f5d212f
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CancelDmaapSubscriptionTest.java
@@ -0,0 +1,57 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.infrastructure.pnf.delegate;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = {CancelDmaapSubscription.class, DmaapClientTestImpl.class})
+public class CancelDmaapSubscriptionTest {
+
+    @Autowired
+    public CancelDmaapSubscription delegate;
+
+    @Autowired
+    private DmaapClientTestImpl dmaapClientTest;
+
+    @Test
+    public void shouldCancelSubscription() throws Exception {
+        // given
+        DelegateExecution delegateExecution = mock(DelegateExecution.class);
+        when(delegateExecution.getVariable(eq(ExecutionVariableNames.CORRELATION_ID))).thenReturn("testCorrelationId");
+        when(delegateExecution.getProcessBusinessKey()).thenReturn("testBusinessKey");
+        dmaapClientTest.registerForUpdate("testCorrelationId", () -> {});
+        // when
+        delegate.execute(delegateExecution);
+        // then
+        assertThat(dmaapClientTest.haveRegisteredConsumer()).isFalse();
+    }
+}
\ No newline at end of file
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForCorrelationIdDelegateTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForCorrelationIdDelegateTest.java
new file mode 100644
index 0000000..301e5d9
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CheckAaiForCorrelationIdDelegateTest.java
@@ -0,0 +1,132 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.infrastructure.pnf.delegate;
+
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+import static org.onap.so.bpmn.infrastructure.pnf.delegate.AaiConnectionTestImpl.ID_WITHOUT_ENTRY;
+import static org.onap.so.bpmn.infrastructure.pnf.delegate.AaiConnectionTestImpl.ID_WITH_ENTRY_AND_IP;
+import static org.onap.so.bpmn.infrastructure.pnf.delegate.AaiConnectionTestImpl.ID_WITH_ENTRY_NO_IP;
+import static org.onap.so.bpmn.infrastructure.pnf.delegate.AaiConnectionTestImpl.ID_WITH_IP_V6;
+import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.AAI_CONTAINS_INFO_ABOUT_IP;
+import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.AAI_CONTAINS_INFO_ABOUT_PNF;
+import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.CORRELATION_ID;
+
+import org.camunda.bpm.engine.delegate.BpmnError;
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.junit.Test;
+import org.junit.experimental.runners.Enclosed;
+import org.junit.runner.RunWith;
+import org.onap.so.bpmn.core.WorkflowException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+@RunWith(Enclosed.class)
+public class CheckAaiForCorrelationIdDelegateTest {
+
+    @RunWith(SpringRunner.class)
+    @SpringBootTest(classes = {CheckAaiForCorrelationIdDelegate.class, AaiConnectionTestImpl.class})
+    public static class ConnectionOkTests {
+
+        @Autowired
+        private CheckAaiForCorrelationIdDelegate delegate;
+
+        @Test
+        public void shouldThrowExceptionWhenCorrelationIdIsNotSet() throws Exception {
+            // given
+            DelegateExecution execution = mock(DelegateExecution.class);
+            when(execution.getVariable(CORRELATION_ID)).thenReturn(null);
+            when(execution.getVariable("testProcessKey")).thenReturn("testProcessKeyValue");
+            // when, then
+            assertThatThrownBy(() -> delegate.execute(execution)).isInstanceOf(BpmnError.class);
+            verify(execution).setVariable(eq("WorkflowException"), any(WorkflowException.class));
+        }
+
+        @Test
+        public void shouldSetCorrectVariablesWhenAaiDoesNotContainInfoAboutPnf() throws Exception {
+            // given
+            DelegateExecution execution = mock(DelegateExecution.class);
+            when(execution.getVariable(CORRELATION_ID)).thenReturn(ID_WITHOUT_ENTRY);
+            // when
+            delegate.execute(execution);
+            // then
+            verify(execution).setVariableLocal(AAI_CONTAINS_INFO_ABOUT_PNF, false);
+        }
+
+        @Test
+        public void shouldSetCorrectVariablesWhenAaiContainsInfoAboutPnf() throws Exception {
+            shouldSetCorrectVariablesWhenAaiContainsInfoAboutPnf(ID_WITH_ENTRY_AND_IP);
+        }
+
+        @Test
+        public void shouldSetCorrectVariablesWhenAaiContainsInfoAboutPnfWithIpV6() throws Exception {
+            shouldSetCorrectVariablesWhenAaiContainsInfoAboutPnf(ID_WITH_IP_V6);
+        }
+
+        private void shouldSetCorrectVariablesWhenAaiContainsInfoAboutPnf(String id) throws Exception {
+            // given
+            DelegateExecution execution = mock(DelegateExecution.class);
+            when(execution.getVariable(CORRELATION_ID)).thenReturn(id);
+            // when
+            delegate.execute(execution);
+            // then
+            verify(execution).setVariableLocal(AAI_CONTAINS_INFO_ABOUT_PNF, true);
+            verify(execution).setVariableLocal(AAI_CONTAINS_INFO_ABOUT_IP, true);
+        }
+
+        @Test
+        public void shouldSetCorrectVariablesWhenAaiContainsInfoAboutPnfWithoutIp() throws Exception {
+            // given
+            DelegateExecution execution = mock(DelegateExecution.class);
+            when(execution.getVariable(CORRELATION_ID)).thenReturn(ID_WITH_ENTRY_NO_IP);
+            // when
+            delegate.execute(execution);
+            // then
+            verify(execution).setVariableLocal(AAI_CONTAINS_INFO_ABOUT_PNF, true);
+            verify(execution).setVariableLocal(AAI_CONTAINS_INFO_ABOUT_IP, false);
+        }
+    }
+
+
+    @RunWith(SpringRunner.class)
+    @SpringBootTest(classes = {CheckAaiForCorrelationIdDelegate.class, AaiConnectionThrowingException.class})
+    public static class NoConnectionTests {
+
+        @Autowired
+        private CheckAaiForCorrelationIdDelegate delegate;
+
+        @Test
+        public void shouldThrowExceptionWhenIoExceptionOnConnectionToAai() throws Exception {
+            // given
+            DelegateExecution execution = mock(DelegateExecution.class);
+            when(execution.getVariable(CORRELATION_ID)).thenReturn(ID_WITH_ENTRY_NO_IP);
+            when(execution.getVariable("testProcessKey")).thenReturn("testProcessKey");
+            // when, then
+            assertThatThrownBy(() -> delegate.execute(execution)).isInstanceOf(BpmnError.class);
+            verify(execution).setVariable(eq("WorkflowException"), any(WorkflowException.class));
+        }
+    }
+}
\ No newline at end of file
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAaiEntryWithPnfIdDelegateTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAaiEntryWithPnfIdDelegateTest.java
new file mode 100644
index 0000000..465dc08
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAaiEntryWithPnfIdDelegateTest.java
@@ -0,0 +1,50 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.infrastructure.pnf.delegate;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.CORRELATION_ID;
+
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.junit.Test;
+import org.onap.aai.domain.yang.Pnf;
+
+public class CreateAaiEntryWithPnfIdDelegateTest {
+
+    @Test
+    public void shouldSetPnfIdAndPnfName() throws Exception {
+        // given
+        CreateAaiEntryWithPnfIdDelegate delegate = new CreateAaiEntryWithPnfIdDelegate();
+        AaiConnectionTestImpl aaiConnection = new AaiConnectionTestImpl();
+        delegate.setAaiConnection(aaiConnection);
+        DelegateExecution execution = mock(DelegateExecution.class);
+        when(execution.getVariable(eq(CORRELATION_ID))).thenReturn("testCorrelationId");
+        // when
+        delegate.execute(execution);
+        // then
+        Pnf createdEntry = aaiConnection.getCreated().get("testCorrelationId");
+        assertThat(createdEntry.getPnfId()).isEqualTo("testCorrelationId");
+        assertThat(createdEntry.getPnfName()).isEqualTo("testCorrelationId");
+        assertThat(createdEntry.isInMaint()).isTrue();
+    }
+}
\ No newline at end of file
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java
new file mode 100644
index 0000000..9c8f19f
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java
@@ -0,0 +1,59 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.infrastructure.pnf.delegate;
+
+import org.onap.so.bpmn.infrastructure.pnf.dmaap.DmaapClient;
+import java.util.Objects;
+
+public class DmaapClientTestImpl implements DmaapClient {
+
+    private String correlationId;
+    private Runnable informConsumer;
+
+    @Override
+    public void registerForUpdate(String correlationId, Runnable informConsumer) {
+        this.correlationId = correlationId;
+        this.informConsumer = informConsumer;
+    }
+
+    @Override
+    public Runnable unregister(String correlationId) {
+        if (Objects.equals(this.correlationId, correlationId)) {
+            this.correlationId = null;
+            Runnable informConsumer = this.informConsumer;
+            this.informConsumer = null;
+            return informConsumer;
+        }
+        return null;
+    }
+
+    public String getCorrelationId() {
+        return correlationId;
+    }
+
+    public Runnable getInformConsumer() {
+        return informConsumer;
+    }
+
+    public boolean haveRegisteredConsumer() {
+        return correlationId != null;
+    }
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClientTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClientTest.java
new file mode 100644
index 0000000..168cd69
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClientTest.java
@@ -0,0 +1,94 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.infrastructure.pnf.delegate;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.inOrder;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verifyZeroInteractions;
+import static org.mockito.Mockito.when;
+
+import org.camunda.bpm.engine.ProcessEngineServices;
+import org.camunda.bpm.engine.RuntimeService;
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.camunda.bpm.engine.runtime.MessageCorrelationBuilder;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InOrder;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = {InformDmaapClient.class, DmaapClientTestImpl.class})
+public class InformDmaapClientTest {
+
+    @Autowired
+    private InformDmaapClient informDmaapClient;
+
+    @Autowired
+    private DmaapClientTestImpl dmaapClientTest;
+
+    private DelegateExecution delegateExecution;
+
+    private MessageCorrelationBuilder messageCorrelationBuilder;
+
+    @Test
+    public void shouldSendListenerToDmaapClient() throws Exception {
+        // given
+        mockDelegateExecution();
+        // when
+        informDmaapClient.execute(delegateExecution);
+        // then
+        assertThat(dmaapClientTest.getCorrelationId()).isEqualTo("testCorrelationId");
+        assertThat(dmaapClientTest.getInformConsumer()).isNotNull();
+        verifyZeroInteractions(messageCorrelationBuilder);
+    }
+
+    @Test
+    public void shouldSendListenerToDmaapClientAndSendMessageToCamunda() throws Exception {
+        // given
+        mockDelegateExecution();
+        // when
+        informDmaapClient.execute(delegateExecution);
+        dmaapClientTest.getInformConsumer().run();
+        // then
+        assertThat(dmaapClientTest.getCorrelationId()).isEqualTo("testCorrelationId");
+        InOrder inOrder = inOrder(messageCorrelationBuilder);
+        inOrder.verify(messageCorrelationBuilder).processInstanceBusinessKey("testBusinessKey");
+        inOrder.verify(messageCorrelationBuilder).correlateWithResult();
+    }
+
+    private void mockDelegateExecution() {
+        delegateExecution = mock(DelegateExecution.class);
+        when(delegateExecution.getVariable(eq(ExecutionVariableNames.CORRELATION_ID))).thenReturn("testCorrelationId");
+        when(delegateExecution.getProcessBusinessKey()).thenReturn("testBusinessKey");
+        ProcessEngineServices processEngineServices = mock(ProcessEngineServices.class);
+        when(delegateExecution.getProcessEngineServices()).thenReturn(processEngineServices);
+        RuntimeService runtimeService = mock(RuntimeService.class);
+        when(processEngineServices.getRuntimeService()).thenReturn(runtimeService);
+        messageCorrelationBuilder = mock(MessageCorrelationBuilder.class);
+        when(runtimeService.createMessageCorrelation(any())).thenReturn(messageCorrelationBuilder);
+        when(messageCorrelationBuilder.processInstanceBusinessKey(any())).thenReturn(messageCorrelationBuilder);
+    }
+}
\ No newline at end of file
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputsTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputsTest.java
new file mode 100644
index 0000000..aab289f
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/PnfCheckInputsTest.java
@@ -0,0 +1,84 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.infrastructure.pnf.delegate;
+
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.CORRELATION_ID;
+import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.TIMEOUT_FOR_NOTIFICATION;
+
+import org.camunda.bpm.engine.delegate.BpmnError;
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.junit.Before;
+import org.junit.Test;
+
+public class PnfCheckInputsTest {
+
+    private PnfCheckInputs delegate;
+
+    @Before
+    public void setUp() throws Exception {
+        delegate = new PnfCheckInputs();
+    }
+
+    private DelegateExecution mockDelegateExecution() {
+        DelegateExecution delegateExecution = mock(DelegateExecution.class);
+        when(delegateExecution.getVariable("testProcessKey")).thenReturn("testProcessKeyValue");
+        return delegateExecution;
+    }
+
+    @Test
+    public void shouldThrowException_whenPnfIdNotSet() throws Exception {
+        // given
+        DelegateExecution delegateExecution = mockDelegateExecution();
+        // when, then
+        assertThatThrownBy(() -> delegate.execute(delegateExecution)).isInstanceOf(BpmnError.class);
+    }
+
+    private DelegateExecution mockDelegateExecutionWithCorrelationId() {
+        DelegateExecution delegateExecution = mockDelegateExecution();
+        when(delegateExecution.getVariable(CORRELATION_ID)).thenReturn("testCorrelationId");
+        return delegateExecution;
+    }
+
+    @Test
+    public void shouldThrowException_whenTimeoutIsNotSetAndDefaultIsNotDefined() throws Exception {
+        // given
+        DelegateExecution delegateExecution = mockDelegateExecutionWithCorrelationId();
+        // when, then
+        assertThatThrownBy(() -> delegate.execute(delegateExecution)).isInstanceOf(BpmnError.class);
+    }
+
+    @Test
+    public void shouldSetDefaultTimeout_whenTimeoutIsNotSet() throws Exception {
+        // given
+        String defaultTimeout = "T1D";
+        delegate.setDefaultTimeout(defaultTimeout);
+        DelegateExecution delegateExecution = mockDelegateExecutionWithCorrelationId();
+        // when
+        delegate.execute(delegateExecution);
+        // then
+        verify(delegateExecution).setVariable(eq(TIMEOUT_FOR_NOTIFICATION), eq(defaultTimeout));
+    }
+}
\ No newline at end of file
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/bpmn/CreateAndActivatePnfResourceTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/bpmn/CreateAndActivatePnfResourceTest.java
new file mode 100644
index 0000000..7c4c820
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/bpmn/CreateAndActivatePnfResourceTest.java
@@ -0,0 +1,150 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.infrastructure.pnf.delegate.bpmn;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.camunda.bpm.engine.test.assertions.ProcessEngineAssertions.assertThat;
+import static org.onap.so.bpmn.infrastructure.pnf.delegate.AaiConnectionTestImpl.ID_WITHOUT_ENTRY;
+import static org.onap.so.bpmn.infrastructure.pnf.delegate.AaiConnectionTestImpl.ID_WITH_ENTRY_AND_IP;
+import static org.onap.so.bpmn.infrastructure.pnf.delegate.AaiConnectionTestImpl.ID_WITH_ENTRY_NO_IP;
+import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.CORRELATION_ID;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.camunda.bpm.engine.RuntimeService;
+import org.camunda.bpm.engine.history.HistoricVariableInstance;
+import org.camunda.bpm.engine.runtime.ProcessInstance;
+import org.camunda.bpm.engine.test.Deployment;
+import org.camunda.bpm.engine.test.ProcessEngineRule;
+import org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.onap.so.bpmn.infrastructure.pnf.delegate.AaiConnectionTestImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringRunner;
+
+@RunWith(SpringRunner.class)
+@ContextConfiguration(locations = "/applicationContext_forPnfTesting.xml")
+@Ignore
+public class CreateAndActivatePnfResourceTest {
+
+    private static final String TIMEOUT_10_S = "PT10S";
+    @Autowired
+    private RuntimeService runtimeService;
+
+    @Autowired
+    @Rule
+    public ProcessEngineRule processEngineRule;
+
+    @Autowired
+    private AaiConnectionTestImpl aaiConnection;
+
+    @Test
+    @Deployment(resources = {"process/CreateAndActivatePnfResource.bpmn"})
+    public void shouldSaveCurrentIpToVariableIfItAlreadyExistsInAai() throws Exception {
+        // given
+        aaiConnection.reset();
+        BpmnAwareTests.init(processEngineRule.getProcessEngine());
+        Map<String, Object> variables = new HashMap<>();
+        variables.put("timeoutForPnfEntryNotification", TIMEOUT_10_S);
+        variables.put(CORRELATION_ID, ID_WITH_ENTRY_AND_IP);
+        // when
+        ProcessInstance instance = runtimeService
+                .startProcessInstanceByKey("CreateAndActivatePnfResource", variables);
+        // then
+        assertThat(instance).isEnded().hasPassedInOrder(
+                "CreateAndActivatePnf_StartEvent",
+                "CheckAiiForCorrelationId",
+                "DoesAaiContainInfoAboutPnf",
+                "DoesAaiContainInfoAboutIp",
+                "AaiEntryAlreadyUpToDate"
+        );
+    }
+
+    @Test
+    @Deployment(resources = {"process/CreateAndActivatePnfResource.bpmn"})
+    public void shouldWaitForMessageFromDmaapAndUpdateAaiEntryWhenIpIsMissingInAaiEntry() throws Exception {
+        // given
+        aaiConnection.reset();
+        BpmnAwareTests.init(processEngineRule.getProcessEngine());
+        Map<String, Object> variables = new HashMap<>();
+        variables.put("timeoutForPnfEntryNotification", TIMEOUT_10_S);
+        variables.put(CORRELATION_ID, ID_WITH_ENTRY_NO_IP);
+        // when
+        ProcessInstance instance = runtimeService
+                .startProcessInstanceByKey("CreateAndActivatePnfResource", "businessKey", variables);
+        assertThat(instance).isWaitingAt("WaitForDmaapPnfReadyNotification").isWaitingFor("WorkflowMessage");
+        runtimeService.createMessageCorrelation("WorkflowMessage")
+                .processInstanceBusinessKey("businessKey")
+                .correlateWithResult();
+        // then
+        assertThat(instance).isEnded().hasPassedInOrder(
+                "CreateAndActivatePnf_StartEvent",
+                "CheckAiiForCorrelationId",
+                "DoesAaiContainInfoAboutPnf",
+                "DoesAaiContainInfoAboutIp",
+                "AaiEntryExists",
+                "InformDmaapClient",
+                "WaitForDmaapPnfReadyNotification",
+                "AaiEntryUpdated"
+        );
+    }
+
+    @Test
+    @Deployment(resources = {"process/CreateAndActivatePnfResource.bpmn"})
+    public void shouldCreateAaiEntryWaitForMessageFromDmaapAndUpdateAaiEntryWhenNoAaiEntry() throws Exception {
+        // given
+        aaiConnection.reset();
+        BpmnAwareTests.init(processEngineRule.getProcessEngine());
+        Map<String, Object> variables = new HashMap<>();
+        variables.put("timeoutForPnfEntryNotification", TIMEOUT_10_S);
+        variables.put(CORRELATION_ID, ID_WITHOUT_ENTRY);
+        // when
+        ProcessInstance instance = runtimeService
+                .startProcessInstanceByKey("CreateAndActivatePnfResource", "businessKey", variables);
+        assertThat(instance).isWaitingAt("WaitForDmaapPnfReadyNotification").isWaitingFor("WorkflowMessage");
+        runtimeService.createMessageCorrelation("WorkflowMessage")
+                .processInstanceBusinessKey("businessKey")
+                .correlateWithResult();
+        // then
+        assertThat(instance).isEnded().hasPassedInOrder(
+                "CreateAndActivatePnf_StartEvent",
+                "CheckAiiForCorrelationId",
+                "DoesAaiContainInfoAboutPnf",
+                "CreateAndActivatePnf_CreateAaiEntry",
+                "AaiEntryExists",
+                "InformDmaapClient",
+                "WaitForDmaapPnfReadyNotification",
+                "AaiEntryUpdated"
+        );
+        assertThat(aaiConnection.getCreated()).containsOnlyKeys(ID_WITHOUT_ENTRY);
+    }
+
+    private List<HistoricVariableInstance> getVariables(ProcessInstance instance) {
+        return processEngineRule.getHistoryService().createHistoricVariableInstanceQuery()
+                .processInstanceId(instance.getProcessInstanceId()).taskIdIn().list();
+    }
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClientTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClientTest.java
new file mode 100644
index 0000000..08ac9b6
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClientTest.java
@@ -0,0 +1,197 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.infrastructure.pnf.dmaap;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyZeroInteractions;
+import static org.mockito.Mockito.when;
+
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.lang.reflect.Field;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ScheduledExecutorService;
+
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpResponse;
+import org.apache.http.ProtocolVersion;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.message.BasicHttpResponse;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.ArgumentCaptor;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.onap.so.bpmn.infrastructure.pnf.dmaap.PnfEventReadyDmaapClient.DmaapTopicListenerThread;
+import org.springframework.core.env.Environment;
+@RunWith(MockitoJUnitRunner.class)
+public class PnfEventReadyDmaapClientTest {
+
+    private static final String CORRELATION_ID = "corrTestId";
+    private static final String CORRELATION_ID_NOT_FOUND_IN_MAP = "otherCorrId";
+    private static final String JSON_EXAMPLE_WITH_CORRELATION_ID = "[\n"
+            + "    {\n"
+            + "        \"pnfRegistrationFields\" : {\n"
+            + "        \"correlationId\" : \"%s\",\n"
+            + "        \"value\" : \"value1\"\n"
+            + "        }\n"
+            + "    },\n"
+            + "    {\n"
+            + "        \"pnfRegistrationFields\" : {\n"
+            + "        \"correlationId\" : \"corr\",\n"
+            + "        \"value\" : \"value2\"\n"
+            + "        }\n"
+            + "    }\n"
+            + "]";
+    private static final String JSON_EXAMPLE_WITH_NO_CORRELATION_ID =
+            "{\"pnfRegistrationFields\":{\"field\":\"value\"}}";
+
+    private static final String HOST = "hostTest";
+    private static final int PORT = 1234;
+    private static final String PROTOCOL = "http";
+    private static final String URI_PATH_PREFIX = "eventsForTesting";
+    private static final String EVENT_TOPIC_TEST = "eventTopicTest";
+    private static final String CONSUMER_ID = "consumerTestId";
+    private static final String CONSUMER_GROUP = "consumerGroupTest";
+    @Mock
+    private Environment env;
+    @InjectMocks
+    private PnfEventReadyDmaapClient testedObject = new PnfEventReadyDmaapClient();
+;
+    private DmaapTopicListenerThread testedObjectInnerClassThread;
+    private HttpClient httpClientMock;
+    private Runnable threadMockToNotifyCamundaFlow;
+    private ScheduledExecutorService executorMock;
+
+    @Before
+    public void init() throws NoSuchFieldException, IllegalAccessException {
+    	when(env.getProperty(eq("pnf.dmaap.port"), eq(Integer.class))).thenReturn(PORT);
+    	when(env.getProperty(eq("pnf.dmaap.host"))).thenReturn(HOST);
+        testedObject.setDmaapProtocol(PROTOCOL);
+        testedObject.setDmaapUriPathPrefix(URI_PATH_PREFIX);
+        testedObject.setDmaapTopicName(EVENT_TOPIC_TEST);
+        testedObject.setConsumerId(CONSUMER_ID);
+        testedObject.setConsumerGroup(CONSUMER_GROUP);
+        testedObject.setDmaapClientDelayInSeconds(1);
+        testedObject.init();
+        testedObjectInnerClassThread = testedObject.new DmaapTopicListenerThread();
+        httpClientMock = mock(HttpClient.class);
+        threadMockToNotifyCamundaFlow = mock(Runnable.class);
+        executorMock = mock(ScheduledExecutorService.class);
+        setPrivateField();
+    }
+
+    /**
+     * Test run method, where the are following conditions:
+     * <p> - DmaapThreadListener is running, flag is set to true
+     * <p> - map is filled with one entry with the key that we get from response
+     * <p> run method should invoke thread from map to notify camunda process, remove element from the map (map is
+     * empty) and shutdown the executor because of empty map
+     */
+    @Test
+    public void correlationIdIsFoundInHttpResponse_notifyAboutPnfReady()
+            throws IOException {
+        when(httpClientMock.execute(any(HttpGet.class))).
+                thenReturn(createResponse(String.format(JSON_EXAMPLE_WITH_CORRELATION_ID, CORRELATION_ID)));
+        testedObjectInnerClassThread.run();
+        ArgumentCaptor<HttpGet> captor1 = ArgumentCaptor.forClass(HttpGet.class);
+        verify(httpClientMock).execute(captor1.capture());
+        assertThat(captor1.getValue().getURI()).hasHost(HOST).hasPort(PORT).hasScheme(PROTOCOL)
+                .hasPath(
+                        "/" + URI_PATH_PREFIX + "/" + EVENT_TOPIC_TEST + "/" + CONSUMER_GROUP + "/" + CONSUMER_ID + "");
+        verify(threadMockToNotifyCamundaFlow).run();
+        verify(executorMock).shutdownNow();
+    }
+
+    /**
+     * Test run method, where the are following conditions:
+     * <p> - DmaapThreadListener is running, flag is set to true
+     * <p> - map is filled with one entry with the correlationId that does not match to correlationId
+     * taken from http response. run method should not do anything with the map not run any thread to notify camunda
+     * process
+     */
+    @Test
+    public void correlationIdIsFoundInHttpResponse_NotFoundInMap()
+            throws IOException {
+        when(httpClientMock.execute(any(HttpGet.class))).
+                thenReturn(createResponse(
+                        String.format(JSON_EXAMPLE_WITH_CORRELATION_ID, CORRELATION_ID_NOT_FOUND_IN_MAP)));
+        testedObjectInnerClassThread.run();
+        verifyZeroInteractions(threadMockToNotifyCamundaFlow, executorMock);
+    }
+
+    /**
+     * Test run method, where the are following conditions:
+     * <p> - DmaapThreadListener is running, flag is set to true
+     * <p> - map is filled with one entry with the correlationId but no correlation id is taken from HttpResponse
+     * run method should not do anything with the map and not run any thread to notify camunda process
+     */
+    @Test
+    public void correlationIdIsNotFoundInHttpResponse() throws IOException {
+        when(httpClientMock.execute(any(HttpGet.class))).
+                thenReturn(createResponse(JSON_EXAMPLE_WITH_NO_CORRELATION_ID));
+        testedObjectInnerClassThread.run();
+        verifyZeroInteractions(threadMockToNotifyCamundaFlow, executorMock);
+    }
+
+    private void setPrivateField() throws NoSuchFieldException, IllegalAccessException {
+        Field httpClientField = testedObject.getClass().getDeclaredField("httpClient");
+        httpClientField.setAccessible(true);
+        httpClientField.set(testedObject, httpClientMock);
+        httpClientField.setAccessible(false);
+
+        Field executorField = testedObject.getClass().getDeclaredField("executor");
+        executorField.setAccessible(true);
+        executorField.set(testedObject, executorMock);
+        executorField.setAccessible(false);
+
+        Field pnfCorrelationToThreadMapField = testedObject.getClass()
+                .getDeclaredField("pnfCorrelationIdToThreadMap");
+        pnfCorrelationToThreadMapField.setAccessible(true);
+        Map<String, Runnable> pnfCorrelationToThreadMap = new ConcurrentHashMap<>();
+        pnfCorrelationToThreadMap.put(CORRELATION_ID, threadMockToNotifyCamundaFlow);
+        pnfCorrelationToThreadMapField.set(testedObject, pnfCorrelationToThreadMap);
+
+        Field threadRunFlag = testedObject.getClass().getDeclaredField("dmaapThreadListenerIsRunning");
+        threadRunFlag.setAccessible(true);
+        threadRunFlag.set(testedObject, true);
+        threadRunFlag.setAccessible(false);
+    }
+
+    private HttpResponse createResponse(String json) throws UnsupportedEncodingException {
+        HttpEntity entity = new StringEntity(json);
+        ProtocolVersion protocolVersion = new ProtocolVersion("", 1, 1);
+        HttpResponse response = new BasicHttpResponse(protocolVersion, 1, "");
+        response.setEntity(entity);
+        response.setStatusCode(200);
+        return response;
+    }
+
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/AbstractTestBase.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/AbstractTestBase.java
new file mode 100644
index 0000000..8c31a02
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/AbstractTestBase.java
@@ -0,0 +1,47 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.vcpe;
+
+import org.onap.so.BaseIntegrationTest;
+import org.onap.so.bpmn.infrastructure.FlakyTests;
+
+import groovy.lang.Category;
+
+
+@Category(FlakyTests.class)
+public class AbstractTestBase extends BaseIntegrationTest {
+	
+	
+	public static final String CUST = "SDN-ETHERNET-INTERNET";
+	public static final String SVC = "123456789";
+	public static final String INST = "MIS%252F1604%252F0026%252FSW_INTERNET";
+	public static final String PARENT_INST = "MIS%252F1604%252F0027%252FSW_INTERNET";
+	public static final String ARID = "arId-1";
+	public static final String ARVERS = "1490627351232";
+
+	public static final String DEC_INST = "MIS%2F1604%2F0026%2FSW_INTERNET";
+	public static final String DEC_PARENT_INST = "MIS%2F1604%2F0027%2FSW_INTERNET";
+
+	public static final String VAR_SUCCESS_IND = "SuccessIndicator";
+	public static final String VAR_WFEX = "SavedWorkflowException1";
+	public static final String VAR_RESP_CODE = "CMSO_ResponseCode";
+	public static final String VAR_COMP_REQ = "CompleteMsoProcessRequest";
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/CreateVcpeResCustServiceIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/CreateVcpeResCustServiceIT.java
new file mode 100644
index 0000000..6109306
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/CreateVcpeResCustServiceIT.java
@@ -0,0 +1,381 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.vcpe;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.get;
+import static com.github.tomakehurst.wiremock.client.WireMock.post;
+import static com.github.tomakehurst.wiremock.client.WireMock.put;
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockDeleteAllottedResource;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetAllottedResource;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetCustomer;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithDepth;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetGenericVnfByIdWithPriority;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetNetworkPolicyfqdn;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetServiceInstance;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetServiceInstance_500;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceById;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceByName_404;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPatchAllottedResource;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPatchGenericVnf;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutAllottedResource;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutGenericVnf;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutNetwork;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutServiceInstance;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutVfModuleIdNoResponse;
+import static org.onap.so.bpmn.mock.StubResponseDatabase.MockGetServiceResourcesCatalogData;
+import static org.onap.so.bpmn.mock.StubResponseDatabase.MockPostRequestDB;
+import static org.onap.so.bpmn.mock.StubResponseDatabase.mockUpdateRequestDB;
+import static org.onap.so.bpmn.mock.StubResponseSDNCAdapter.mockSDNCAdapter;
+import static org.onap.so.bpmn.mock.StubResponseVNFAdapter.mockVNFPost;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.so.bpmn.common.BPMNUtil;
+import org.onap.so.bpmn.mock.FileUtil;
+import org.onap.so.bpmn.mock.StubResponseOof;
+
+
+public class CreateVcpeResCustServiceIT extends AbstractTestBase {
+
+	private static final String PROCNAME = "CreateVcpeResCustService";
+	private static final String Prefix = "CVRCS_";
+	
+	private final CallbackSet callbacks = new CallbackSet();
+	private final String request;
+	
+	@Before
+	public void init(){
+		BPMNUtil.cleanHistory(processEngine);
+	}
+	
+	public CreateVcpeResCustServiceIT() throws IOException {
+
+        callbacks.put("oof", JSON, "oofResponse", FileUtil.readResourceFile("__files/VCPE/CreateVcpeResCustService/oofCallbackInfraVnf.json"));
+		callbacks.put("assign", FileUtil.readResourceFile("__files/VfModularity/SDNCTopologyAssignCallback.xml"));
+		callbacks.put("create", FileUtil.readResourceFile("__files/VfModularity/SDNCTopologyCreateCallback.xml"));
+		callbacks.put("activate", FileUtil.readResourceFile("__files/VfModularity/SDNCTopologyActivateCallback.xml"));
+		callbacks.put("queryTXC", FileUtil.readResourceFile("__files/VCPE/CreateVcpeResCustService/SDNCTopologyQueryTXCCallback.xml"));
+		callbacks.put("queryBRG", FileUtil.readResourceFile("__files/VCPE/CreateVcpeResCustService/SDNCTopologyQueryBRGCallback.xml"));
+		callbacks.put("deactivate", FileUtil.readResourceFile("__files/VfModularity/SDNCTopologyDeactivateCallback.xml"));
+		callbacks.put("delete", FileUtil.readResourceFile("__files/VfModularity/SDNCTopologyDeleteCallback.xml"));
+		callbacks.put("unassign", FileUtil.readResourceFile("__files/VfModularity/SDNCTopologyUnassignCallback.xml"));
+
+		callbacks.put("query", FileUtil.readResourceFile("__files/VfModularity/SDNCTopologyQueryCallback.xml"));
+		callbacks.put("queryVnf", FileUtil.readResourceFile("__files/VfModularity/SDNCTopologyQueryCallbackVnf.xml"));
+		callbacks.put("queryModuleNoVnf", FileUtil.readResourceFile("__files/VfModularity/SDNCTopologyQueryCallbackVfModuleNoVnf.xml"));
+		callbacks.put("queryModule", FileUtil.readResourceFile("__files/VfModularity/SDNCTopologyQueryCallbackVfModule.xml"));
+		callbacks.put("vnfCreate", FileUtil.readResourceFile("__files/VfModularity/VNFAdapterRestCreateCallback.xml"));
+
+		request = FileUtil.readResourceFile("__files/VCPE/CreateVcpeResCustService/requestNoSIName.json");
+	}
+	
+	@Test
+	public void testCreateVcpeResCustService_Success() throws Exception {
+		System.out.println("starting:  testCreateVcpeResCustService_Success\n");
+		MockGetServiceResourcesCatalogData("uuid-miu-svc-011-abcdef", "2","VCPE/CreateVcpeResCustService/getCatalogServiceResourcesData.json");
+		MockGetServiceResourcesCatalogData("uuid-miu-svc-011-abcdef", "VCPE/CreateVcpeResCustService/getCatalogServiceResourcesData.json");
+		MockGetCustomer(CUST, "VCPE/CreateVcpeResCustService/getCustomer.xml");
+		StubResponseOof.mockOof();
+		// TODO: the SI should NOT have to be URL-encoded yet again!
+		MockPutServiceInstance(CUST, SVC, INST.replace("%", "%25"), "GenericFlows/getServiceInstance.xml");
+		MockGetServiceInstance(CUST, SVC, INST.replace("%", "%25"), "GenericFlows/getServiceInstance.xml");
+		
+		MockNodeQueryServiceInstanceById(INST, "GenericFlows/getSIUrlById.xml");
+		MockNodeQueryServiceInstanceById(PARENT_INST, "GenericFlows/getParentSIUrlById.xml");		
+		MockGetServiceInstance(CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
+		MockGetServiceInstance(CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
+		MockPutAllottedResource(CUST, SVC, PARENT_INST, ARID);
+		MockPatchAllottedResource(CUST, SVC, PARENT_INST, ARID);
+        MockGetGenericVnfByIdWithDepth(".*", 1, "VCPE/CreateVcpeResCustService/GenericVnf.xml");
+
+		MockPutGenericVnf(".*");
+        MockPatchGenericVnf(".*");
+
+        MockGetGenericVnfByIdWithPriority(".*", ".*", 200, "VfModularity/VfModule-new.xml", 5);
+        // MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
+        MockPutVfModuleIdNoResponse(".*", "PCRF", ".*");
+        MockPutNetwork(".*", "VfModularity/AddNetworkPolicy_AAIResponse_Success.xml", 200);
+
+		MockGetNetworkPolicyfqdn(".*","CreateNetworkV2/createNetwork_queryNetworkPolicy_AAIResponse_Success.xml",200);
+		MockNodeQueryServiceInstanceByName_404(".*");
+
+		mockVNFPost("", 202, ".*");
+
+        stubFor(post(urlMatching("/services/rest/v1/vnfs" + ".*" + "/vf-modules" )).willReturn(aResponse().withStatus(202)));
+		stubFor(get(urlMatching(".*/business/owning-entities?.*")).willReturn(aResponse().withStatus(404)));
+		stubFor(put(urlMatching(".*/business/owning-entities/owning-entity/.*")).willReturn(aResponse().withStatus(200)));
+		stubFor(put(urlMatching(".*/business/owning-entities/owning-entity/038d99af-0427-42c2-9d15-971b99b9b489/relationship-list/relationship")).willReturn(aResponse().withStatus(200)));
+		stubFor(put(urlMatching(".*/query?.*")).willReturn(aResponse().withStatus(200)));
+		MockPostRequestDB();	
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+		mockSDNCAdapter(200);
+		
+		Map<String, Object> variables = setupVariables();
+
+		String businessKey = UUID.randomUUID().toString();
+		invokeAsyncProcess(PROCNAME, "v1", businessKey, request, variables);
+
+        injectWorkflowMessages(callbacks, "oof");
+		// for SI
+		injectSDNCCallbacks(callbacks, "assign");
+		// for TXC
+		injectSDNCCallbacks(callbacks, "assign");
+		injectSDNCCallbacks(callbacks, "create");
+		injectSDNCCallbacks(callbacks, "activate");
+		injectSDNCCallbacks(callbacks, "queryTXC");
+
+        // For VNF
+        injectSDNCCallbacks(callbacks, "assign");
+        injectSDNCCallbacks(callbacks, "assign");
+        injectSDNCCallbacks(callbacks, "queryModule");
+        injectSDNCCallbacks(callbacks, "activate");
+        //VF Module
+        injectSDNCCallbacks(callbacks, "queryModule");
+        injectSDNCCallbacks(callbacks, "assign");
+        injectSDNCCallbacks(callbacks, "queryModule");
+        injectSDNCCallbacks(callbacks, "queryModule");
+		injectSDNCCallbacks(callbacks, "assign");
+		injectSDNCCallbacks(callbacks, "queryModuleNoVnf");
+        injectVNFRestCallbacks(callbacks, "vnfCreate");
+        injectSDNCCallbacks(callbacks, "activate");
+
+        // for BRG
+        injectSDNCCallbacks(callbacks, "assign");
+        injectSDNCCallbacks(callbacks, "create");
+        injectSDNCCallbacks(callbacks, "activate");
+        injectSDNCCallbacks(callbacks, "queryBRG");
+
+		waitForProcessEnd(businessKey, 10000);
+
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX);
+		System.out.println("workflowException:\n" + workflowException);
+
+		String completionReq = BPMNUtil.getVariable(processEngine, PROCNAME, Prefix+VAR_COMP_REQ);
+		System.out.println("completionReq:\n" + completionReq);
+		
+		assertEquals("true", BPMNUtil.getVariable(processEngine, PROCNAME, PROCNAME+VAR_SUCCESS_IND));
+		assertEquals("200", BPMNUtil.getVariable(processEngine, PROCNAME, VAR_RESP_CODE));
+		assertEquals(null, workflowException);
+		assertTrue(completionReq.indexOf("request-id>testRequestId<") >= 0);
+		assertTrue(completionReq.indexOf("action>CREATE<") >= 0);
+		assertTrue(completionReq.indexOf("source>VID<") >= 0);
+
+		assertEquals("1", BPMNUtil.getVariable(processEngine, PROCNAME, Prefix+"VnfsCreatedCount"));
+	}
+
+	@Test
+	public void testCreateVcpeResCustService_NoParts() throws Exception {
+		System.out.println("starting: testCreateVcpeResCustService_NoParts\n"  );
+		MockGetServiceResourcesCatalogData("uuid-miu-svc-011-abcdef", "2", "VCPE/CreateVcpeResCustService/getCatalogServiceResourcesNoData.json");
+		MockGetServiceResourcesCatalogData("uuid-miu-svc-011-abcdef", "VCPE/CreateVcpeResCustService/getCatalogServiceResourcesNoData.json");
+		MockGetCustomer(CUST, "VCPE/CreateVcpeResCustService/getCustomer.xml");
+		
+		// TODO: the SI should NOT have to be URL-encoded yet again!
+		MockPutServiceInstance(CUST, SVC, INST.replace("%", "%25"), "GenericFlows/getServiceInstance.xml");
+		MockGetServiceInstance(CUST, SVC, INST.replace("%", "%25"), "GenericFlows/getServiceInstance.xml");
+		
+		MockNodeQueryServiceInstanceById(INST, "GenericFlows/getSIUrlById.xml");		
+		MockGetServiceInstance(CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
+		MockNodeQueryServiceInstanceById(PARENT_INST, "GenericFlows/getParentSIUrlById.xml");
+		MockGetServiceInstance(CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
+		
+		// TODO: should these really be PARENT_INST, or should they be INST?
+		MockPutAllottedResource(CUST, SVC, PARENT_INST, ARID);
+		MockPatchAllottedResource(CUST, SVC, PARENT_INST, ARID);
+
+		mockSDNCAdapter(200);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+        StubResponseOof.mockOof();
+        stubFor(get(urlMatching(".*/business/owning-entities?.*")).willReturn(aResponse().withStatus(404)));
+        stubFor(put(urlMatching(".*/business/owning-entities/owning-entity/.*")).willReturn(aResponse().withStatus(200)));
+        stubFor(put(urlMatching(".*/business/owning-entities/owning-entity/038d99af-0427-42c2-9d15-971b99b9b489/relationship-list/relationship")).willReturn(aResponse().withStatus(200)));
+        stubFor(put(urlMatching(".*/query?.*")).willReturn(aResponse().withStatus(200)));
+        MockPostRequestDB();
+        mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+		
+		Map<String, Object> variables = setupVariables();
+
+		String businessKey = UUID.randomUUID().toString();
+		invokeAsyncProcess(PROCNAME, "v1", businessKey, request, variables);
+
+        injectWorkflowMessages(callbacks, "oof");
+		// for SI
+		injectSDNCCallbacks(callbacks, "assign");
+		
+		waitForProcessEnd(businessKey, 10000);
+
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX);
+		System.out.println("workflowException:\n" + workflowException);
+
+		String completionReq = BPMNUtil.getVariable(processEngine, PROCNAME, Prefix+VAR_COMP_REQ);
+		System.out.println("completionReq:\n" + completionReq);
+		
+		assertEquals("true", BPMNUtil.getVariable(processEngine, PROCNAME, PROCNAME+VAR_SUCCESS_IND));
+		assertEquals("200", BPMNUtil.getVariable(processEngine, PROCNAME, VAR_RESP_CODE));
+		assertEquals(null, workflowException);
+		assertTrue(completionReq.indexOf("request-id>testRequestId<") >= 0);
+		assertTrue(completionReq.indexOf("action>CREATE<") >= 0);
+		assertTrue(completionReq.indexOf("source>VID<") >= 0);
+
+		assertEquals("0", BPMNUtil.getVariable(processEngine, PROCNAME, Prefix+"VnfsCreatedCount"));
+	}
+	
+	@Test
+	public void testCreateVcpeResCustService_Fault_NoRollback() throws Exception {
+		System.out.println("starting:  testCreateVcpeResCustService_Fault_NoRollback\n");
+		MockGetServiceResourcesCatalogData("uuid-miu-svc-011-abcdef", "2", "VCPE/CreateVcpeResCustService/getCatalogServiceResourcesData.json");
+		MockGetServiceResourcesCatalogData("uuid-miu-svc-011-abcdef", "VCPE/CreateVcpeResCustService/getCatalogServiceResourcesData.json");
+		MockGetCustomer(CUST, "VCPE/CreateVcpeResCustService/getCustomer.xml");
+		
+		// TODO: the SI should NOT have to be URL-encoded yet again!
+		MockPutServiceInstance(CUST, SVC, INST.replace("%", "%25"), "GenericFlows/getServiceInstance.xml");
+		MockGetServiceInstance(CUST, SVC, INST.replace("%", "%25"), "GenericFlows/getServiceInstance.xml");
+		
+		MockNodeQueryServiceInstanceById(INST, "GenericFlows/getSIUrlById.xml");
+		MockNodeQueryServiceInstanceById(PARENT_INST, "GenericFlows/getParentSIUrlById.xml");		
+		MockGetServiceInstance(CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
+		MockGetServiceInstance_500(CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
+		MockPutAllottedResource(CUST, SVC, PARENT_INST, ARID);
+		MockPatchAllottedResource(CUST, SVC, PARENT_INST, ARID);
+
+		mockSDNCAdapter(404);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+        StubResponseOof.mockOof();
+        stubFor(get(urlMatching(".*/business/owning-entities?.*")).willReturn(aResponse().withStatus(404)));
+        stubFor(put(urlMatching(".*/business/owning-entities/owning-entity/.*")).willReturn(aResponse().withStatus(200)));
+        stubFor(put(urlMatching(".*/business/owning-entities/owning-entity/038d99af-0427-42c2-9d15-971b99b9b489/relationship-list/relationship")).willReturn(aResponse().withStatus(200)));
+        stubFor(put(urlMatching(".*/query?.*")).willReturn(aResponse().withStatus(200)));
+        MockPostRequestDB();
+		
+		Map<String, Object> variables = setupVariables();
+
+		String businessKey = UUID.randomUUID().toString();
+		invokeAsyncProcess(PROCNAME, "v1", businessKey, request, variables);
+
+        injectWorkflowMessages(callbacks, "oof");
+		
+		waitForProcessEnd(businessKey, 100000);
+
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX);
+		System.out.println("workflowException:\n" + workflowException);
+
+		String completionReq = BPMNUtil.getVariable(processEngine, PROCNAME, Prefix+VAR_COMP_REQ);
+		System.out.println("completionReq:\n" + completionReq);
+		
+		assertEquals(null, BPMNUtil.getVariable(processEngine, PROCNAME, PROCNAME+VAR_SUCCESS_IND));
+		assertEquals(null, BPMNUtil.getVariable(processEngine, PROCNAME, VAR_RESP_CODE));
+		assertNotNull(workflowException);
+		
+		BPMNUtil.assertNoProcessInstance(processEngine, "DoCreateAllottedResourceBRGRollback");
+		BPMNUtil.assertNoProcessInstance(processEngine, "DoCreateVnfAndModulesRollback");
+		BPMNUtil.assertNoProcessInstance(processEngine, "DoCreateAllottedResourceTXCRollback");
+	}
+	
+	@Test
+	public void testCreateVcpeResCustService_Fault_Rollback() throws Exception {
+		System.out.println("starting:  testCreateVcpeResCustService_Fault_Rollback\n");
+		MockGetServiceResourcesCatalogData("uuid-miu-svc-011-abcdef", "2", "VCPE/CreateVcpeResCustService/getCatalogServiceResourcesData.json");
+		MockGetServiceResourcesCatalogData("uuid-miu-svc-011-abcdef", "VCPE/CreateVcpeResCustService/getCatalogServiceResourcesData.json");
+		MockGetCustomer(CUST, "VCPE/CreateVcpeResCustService/getCustomer.xml");
+		
+		// TODO: the SI should NOT have to be URL-encoded yet again!
+		MockPutServiceInstance(CUST, SVC, INST.replace("%", "%25"), "GenericFlows/getServiceInstance.xml");
+		MockGetServiceInstance(CUST, SVC, INST.replace("%", "%25"), "GenericFlows/getServiceInstance.xml");
+		
+		MockNodeQueryServiceInstanceById(INST, "GenericFlows/getSIUrlById.xml");
+		MockNodeQueryServiceInstanceById(PARENT_INST, "GenericFlows/getParentSIUrlById.xml");		
+		MockGetServiceInstance(CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
+		MockGetServiceInstance(CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
+		MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/CreateVcpeResCustService/arGetById.xml");
+		MockGetAllottedResource(CUST, SVC, PARENT_INST, ARID, "VCPE/CreateVcpeResCustService/arGetById.xml");
+		MockPutAllottedResource(CUST, SVC, PARENT_INST, ARID);
+		MockPatchAllottedResource(CUST, SVC, PARENT_INST, ARID);
+		MockDeleteAllottedResource(CUST, SVC, PARENT_INST, ARID, ARVERS);
+
+		mockSDNCAdapter(200);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+		StubResponseOof.mockOof();
+		stubFor(get(urlMatching(".*/business/owning-entities?.*")).willReturn(aResponse().withStatus(404)));
+		stubFor(put(urlMatching(".*/business/owning-entities/owning-entity/.*")).willReturn(aResponse().withStatus(200)));
+		stubFor(put(urlMatching(".*/business/owning-entities/owning-entity/038d99af-0427-42c2-9d15-971b99b9b489/relationship-list/relationship")).willReturn(aResponse().withStatus(200)));
+		stubFor(put(urlMatching(".*/query?.*")).willReturn(aResponse().withStatus(200)));
+		MockPostRequestDB();
+		String req = FileUtil.readResourceFile("__files/VCPE/CreateVcpeResCustService/requestRollback.json");
+
+		Map<String, Object> variables = setupVariables();
+
+		String businessKey = UUID.randomUUID().toString();
+		invokeAsyncProcess(PROCNAME, "v1", businessKey, req, variables);
+
+		injectWorkflowMessages(callbacks, "oof");
+		// for SI
+		injectSDNCCallbacks(callbacks, "assign");
+		
+		// for TXC
+		injectSDNCCallbacks(callbacks, "assign");
+		injectSDNCCallbacks(callbacks, "create");
+		
+		waitForProcessEnd(businessKey, 10000);
+
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX);
+		System.out.println("workflowException:\n" + workflowException);
+
+		String completionReq = BPMNUtil.getVariable(processEngine, PROCNAME, Prefix+VAR_COMP_REQ);
+		System.out.println("completionReq:\n" + completionReq);
+		
+		assertEquals(null, BPMNUtil.getVariable(processEngine, PROCNAME, PROCNAME+VAR_SUCCESS_IND));
+		assertEquals(null, BPMNUtil.getVariable(processEngine, PROCNAME, VAR_RESP_CODE));
+		assertEquals(null, completionReq);
+		assertNotNull(workflowException);
+		
+		BPMNUtil.assertAnyProcessInstanceFinished(processEngine, "DoCreateServiceInstanceRollback");
+	}
+	
+	// *****************
+	// Utility Section
+	// *****************
+
+	// Success Scenario
+	private Map<String, Object> setupVariables() {
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("requestId", "testRequestId");
+		variables.put("request-id", "testRequestId");
+		variables.put("serviceInstanceId", DEC_INST);
+		variables.put("allottedResourceId", ARID);
+		variables.put("URN_mso_workflow_aai_distribution_delay", "PT5S");
+		return variables;
+
+	}
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DeleteVcpeResCustServiceIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DeleteVcpeResCustServiceIT.java
new file mode 100644
index 0000000..ca81d99
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DeleteVcpeResCustServiceIT.java
@@ -0,0 +1,291 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.vcpe;
+
+import com.github.tomakehurst.wiremock.stubbing.Scenario;
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.so.bpmn.common.BPMNUtil;
+import org.onap.so.bpmn.mock.FileUtil;
+
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.delete;
+import static com.github.tomakehurst.wiremock.client.WireMock.get;
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockDeleteAllottedResource;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockDeleteServiceInstance;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetAllottedResource;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetServiceInstance;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceById;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPatchAllottedResource;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockQueryAllottedResourceById;
+import static org.onap.so.bpmn.mock.StubResponseDatabase.mockUpdateRequestDB;
+import static org.onap.so.bpmn.mock.StubResponseSDNCAdapter.mockSDNCAdapter;
+
+public class DeleteVcpeResCustServiceIT extends AbstractTestBase {
+
+	private static final String PROCNAME = "DeleteVcpeResCustService";
+	private static final String Prefix = "DVRCS_";
+	private static final String AR_BRG_ID = "ar-brgB";
+	private static final String AR_TXC_ID = "ar-txcA";
+
+	private final CallbackSet callbacks = new CallbackSet();
+	private final String request;
+
+	public DeleteVcpeResCustServiceIT() throws IOException {
+		callbacks.put("deactivate", FileUtil.readResourceFile("__files/VfModularity/SDNCTopologyDeactivateCallback.xml"));
+		callbacks.put("delete", FileUtil.readResourceFile("__files/VfModularity/SDNCTopologyDeleteCallback.xml"));
+		callbacks.put("unassign", FileUtil.readResourceFile("__files/VfModularity/SDNCTopologyUnassignCallback.xml"));
+
+		request = FileUtil.readResourceFile("__files/VCPE/DeleteVcpeResCustService/request.json");
+	}
+
+	@Before
+	public void init(){
+		BPMNUtil.cleanHistory(processEngine);
+	}
+
+	@Test
+	public void testDeleteVcpeResCustService_Success() throws Exception {
+		logStart();
+		MockNodeQueryServiceInstanceById(INST, "GenericFlows/getSIUrlById.xml");
+
+		// TODO: use INST instead of DEC_INST
+		/*
+		 * Seems to be a bug as they
+		 * fail to URL-encode the SI id before performing the query so we'll
+		 * add a stub for that case, too.
+		 */
+		MockNodeQueryServiceInstanceById(DEC_INST, "GenericFlows/getSIUrlById.xml");
+
+		/*
+		 * cannot use MockGetServiceInstance(), because we need to return
+		 * different responses as we traverse through the flow
+		 */
+
+		// initially, the SI includes the ARs
+		stubFor(get(urlMatching("/aai/v[0-9]+/business/customers/customer/" + CUST + "/service-subscriptions/service-subscription/" + SVC + "/service-instances/service-instance/" + INST))
+				.inScenario("SI retrieval")
+				.whenScenarioStateIs(Scenario.STARTED)
+				.willReturn(aResponse()
+						.withStatus(200)
+						.withHeader("Content-Type", "text/xml")
+						.withBodyFile("VCPE/DeleteVcpeResCustService/getSI.xml"))
+				.willSetStateTo("ARs Deleted"));
+
+		// once the ARs have been deleted, the SI should be empty
+		stubFor(get(urlMatching("/aai/v[0-9]+/business/customers/customer/" + CUST + "/service-subscriptions/service-subscription/" + SVC + "/service-instances/service-instance/" + INST))
+				.inScenario("SI retrieval")
+				.whenScenarioStateIs("ARs Deleted")
+				.willReturn(aResponse()
+						.withStatus(200)
+						.withHeader("Content-Type", "text/xml")
+						.withBodyFile("VCPE/DeleteVcpeResCustService/getSIAfterDelArs.xml")));
+
+		// for BRG
+		MockQueryAllottedResourceById(AR_BRG_ID, "VCPE/DeleteVcpeResCustService/getBRGArUrlById.xml");
+		MockGetAllottedResource(CUST, SVC, INST, AR_BRG_ID, "VCPE/DeleteVcpeResCustService/arGetBRGById.xml");
+		MockPatchAllottedResource(CUST, SVC, INST, AR_BRG_ID);
+		MockDeleteAllottedResource(CUST, SVC, INST, AR_BRG_ID, ARVERS);
+
+		// for TXC
+		MockQueryAllottedResourceById(AR_TXC_ID, "VCPE/DeleteVcpeResCustService/getTXCArUrlById.xml");
+		MockGetAllottedResource(CUST, SVC, INST, AR_TXC_ID, "VCPE/DeleteVcpeResCustService/arGetTXCById.xml");
+		MockPatchAllottedResource(CUST, SVC, INST, AR_TXC_ID);
+		MockDeleteAllottedResource(CUST, SVC, INST, AR_TXC_ID, ARVERS);
+
+        //MockGetGenericVnfById("vnfX.*", "GenericFlows/getGenericVnfByNameResponse.xml");
+        stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*"))
+                .willReturn(aResponse()
+                        .withStatus(200)
+                        .withHeader("Content-Type", "text/xml")
+                        .withBodyFile("GenericFlows/getGenericVnfByNameResponse.xml")));
+
+
+		stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*"))
+				.willReturn(aResponse()
+						.withStatus(204)
+						.withHeader("Content-Type", "text/xml")));
+
+        MockDeleteServiceInstance(CUST,SVC,INST,SVC);
+
+        mockSDNCAdapter(200);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = setupVariables(businessKey);
+
+		invokeAsyncProcess(PROCNAME, "v1", businessKey, request, variables);
+
+		// for BRG
+		injectSDNCCallbacks(callbacks, "deactivate");
+		injectSDNCCallbacks(callbacks, "delete");
+		injectSDNCCallbacks(callbacks, "unassign");
+
+		// for VNF1
+		injectSDNCCallbacks(callbacks, "deactivate");
+		injectSDNCCallbacks(callbacks, "unassign");
+
+		// for VNF2
+		injectSDNCCallbacks(callbacks, "deactivate");
+		injectSDNCCallbacks(callbacks, "unassign");
+
+		// for TXC
+		injectSDNCCallbacks(callbacks, "deactivate");
+		injectSDNCCallbacks(callbacks, "delete");
+		injectSDNCCallbacks(callbacks, "unassign");
+
+		// for SI
+		injectSDNCCallbacks(callbacks, "deactivate");
+		injectSDNCCallbacks(callbacks, "delete");
+
+		waitForProcessEnd(businessKey, 70000);
+		assertTrue(isProcessEnded(businessKey));
+
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX);
+		System.out.println("workflowException:\n" + workflowException);
+
+		String completionReq = BPMNUtil.getVariable(processEngine, PROCNAME, Prefix+VAR_COMP_REQ);
+		System.out.println("completionReq:\n" + completionReq);
+
+		assertEquals("true", BPMNUtil.getVariable(processEngine, PROCNAME, PROCNAME+VAR_SUCCESS_IND));
+		assertEquals("200", BPMNUtil.getVariable(processEngine, PROCNAME, VAR_RESP_CODE));
+		assertNull(workflowException);
+		assertTrue(completionReq.contains("<request-id>"+businessKey+"<"));
+		assertTrue(completionReq.contains("<action>DELETE<"));
+		assertTrue(completionReq.contains("<source>VID<"));
+
+		assertEquals("2", BPMNUtil.getVariable(processEngine, PROCNAME, Prefix+"vnfsDeletedCount"));
+
+		BPMNUtil.assertAnyProcessInstanceFinished(processEngine, "DoDeleteVnfAndModules");
+		logEnd();
+	}
+
+	@Test
+	public void testDeleteVcpeResCustService_NoBRG_NoTXC_NoVNF() throws Exception {
+		logStart();
+		MockNodeQueryServiceInstanceById(INST, "GenericFlows/getSIUrlById.xml");
+
+		// TODO: use INST instead of DEC_INST
+		/*
+		 * Seems to be a bug  as they
+		 * fail to URL-encode the SI id before performing the query so we'll
+		 * add a stub for that case, too.
+		 */
+		MockNodeQueryServiceInstanceById(DEC_INST, "GenericFlows/getSIUrlById.xml");
+
+		MockGetServiceInstance(CUST, SVC, INST, "VCPE/DeleteVcpeResCustService/getSIAfterDelArs.xml");
+
+		mockSDNCAdapter(200);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = setupVariables(businessKey);
+
+
+		invokeAsyncProcess(PROCNAME, "v1", businessKey, request, variables);
+
+		// for SI
+		injectSDNCCallbacks(callbacks, "deactivate");
+		injectSDNCCallbacks(callbacks, "delete");
+
+		waitForProcessEnd(businessKey, 70000);
+
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX);
+		System.out.println("workflowException:\n" + workflowException);
+
+		String completionReq = BPMNUtil.getVariable(processEngine, PROCNAME, Prefix+VAR_COMP_REQ);
+		System.out.println("completionReq:\n" + completionReq);
+
+		assertEquals("true", BPMNUtil.getVariable(processEngine, PROCNAME, PROCNAME+VAR_SUCCESS_IND));
+		assertEquals("200", BPMNUtil.getVariable(processEngine, PROCNAME, VAR_RESP_CODE));
+		assertNull( workflowException);
+		assertTrue(completionReq.contains("<request-id>"+businessKey+"<"));
+		assertTrue(completionReq.contains("<action>DELETE<"));
+		assertTrue(completionReq.contains("<source>VID<"));
+
+		assertEquals("0", BPMNUtil.getVariable(processEngine, PROCNAME, Prefix+"vnfsDeletedCount"));
+
+		BPMNUtil.assertNoProcessInstance(processEngine, "DoDeleteVnfAndModules");
+		logEnd();
+	}
+
+	@Test
+	public void testDeleteVcpeResCustService_Fault() throws Exception {
+		logStart();
+		MockNodeQueryServiceInstanceById(INST, "GenericFlows/getSIUrlById.xml");
+
+		// TODO: use INST instead of DEC_INST
+		/*
+		 * Seems to be a bug as they
+		 * fail to URL-encode the SI id before performing the query so we'll
+		 * add a stub for that case, too.
+		 */
+		MockNodeQueryServiceInstanceById(DEC_INST, "GenericFlows/getSIUrlById.xml");
+
+		MockGetServiceInstance(CUST, SVC, INST, "VCPE/DeleteVcpeResCustService/getSIAfterDelArs.xml");
+
+		// generate failure
+		mockSDNCAdapter(404);
+
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = setupVariables(businessKey);
+
+		invokeAsyncProcess(PROCNAME, "v1", businessKey, request, variables);
+
+		waitForProcessEnd(businessKey, 70000);
+
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX);
+		System.out.println("workflowException:\n" + workflowException);
+
+		String completionReq = BPMNUtil.getVariable(processEngine, PROCNAME, Prefix+VAR_COMP_REQ);
+		System.out.println("completionReq:\n" + completionReq);
+
+		assertEquals(null, BPMNUtil.getVariable(processEngine, PROCNAME, PROCNAME+VAR_SUCCESS_IND));
+		assertEquals(null, BPMNUtil.getVariable(processEngine, PROCNAME, VAR_RESP_CODE));
+		assertNotNull(workflowException);
+		logEnd();
+	}
+
+	private Map<String, Object> setupVariables(String requestId) throws UnsupportedEncodingException {
+		Map<String, Object> variables = new HashMap<>();
+		variables.put("isDebugLogEnabled", "true");
+		variables.put("requestId", requestId);
+		variables.put("serviceInstanceId", DEC_INST);
+		variables.put("sdncVersion", "1802");
+		variables.put("serviceInstanceName", "some-junk-name");
+		return variables;
+	}
+
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoCreateAllottedResourceBRGIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoCreateAllottedResourceBRGIT.java
new file mode 100644
index 0000000..2b1b5a3
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoCreateAllottedResourceBRGIT.java
@@ -0,0 +1,266 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.vcpe;
+
+import static org.junit.Assert.*;
+import static org.onap.so.bpmn.common.BPMNUtil.waitForWorkflowToFinish;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetAllottedResource;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetServiceInstance;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceById;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPatchAllottedResource;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutAllottedResource;
+import static org.onap.so.bpmn.mock.StubResponseDatabase.mockUpdateRequestDB;
+import static org.onap.so.bpmn.mock.StubResponseSDNCAdapter.mockSDNCAdapter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.junit.Test;
+import org.onap.so.bpmn.common.BPMNUtil;
+import org.onap.so.bpmn.mock.FileUtil;
+
+
+public class DoCreateAllottedResourceBRGIT extends AbstractTestBase {
+
+	private static final String PROCNAME = "DoCreateAllottedResourceBRG";
+	private final CallbackSet callbacks = new CallbackSet();
+
+	public DoCreateAllottedResourceBRGIT() {
+		callbacks.put("assign", FileUtil.readResourceFile("__files/VfModularity/SDNCTopologyAssignCallback.xml"));
+		callbacks.put("create", FileUtil.readResourceFile("__files/VfModularity/SDNCTopologyCreateCallback.xml"));
+		callbacks.put("activate", FileUtil.readResourceFile("__files/VfModularity/SDNCTopologyActivateCallback.xml"));
+		callbacks.put("query", FileUtil.readResourceFile("__files/VCPE/DoCreateAllottedResourceBRG/SDNCTopologyQueryCallback.xml"));
+	}
+	
+	@Test
+	public void testDoCreateAllottedResourceBRG_Success() throws InterruptedException {
+		logStart();
+
+		// TODO: use INST instead of DEC_INST
+		/*
+		 * should be INST instead of DEC_INST, but AAI utilities appear to
+		 * have a bug in that they don't URL-encode the SI id before using
+		 * it in the query
+		 */
+		MockNodeQueryServiceInstanceById(DEC_INST, "GenericFlows/getSIUrlById.xml");
+		MockNodeQueryServiceInstanceById(DEC_PARENT_INST, "GenericFlows/getParentSIUrlById.xml");
+
+		MockGetServiceInstance(CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
+		MockGetServiceInstance(CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
+		MockPutAllottedResource(CUST, SVC, PARENT_INST, ARID);
+		MockPatchAllottedResource(CUST, SVC, PARENT_INST, ARID);
+		mockSDNCAdapter(200);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesSuccess(variables,"testRequestId123");
+
+		String processId = invokeSubProcess(PROCNAME, variables);
+		
+		injectSDNCCallbacks(callbacks, "assign");
+		injectSDNCCallbacks(callbacks, "create");
+		injectSDNCCallbacks(callbacks, "activate");
+		injectSDNCCallbacks(callbacks, "query");
+
+		waitForWorkflowToFinish(processEngine,processId);
+
+		assertTrue(isProcessEndedByProcessInstanceId(processId));
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX,processId);
+		assertNull(workflowException);
+		
+		assertEquals("namefromrequest", BPMNUtil.getVariable(processEngine, PROCNAME, "allotedResourceName",processId));
+		logEnd();
+	}
+	
+	@Test
+	public void testDoCreateAllottedResourceBRG_NoSI() throws Exception{
+		logStart();
+		// TODO: use INST instead of DEC_INST
+		/*
+		 * should be INST instead of DEC_INST, but AAI utilities appear to
+		 * have a bug in that they don't URL-encode the SI id before using
+		 * it in the query
+		 */
+		MockNodeQueryServiceInstanceById(DEC_INST, "GenericFlows/getNotFound.xml");
+		MockNodeQueryServiceInstanceById(DEC_PARENT_INST, "GenericFlows/getParentSIUrlById.xml");
+
+		MockGetServiceInstance(CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
+		MockGetServiceInstance(CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
+		MockPutAllottedResource(CUST, SVC, PARENT_INST, ARID);
+		MockPatchAllottedResource(CUST, SVC, PARENT_INST, ARID);
+		mockSDNCAdapter(200);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+		
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesSuccess(variables,"testRequestId124");
+		
+		String processId = invokeSubProcess(PROCNAME, variables);
+
+		waitForWorkflowToFinish(processEngine,processId);
+
+		assertTrue(isProcessEndedByProcessInstanceId(processId));
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX,processId);
+		assertNotNull(workflowException);
+		
+		assertNull(BPMNUtil.getVariable(processEngine, PROCNAME, "allotedResourceName",processId));
+		logEnd();
+	}
+	
+	@Test
+	public void testDoCreateAllottedResourceBRG_ActiveAr() throws Exception{
+		logStart();
+		// TODO: use INST instead of DEC_INST
+		/*
+		 * should be INST instead of DEC_INST, but AAI utilities appear to
+		 * have a bug in that they don't URL-encode the SI id before using
+		 * it in the query
+		 */
+		MockNodeQueryServiceInstanceById(DEC_INST, "GenericFlows/getSIUrlById.xml");
+		MockNodeQueryServiceInstanceById(DEC_PARENT_INST, "GenericFlows/getParentSIUrlById.xml");
+		
+		MockGetServiceInstance(CUST, SVC, INST, "VCPE/DoCreateAllottedResourceBRG/getSIandAR.xml");
+		MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRG/getArBrg2.xml");
+		MockGetServiceInstance(CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
+		MockPutAllottedResource(CUST, SVC, PARENT_INST, ARID);
+		MockPatchAllottedResource(CUST, SVC, PARENT_INST, ARID);
+		mockSDNCAdapter(200);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesSuccess(variables,"testRequestId125");
+
+		variables.put("failExists", "false");
+
+		String processId = invokeSubProcess(PROCNAME, variables);
+
+		
+		
+		injectSDNCCallbacks(callbacks, "query");
+
+		waitForWorkflowToFinish(processEngine,processId);
+
+		assertTrue(isProcessEndedByProcessInstanceId(processId));
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX,processId);
+		assertNull( workflowException);
+		
+		assertEquals("namefromrequest", BPMNUtil.getVariable(processEngine, PROCNAME, "allotedResourceName",processId));
+		logEnd();
+	}
+	
+	@Test
+	public void testDoCreateAllottedResourceBRG_NoParentSI() throws Exception{
+		logStart();
+		// TODO: use INST instead of DEC_INST
+		/*
+		 * should be INST instead of DEC_INST, but AAI utilities appear to
+		 * have a bug in that they don't URL-encode the SI id before using
+		 * it in the query
+		 */
+		MockNodeQueryServiceInstanceById(DEC_INST, "GenericFlows/getSIUrlById.xml");
+		MockNodeQueryServiceInstanceById(DEC_PARENT_INST, "GenericFlows/getNotFound.xml");
+
+		MockGetServiceInstance(CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
+		MockGetServiceInstance(CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
+		MockPutAllottedResource(CUST, SVC, PARENT_INST, ARID);
+		MockPatchAllottedResource(CUST, SVC, PARENT_INST, ARID);
+		mockSDNCAdapter(200);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesSuccess(variables,"testRequestId126");
+
+		String processId = invokeSubProcess(PROCNAME, variables);
+
+		waitForWorkflowToFinish(processEngine,processId);
+
+		assertTrue(isProcessEndedByProcessInstanceId(processId));
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX,processId);
+		assertNotNull(workflowException);
+		
+		assertNull(BPMNUtil.getVariable(processEngine, PROCNAME, "allotedResourceName",processId));
+		logEnd();
+	}
+	
+	@Test
+	public void testDoCreateAllottedResourceBRG_SubProcessError() throws Exception{
+		logStart();
+		// TODO: use INST instead of DEC_INST
+		/*
+		 * should be INST instead of DEC_INST, but AAI utilities appear to
+		 * have a bug in that they don't URL-encode the SI id before using
+		 * it in the query
+		 */
+		MockNodeQueryServiceInstanceById(DEC_INST, "GenericFlows/getSIUrlById.xml");
+		MockNodeQueryServiceInstanceById(DEC_PARENT_INST, "GenericFlows/getParentSIUrlById.xml");
+		
+		MockGetServiceInstance(CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
+		MockGetServiceInstance(CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
+		MockPutAllottedResource(CUST, SVC, PARENT_INST, ARID);
+		MockPatchAllottedResource(CUST, SVC, PARENT_INST, ARID);
+		mockSDNCAdapter(404);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesSuccess(variables,"testRequestId127");
+
+		String processId = invokeSubProcess(PROCNAME, variables);
+
+		waitForWorkflowToFinish(processEngine,processId);
+
+		assertTrue(isProcessEndedByProcessInstanceId(processId));
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX,processId);
+		assertNotNull(workflowException);
+
+		assertNull(BPMNUtil.getVariable(processEngine, PROCNAME, "allotedResourceName",processId));
+		logEnd();
+	}
+
+	private void setVariablesSuccess(Map<String, Object> variables, String requestId) {
+		variables.put("isDebugLogEnabled", "true");
+		variables.put("failExists", "true");
+		variables.put("disableRollback", "true");
+		variables.put("msoRequestId", requestId);
+		variables.put("mso-request-id", "requestId");
+		variables.put("sourceNetworkId", "snId");
+		variables.put("sourceNetworkRole", "snRole");
+		variables.put("allottedResourceRole", "txc");
+		variables.put("allottedResourceType", "BRG");
+		variables.put("allottedResourceId", ARID);
+		variables.put("vni", "BRG");
+		variables.put("vgmuxBearerIP", "bearerip");
+		variables.put("brgWanMacAddress", "wanmac");
+
+		variables.put("serviceInstanceId", DEC_INST);
+		variables.put("parentServiceInstanceId", DEC_PARENT_INST);
+		
+		variables.put("serviceChainServiceInstanceId", "scsiId");
+		
+		String arModelInfo = "{ "+ "\"modelType\": \"allotted-resource\"," +
+				"\"modelInvariantUuid\": \"ff5256d2-5a33-55df-13ab-12abad84e7ff\"," +
+				"\"modelUuid\": \"fe6478e5-ea33-3346-ac12-ab121484a3fe\"," +
+				"\"modelName\": \"vSAMP12\"," +
+				"\"modelVersion\": \"1.0\"," +
+				"\"modelCustomizationUuid\": \"MODEL-ID-1234\"," +
+				"}";
+		variables.put("allottedResourceModelInfo", arModelInfo);
+	}
+
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoCreateAllottedResourceBRGRollbackIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoCreateAllottedResourceBRGRollbackIT.java
new file mode 100644
index 0000000..5b78b48
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoCreateAllottedResourceBRGRollbackIT.java
@@ -0,0 +1,323 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.vcpe;
+
+import org.junit.Test;
+import org.onap.so.bpmn.common.BPMNUtil;
+import org.onap.so.bpmn.core.RollbackData;
+import org.onap.so.bpmn.mock.FileUtil;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.onap.so.bpmn.common.BPMNUtil.waitForWorkflowToFinish;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockDeleteAllottedResource;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetAllottedResource;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPatchAllottedResource;
+import static org.onap.so.bpmn.mock.StubResponseDatabase.mockUpdateRequestDB;
+import static org.onap.so.bpmn.mock.StubResponseSDNCAdapter.mockSDNCAdapter;
+
+public class DoCreateAllottedResourceBRGRollbackIT extends AbstractTestBase {
+
+	private static final String PROCNAME = "DoCreateAllottedResourceBRGRollback";
+	private static final String RbType = "DCARBRG_";
+	private final CallbackSet callbacks = new CallbackSet();
+
+	public DoCreateAllottedResourceBRGRollbackIT() throws IOException {
+		callbacks.put("deactivate", FileUtil.readResourceFile("__files/VfModularity/SDNCTopologyDeactivateCallback.xml"));
+		callbacks.put("delete", FileUtil.readResourceFile("__files/VfModularity/SDNCTopologyDeleteCallback.xml"));
+		callbacks.put("unassign", FileUtil.readResourceFile("__files/VfModularity/SDNCTopologyUnassignCallback.xml"));
+	}
+	
+	@Test
+	public void testDoCreateAllottedResourceBRGRollback_Success() throws Exception {
+        logStart();
+		MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml");
+		MockPatchAllottedResource(CUST, SVC, INST, ARID);
+		MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
+		mockSDNCAdapter(200);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+		
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesSuccess(variables, businessKey);
+		
+		String processId = invokeSubProcess(PROCNAME, variables);
+		
+		injectSDNCCallbacks(callbacks, "deactivate");
+		injectSDNCCallbacks(callbacks, "delete");
+		injectSDNCCallbacks(callbacks, "unassign");
+		
+		waitForWorkflowToFinish(processEngine,processId);
+		
+		assertTrue(isProcessEndedByProcessInstanceId(processId));
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX,processId);
+		System.out.println("workflowException:\n" + workflowException);
+		assertEquals(null, workflowException);
+		assertEquals("true", BPMNUtil.getVariable(processEngine, PROCNAME, "rolledBack",processId));
+		assertNull(BPMNUtil.getVariable(processEngine, PROCNAME, "rollbackError",processId));
+		logEnd();
+	}
+	
+	@Test
+	public void testDoCreateAllottedResourceBRGRollback_skipRollback() throws Exception {
+		logStart();
+		MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml");
+		MockPatchAllottedResource(CUST, SVC, INST, ARID);
+		MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
+		mockSDNCAdapter(200);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+		
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		RollbackData rollbackData = setVariablesSuccess(variables, businessKey);
+
+		rollbackData.put(RbType, "rollbackAAI", "false");
+		rollbackData.put(RbType, "rollbackSDNCassign", "false");
+		
+		String processId = invokeSubProcess(PROCNAME, variables);
+
+		waitForWorkflowToFinish(processEngine,processId);
+		
+		assertTrue(isProcessEndedByProcessInstanceId(processId));
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX,processId);
+		System.out.println("workflowException:\n" + workflowException);
+		assertEquals(null, workflowException);
+		assertEquals(null, BPMNUtil.getVariable(processEngine, PROCNAME, "rolledBack",processId));
+		assertNull(BPMNUtil.getVariable(processEngine, PROCNAME, "rollbackError",processId));
+		logEnd();
+	}
+	
+	@Test
+	public void testDoCreateAllottedResourceBRGRollback_DoNotRollBack() throws Exception {
+		logStart();
+	    MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml");
+		MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+		
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		RollbackData rollbackData = setVariablesSuccess(variables, businessKey);
+
+		// this will cause "rollbackSDNC" to be set to false
+		rollbackData.put(RbType, "rollbackSDNCassign", "false");
+		
+		String processId = invokeSubProcess(PROCNAME, variables);
+
+		waitForWorkflowToFinish(processEngine,processId);
+		
+		assertTrue(isProcessEndedByProcessInstanceId(processId));
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX,processId);
+		System.out.println("workflowException:\n" + workflowException);
+		assertEquals(null, workflowException);
+		assertEquals("true", BPMNUtil.getVariable(processEngine, PROCNAME, "rolledBack",processId));
+		assertNull(BPMNUtil.getVariable(processEngine, PROCNAME, "rollbackError",processId));
+	    logEnd();
+	}
+
+	@Test
+	public void testDoCreateAllottedResourceBRGRollback_NoDeactivate() throws Exception {
+		logStart();
+		MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml");
+		MockPatchAllottedResource(CUST, SVC, INST, ARID);
+		MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
+		mockSDNCAdapter(200);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+		
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		RollbackData rollbackData = setVariablesSuccess(variables, businessKey);
+
+		rollbackData.put(RbType, "rollbackSDNCactivate", "false");
+		
+		String processId = invokeSubProcess(PROCNAME, variables);
+
+		injectSDNCCallbacks(callbacks, "delete");
+		injectSDNCCallbacks(callbacks, "unassign");
+
+		waitForWorkflowToFinish(processEngine,processId);
+		
+		assertTrue(isProcessEndedByProcessInstanceId(processId));
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX,processId);
+		System.out.println("workflowException:\n" + workflowException);
+		assertEquals(null, workflowException);
+		assertEquals("true", BPMNUtil.getVariable(processEngine, PROCNAME, "rolledBack",processId));
+		assertNull(BPMNUtil.getVariable(processEngine, PROCNAME, "rollbackError",processId));
+		logEnd();
+	}
+
+	@Test
+	public void testDoCreateAllottedResourceBRGRollback_NoDelete() throws Exception {
+		logStart();
+		MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml");
+		MockPatchAllottedResource(CUST, SVC, INST, ARID);
+		MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
+		mockSDNCAdapter(200);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+		
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		RollbackData rollbackData = setVariablesSuccess(variables, businessKey);
+
+		rollbackData.put(RbType, "rollbackSDNCcreate", "false");
+		
+		String processId = invokeSubProcess(PROCNAME, variables);
+
+		injectSDNCCallbacks(callbacks, "deactivate");
+		injectSDNCCallbacks(callbacks, "unassign");
+
+		waitForWorkflowToFinish(processEngine,processId);
+		
+		assertTrue(isProcessEndedByProcessInstanceId(processId));
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX,processId);
+		System.out.println("workflowException:\n" + workflowException);
+		assertEquals(null, workflowException);
+		assertEquals("true", BPMNUtil.getVariable(processEngine, PROCNAME, "rolledBack",processId));
+		assertNull(BPMNUtil.getVariable(processEngine, PROCNAME, "rollbackError",processId));
+		logEnd();
+	}
+	
+	@Test
+	public void testDoCreateAllottedResourceBRGRollback_NoUnassign() throws Exception {
+		logStart();
+		MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml");
+		MockPatchAllottedResource(CUST, SVC, INST, ARID);
+		MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
+		mockSDNCAdapter(200);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+		
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		RollbackData rollbackData = setVariablesSuccess(variables, businessKey);
+
+		rollbackData.put(RbType, "rollbackSDNCassign", "false");
+		
+		/*
+		 * Note: if assign == false then the flow/script will set
+		 * "skipRollback" to false, which will cause ALL of the SDNC steps
+		 * to be skipped, not just the unassign step.
+		 */
+		
+		String processId = invokeSubProcess(PROCNAME, variables);
+
+		waitForWorkflowToFinish(processEngine,processId);
+		
+		assertTrue(isProcessEndedByProcessInstanceId(processId));
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX,processId);
+		System.out.println("workflowException:\n" + workflowException);
+		assertEquals(null, workflowException);
+		assertEquals("true", BPMNUtil.getVariable(processEngine, PROCNAME, "rolledBack",processId));
+		assertNull(BPMNUtil.getVariable(processEngine, PROCNAME, "rollbackError",processId));
+	    logEnd();
+	}
+	
+	@Test
+	public void testDoCreateAllottedResourceBRGRollback_SubProcessError() throws Exception {
+		logStart();
+		MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml");
+		MockPatchAllottedResource(CUST, SVC, INST, ARID);
+		MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+		mockSDNCAdapter(404);
+		
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesSuccess(variables, businessKey);
+		
+		String processId = invokeSubProcess(PROCNAME, variables);
+
+		waitForWorkflowToFinish(processEngine,processId);
+		
+		assertTrue(isProcessEndedByProcessInstanceId(processId));
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX,processId);
+		System.out.println("workflowException:\n" + workflowException);
+		assertEquals(null, workflowException);
+		assertEquals("false", BPMNUtil.getVariable(processEngine, PROCNAME, "rolledBack",processId));
+		assertNotNull(BPMNUtil.getVariable(processEngine, PROCNAME, "rollbackError",processId));
+	    logEnd();
+	}
+	
+	@Test
+	public void testDoCreateAllottedResourceBRGRollback_JavaException() throws Exception {
+		logStart();
+		MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml");
+		MockPatchAllottedResource(CUST, SVC, INST, ARID);
+		MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
+		mockSDNCAdapter(200);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+		
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesSuccess(variables, businessKey);
+
+		variables.put("rollbackData", "string instead of rollback data");
+		
+		String processId = invokeSubProcess(PROCNAME, variables);
+
+		waitForWorkflowToFinish(processEngine,processId);
+		
+		assertTrue(isProcessEndedByProcessInstanceId(processId));
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX,processId);
+		System.out.println("workflowException:\n" + workflowException);
+		assertEquals(null, workflowException);
+		assertEquals("false", BPMNUtil.getVariable(processEngine, PROCNAME, "rolledBack",processId));
+		assertNotNull(BPMNUtil.getVariable(processEngine, PROCNAME, "rollbackError",processId));
+	    logEnd();
+	}
+
+	private RollbackData setVariablesSuccess(Map<String, Object> variables, String requestId) {
+		variables.put("isDebugLogEnabled", "true");
+		variables.put("failNotFound", "true");
+		variables.put("msoRequestId", requestId);
+		variables.put("mso-request-id", "requestId");
+		variables.put("allottedResourceId", ARID);
+
+		variables.put("serviceInstanceId", DEC_INST);
+		variables.put("parentServiceInstanceId", DEC_PARENT_INST);
+		
+		RollbackData rollbackData = new RollbackData();
+
+		rollbackData.put(RbType, "serviceInstanceId", DEC_INST);
+		rollbackData.put(RbType, "serviceSubscriptionType", SVC);
+		rollbackData.put(RbType, "disablerollback", "false");
+		rollbackData.put(RbType, "rollbackAAI", "true");
+		rollbackData.put(RbType, "rollbackSDNCassign", "true");
+		rollbackData.put(RbType, "rollbackSDNCactivate", "true");
+		rollbackData.put(RbType, "rollbackSDNCcreate", "true");
+		rollbackData.put(RbType, "aaiARPath", "http://localhost:"+wiremockPort+"/aai/v9/business/customers/customer/"+CUST+"/service-subscriptions/service-subscription/"+SVC+"/service-instances/service-instance/"+INST+"/allotted-resources/allotted-resource/"+ARID);
+		
+		rollbackData.put(RbType, "sdncActivateRollbackReq", FileUtil.readResourceFile("__files/VCPE/DoCreateAllottedResourceBRGRollback/sdncActivateRollbackReq.xml"));
+		rollbackData.put(RbType, "sdncCreateRollbackReq", FileUtil.readResourceFile("__files/VCPE/DoCreateAllottedResourceBRGRollback/sdncCreateRollbackReq.xml")); 
+		rollbackData.put(RbType, "sdncAssignRollbackReq", FileUtil.readResourceFile("__files/VCPE/DoCreateAllottedResourceBRGRollback/sdncAssignRollbackReq.xml"));
+		
+		variables.put("rollbackData",rollbackData);
+		
+		return rollbackData;
+	}
+
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoCreateAllottedResourceTXCIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoCreateAllottedResourceTXCIT.java
new file mode 100644
index 0000000..473661c
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoCreateAllottedResourceTXCIT.java
@@ -0,0 +1,276 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.vcpe;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.onap.so.bpmn.common.BPMNUtil.waitForWorkflowToFinish;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetAllottedResource;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetServiceInstance;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockNodeQueryServiceInstanceById;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPatchAllottedResource;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPutAllottedResource;
+import static org.onap.so.bpmn.mock.StubResponseDatabase.mockUpdateRequestDB;
+import static org.onap.so.bpmn.mock.StubResponseSDNCAdapter.mockSDNCAdapter;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.camunda.bpm.engine.test.Deployment;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.onap.so.bpmn.common.BPMNUtil;
+import org.onap.so.bpmn.mock.FileUtil;
+
+public class DoCreateAllottedResourceTXCIT extends AbstractTestBase {
+
+	private static final String PROCNAME = "DoCreateAllottedResourceTXC";
+	private final CallbackSet callbacks = new CallbackSet();
+
+	public DoCreateAllottedResourceTXCIT() throws IOException {
+		callbacks.put("assign", FileUtil.readResourceFile("__files/VfModularity/SDNCTopologyAssignCallback.xml"));
+		callbacks.put("create", FileUtil.readResourceFile("__files/VfModularity/SDNCTopologyCreateCallback.xml"));
+		callbacks.put("activate", FileUtil.readResourceFile("__files/VfModularity/SDNCTopologyActivateCallback.xml"));
+		callbacks.put("query", FileUtil.readResourceFile("__files/VCPE/DoCreateAllottedResourceTXC/SDNCTopologyQueryCallback.xml"));
+	}
+	
+	@Test
+	public void testDoCreateAllottedResourceTXC_Success() throws Exception{
+		logStart();
+		// TODO: use INST instead of DEC_INST
+		/*
+		 * should be INST instead of DEC_INST, but AAI utilities appear to
+		 * have a bug in that they don't URL-encode the SI id before using
+		 * it in the query
+		 */
+		MockNodeQueryServiceInstanceById(DEC_INST, "GenericFlows/getSIUrlById.xml");
+		MockNodeQueryServiceInstanceById(DEC_PARENT_INST, "GenericFlows/getParentSIUrlById.xml");
+		
+		MockGetServiceInstance(CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
+		MockGetServiceInstance(CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
+		MockPutAllottedResource(CUST, SVC, PARENT_INST, ARID);
+		MockPatchAllottedResource(CUST, SVC, PARENT_INST, ARID);
+		mockSDNCAdapter(200);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesSuccess(variables, "testRequestId123");
+
+		String processId = invokeSubProcess(PROCNAME, variables);
+		
+		injectSDNCCallbacks(callbacks, "assign");
+		injectSDNCCallbacks(callbacks, "create");
+		injectSDNCCallbacks(callbacks, "activate");
+		injectSDNCCallbacks(callbacks, "query");
+
+		waitForWorkflowToFinish(processEngine,processId);
+		
+		assertTrue(isProcessEndedByProcessInstanceId(processId));
+		
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX,processId);
+		assertEquals(null, workflowException);
+
+		assertEquals("namefromrequest", BPMNUtil.getVariable(processEngine, PROCNAME, "allotedResourceName",processId));
+		assertEquals("my-vni", BPMNUtil.getVariable(processEngine, PROCNAME, "vni",processId));
+		assertEquals("my-bearer-ip", BPMNUtil.getVariable(processEngine, PROCNAME, "vgmuxBearerIP",processId));
+		assertEquals("my-lan-ip", BPMNUtil.getVariable(processEngine, PROCNAME, "vgmuxLanIP",processId));
+		logEnd();
+	}
+	
+	@Test
+	public void testDoCreateAllottedResourceTXC_NoSI() throws Exception{
+		logStart();
+		// TODO: use INST instead of DEC_INST
+		/*
+		 * should be INST instead of DEC_INST, but AAI utilities appear to
+		 * have a bug in that they don't URL-encode the SI id before using
+		 * it in the query
+		 */
+		MockNodeQueryServiceInstanceById(DEC_INST, "GenericFlows/getNotFound.xml");
+		MockNodeQueryServiceInstanceById(DEC_PARENT_INST, "GenericFlows/getParentSIUrlById.xml");
+		
+		MockGetServiceInstance(CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
+		MockGetServiceInstance(CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
+		MockPutAllottedResource(CUST, SVC, PARENT_INST, ARID);
+		MockPatchAllottedResource(CUST, SVC, PARENT_INST, ARID);
+		mockSDNCAdapter(200);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesSuccess(variables, "testRequestId123");
+
+		String processId = invokeSubProcess(PROCNAME, variables);
+
+		waitForWorkflowToFinish(processEngine,processId);
+		
+		Assert.assertTrue(isProcessEndedByProcessInstanceId(processId));
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX,processId);
+		assertNotNull(workflowException);
+		
+		assertEquals(null, BPMNUtil.getVariable(processEngine, PROCNAME, "allotedResourceName",processId));
+		logEnd();
+	}
+	
+	@Test
+	public void testDoCreateAllottedResourceTXC_ActiveAr() throws Exception{
+		logStart();
+		// TODO: use INST instead of DEC_INST
+		/*
+		 * should be INST instead of DEC_INST, but AAI utilities appear to
+		 * have a bug in that they don't URL-encode the SI id before using
+		 * it in the query
+		 */
+		MockNodeQueryServiceInstanceById(DEC_INST, "GenericFlows/getSIUrlById.xml");
+		MockNodeQueryServiceInstanceById(DEC_PARENT_INST, "GenericFlows/getParentSIUrlById.xml");
+		
+		MockGetServiceInstance(CUST, SVC, INST, "VCPE/DoCreateAllottedResourceTXC/getSIandAR.xml");
+		MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXC/getArTxc2.xml");
+		MockGetServiceInstance(CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
+		MockPutAllottedResource(CUST, SVC, PARENT_INST, ARID);
+		MockPatchAllottedResource(CUST, SVC, PARENT_INST, ARID);
+		mockSDNCAdapter(200);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesSuccess(variables, "testRequestId123");
+
+		variables.put("failExists", "false");
+
+		String processId = invokeSubProcess(PROCNAME, variables);
+		
+		injectSDNCCallbacks(callbacks, "query");
+
+		waitForWorkflowToFinish(processEngine,processId);
+		
+		assertTrue(isProcessEndedByProcessInstanceId(processId));
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX);
+		assertEquals(null, workflowException);
+
+		assertEquals("namefromrequest", BPMNUtil.getVariable(processEngine, PROCNAME, "allotedResourceName",processId));
+		assertEquals("my-vni", BPMNUtil.getVariable(processEngine, PROCNAME, "vni",processId));
+		assertEquals("my-bearer-ip", BPMNUtil.getVariable(processEngine, PROCNAME, "vgmuxBearerIP",processId));
+		assertEquals("my-lan-ip", BPMNUtil.getVariable(processEngine, PROCNAME, "vgmuxLanIP",processId));
+		logEnd();
+	}
+	
+	@Test
+	public void testDoCreateAllottedResourceTXC_NoParentSI() throws Exception{
+		logStart();
+		// TODO: use INST instead of DEC_INST
+		/*
+		 * should be INST instead of DEC_INST, but AAI utilities appear to
+		 * have a bug in that they don't URL-encode the SI id before using
+		 * it in the query
+		 */
+		MockNodeQueryServiceInstanceById(DEC_INST, "GenericFlows/getSIUrlById.xml");
+		
+		MockNodeQueryServiceInstanceById(DEC_PARENT_INST, "GenericFlows/getNotFound.xml");
+		
+		MockGetServiceInstance(CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
+		MockGetServiceInstance(CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
+		MockPutAllottedResource(CUST, SVC, PARENT_INST, ARID);
+		MockPatchAllottedResource(CUST, SVC, PARENT_INST, ARID);
+		mockSDNCAdapter(200);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesSuccess(variables, "testRequestId123");
+
+		String processId = invokeSubProcess(PROCNAME, variables);
+
+		waitForWorkflowToFinish(processEngine,processId);
+
+		assertTrue(isProcessEndedByProcessInstanceId(processId));
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX,processId);
+		assertNotNull(workflowException);
+		
+		assertEquals(null, BPMNUtil.getVariable(processEngine, PROCNAME, "allotedResourceName",processId));
+		logEnd();
+	}
+	
+	@Test
+	public void testDoCreateAllottedResourceTXC_SubProcessError() throws Exception{
+		logStart();
+		// TODO: use INST instead of DEC_INST
+		/*
+		 * should be INST instead of DEC_INST, but AAI utilities appear to
+		 * have a bug in that they don't URL-encode the SI id before using
+		 * it in the query
+		 */
+		MockNodeQueryServiceInstanceById(DEC_INST, "GenericFlows/getSIUrlById.xml");
+		MockNodeQueryServiceInstanceById(DEC_PARENT_INST, "GenericFlows/getParentSIUrlById.xml");
+		
+		MockGetServiceInstance(CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
+		MockGetServiceInstance(CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
+		MockPutAllottedResource(CUST, SVC, PARENT_INST, ARID);
+		MockPatchAllottedResource(CUST, SVC, PARENT_INST, ARID);
+		mockSDNCAdapter(404);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesSuccess(variables, "testRequestId123");
+
+		String processId = invokeSubProcess(PROCNAME, variables);
+
+		waitForWorkflowToFinish(processEngine,processId);
+
+		assertTrue(isProcessEndedByProcessInstanceId(processId));
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX,processId);
+		assertNotNull(workflowException);
+		
+		assertEquals(null, BPMNUtil.getVariable(processEngine, PROCNAME, "allotedResourceName",processId));
+		logEnd();
+	}
+
+	private void setVariablesSuccess(Map<String, Object> variables, String requestId) {
+		// TODO: need all of these?
+		variables.put("isDebugLogEnabled", "true");
+		variables.put("failExists", "true");
+		variables.put("disableRollback", "true");
+		variables.put("msoRequestId", requestId);
+		variables.put("mso-request-id", "requestId");
+		variables.put("sourceNetworkId", "snId");
+		variables.put("sourceNetworkRole", "snRole");
+		variables.put("allottedResourceRole", "brg");
+		variables.put("allottedResourceType", "TXC");
+		variables.put("allottedResourceId", ARID);
+		variables.put("brgWanMacAddress", "wanmac");
+
+		variables.put("serviceInstanceId", DEC_INST);
+		variables.put("parentServiceInstanceId", DEC_PARENT_INST);
+		
+		variables.put("serviceChainServiceInstanceId", "scsiId");
+		
+		String arModelInfo = "{ "+ "\"modelType\": \"allotted-resource\"," +
+				"\"modelInvariantUuid\": \"ff5256d2-5a33-55df-13ab-12abad84e7ff\"," +
+				"\"modelUuid\": \"fe6478e5-ea33-3346-ac12-ab121484a3fe\"," +
+				"\"modelName\": \"vSAMP12\"," +
+				"\"modelVersion\": \"1.0\"," +
+				"\"modelCustomizationUuid\": \"MODEL-ID-1234\"," +
+				"}";
+		variables.put("allottedResourceModelInfo", arModelInfo);
+	}
+
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoCreateAllottedResourceTXCRollbackIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoCreateAllottedResourceTXCRollbackIT.java
new file mode 100644
index 0000000..3720f1d
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoCreateAllottedResourceTXCRollbackIT.java
@@ -0,0 +1,323 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.vcpe;
+
+import org.junit.Test;
+import org.onap.so.bpmn.common.BPMNUtil;
+import org.onap.so.bpmn.core.RollbackData;
+import org.onap.so.bpmn.mock.FileUtil;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.onap.so.bpmn.common.BPMNUtil.waitForWorkflowToFinish;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockDeleteAllottedResource;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockGetAllottedResource;
+import static org.onap.so.bpmn.mock.StubResponseAAI.MockPatchAllottedResource;
+import static org.onap.so.bpmn.mock.StubResponseDatabase.mockUpdateRequestDB;
+import static org.onap.so.bpmn.mock.StubResponseSDNCAdapter.mockSDNCAdapter;
+
+public class DoCreateAllottedResourceTXCRollbackIT extends AbstractTestBase {
+
+	private static final String PROCNAME = "DoCreateAllottedResourceTXCRollback";
+	private static final String RbType = "DCARTXC_";
+	private final CallbackSet callbacks = new CallbackSet();
+	
+	public DoCreateAllottedResourceTXCRollbackIT() throws IOException {
+		callbacks.put("deactivate", FileUtil.readResourceFile("__files/VfModularity/SDNCTopologyDeactivateCallback.xml"));
+		callbacks.put("delete", FileUtil.readResourceFile("__files/VfModularity/SDNCTopologyDeleteCallback.xml"));
+		callbacks.put("unassign", FileUtil.readResourceFile("__files/VfModularity/SDNCTopologyUnassignCallback.xml"));
+	}
+	
+	@Test
+	public void testDoCreateAllottedResourceTXCRollback_Success() throws Exception {
+		logStart();
+		MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml");
+		MockPatchAllottedResource(CUST, SVC, INST, ARID);
+		MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
+		mockSDNCAdapter(200);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+		
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesSuccess(variables, businessKey);
+		
+		String processId = invokeSubProcess(PROCNAME, variables);
+		
+		injectSDNCCallbacks(callbacks, "deactivate");
+		injectSDNCCallbacks(callbacks, "delete");
+		injectSDNCCallbacks(callbacks, "unassign");
+
+		waitForWorkflowToFinish(processEngine,processId);
+		
+		assertTrue(isProcessEndedByProcessInstanceId(processId));
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX,processId);
+		System.out.println("workflowException:\n" + workflowException);
+		assertEquals(null, workflowException);
+		assertEquals("true", BPMNUtil.getVariable(processEngine, PROCNAME, "rolledBack",processId));
+		assertNull(BPMNUtil.getVariable(processEngine, PROCNAME, "rollbackError",processId));
+		logEnd();
+	}
+	
+	@Test
+	public void testDoCreateAllottedResourceTXCRollback_skipRollback() throws Exception {
+		logStart();
+		MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml");
+		MockPatchAllottedResource(CUST, SVC, INST, ARID);
+		MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
+		mockSDNCAdapter(200);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+		
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		RollbackData rollbackData = setVariablesSuccess(variables, businessKey);
+
+		rollbackData.put(RbType, "rollbackAAI", "false");
+		rollbackData.put(RbType, "rollbackSDNCassign", "false");
+		
+		String processId = invokeSubProcess(PROCNAME, variables);
+
+		waitForWorkflowToFinish(processEngine,processId);
+		
+		assertTrue(isProcessEndedByProcessInstanceId(processId));
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX,processId);
+		System.out.println("workflowException:\n" + workflowException);
+		assertEquals(null, workflowException);
+		assertEquals(null, BPMNUtil.getVariable(processEngine, PROCNAME, "rolledBack",processId));
+		assertNull(BPMNUtil.getVariable(processEngine, PROCNAME, "rollbackError",processId));
+		logEnd();
+	}
+	
+	@Test
+	public void testDoCreateAllottedResourceTXCRollback_DoNotRollBack() throws Exception {
+		logStart();
+		MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml");
+		MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+		
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		RollbackData rollbackData = setVariablesSuccess(variables, businessKey);
+
+		// this will cause "rollbackSDNC" to be set to false
+		rollbackData.put(RbType, "rollbackSDNCassign", "false");
+		
+		String processId = invokeSubProcess(PROCNAME, variables);
+
+		waitForWorkflowToFinish(processEngine,processId);
+		
+		assertTrue(isProcessEndedByProcessInstanceId(processId));
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX,processId);
+		System.out.println("workflowException:\n" + workflowException);
+		assertEquals(null, workflowException);
+		assertEquals("true", BPMNUtil.getVariable(processEngine, PROCNAME, "rolledBack",processId));
+		assertNull(BPMNUtil.getVariable(processEngine, PROCNAME, "rollbackError",processId));
+		logEnd();
+	}
+	
+	@Test
+	public void testDoCreateAllottedResourceTXCRollback_NoDeactivate() throws Exception {
+		logStart();
+		MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml");
+		MockPatchAllottedResource(CUST, SVC, INST, ARID);
+		MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
+		mockSDNCAdapter(200);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+		
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		RollbackData rollbackData = setVariablesSuccess(variables, businessKey);
+
+		rollbackData.put(RbType, "rollbackSDNCactivate", "false");
+		
+		String processId = invokeSubProcess(PROCNAME, variables);
+
+		injectSDNCCallbacks(callbacks, "delete");
+		injectSDNCCallbacks(callbacks, "unassign");
+
+		waitForWorkflowToFinish(processEngine,processId);
+		
+		assertTrue(isProcessEndedByProcessInstanceId(processId));
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX,processId);
+		System.out.println("workflowException:\n" + workflowException);
+		assertEquals(null, workflowException);
+		assertEquals("true", BPMNUtil.getVariable(processEngine, PROCNAME, "rolledBack",processId));
+		assertNull(BPMNUtil.getVariable(processEngine, PROCNAME, "rollbackError",processId));
+		logEnd();
+	}
+	
+	@Test
+	public void testDoCreateAllottedResourceTXCRollback_NoDelete() throws Exception {
+		logStart();
+		MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml");
+		MockPatchAllottedResource(CUST, SVC, INST, ARID);
+		MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
+		mockSDNCAdapter(200);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+		
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		RollbackData rollbackData = setVariablesSuccess(variables, businessKey);
+
+		rollbackData.put(RbType, "rollbackSDNCcreate", "false");
+		
+		String processId = invokeSubProcess(PROCNAME, variables);
+
+		injectSDNCCallbacks(callbacks, "deactivate");
+		injectSDNCCallbacks(callbacks, "unassign");
+
+		waitForWorkflowToFinish(processEngine,processId);
+		
+		assertTrue(isProcessEndedByProcessInstanceId(processId));
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX,processId);
+		System.out.println("workflowException:\n" + workflowException);
+		assertEquals(null, workflowException);
+		assertEquals("true", BPMNUtil.getVariable(processEngine, PROCNAME, "rolledBack",processId));
+		assertNull(BPMNUtil.getVariable(processEngine, PROCNAME, "rollbackError",processId));
+		logEnd();
+	}
+	
+	@Test
+	public void testDoCreateAllottedResourceTXCRollback_NoUnassign() throws Exception {
+		logStart();
+		MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml");
+		MockPatchAllottedResource(CUST, SVC, INST, ARID);
+		MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
+		mockSDNCAdapter(200);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+		
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		RollbackData rollbackData = setVariablesSuccess(variables, businessKey);
+
+		rollbackData.put(RbType, "rollbackSDNCassign", "false");
+		
+		/*
+		 * Note: if assign == false then the flow/script will set
+		 * "skipRollback" to false, which will cause ALL of the SDNC steps
+		 * to be skipped, not just the unassign step.
+		 */
+		
+		String processId = invokeSubProcess(PROCNAME, variables);
+
+		waitForWorkflowToFinish(processEngine,processId);
+		
+		assertTrue(isProcessEndedByProcessInstanceId(processId));
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX,processId);
+		System.out.println("workflowException:\n" + workflowException);
+		assertEquals(null, workflowException);
+		assertEquals("true", BPMNUtil.getVariable(processEngine, PROCNAME, "rolledBack",processId));
+		assertNull(BPMNUtil.getVariable(processEngine, PROCNAME, "rollbackError",processId));
+		logEnd();
+	}
+	
+	@Test
+	public void testDoCreateAllottedResourceTXCRollback_SubProcessError() throws Exception {
+		logStart();
+		MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml");
+		MockPatchAllottedResource(CUST, SVC, INST, ARID);
+		MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+		mockSDNCAdapter(404);
+		
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesSuccess(variables, businessKey);
+		
+		String processId = invokeSubProcess(PROCNAME, variables);
+
+		waitForWorkflowToFinish(processEngine,processId);
+		
+		assertTrue(isProcessEndedByProcessInstanceId(processId));
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX,processId);
+		System.out.println("workflowException:\n" + workflowException);
+		assertEquals(null, workflowException);
+		assertEquals("false", BPMNUtil.getVariable(processEngine, PROCNAME, "rolledBack",processId));
+		assertNotNull(BPMNUtil.getVariable(processEngine, PROCNAME, "rollbackError",processId));
+		logEnd();
+	}
+	
+	@Test
+	public void testDoCreateAllottedResourceTXCRollback_JavaException() throws Exception {
+		logStart();
+		MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml");
+		MockPatchAllottedResource(CUST, SVC, INST, ARID);
+		MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
+		mockSDNCAdapter(200);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+		
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesSuccess(variables, businessKey);
+
+		variables.put("rollbackData", "string instead of rollback data");
+		
+		String processId = invokeSubProcess(PROCNAME, variables);
+
+		waitForWorkflowToFinish(processEngine,processId);
+		
+		assertTrue(isProcessEndedByProcessInstanceId(processId));
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX,processId);
+		System.out.println("workflowException:\n" + workflowException);
+		assertEquals(null, workflowException);
+		assertEquals("false", BPMNUtil.getVariable(processEngine, PROCNAME, "rolledBack",processId));
+		assertNotNull(BPMNUtil.getVariable(processEngine, PROCNAME, "rollbackError",processId));
+		logEnd();
+	}
+
+	private RollbackData setVariablesSuccess(Map<String, Object> variables, String requestId) {
+		variables.put("isDebugLogEnabled", "true");
+		variables.put("failNotFound", "true");
+		variables.put("msoRequestId", requestId);
+		variables.put("mso-request-id", "requestId");
+		variables.put("allottedResourceId", ARID);
+
+		variables.put("serviceInstanceId", DEC_INST);
+		variables.put("parentServiceInstanceId", DEC_PARENT_INST);
+		
+		RollbackData rollbackData = new RollbackData();
+
+		rollbackData.put(RbType, "serviceInstanceId", DEC_INST);
+		rollbackData.put(RbType, "serviceSubscriptionType", SVC);
+		rollbackData.put(RbType, "disablerollback", "false");
+		rollbackData.put(RbType, "rollbackAAI", "true");
+		rollbackData.put(RbType, "rollbackSDNCassign", "true");
+		rollbackData.put(RbType, "rollbackSDNCactivate", "true");
+		rollbackData.put(RbType, "rollbackSDNCcreate", "true");
+		rollbackData.put(RbType, "aaiARPath", "http://localhost:"+wiremockPort+"/aai/v9/business/customers/customer/"+CUST+"/service-subscriptions/service-subscription/"+SVC+"/service-instances/service-instance/"+INST+"/allotted-resources/allotted-resource/"+ARID);
+		
+		rollbackData.put(RbType, "sdncActivateRollbackReq", FileUtil.readResourceFile("__files/VCPE/DoCreateAllottedResourceTXCRollback/sdncActivateRollbackReq.xml"));
+		rollbackData.put(RbType, "sdncCreateRollbackReq", FileUtil.readResourceFile("__files/VCPE/DoCreateAllottedResourceTXCRollback/sdncCreateRollbackReq.xml")); 
+		rollbackData.put(RbType, "sdncAssignRollbackReq", FileUtil.readResourceFile("__files/VCPE/DoCreateAllottedResourceTXCRollback/sdncAssignRollbackReq.xml"));
+		
+		variables.put("rollbackData",rollbackData);
+		
+		return rollbackData;
+	}
+
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoDeleteAllottedResourceBRGIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoDeleteAllottedResourceBRGIT.java
new file mode 100644
index 0000000..4edaf7d
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoDeleteAllottedResourceBRGIT.java
@@ -0,0 +1,145 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.vcpe;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.onap.so.bpmn.common.BPMNUtil;
+import org.onap.so.bpmn.mock.FileUtil;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import static org.junit.Assert.*;
+import static org.onap.so.bpmn.mock.StubResponseAAI.*;
+import static org.onap.so.bpmn.mock.StubResponseDatabase.mockUpdateRequestDB;
+import static org.onap.so.bpmn.mock.StubResponseSDNCAdapter.mockSDNCAdapter;
+
+
+public class DoDeleteAllottedResourceBRGIT extends AbstractTestBase {
+
+	private static final String PROCNAME = "DoDeleteAllottedResourceBRG";
+	private final CallbackSet callbacks = new CallbackSet();
+	
+	public DoDeleteAllottedResourceBRGIT() {
+		callbacks.put("deactivate", FileUtil.readResourceFile("__files/VfModularity/SDNCTopologyDeactivateCallback.xml"));
+		callbacks.put("deactivateNF", FileUtil.readResourceFile("__files/VfModularity/SDNCTopologyDeactivateCallbackNotFound.xml"));
+		callbacks.put("delete", FileUtil.readResourceFile("__files/VfModularity/SDNCTopologyDeleteCallback.xml"));
+		callbacks.put("unassign", FileUtil.readResourceFile("__files/VfModularity/SDNCTopologyUnassignCallback.xml"));
+	}
+	
+	@Test
+	public void testDoDeleteAllottedResourceBRG_Success() {
+		logStart();
+		MockQueryAllottedResourceById(ARID, "GenericFlows/getARUrlById.xml");
+		MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceBRG/arGetById.xml");
+		MockPatchAllottedResource(CUST, SVC, INST, ARID);
+		MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
+		mockSDNCAdapter(200);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+		
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesSuccess(variables);
+		
+		invokeSubProcess(PROCNAME, businessKey, variables);
+		
+		injectSDNCCallbacks(callbacks, "deactivate");
+		injectSDNCCallbacks(callbacks, "delete");
+		injectSDNCCallbacks(callbacks, "unassign");
+
+		waitForProcessEnd(businessKey, 10000);
+		
+		Assert.assertTrue(isProcessEnded(businessKey));
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX);
+		System.out.println("workflowException:\n" + workflowException);
+		assertNull(workflowException);
+		logEnd();
+	}
+	
+	@Test
+	public void testDoDeleteAllottedResourceBRG_ARNotInSDNC() {
+		logStart();
+		MockQueryAllottedResourceById(ARID, "GenericFlows/getARUrlById.xml");
+		MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceBRG/arGetById.xml");
+		MockPatchAllottedResource(CUST, SVC, INST, ARID);
+		MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
+		mockSDNCAdapter(200);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+		
+		String businessKey = UUID.randomUUID().toString();
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesSuccess(variables);
+
+		variables.put("failNotFound", "false");
+		
+		invokeSubProcess(PROCNAME, businessKey, variables);
+		
+		injectSDNCCallbacks(callbacks, "deactivateNF");
+
+		waitForProcessEnd(businessKey, 10000);
+		
+		Assert.assertTrue(isProcessEnded(businessKey));
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, VAR_WFEX);
+		System.out.println("workflowException:\n" + workflowException);
+		assertNull(workflowException);
+		logEnd();
+	}
+	
+	
+	@Test
+	public void testDoDeleteAllottedResourceBRG_SubProcessError() throws Exception {
+		logStart();
+		MockQueryAllottedResourceById(ARID, "GenericFlows/getARUrlById.xml");
+		MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceBRG/arGetById.xml");
+		MockPatchAllottedResource(CUST, SVC, INST, ARID);
+		MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+		mockSDNCAdapter(500);
+		
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesSuccess(variables);
+
+		String processId = invokeSubProcess(PROCNAME, variables);
+
+
+		BPMNUtil.waitForWorkflowToFinish(processEngine,processId);
+
+		Assert.assertTrue(isProcessEndedByProcessInstanceId(processId));
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, "WorkflowException",processId);
+		System.out.println("workflowException:\n" + workflowException);
+		assertNotNull(workflowException);
+		logEnd();
+	}
+
+	private void setVariablesSuccess(Map<String, Object> variables) {
+		variables.put("isDebugLogEnabled", "true");
+		variables.put("failNotFound", "true");
+		variables.put("msoRequestId", "testRequestId1");
+		variables.put("mso-request-id", "requestId");
+		variables.put("allottedResourceId", ARID);
+		variables.put("serviceInstanceId", DEC_INST);
+		variables.put("parentServiceInstanceId", DEC_PARENT_INST);
+	}
+
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoDeleteAllottedResourceTXCIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoDeleteAllottedResourceTXCIT.java
new file mode 100644
index 0000000..520beaf
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoDeleteAllottedResourceTXCIT.java
@@ -0,0 +1,140 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.onap.so.bpmn.vcpe;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.onap.so.bpmn.common.BPMNUtil;
+import org.onap.so.bpmn.mock.FileUtil;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.onap.so.bpmn.mock.StubResponseAAI.*;
+import static org.onap.so.bpmn.mock.StubResponseDatabase.mockUpdateRequestDB;
+import static org.onap.so.bpmn.mock.StubResponseSDNCAdapter.mockSDNCAdapter;
+
+
+public class DoDeleteAllottedResourceTXCIT extends AbstractTestBase {
+
+	private static final String PROCNAME = "DoDeleteAllottedResourceTXC";
+	private final CallbackSet callbacks = new CallbackSet();
+	
+	public DoDeleteAllottedResourceTXCIT() {
+		callbacks.put("deactivate", FileUtil.readResourceFile("__files/VfModularity/SDNCTopologyDeactivateCallback.xml"));
+		callbacks.put("deactivateNF", FileUtil.readResourceFile("__files/VfModularity/SDNCTopologyDeactivateCallbackNotFound.xml"));
+		callbacks.put("delete", FileUtil.readResourceFile("__files/VfModularity/SDNCTopologyDeleteCallback.xml"));
+		callbacks.put("unassign", FileUtil.readResourceFile("__files/VfModularity/SDNCTopologyUnassignCallback.xml"));
+	}
+	
+	@Test
+	public void testDoDeleteAllottedResourceTXC_Success() throws Exception {
+		logStart();
+		MockQueryAllottedResourceById(ARID, "GenericFlows/getARUrlById.xml");
+		MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceTXC/arGetById.xml");
+		MockPatchAllottedResource(CUST, SVC, INST, ARID);
+		MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
+		mockSDNCAdapter(200);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+		
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesSuccess(variables);
+		
+		String processId = invokeSubProcess(PROCNAME, variables);
+		
+		injectSDNCCallbacks(callbacks, "deactivate");
+		injectSDNCCallbacks(callbacks, "delete");
+		injectSDNCCallbacks(callbacks, "unassign");
+
+		BPMNUtil.waitForWorkflowToFinish(processEngine,processId);
+
+		Assert.assertTrue(isProcessEndedByProcessInstanceId(processId));
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, "WorkflowException",processId);
+		System.out.println("workflowException:\n" + workflowException);
+		assertNull(workflowException);
+		logEnd();
+	}
+	
+	@Test
+	public void testDoDeleteAllottedResourceTXC_ARNotInSDNC() throws Exception {
+		logStart();
+		MockQueryAllottedResourceById(ARID, "GenericFlows/getARUrlById.xml");
+		MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceTXC/arGetById.xml");
+		MockPatchAllottedResource(CUST, SVC, INST, ARID);
+		MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
+		mockSDNCAdapter(200);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+		
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesSuccess(variables);
+
+		variables.put("failNotFound", "false");
+
+		String processId = invokeSubProcess(PROCNAME, variables);
+		
+		injectSDNCCallbacks(callbacks, "deactivateNF");
+
+		BPMNUtil.waitForWorkflowToFinish(processEngine,processId);
+
+		Assert.assertTrue(isProcessEndedByProcessInstanceId(processId));
+		logEnd();
+	}
+	
+	
+	@Test
+	public void testDoDeleteAllottedResourceTXC_SubProcessError() throws Exception {
+		logStart();
+		MockQueryAllottedResourceById(ARID, "GenericFlows/getARUrlById.xml");
+		MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceTXC/arGetById.xml");
+		MockPatchAllottedResource(CUST, SVC, INST, ARID);
+		MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
+		mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+
+		mockSDNCAdapter(500);
+		
+		Map<String, Object> variables = new HashMap<>();
+		setVariablesSuccess(variables);
+
+		String processId = invokeSubProcess(PROCNAME, variables);
+
+		BPMNUtil.waitForWorkflowToFinish(processEngine,processId);
+
+		Assert.assertTrue(isProcessEndedByProcessInstanceId(processId));
+		String workflowException = BPMNUtil.getVariable(processEngine, PROCNAME, "WorkflowException",processId);
+		System.out.println("workflowException:\n" + workflowException);
+		assertNotNull(workflowException);
+		logEnd();
+	}
+
+	private void setVariablesSuccess(Map<String, Object> variables) {
+		variables.put("isDebugLogEnabled", "true");
+		variables.put("failNotFound", "true");
+		variables.put("msoRequestId", "testRequestId1");
+		variables.put("mso-request-id", "requestId");
+		variables.put("allottedResourceId", ARID);
+		
+		variables.put("serviceInstanceId", DEC_INST);
+		variables.put("parentServiceInstanceId", DEC_PARENT_INST);
+	}
+
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/resources/__files/VCPE/CreateVcpeResCustService/GenericVnf.xml b/bpmn/mso-infrastructure-bpmn/src/test/resources/__files/VCPE/CreateVcpeResCustService/GenericVnf.xml
new file mode 100644
index 0000000..aaac6c1
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/resources/__files/VCPE/CreateVcpeResCustService/GenericVnf.xml
@@ -0,0 +1,16 @@
+<generic-vnf xmlns="http://org.openecomp.aai.inventory/v7">
+	<vnf-id>VCPE-123456</vnf-id>
+	<vnf-name>VCPE</vnf-name>
+	<vnf-type>VCPE</vnf-type>
+	<service-id>SDN-MOBILITY</service-id>
+	<equipment-role>vPCRF</equipment-role>
+	<orchestration-status>pending-create</orchestration-status>
+	<in-maint>false</in-maint>
+	<is-closed-loop-disabled>false</is-closed-loop-disabled>
+	<model-invariant-id>introvert</model-invariant-id>
+	<model-version-id>2.0</model-version-id>
+	<resource-version>0000020</resource-version>
+	<relationship-list/>
+	<l-interfaces/>
+	<lag-interfaces/>
+</generic-vnf>
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/resources/__files/VCPE/CreateVcpeResCustService/oofCallbackInfraVnf.json b/bpmn/mso-infrastructure-bpmn/src/test/resources/__files/VCPE/CreateVcpeResCustService/oofCallbackInfraVnf.json
new file mode 100644
index 0000000..15e601b
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/resources/__files/VCPE/CreateVcpeResCustService/oofCallbackInfraVnf.json
@@ -0,0 +1,50 @@
+{
+   "transactionId": "xxx-xxx-xxxx",
+   "requestId": "yyy-yyy-yyyy",
+   "requestStatus": "completed",
+   "statusMessage": "success",
+   "solutions": {
+      "placementSolutions": [
+         [
+         {
+            "resourceModuleName": "vGMuxInfra",
+            "serviceResourceId": "some_resource_id",
+            "solution": {
+               "identifierType": "serviceInstanceId",
+               "identifiers": ["gjhd-098-fhd-987"]
+            },
+            "assignmentInfo": [
+               { "key": "cloudOwner", "value": "amazon" },
+               { "key": "vnfHostName", "value": "ahr344gh" },
+               { "key": "isRehome", "value": "False" },
+               { "key": "locationId", "value": "1ac71fb8-ad43-4e16-9459-c3f372b8236d" }
+            ]
+         },
+         {
+            "resourceModuleName": "vG",
+            "serviceResourceId": "some_resource_id",
+            "solution": {
+               "identifierType": "cloudRegionId",
+               "cloudOwner": "amazon",
+               "identifiers": ["gjhd-098-fhd-987"]
+            },
+            "assignmentInfo": [
+               { "key": "cloudOwner", "value": "amazon" },
+               { "key": "locationId", "value": "1ac71fb8-ad43-4e16-9459-c3f372b8236d" },
+               { "key":"flavors", "value":{ "flavorLabel1xxx":"vimFlavorxxx", "flavorLabel2xxx":"vimFlavorxxx"}}
+            ]
+         }
+      ]
+      ],
+      "licenseSolutions": [
+         {
+            "resourceModuleName": "vGMuxInfra",
+            "serviceResourceId": "some_resource_id",
+            "entitlementPoolUUID": ["1ac71fb8-ad43-4e16-9459-c3f372b8236d", "834fc71fb8-ad43-4fh7-9459-c3f372b8236f"],
+            "licenseKeyGroupUUID": ["1ac71fb8-ad43-4e16-9459-c3f372b8236d", "834fc71fb8-ad43-4fh7-9459-c3f372b8236f"],
+            "entitlementPoolInvariantUUID": ["1ac71fb8-ad43-4e16-9459-c3f372b8236d", "834fc71fb8-ad43-4fh7-9459-c3f372b8236f"],
+            "licenseKeyGroupInvariantUUID": ["1ac71fb8-ad43-4e16-9459-c3f372b8236d", "834fc71fb8-ad43-4fh7-9459-c3f372b8236f"]
+         }
+      ]
+   }
+}
\ No newline at end of file
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestRollback.json b/bpmn/mso-infrastructure-bpmn/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestRollback.json
new file mode 100644
index 0000000..a7b5c1b
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/resources/__files/VCPE/CreateVcpeResCustService/requestRollback.json
@@ -0,0 +1,60 @@
+{
+	"requestDetails":
+	{
+		"modelInfo":
+		{
+			"modelType":"service",
+			"modelInvariantUuid":"uuid-miu-svc-011-abcdef",
+			"modelVersionId":"ASDC_TOSCA_UUID",
+			"modelName":"SIModelName1",
+			"modelVersion":"2"
+		},
+		"subscriberInfo":
+		{
+			"globalSubscriberId":"SDN-ETHERNET-INTERNET",
+			"subscriberName":"Kaneohe"
+		},
+		"requestInfo":
+		{
+			"source":"VID",
+			"suppressRollback":"false",
+			"productFamilyId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+			"instanceName":"serviceInstanceName"
+		},
+		"cloudConfiguration":
+		{
+			"lcpCloudRegionId":"mdt1_123",
+			"tenantId":"8b1df54faa3b49078e3416e21370a3ba"
+		},
+		"owningEntity": {
+			"owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+			"owningEntityName": "PACKET CORE"
+		},
+		"requestParameters":
+		{
+			"subscriptionServiceType":"123456789",
+			"aLaCarte":"false",
+			"userParams": [
+				{
+					"name": "BRG_WAN_MAC_Address"
+				},
+				{
+					"name": "Customer_Location",
+					"value":
+					{
+						"customerLatitude" : "32.89748",
+						"customerLongitude" : "-97.040443"
+					}
+				},
+				{
+					"name": "Homing_Model_Ids",
+					"value":
+					{
+						"resourceModuleName" : "test"
+					}
+				}
+			]
+		}
+
+	}
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/resources/application-test.yaml b/bpmn/mso-infrastructure-bpmn/src/test/resources/application-test.yaml
new file mode 100644
index 0000000..8a5ade6
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/test/resources/application-test.yaml
@@ -0,0 +1,208 @@
+aai:
+  auth: 26AFB797A6A57960D5D718491925C50F77CDC22AC394B3DBA09950D8FD1C0764
+  endpoint: http://localhost:${wiremock.server.port}
+appc:
+  client:
+    key: iaEMAfjsVsZnraBP
+    response:
+      timeout: '120000'
+    secret: wcivUjsjXzmGFBfxMmyJu9dz
+    poolMembers: localhost:3904
+    service: ueb
+    topic:
+      read:
+        name: APPC-TEST-AMDOCS2
+        timeout: '120000'
+      write: APPC-TEST-AMDOCS1-DEV3
+      sdnc:
+        read: SDNC-LCM-READ
+        write: SDNC-LCM-WRITE
+mso:
+  adapters:
+    completemsoprocess:
+      endpoint: http://localhost:${wiremock.server.port}/CompleteMsoProcess
+    db:
+      auth: 757A94191D685FD2092AC1490730A4FC
+      endpoint: http://localhost:${wiremock.server.port}/dbadapters/RequestsDbAdapter
+      spring:
+        endpoint: http://localhost:${wiremock.server.port}
+    network:
+      endpoint: http://localhost:${wiremock.server.port}/networks/NetworkAdapter
+      rest:
+        endpoint: http://localhost:${wiremock.server.port}/networks/rest/v1/networks
+    openecomp:
+      db:
+        endpoint: http://localhost:${wiremock.server.port}/dbadapters/RequestsDbAdapter
+    po:
+      auth: 757A94191D685FD2092AC1490730A4FC
+      password: 3141634BF7E070AA289CF2892C986C0B
+    sdnc:
+      endpoint: http://localhost:${wiremock.server.port}/SDNCAdapter
+      rest:
+        endpoint: http://localhost:${wiremock.server.port}/SDNCAdapter/v1/sdnc
+      timeout: PT60S
+    tenant:
+      endpoint: http://localhost:${wiremock.server.port}/tenantAdapterMock
+    vnf:
+      endpoint: http://localhost:${wiremock.server.port}/vnfs/VnfAdapter
+      rest:
+        endpoint: http://localhost:${wiremock.server.port}/services/rest/v1/vnfs
+    volume-groups:
+      rest:
+        endpoint: http://localhost:${wiremock.server.port}/services/rest/v1/volume-groups
+    vnf-async:
+      endpoint: http://localhost:${wiremock.server.port}/vnfs/VnfAdapterAsync
+    workflow:
+      message:
+        endpoint: http://localhost:${wiremock.server.port}/workflows/messages/message
+        
+  async:
+      core-pool-size: 50
+      max-pool-size: 50
+      queue-capacity: 500
+  
+  bpmn:
+    optimisticlockingexception:
+      retrycount: '3'
+  callbackRetryAttempts: '5'
+  catalog:
+    db:
+      endpoint: http://localhost:${wiremock.server.port}/
+      spring:
+        endpoint: http://localhost:${wiremock.server.port}  
+  correlation:
+        timeout: 60
+  db:
+    auth: Basic YnBlbDptc28tZGItMTUwNyE=
+  default:
+    adapter:
+      namespace: http://org.onap.so
+  healthcheck:
+    log:
+      debug: 'false'
+  infra:
+    customer:
+      id: testCustIdInfra
+  logPath: logs
+  msoKey: 07a7159d3bf51a0e53be7a8f89699be7
+  po:
+    timeout: PT60S
+  request:
+    db:
+      endpoint: http://localhost:${wiremock.server.port}/
+  rollback: 'true'
+  sdnc:    
+    password: 3141634BF7E070AA289CF2892C986C0B      
+  site-name: localDevEnv
+  workflow:   
+    default:
+      aai:
+        cloud-region:
+          version: '9'
+        generic-vnf:
+          version: '9'
+        v8:
+          customer:
+            uri: /aai/v8/business/customers/customer
+          generic-query:
+            uri: /aai/v8/search/generic-query
+          l3-network:
+            uri: /aai/v8/network/l3-networks/l3-network
+          network-policy:
+            uri: /aai/v8/network/network-policies/network-policy
+          nodes-query:
+            uri: /aai/v8/search/nodes-query
+          route-table-reference:
+            uri: /aai/v8/network/route-table-references/route-table-reference
+          tenant:
+            uri: /aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant
+          vce:
+            uri: /aai/v8/network/vces/vce
+          vpn-binding:
+            uri: /aai/v8/network/vpn-bindings/vpn-binding
+        v9:
+          cloud-region:
+            uri: /aai/v9/cloud-infrastructure/cloud-regions/cloud-region/att-aic
+          generic-vnf:
+            uri: /aai/v9/network/generic-vnfs/generic-vnf
+    global:
+      default:
+        aai:
+          namespace: http://org.openecomp.aai.inventory/
+          version: '8'
+    message:
+      endpoint: http://localhost:${wiremock.server.port}/mso/WorkflowMesssage
+    notification:
+      name: GenericNotificationService
+    sdncadapter:
+      callback: http://localhost:${wiremock.server.port}/mso/SDNCAdapterCallbackService
+    vnfadapter:
+      create:
+        callback: http://localhost:${wiremock.server.port}/mso/vnfAdapterNotify
+      delete:
+        callback: http://localhost:${wiremock.server.port}/mso/vnfAdapterNotify
+      query:
+        callback: http://localhost:${wiremock.server.port}/mso/services/VNFAdapterQuerCallbackV1
+      rollback:
+        callback: http://localhost:${wiremock.server.port}/mso/vnfAdapterNotify
+  global:
+    dmaap:
+      username: dmaapUsername
+      password: dmaapPassword
+      host: http://localhost:28090
+      publisher:
+        topic: com.att.mso.asyncStatusUpdate 
+  service-plugin:
+    third-sp-endpoint:
+    oof-calc-endpoint:
+policy:
+  auth: Basic dGVzdHBkcDphbHBoYTEyMw==
+  client:
+    auth: Basic bTAzNzQzOnBvbGljeVIwY2sk
+  endpoint: https://localhost:8081/pdp/api/
+  environment: TEST
+sniro:
+  conductor:
+    enabled: true
+    host: http://localhost:${wiremock.server.port}
+    uri: /v1/release-orders
+    headers.auth: Basic dGVzdDp0ZXN0cHdk
+  manager:
+    timeout: PT30M
+    host: http://localhost:${wiremock.server.port}
+    uri.v1: /sniro/api/v2/placement
+    uri.v2: /sniro/api/placement/v2
+    headers.auth: Basic dGVzdDp0ZXN0cHdk
+    headers.patchVersion: 1
+    headers.minorVersion: 1
+    headers.latestVersion: 2
+spring:
+  datasource:
+    url: jdbc:mariadb://localhost:3307/camundabpmn
+    username: root
+    password: password
+    driver-class-name: org.mariadb.jdbc.Driver
+    initialize: true
+  jpa:   
+    generate-ddl: false
+    show-sql: false
+    hibernate:      
+      ddl-auto: none
+      naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy
+      enable-lazy-load-no-trans: true
+    database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
+  security:
+    usercredentials:
+    -  
+      username: test
+      password: '$2a$12$Zi3AuYcZoZO/gBQyUtST2.F5N6HqcTtaNci2Et.ufsQhski56srIu'
+      role: BPEL-Client
+mariaDB4j:
+  dataDir: 
+  port: 3307
+  databaseName: camundabpmn
+camunda:
+  bpm:
+    metrics:
+      enabled: false
+      db-reporter-activate: false
\ No newline at end of file
