Refactored SDNCAdapterUtils (groovy)
[so.git] / bpmn / so-bpmn-infrastructure-common / src / main / groovy / org / onap / so / bpmn / infrastructure / scripts / DoCreateVfModule.groovy
index 6783808..6b4fc84 100644 (file)
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * 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
 
 package org.onap.so.bpmn.infrastructure.scripts
 
+import org.onap.so.bpmn.common.scripts.CatalogDbUtilsFactory
+import org.onap.so.client.HttpClientFactory
+import org.onap.so.logger.ErrorCode
+
+import javax.ws.rs.core.MediaType
+import javax.ws.rs.core.Response
 import javax.xml.parsers.DocumentBuilder
 import javax.xml.parsers.DocumentBuilderFactory
 
@@ -28,6 +36,7 @@ import org.camunda.bpm.engine.delegate.DelegateExecution
 import org.json.JSONArray
 import org.json.JSONObject
 import org.onap.aai.domain.yang.GenericVnf
+import org.onap.aai.domain.yang.NetworkPolicy
 import org.onap.so.bpmn.common.scripts.AaiUtil
 import org.onap.so.bpmn.common.scripts.CatalogDbUtils
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
@@ -35,14 +44,14 @@ import org.onap.so.bpmn.common.scripts.MsoUtils
 import org.onap.so.bpmn.common.scripts.NetworkUtils
 import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
 import org.onap.so.bpmn.common.scripts.VfModuleBase
+import org.onap.so.bpmn.common.util.OofInfraUtils
 import org.onap.so.bpmn.core.RollbackData
 import org.onap.so.bpmn.core.UrnPropertiesReader
 import org.onap.so.bpmn.core.WorkflowException
-
 import org.onap.so.bpmn.core.domain.VnfResource
 import org.onap.so.bpmn.core.json.DecomposeJsonUtil
 import org.onap.so.bpmn.core.json.JsonUtils
-import org.onap.so.client.graphinventory.entities.uri.Depth
+import org.onap.so.client.HttpClient
 import org.onap.so.client.aai.AAIObjectPlurals
 import org.onap.so.client.aai.AAIObjectType;
 import org.onap.so.client.aai.AAIResourcesClient
@@ -50,13 +59,14 @@ import org.onap.so.client.aai.entities.AAIResultWrapper
 import org.onap.so.client.aai.entities.uri.AAIResourceUri
 import org.onap.so.client.aai.entities.uri.AAIUri
 import org.onap.so.client.aai.entities.uri.AAIUriFactory;
+import org.onap.so.client.graphinventory.entities.uri.Depth
 import org.onap.so.constants.Defaults
+import org.onap.so.db.catalog.beans.HomingInstance
 import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
-import org.onap.so.rest.APIResponse
-import org.onap.so.rest.RESTClient
-import org.onap.so.rest.RESTConfig
-import org.springframework.web.util.UriUtils
+import org.slf4j.Logger
+import org.slf4j.LoggerFactory
+
+import org.onap.so.utils.TargetEntity
 import org.w3c.dom.Document
 import org.w3c.dom.Element
 import org.w3c.dom.NamedNodeMap
@@ -69,14 +79,16 @@ import com.fasterxml.jackson.databind.ObjectMapper
 
 
 public class DoCreateVfModule extends VfModuleBase {
-       private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoCreateVfModule.class);
+    private static final Logger logger = LoggerFactory.getLogger( DoCreateVfModule.class);
 
        String Prefix="DCVFM_"
        ExceptionUtil exceptionUtil = new ExceptionUtil()
        JsonUtils jsonUtil = new JsonUtils()
-       SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
-       CatalogDbUtils catalog = new CatalogDbUtils()
+       SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
+       OofInfraUtils oofInfraUtils = new OofInfraUtils()
+       CatalogDbUtils catalogDbUtils = new CatalogDbUtilsFactory().create()
        DecomposeJsonUtil decomposeJsonUtils = new DecomposeJsonUtil()
+       private final HttpClientFactory httpClientFactory = new HttpClientFactory()
 
        /**
         * Validates the request message and sets up the workflow.
@@ -87,7 +99,7 @@ public class DoCreateVfModule extends VfModuleBase {
                        'execution=' + execution.getId() +
                        ')'
 
-               msoLogger.trace('Entered ' + method)
+               logger.trace('Entered ' + method)
 
                execution.setVariable('prefix', Prefix)
                try{
@@ -108,9 +120,9 @@ public class DoCreateVfModule extends VfModuleBase {
                                String vfModuleModelInfo = execution.getVariable("vfModuleModelInfo")
 
                                def serviceModelInfo = execution.getVariable("serviceModelInfo")
-                               msoLogger.debug("serviceModelInfo: " + serviceModelInfo)
+                               logger.debug("serviceModelInfo: " + serviceModelInfo)
                                String modelInvariantUuid = jsonUtil.getJsonValue(serviceModelInfo, "modelInvariantUuid")
-                               msoLogger.debug("modelInvariantUuid: " + modelInvariantUuid)
+                               logger.debug("modelInvariantUuid: " + modelInvariantUuid)
 
                                def vnfModelInfo = execution.getVariable("vnfModelInfo")
 
@@ -128,66 +140,66 @@ public class DoCreateVfModule extends VfModuleBase {
                                def cloudSiteId = execution.getVariable("lcpCloudRegionId")
                                execution.setVariable("DCVFM_cloudSiteId", cloudSiteId)
                                rollbackData.put("VFMODULE", "aiccloudregion", cloudSiteId)
-                               msoLogger.debug("cloudSiteId: " + cloudSiteId)
+                               logger.debug("cloudSiteId: " + cloudSiteId)
                                //cloudOwner
                                def cloudOwner = execution.getVariable("cloudOwner")
                                execution.setVariable("DCVFM_cloudOwner", cloudOwner)
                                rollbackData.put("VFMODULE", "cloudOwner", cloudOwner)
-                               msoLogger.debug("cloudOwner: " + cloudOwner)
+                               logger.debug("cloudOwner: " + cloudOwner)
                                //vnfType
                                def vnfType = execution.getVariable("vnfType")
                                execution.setVariable("DCVFM_vnfType", vnfType)
                                rollbackData.put("VFMODULE", "vnftype", vnfType)
-                               msoLogger.debug("vnfType: " + vnfType)
+                               logger.debug("vnfType: " + vnfType)
                                //vnfName
                                def vnfName = execution.getVariable("vnfName")
                                execution.setVariable("DCVFM_vnfName", vnfName)
                                rollbackData.put("VFMODULE", "vnfname", vnfName)
-                               msoLogger.debug("vnfName: " + vnfName)
+                               logger.debug("vnfName: " + vnfName)
                                //vnfId
                                def vnfId = execution.getVariable("vnfId")
                                execution.setVariable("DCVFM_vnfId", vnfId)
                                rollbackData.put("VFMODULE", "vnfid", vnfId)
-                               msoLogger.debug("vnfId: " + vnfId)
+                               logger.debug("vnfId: " + vnfId)
                                //vfModuleName
                                def vfModuleName = execution.getVariable("vfModuleName")
                                execution.setVariable("DCVFM_vfModuleName", vfModuleName)
                                rollbackData.put("VFMODULE", "vfmodulename", vfModuleName)
-                               msoLogger.debug("vfModuleName: " + vfModuleName)
+                               logger.debug("vfModuleName: " + vfModuleName)
                                //vfModuleModelName
                                def vfModuleModelName = jsonUtil.getJsonValue(vfModuleModelInfo, "modelName")
                                execution.setVariable("DCVFM_vfModuleModelName", vfModuleModelName)
                                rollbackData.put("VFMODULE", "vfmodulemodelname", vfModuleModelName)
-                               msoLogger.debug("vfModuleModelName: " + vfModuleModelName)
+                               logger.debug("vfModuleModelName: " + vfModuleModelName)
                                //modelCustomizationUuid
                                def modelCustomizationUuid = jsonUtil.getJsonValue(vfModuleModelInfo, "modelCustomizationUuid")
                                execution.setVariable("DCVFM_modelCustomizationUuid", modelCustomizationUuid)
                                rollbackData.put("VFMODULE", "modelcustomizationuuid", modelCustomizationUuid)
-                               msoLogger.debug("modelCustomizationUuid: " + modelCustomizationUuid)
+                               logger.debug("modelCustomizationUuid: " + modelCustomizationUuid)
                                //vfModuleId
                                def vfModuleId = execution.getVariable("vfModuleId")
                                execution.setVariable("DCVFM_vfModuleId", vfModuleId)
-                               msoLogger.debug("vfModuleId: " + vfModuleId)
+                               logger.debug("vfModuleId: " + vfModuleId)
                                def requestId = execution.getVariable("msoRequestId")
                                execution.setVariable("DCVFM_requestId", requestId)
-                               msoLogger.debug("requestId: " + requestId)
+                               logger.debug("requestId: " + requestId)
                                rollbackData.put("VFMODULE", "msorequestid", requestId)
                                // Set mso-request-id to request-id for VNF Adapter interface
                                execution.setVariable("mso-request-id", requestId)
                                //serviceId
                                def serviceId = execution.getVariable("serviceId")
                                execution.setVariable("DCVFM_serviceId", serviceId)
-                               msoLogger.debug("serviceId: " + serviceId)
+                               logger.debug("serviceId: " + serviceId)
                                //serviceInstanceId
                                def serviceInstanceId = execution.getVariable("serviceInstanceId")
                                execution.setVariable("DCVFM_serviceInstanceId", serviceInstanceId)
                                rollbackData.put("VFMODULE", "serviceInstanceId", serviceInstanceId)
-                               msoLogger.debug("serviceInstanceId: " + serviceInstanceId)
+                               logger.debug("serviceInstanceId: " + serviceInstanceId)
                                //source - HARDCODED
                                def source = "VID"
                                execution.setVariable("DCVFM_source", source)
                                rollbackData.put("VFMODULE", "source", source)
-                               msoLogger.debug("source: " + source)
+                               logger.debug("source: " + source)
                                //backoutOnFailure
                                def disableRollback = execution.getVariable("disableRollback")
                                def backoutOnFailure = true
@@ -195,15 +207,15 @@ public class DoCreateVfModule extends VfModuleBase {
                                        backoutOnFailure = false
                                }
                                execution.setVariable("DCVFM_backoutOnFailure", backoutOnFailure)
-                               msoLogger.debug("backoutOnFailure: " + backoutOnFailure)
+                               logger.debug("backoutOnFailure: " + backoutOnFailure)
                                //isBaseVfModule
                                def isBaseVfModule = execution.getVariable("isBaseVfModule")
                                execution.setVariable("DCVFM_isBaseVfModule", isBaseVfModule)
-                               msoLogger.debug("isBaseVfModule: " + isBaseVfModule)
+                               logger.debug("isBaseVfModule: " + isBaseVfModule)
                                //asdcServiceModelVersion
                                def asdcServiceModelVersion = execution.getVariable("asdcServiceModelVersion")
                                execution.setVariable("DCVFM_asdcServiceModelVersion", asdcServiceModelVersion)
-                               msoLogger.debug("asdcServiceModelVersion: " + asdcServiceModelVersion)
+                               logger.debug("asdcServiceModelVersion: " + asdcServiceModelVersion)
                                //personaModelId
                                execution.setVariable("DCVFM_personaModelId", jsonUtil.getJsonValue(vfModuleModelInfo, "modelInvariantUuid"))
                                //personaModelVersion
@@ -212,15 +224,15 @@ public class DoCreateVfModule extends VfModuleBase {
                                def vfModuleLabel = execution.getVariable("vfModuleLabel")
                                if (vfModuleLabel != null) {
                                        execution.setVariable("DCVFM_vfModuleLabel", vfModuleLabel)
-                                       msoLogger.debug("vfModuleLabel: " + vfModuleLabel)
+                                       logger.debug("vfModuleLabel: " + vfModuleLabel)
                                }
                                //Get or Generate UUID
                                String uuid = execution.getVariable("DCVFM_uuid")
                                if(uuid == null){
                                        uuid = UUID.randomUUID()
-                                       msoLogger.debug("Generated messageId (UUID) is: " + uuid)
+                                       logger.debug("Generated messageId (UUID) is: " + uuid)
                                }else{
-                                       msoLogger.debug("Found messageId (UUID) is: " + uuid)
+                                       logger.debug("Found messageId (UUID) is: " + uuid)
                                }
                                //isVidRequest
                                String isVidRequest = execution.getVariable("isVidRequest")
@@ -231,13 +243,38 @@ public class DoCreateVfModule extends VfModuleBase {
                                //globalSubscriberId
                                String globalSubscriberId = execution.getVariable("globalSubscriberId")
                                execution.setVariable("DCVFM_globalSubscriberId", globalSubscriberId)
-                               msoLogger.debug("globalSubsrciberId: " + globalSubscriberId)
-                               //OofDirectives
-                               String oofDirectives = execution.getVariable("oofDirectives")
+                               logger.debug("globalSubsrciberId: " + globalSubscriberId)
+
+                               // Set Homing Info
+                               String oofDirectives = null
+                               try {
+                                       HomingInstance homingInstance = oofInfraUtils.getHomingInstance(serviceInstanceId, execution)
+                                       if (homingInstance != null) {
+                                               execution.setVariable("DCVFM_cloudSiteId", homingInstance.getCloudRegionId())
+                                               rollbackData.put("VFMODULE", "aiccloudregion", homingInstance.getCloudRegionId())
+                                               logger.debug("Overwriting cloudSiteId with homing cloudSiteId: " +
+                                                               homingInstance.getCloudRegionId())
+                                               execution.setVariable("DCVFM_cloudOwner", homingInstance.getCloudOwner())
+                                               rollbackData.put("VFMODULE", "cloudOwner", homingInstance.getCloudOwner())
+                                               logger.debug("Overwriting cloudOwner with homing cloudOwner: " +
+                                                               homingInstance.getCloudOwner())
+                                               oofDirectives = homingInstance.getOofDirectives()
+                                               execution.setVariable("DCVFM_oofDirectives", oofDirectives)
+                                       }
+                               } catch (Exception exception) {
+                                       logger.debug("Could not find homing information for service instance: " + serviceInstanceId +
+                                                       "... continuing")
+                                       logger.debug("Could not find homing information for service instance error: " + exception)
+                               }
+                               //OofDirectives to Input Params
                                Map<String,String> vfModuleInputParams = execution.getVariable("vfModuleInputParams")
-                               if (oofDirectives != null) {
-                                       vfModuleInputParams.put("oofDirectives", oofDirectives)
-                                       logDebug("OofDirectives are: " + oofDirectives, isDebugLogEnabled)
+                               if (oofDirectives != null && vfModuleInputParams != null) {
+                                       vfModuleInputParams.put("oof_directives", oofDirectives)
+                                       vfModuleInputParams.put("sdnc_directives", "{}")
+                                       logger.debug("OofDirectives are: " + oofDirectives)
+                               } else if (vfModuleInputParams != null) {
+                                       vfModuleInputParams.put("oof_directives", "{}")
+                                       vfModuleInputParams.put("sdnc_directives", "{}")
                                }
                                if (vfModuleInputParams != null) {
                                        execution.setVariable("DCVFM_vnfParamsMap", vfModuleInputParams)
@@ -246,11 +283,11 @@ public class DoCreateVfModule extends VfModuleBase {
                                //usePreload
                                def usePreload = execution.getVariable("usePreload")
                                execution.setVariable("DCVFM_usePreload", usePreload)
-                               msoLogger.debug("usePreload: " + usePreload)
+                               logger.debug("usePreload: " + usePreload)
                                //aLaCarte
                                def aLaCarte = execution.getVariable("aLaCarte")
                                execution.setVariable("DCVFM_aLaCarte", aLaCarte)
-                               msoLogger.debug("aLaCarte: " + aLaCarte)
+                               logger.debug("aLaCarte: " + aLaCarte)
 
                                //get workload and environment context from parent SI
                                String environmentContext = ""
@@ -258,13 +295,13 @@ public class DoCreateVfModule extends VfModuleBase {
                                String serviceType =""
 
                                try{
-                                       String json = catalog.getServiceResourcesByServiceModelInvariantUuidString(execution,modelInvariantUuid )
+                                       String json = catalogDbUtils.getServiceResourcesByServiceModelInvariantUuidString(execution,modelInvariantUuid )
                                        serviceType = jsonUtil.getJsonValue(json, "serviceResources.serviceType")
                                }catch(BpmnError e){
                                        throw e
                                } catch (Exception ex){
                                        String msg = "Exception in preProcessRequest " + ex.getMessage()
-                                       msoLogger.debug(msg)
+                                       logger.debug(msg)
                                        exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
                                }
 
@@ -277,7 +314,7 @@ public class DoCreateVfModule extends VfModuleBase {
                                        workloadContext = aaiJson.getOrDefault("workload-context","")
 
                                }catch (Exception ex) {
-                                       msoLogger.debug("Error retreiving parent service instance information")
+                                       logger.debug("Error retreiving parent service instance information")
                                }
 
                                execution.setVariable("DCVFM_environmentContext",environmentContext)
@@ -286,7 +323,7 @@ public class DoCreateVfModule extends VfModuleBase {
                        }
                        else {
                                // The info is inside the request - DEAD CODE
-                               msoLogger.debug("DoCreateVfModule request: " + request)
+                               logger.debug("DoCreateVfModule request: " + request)
 
                                //tenantId
                                def tenantId = ""
@@ -314,7 +351,7 @@ public class DoCreateVfModule extends VfModuleBase {
                                }
                                execution.setVariable("DCVFM_cloudSiteId", cloudSiteId)
                                rollbackData.put("VFMODULE", "aiccloudregion", cloudSiteId)
-                               msoLogger.debug("cloudSiteId: " + cloudSiteId)
+                               logger.debug("cloudSiteId: " + cloudSiteId)
                                //vnfType
                                def vnfType = ""
                                if (utils.nodeExists(request, "vnf-type")) {
@@ -322,7 +359,7 @@ public class DoCreateVfModule extends VfModuleBase {
                                }
                                execution.setVariable("DCVFM_vnfType", vnfType)
                                rollbackData.put("VFMODULE", "vnftype", vnfType)
-                               msoLogger.debug("vnfType: " + vnfType)
+                               logger.debug("vnfType: " + vnfType)
                                //vnfName
                                def vnfName = ""
                                if (utils.nodeExists(request, "vnf-name")) {
@@ -330,7 +367,7 @@ public class DoCreateVfModule extends VfModuleBase {
                                }
                                execution.setVariable("DCVFM_vnfName", vnfName)
                                rollbackData.put("VFMODULE", "vnfname", vnfName)
-                               msoLogger.debug("vnfName: " + vnfName)
+                               logger.debug("vnfName: " + vnfName)
                                //vnfId
                                def vnfId = ""
                                if (utils.nodeExists(request, "vnf-id")) {
@@ -338,7 +375,7 @@ public class DoCreateVfModule extends VfModuleBase {
                                }
                                execution.setVariable("DCVFM_vnfId", vnfId)
                                rollbackData.put("VFMODULE", "vnfid", vnfId)
-                               msoLogger.debug("vnfId: " + vnfId)
+                               logger.debug("vnfId: " + vnfId)
                                //vfModuleName
                                def vfModuleName = ""
                                if (utils.nodeExists(request, "vf-module-name")) {
@@ -346,7 +383,7 @@ public class DoCreateVfModule extends VfModuleBase {
                                }
                                execution.setVariable("DCVFM_vfModuleName", vfModuleName)
                                rollbackData.put("VFMODULE", "vfmodulename", vfModuleName)
-                               msoLogger.debug("vfModuleName: " + vfModuleName)
+                               logger.debug("vfModuleName: " + vfModuleName)
                                //vfModuleModelName
                                def vfModuleModelName = ""
                                if (utils.nodeExists(request, "vf-module-model-name")) {
@@ -354,7 +391,7 @@ public class DoCreateVfModule extends VfModuleBase {
                                }
                                execution.setVariable("DCVFM_vfModuleModelName", vfModuleModelName)
                                rollbackData.put("VFMODULE", "vfmodulemodelname", vfModuleModelName)
-                               msoLogger.debug("vfModuleModelName: " + vfModuleModelName)
+                               logger.debug("vfModuleModelName: " + vfModuleModelName)
                                //modelCustomizationUuid
                                def modelCustomizationUuid = ""
                                if (utils.nodeExists(request, "model-customization-id")) {
@@ -362,27 +399,27 @@ public class DoCreateVfModule extends VfModuleBase {
                                }
                                execution.setVariable("DCVFM_modelCustomizationUuid", modelCustomizationUuid)
                                rollbackData.put("VFMODULE", "modelcustomizationuuid", modelCustomizationUuid)
-                               msoLogger.debug("modelCustomizationUuid: " + modelCustomizationUuid)
+                               logger.debug("modelCustomizationUuid: " + modelCustomizationUuid)
                                //vfModuleId
                                def vfModuleId = ""
                                if (utils.nodeExists(request, "vf-module-id")) {
                                        vfModuleId = utils.getNodeText(request, "vf-module-id")
                                }
                                execution.setVariable("DCVFM_vfModuleId", vfModuleId)
-                               msoLogger.debug("vfModuleId: " + vfModuleId)
+                               logger.debug("vfModuleId: " + vfModuleId)
                                def requestId = ""
                                if (utils.nodeExists(request, "request-id")) {
                                        requestId = utils.getNodeText(request, "request-id")
                                }
                                execution.setVariable("DCVFM_requestId", requestId)
-                               msoLogger.debug("requestId: " + requestId)
+                               logger.debug("requestId: " + requestId)
                                //serviceId
                                def serviceId = ""
                                if (utils.nodeExists(request, "service-id")) {
                                        serviceId = utils.getNodeText(request, "service-id")
                                }
                                execution.setVariable("DCVFM_serviceId", serviceId)
-                               msoLogger.debug("serviceId: " + serviceId)
+                               logger.debug("serviceId: " + serviceId)
                                //serviceInstanceId
                                def serviceInstanceId = ""
                                if (utils.nodeExists(request, "service-instance-id")) {
@@ -390,7 +427,7 @@ public class DoCreateVfModule extends VfModuleBase {
                                }
                                execution.setVariable("DCVFM_serviceInstanceId", serviceInstanceId)
                                rollbackData.put("VFMODULE", "serviceInstanceId", serviceInstanceId)
-                               msoLogger.debug("serviceInstanceId: " + serviceInstanceId)
+                               logger.debug("serviceInstanceId: " + serviceInstanceId)
                                //source
                                def source = ""
                                if (utils.nodeExists(request, "source")) {
@@ -398,26 +435,26 @@ public class DoCreateVfModule extends VfModuleBase {
                                }
                                execution.setVariable("DCVFM_source", source)
                                rollbackData.put("VFMODULE", "source", source)
-                               msoLogger.debug("source: " + source)
+                               logger.debug("source: " + source)
                                //backoutOnFailure
                                NetworkUtils networkUtils = new NetworkUtils()
                                def backoutOnFailure = networkUtils.isRollbackEnabled(execution,request)
                                execution.setVariable("DCVFM_backoutOnFailure", backoutOnFailure)
-                               msoLogger.debug("backoutOnFailure: " + backoutOnFailure)
+                               logger.debug("backoutOnFailure: " + backoutOnFailure)
                                //isBaseVfModule
                                def isBaseVfModule = "false"
                                if (utils.nodeExists(request, "is-base-vf-module")) {
                                        isBaseVfModule = utils.getNodeText(request, "is-base-vf-module")
                                }
                                execution.setVariable("DCVFM_isBaseVfModule", isBaseVfModule)
-                               msoLogger.debug("isBaseVfModule: " + isBaseVfModule)
+                               logger.debug("isBaseVfModule: " + isBaseVfModule)
                                //asdcServiceModelVersion
                                def asdcServiceModelVersion = ""
                                if (utils.nodeExists(request, "asdc-service-model-version")) {
                                        asdcServiceModelVersion = utils.getNodeText(request, "asdc-service-model-version")
                                }
                                execution.setVariable("DCVFM_asdcServiceModelVersion", asdcServiceModelVersion)
-                               msoLogger.debug("asdcServiceModelVersion: " + asdcServiceModelVersion)
+                               logger.debug("asdcServiceModelVersion: " + asdcServiceModelVersion)
 
                                //personaModelId
                                def personaModelId = ""
@@ -425,7 +462,7 @@ public class DoCreateVfModule extends VfModuleBase {
                                        personaModelId = utils.getNodeText(request, "persona-model-id")
                                }
                                execution.setVariable("DCVFM_personaModelId", personaModelId)
-                               msoLogger.debug("personaModelId: " + personaModelId)
+                               logger.debug("personaModelId: " + personaModelId)
 
                                //personaModelVersion
                                def personaModelVersion = ""
@@ -433,15 +470,15 @@ public class DoCreateVfModule extends VfModuleBase {
                                        personaModelVersion = utils.getNodeText(request, "persona-model-version")
                                }
                                execution.setVariable("DCVFM_personaModelVersion", personaModelVersion)
-                               msoLogger.debug("personaModelVersion: " + personaModelVersion)
+                               logger.debug("personaModelVersion: " + personaModelVersion)
 
                                // Process the parameters
 
                                                String vnfParamsChildNodes = utils.getChildNodes(request, "vnf-params")
                                                if(vnfParamsChildNodes == null || vnfParamsChildNodes.length() < 1){
-                                                               msoLogger.debug("Request contains NO VNF Params")
+                                                               logger.debug("Request contains NO VNF Params")
                                                }else{
-                                                               msoLogger.debug("Request does contain VNF Params")
+                                                               logger.debug("Request does contain VNF Params")
                                                                execution.setVariable("DCVFM_vnfParamsExistFlag", true)
 
                                                                InputSource xmlSource = new InputSource(new StringReader(request));
@@ -464,11 +501,30 @@ public class DoCreateVfModule extends VfModuleBase {
                                                        }
 
                                //OofDirectives
-                               String oofDirectives = execution.getVariable("oofDirectives")
+                               String oofDirectives = null
+                               try {
+                                       HomingInstance homingInstance = oofInfraUtils.getHomingInstance(serviceInstanceId, execution)
+                                       if (homingInstance != null) {
+                                               execution.setVariable("DCVFM_cloudSiteId", homingInstance.getCloudRegionId())
+                                               rollbackData.put("VFMODULE", "aiccloudregion", homingInstance.getCloudRegionId())
+                                               logger.debug("Overwriting cloudSiteId with homing cloudSiteId: " +
+                                                               homingInstance.getCloudRegionId())
+                                               execution.setVariable("DCVFM_cloudOwner", homingInstance.getCloudOwner())
+                                               rollbackData.put("VFMODULE", "cloudOwner", homingInstance.getCloudOwner())
+                                               logger.debug("Overwriting cloudOwner with homing cloudOwner: " +
+                                                               homingInstance.getCloudOwner())
+                                               oofDirectives = homingInstance.getOofDirectives()
+                                               execution.setVariable("DCVFM_oofDirectives", oofDirectives)
+                                       }
+                               } catch (Exception exception) {
+                                       logger.debug("Could not find homing information for service instance: " + serviceInstanceId +
+                                                       "... continuing")
+                                       logger.debug("Could not find homing information for service instance error: " + exception)
+                               }
                                if (oofDirectives != null) {
                                        Map<String, String> paramsMap = execution.getVariable("DCVFM_vnfParamsMap")
                                        paramsMap.put("oofDirectives", oofDirectives)
-                                       logDebug("OofDirectives are: " + oofDirectives, isDebugLogEnabled)
+                                       logger.debug("OofDirectives are: " + oofDirectives)
                                        execution.setVariable("DCVFM_vnfParamsMap", paramsMap)
                                }
                        }
@@ -478,16 +534,16 @@ public class DoCreateVfModule extends VfModuleBase {
                        String uuid = execution.getVariable("DCVFM_uuid")
                        if(uuid == null){
                                uuid = UUID.randomUUID()
-                               msoLogger.debug("Generated messageId (UUID) is: " + uuid)
+                               logger.debug("Generated messageId (UUID) is: " + uuid)
                        }else{
-                               msoLogger.debug("Found messageId (UUID) is: " + uuid)
+                               logger.debug("Found messageId (UUID) is: " + uuid)
                        }
                        // Get sdncVersion, default to empty
                        String sdncVersion = execution.getVariable("sdncVersion")
                        if (sdncVersion == null) {
                                sdncVersion = ""
                        }
-                       msoLogger.debug("sdncVersion: " + sdncVersion)
+                       logger.debug("sdncVersion: " + sdncVersion)
                        execution.setVariable("DCVFM_sdncVersion", sdncVersion)
 
                        execution.setVariable("DCVFM_uuid", uuid)
@@ -512,24 +568,25 @@ public class DoCreateVfModule extends VfModuleBase {
                        String sdncCallbackUrl = (String) UrnPropertiesReader.getVariable("mso.workflow.sdncadapter.callback",execution)
                                if (sdncCallbackUrl == null || sdncCallbackUrl.trim().isEmpty()) {
                                        def msg = 'Required variable \'mso.workflow.sdncadapter.callback\' is missing'
-                                       msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, msg, "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, msg);
+                                       logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
+                                                       ErrorCode.UnknownError.getValue(), msg);
 
                                        exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
                                }
                                execution.setVariable("DCVFM_sdncCallbackUrl", sdncCallbackUrl)
-                           msoLogger.debug("SDNC Callback URL is: " + sdncCallbackUrl)
+                           logger.debug("SDNC Callback URL is: " + sdncCallbackUrl)
 
 
                        execution.setVariable("rollbackData", rollbackData)
                }catch(BpmnError b){
-            msoLogger.error(b);
+            logger.error(b);
                        throw b
                }catch(Exception e){
-            msoLogger.error(e);
+            logger.error(e);
                        exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error encountered in PreProcess method!")
                }
 
-               msoLogger.trace('Exited ' + method)
+               logger.trace('Exited ' + method)
        }
 
        /**
@@ -541,7 +598,7 @@ public class DoCreateVfModule extends VfModuleBase {
         */
        public void validateWorkflowResponse(DelegateExecution execution, String responseVar,
                        String responseCodeVar, String errorResponseVar) {
-               SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+               SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
                sdncAdapterUtils.validateSDNCResponse(execution, responseVar, responseCodeVar, errorResponseVar)
        }
 
@@ -555,15 +612,17 @@ public class DoCreateVfModule extends VfModuleBase {
                        'execution=' + execution.getId() +
                        ')'
 
-               msoLogger.trace('Entered ' + method)
+               logger.trace('Entered ' + method)
 
                try {
                        sendWorkflowResponse(execution, 200, "")
-                       msoLogger.trace('Exited ' + method)
+                       logger.trace('Exited ' + method)
                } catch (BpmnError e) {
                        throw e;
                } catch (Exception e) {
-                       msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+                       logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+                                       'Caught exception in ' + method, "BPMN",
+                                       ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
 
                        exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Internal Error')
                }
@@ -581,39 +640,38 @@ public class DoCreateVfModule extends VfModuleBase {
                        'execution=' + execution.getId() +
                        ')'
 
-               msoLogger.trace('Entered ' + method)
+               logger.trace('Entered ' + method)
 
                try {
                        def createResponse = execution.getVariable('DCVFM_createVfModuleResponse')
-                       msoLogger.debug("createVfModule Response: " + createResponse)
+                       logger.debug("createVfModule Response: " + createResponse)
 
                        def rollbackData = execution.getVariable("rollbackData")
                        String vnfName = utils.getNodeText(createResponse, 'vnf-name')
                        if (vnfName != null) {
                                execution.setVariable('DCVFM_vnfName', vnfName)
-                               msoLogger.debug("vnfName retrieved from AAI is: " + vnfName)
+                               logger.debug("vnfName retrieved from AAI is: " + vnfName)
                                rollbackData.put("VFMODULE", "vnfname", vnfName)
                        }
                        String vnfId = utils.getNodeText(createResponse, 'vnf-id')
                        execution.setVariable('DCVFM_vnfId', vnfId)
-                       msoLogger.debug("vnfId is: " + vnfId)
+                       logger.debug("vnfId is: " + vnfId)
                        String vfModuleId = utils.getNodeText(createResponse, 'vf-module-id')
                        execution.setVariable('DCVFM_vfModuleId', vfModuleId)
-                       msoLogger.debug("vfModuleId is: " + vfModuleId)
+                       logger.debug("vfModuleId is: " + vfModuleId)
                        String vfModuleIndex= utils.getNodeText(createResponse, 'vf-module-index')
                        execution.setVariable('DCVFM_vfModuleIndex', vfModuleIndex)
-                       msoLogger.debug("vfModuleIndex is: " + vfModuleIndex)
+                       logger.debug("vfModuleIndex is: " + vfModuleIndex)
                        rollbackData.put("VFMODULE", "vnfid", vnfId)
                        rollbackData.put("VFMODULE", "vfmoduleid", vfModuleId)
                        rollbackData.put("VFMODULE", "rollbackCreateAAIVfModule", "true")
                        rollbackData.put("VFMODULE", "rollbackPrepareUpdateVfModule", "true")
                        execution.setVariable("rollbackData", rollbackData)
                } catch (Exception ex) {
-                               ex.printStackTrace()
-                               msoLogger.debug('Exception occurred while postProcessing CreateAAIVfModule request:' + ex.getMessage())
+                               logger.debug('Exception occurred while postProcessing CreateAAIVfModule request: {}', ex.getMessage(), ex)
                                exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Bad response from CreateAAIVfModule' + ex.getMessage())
                }
-               msoLogger.trace('Exited ' + method)
+               logger.trace('Exited ' + method)
        }
 
 
@@ -628,7 +686,7 @@ public class DoCreateVfModule extends VfModuleBase {
                def method = getClass().getSimpleName() + '.getVfModule(' +
                        'execution=' + execution.getId() +
                        ')'
-               msoLogger.trace('Entered ' + method)
+               logger.trace('Entered ' + method)
 
                try {
                        def vnfId = execution.getVariable('DCVFM_vnfId')
@@ -639,30 +697,28 @@ public class DoCreateVfModule extends VfModuleBase {
                        String endPoint = aaiUriUtil.createAaiUri(uri)
 
                        try {
-                               RESTConfig config = new RESTConfig(endPoint);
-                               def responseData = ''
-                               def aaiRequestId = UUID.randomUUID().toString()
-                               RESTClient client = new RESTClient(config).
-                                       addHeader('X-TransactionId', aaiRequestId).
-                                       addHeader('X-FromAppId', 'MSO').
-                                       addHeader('Content-Type', 'application/xml').
-                                       addHeader('Accept','application/xml');
-                               msoLogger.debug('sending GET to AAI endpoint \'' + endPoint + '\'')
-                               APIResponse response = client.httpGet()
-
-                               responseData = response.getResponseBodyAsString()
+                               HttpClient client = httpClientFactory.newXmlClient(new URL(endPoint), TargetEntity.AAI)
+                               client.addAdditionalHeader('X-TransactionId', UUID.randomUUID().toString())
+                               client.addAdditionalHeader('X-FromAppId', 'MSO')
+                               client.addAdditionalHeader('Content-Type', MediaType.APPLICATION_XML)
+                               client.addAdditionalHeader('Accept', MediaType.APPLICATION_XML)
+
+                               logger.debug('sending GET to AAI endpoint \'' + endPoint + '\'')
+                               Response response = client.get()
+
+                               String responseData = response.readEntity(String.class)
                                if (responseData != null) {
-                                       msoLogger.debug("Received generic VNF data: " + responseData)
+                                       logger.debug("Received generic VNF data: " + responseData)
 
                                }
 
-                               execution.setVariable('DCVFM_queryAAIVfModuleResponseCode', response.getStatusCode())
+                               execution.setVariable('DCVFM_queryAAIVfModuleResponseCode', response.getStatus())
                                execution.setVariable('DCVFM_queryAAIVfModuleResponse', responseData)
-                               msoLogger.debug('Response code:' + response.getStatusCode())
-                               msoLogger.debug('Response:' + System.lineSeparator() + responseData)
-                               if (response.getStatusCode() == 200) {
+                               logger.debug('Response code:' + response.getStatus())
+                               logger.debug('Response:' + System.lineSeparator() + responseData)
+                               if (response.getStatus() == 200) {
                                        // Parse the VNF record from A&AI to find base module info
-                                       msoLogger.debug('Parsing the VNF data to find base module info')
+                                       logger.debug('Parsing the VNF data to find base module info')
                                        if (responseData != null) {
                                                def vfModulesText = utils.getNodeXml(responseData, "vf-modules")
                                                def xmlVfModules= new XmlSlurper().parseText(vfModulesText)
@@ -675,24 +731,25 @@ public class DoCreateVfModule extends VfModuleBase {
                                                        if (isBaseVfModule == "true") {
                                                            String baseModuleId = utils.getNodeText(vfModuleXml, "vf-module-id")
                                                            execution.setVariable("DCVFM_baseVfModuleId", baseModuleId)
-                                                           msoLogger.debug('Received baseVfModuleId: ' + baseModuleId)
+                                                           logger.debug('Received baseVfModuleId: ' + baseModuleId)
                                                            String baseModuleHeatStackId = utils.getNodeText(vfModuleXml, "heat-stack-id")
                                                            execution.setVariable("DCVFM_baseVfModuleHeatStackId", baseModuleHeatStackId)
-                                                           msoLogger.debug('Received baseVfModuleHeatStackId: ' + baseModuleHeatStackId)
+                                                           logger.debug('Received baseVfModuleHeatStackId: ' + baseModuleHeatStackId)
                                                        }
                                                }
                                        }
                                }
                        } catch (Exception ex) {
-                               ex.printStackTrace()
-                               msoLogger.debug('Exception occurred while executing AAI GET:' + ex.getMessage())
+                               logger.debug('Exception occurred while executing AAI GET: {}', ex.getMessage(), ex)
                                exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'AAI GET Failed:' + ex.getMessage())
                        }
-                       msoLogger.trace('Exited ' + method)
+                       logger.trace('Exited ' + method)
                } catch (BpmnError e) {
                        throw e;
                } catch (Exception e) {
-                       msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+                       logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+                                       'Caught exception in ' + method, "BPMN",
+                                       ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
                        exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in queryAAIVfModule(): ' + e.getMessage())
                }
        }
@@ -711,7 +768,7 @@ public class DoCreateVfModule extends VfModuleBase {
                def method = getClass().getSimpleName() + '.queryAAIVfModuleForStatus(' +
                        'execution=' + execution.getId() +
                        ')'
-               msoLogger.trace('Entered ' + method)
+               logger.trace('Entered ' + method)
 
                execution.setVariable('DCVFM_orchestrationStatus', '')
 
@@ -720,36 +777,36 @@ public class DoCreateVfModule extends VfModuleBase {
                        def vfModuleName = execution.getVariable('DCVFM_vfModuleName')
 
                        AaiUtil aaiUriUtil = new AaiUtil(this)
-                       AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.VF_MODULES, vnfId).queryParam("vf-module-name",vfModuleName)
+                       AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.VF_MODULE, vnfId).queryParam("vf-module-name",vfModuleName)
                        String endPoint = aaiUriUtil.createAaiUri(uri)
 
+                       HttpClient client = httpClientFactory.newXmlClient(new URL(endPoint), TargetEntity.AAI)
+                       client.addAdditionalHeader('X-TransactionId', UUID.randomUUID().toString())
+                       client.addAdditionalHeader('X-FromAppId', 'MSO')
+                       client.addAdditionalHeader('Content-Type', MediaType.APPLICATION_XML)
+                       client.addAdditionalHeader('Accept', MediaType.APPLICATION_XML)
+
                        try {
-                               RESTConfig config = new RESTConfig(endPoint);
                                def responseData = ''
-                               def aaiRequestId = UUID.randomUUID().toString()
-                               RESTClient client = new RESTClient(config).
-                                       addHeader('X-TransactionId', aaiRequestId).
-                                       addHeader('X-FromAppId', 'MSO').
-                                       addHeader('Content-Type', 'application/xml').
-                                       addHeader('Accept','application/xml');
-                               msoLogger.debug('sending GET to AAI endpoint \'' + endPoint + '\'')
-                               APIResponse response = client.httpGet()
-                               msoLogger.debug("createVfModule - invoking httpGet() to AAI")
-
-                               responseData = response.getResponseBodyAsString()
+
+                               logger.debug('sending GET to AAI endpoint \'' + endPoint + '\'')
+                               Response response = client.get()
+                               logger.debug("createVfModule - invoking httpGet() to AAI")
+
+                               responseData = response.readEntity(String.class)
                                if (responseData != null) {
-                                       msoLogger.debug("Received generic VNF data: " + responseData)
+                                       logger.debug("Received generic VNF data: " + responseData)
 
                                }
 
-                               execution.setVariable('DCVFM_queryAAIVfModuleForStatusResponseCode', response.getStatusCode())
+                               execution.setVariable('DCVFM_queryAAIVfModuleForStatusResponseCode', response.getStatus())
                                execution.setVariable('DCVFM_queryAAIVfModuleForStatusResponse', responseData)
-                               msoLogger.debug('Response code:' + response.getStatusCode())
-                               msoLogger.debug('Response:' + System.lineSeparator() + responseData)
+                               logger.debug('Response code:' + response.getStatus())
+                               logger.debug('Response:' + System.lineSeparator() + responseData)
                                // Retrieve VF Module info and its orchestration status; if not found, do nothing
-                               if (response.getStatusCode() == 200) {
+                               if (response.getStatus() == 200) {
                                        // Parse the VNF record from A&AI to find base module info
-                                       msoLogger.debug('Parsing the VNF data to find orchestration status')
+                                       logger.debug('Parsing the VNF data to find orchestration status')
                                        if (responseData != null) {
                                                def vfModuleText = utils.getNodeXml(responseData, "vf-module")
                                                //def xmlVfModule= new XmlSlurper().parseText(vfModuleText)
@@ -758,20 +815,21 @@ public class DoCreateVfModule extends VfModuleBase {
                                                // Also retrieve vfModuleId
                                                def vfModuleId = utils.getNodeText(vfModuleText, "vf-module-id")
                                                execution.setVariable("DCVFM_vfModuleId", vfModuleId)
-                                               msoLogger.debug("Received orchestration status from A&AI: " + orchestrationStatus)
+                                               logger.debug("Received orchestration status from A&AI: " + orchestrationStatus)
 
                                        }
                                }
                        } catch (Exception ex) {
-                               ex.printStackTrace()
-                               msoLogger.debug('Exception occurred while executing AAI GET:' + ex.getMessage())
+                               logger.debug('Exception occurred while executing AAI GET: {}', ex.getMessage(), ex)
                                exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'AAI GET Failed:' + ex.getMessage())
                        }
-                       msoLogger.trace('Exited ' + method)
+                       logger.trace('Exited ' + method)
                } catch (BpmnError e) {
                        throw e;
                } catch (Exception e) {
-                       msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+                       logger.error("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+                                       'Caught exception in ' + method, "BPMN",
+                                       ErrorCode.UnknownError.getValue(), "Exception is:\n" + e, e);
                        exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in queryAAIVfModuleForStatus(): ' + e.getMessage())
                }
        }
@@ -780,11 +838,11 @@ public class DoCreateVfModule extends VfModuleBase {
        public void preProcessSDNCAssignRequest(DelegateExecution execution){
 
                execution.setVariable("prefix", Prefix)
-               msoLogger.trace("STARTED preProcessSDNCAssignRequest")
+               logger.trace("STARTED preProcessSDNCAssignRequest")
                def vnfId = execution.getVariable("DCVFM_vnfId")
                def vfModuleId = execution.getVariable("DCVFM_vfModuleId")
                def serviceInstanceId = execution.getVariable("DCVFM_serviceInstanceId")
-               msoLogger.debug("NEW VNF ID: " + vnfId)
+               logger.debug("NEW VNF ID: " + vnfId)
 
                try{
 
@@ -802,20 +860,22 @@ public class DoCreateVfModule extends VfModuleBase {
 
                        assignSDNCRequest = utils.formatXml(assignSDNCRequest)
                        execution.setVariable("DCVFM_assignSDNCRequest", assignSDNCRequest)
-                       msoLogger.debug("Outgoing AssignSDNCRequest is: \n" + assignSDNCRequest)
+                       logger.debug("Outgoing AssignSDNCRequest is: \n" + assignSDNCRequest)
 
                }catch(Exception e){
-                       msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, " Exception Occurred Processing preProcessSDNCAssignRequest", "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+                       logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+                                       "Exception Occurred Processing preProcessSDNCAssignRequest", "BPMN",
+                                       ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
                        exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during prepareProvision Method:\n" + e.getMessage())
                }
-               msoLogger.trace("COMPLETED preProcessSDNCAssignRequest")
+               logger.trace("COMPLETED preProcessSDNCAssignRequest")
        }
 
        public void preProcessSDNCGetRequest(DelegateExecution execution, String element){
 
                String sdncVersion = execution.getVariable("DCVFM_sdncVersion")
                execution.setVariable("prefix", Prefix)
-               msoLogger.trace("STARTED preProcessSDNCGetRequest Process")
+               logger.trace("STARTED preProcessSDNCGetRequest Process")
                try{
                        def serviceInstanceId = execution.getVariable('DCVFM_serviceInstanceId')
 
@@ -825,7 +885,7 @@ public class DoCreateVfModule extends VfModuleBase {
                        }
 
                        def callbackUrl = execution.getVariable("DCVFM_sdncCallbackUrl")
-                       msoLogger.debug("callbackUrl:" + callbackUrl)
+                       logger.debug("callbackUrl:" + callbackUrl)
 
                        def vfModuleId = execution.getVariable('DCVFM_vfModuleId')
 
@@ -857,21 +917,21 @@ public class DoCreateVfModule extends VfModuleBase {
 
                                Optional<GenericVnf> vnf = wrapper.asBean(GenericVnf.class)
                                serviceOperation = vnf.get().getSelflink()
-                               msoLogger.debug("VNF - service operation: " + serviceOperation)
+                               logger.debug("VNF - service operation: " + serviceOperation)
                        }
                        else if (element.equals("vfmodule")) {
                                String response = execution.getVariable("DCVFM_assignSDNCAdapterResponse")
-                               msoLogger.debug("DCVFM_assignSDNCAdapterResponse is: \n" + response)
+                               logger.debug("DCVFM_assignSDNCAdapterResponse is: \n" + response)
 
                                if (!sdncVersion.equals("1707")) {
                                        serviceOperation = "/VNF-API:vnfs/vnf-list/" + vfModuleId
-                                       msoLogger.debug("VF Module with sdncVersion before 1707 - service operation: " + serviceOperation)
+                                       logger.debug("VF Module with sdncVersion before 1707 - service operation: " + serviceOperation)
                                }
                                else {
                                        String data = utils.getNodeXml(response, "response-data")
-                                       msoLogger.debug("responseData: " + data)
+                                       logger.debug("responseData: " + data)
                                        serviceOperation = utils.getNodeText(data, "object-path")
-                                       msoLogger.debug("VF Module with sdncVersion of 1707 - service operation: " + serviceOperation)
+                                       logger.debug("VF Module with sdncVersion of 1707 - service operation: " + serviceOperation)
                                }
                        }
 
@@ -894,13 +954,15 @@ public class DoCreateVfModule extends VfModuleBase {
                                </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
 
                        execution.setVariable("DCVFM_getSDNCRequest", SDNCGetRequest)
-                       msoLogger.debug("Outgoing GetSDNCRequest is: \n" + SDNCGetRequest)
+                       logger.debug("Outgoing GetSDNCRequest is: \n" + SDNCGetRequest)
 
                }catch(Exception e){
-                       msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occurred Processing preProcessSDNCGetRequest", "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+                       logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+                                       "Exception Occurred Processing preProcessSDNCGetRequest", "BPMN",
+                                       ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
                        exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during prepareProvision Method:\n" + e.getMessage())
                }
-               msoLogger.trace("COMPLETED preProcessSDNCGetRequest Process")
+               logger.trace("COMPLETED preProcessSDNCGetRequest Process")
        }
 
 
@@ -909,14 +971,16 @@ public class DoCreateVfModule extends VfModuleBase {
                        'execution=' + execution.getId() +
                        ')'
 
-               msoLogger.trace('Entered ' + method)
+               logger.trace('Entered ' + method)
 
                //def xml = execution.getVariable("DoCreateVfModuleRequest")
-               //msoLogger.debug('VNF REQUEST is: ' + xml)
+               //logger.debug('VNF REQUEST is: ' + xml)
 
                //Get variables
                //cloudSiteId
                def cloudSiteId = execution.getVariable("DCVFM_cloudSiteId")
+               //cloudOwner
+               def cloudOwner = execution.getVariable("DCVFM_cloudOwner")
                //tenantId
                def tenantId = execution.getVariable("DCVFM_tenantId")
                //vnfType
@@ -957,8 +1021,8 @@ public class DoCreateVfModule extends VfModuleBase {
                String environmentContext = execution.getVariable("DCVFM_environmentContext")
                //workloadContext
                String workloadContext = execution.getVariable("DCVFM_workloadContext")
-               msoLogger.debug("workloadContext: " + workloadContext)
-               msoLogger.debug("environmentContext: " + environmentContext)
+               logger.debug("workloadContext: " + workloadContext)
+               logger.debug("environmentContext: " + environmentContext)
 
                def messageId = execution.getVariable('mso-request-id') + '-' +
                                 System.currentTimeMillis()
@@ -966,8 +1030,8 @@ public class DoCreateVfModule extends VfModuleBase {
                def notificationUrl = createCallbackURL(execution, "VNFAResponse", messageId)
                def useQualifiedHostName = UrnPropertiesReader.getVariable("mso.use.qualified.host",execution)
 
-               msoLogger.debug("notificationUrl: " + notificationUrl)
-               msoLogger.debug("QualifiedHostName: " + useQualifiedHostName)
+               logger.debug("notificationUrl: " + notificationUrl)
+               logger.debug("QualifiedHostName: " + useQualifiedHostName)
 
                if ('true'.equals(useQualifiedHostName)) {
                        notificationUrl = utils.getQualifiedHostNameForCallback(notificationUrl)
@@ -977,7 +1041,7 @@ public class DoCreateVfModule extends VfModuleBase {
                String vfModuleParams = ""
                //Get SDNC Response Data for VF Module Topology
                String vfModuleSdncGetResponse = execution.getVariable('DCVFM_getSDNCAdapterResponse')
-               msoLogger.debug("sdncGetResponse: " + vfModuleSdncGetResponse)
+               logger.debug("sdncGetResponse: " + vfModuleSdncGetResponse)
                def sdncVersion = execution.getVariable("sdncVersion")
 
                if (!sdncVersion.equals("1707")) {
@@ -988,7 +1052,7 @@ public class DoCreateVfModule extends VfModuleBase {
                else {
                        //Get SDNC Response Data for Vnf Topology
                        String vnfSdncGetResponse = execution.getVariable('DCVFM_getVnfSDNCAdapterResponse')
-                       msoLogger.debug("vnfSdncGetResponse: " + vnfSdncGetResponse)
+                       logger.debug("vnfSdncGetResponse: " + vnfSdncGetResponse)
 
                        vfModuleParams = buildVfModuleParamsFromCombinedTopologies(vnfParamsMap, vnfSdncGetResponse, vfModuleSdncGetResponse, vnfId, vnfName,
                                vfModuleId, vfModuleName, vfModuleIndex, environmentContext, workloadContext)
@@ -1002,9 +1066,10 @@ public class DoCreateVfModule extends VfModuleBase {
                        svcInstId = serviceInstanceId
                }
 
-               def createVnfARequest = """
+               String createVnfARequest = """
                <createVfModuleRequest>
                <cloudSiteId>${MsoUtils.xmlEscape(cloudSiteId)}</cloudSiteId>
+               <cloudOwner>${MsoUtils.xmlEscape(cloudOwner)}</cloudOwner>
                <tenantId>${MsoUtils.xmlEscape(tenantId)}</tenantId>
                <vnfId>${MsoUtils.xmlEscape(vnfId)}</vnfId>
                <vnfName>${MsoUtils.xmlEscape(vnfName)}</vnfName>
@@ -1033,7 +1098,7 @@ public class DoCreateVfModule extends VfModuleBase {
                <notificationUrl>${MsoUtils.xmlEscape(notificationUrl)}</notificationUrl>
                </createVfModuleRequest>"""
 
-               msoLogger.debug("Create VfModule Request to VNF Adapter: " + createVnfARequest)
+               logger.debug("Create VfModule Request to VNF Adapter: " + createVnfARequest)
                execution.setVariable("DCVFM_createVnfARequest", createVnfARequest)
        }
 
@@ -1049,7 +1114,7 @@ public class DoCreateVfModule extends VfModuleBase {
                        'execution=' + execution.getId() +
                        ')'
 
-               msoLogger.trace('Entered ' + method)
+               logger.trace('Entered ' + method)
 
                String processKey = getProcessKey(execution);
                def prefix = execution.getVariable("prefix")
@@ -1076,7 +1141,7 @@ public class DoCreateVfModule extends VfModuleBase {
                        if (request == null) {
                                exceptionUtil.buildAndThrowWorkflowException(execution, 1002, processKey + " request is null")
                        }
-                       msoLogger.debug("DoCreateVfModule Request: " + request)
+                       logger.debug("DoCreateVfModule Request: " + request)
 
                        /*
 
@@ -1094,13 +1159,15 @@ public class DoCreateVfModule extends VfModuleBase {
 
                        utils.logContext(requestId, serviceInstanceId)
                        */
-                       msoLogger.debug('Incoming message: ' + System.lineSeparator() + request)
-                       msoLogger.trace('Exited ' + method)
+                       logger.debug('Incoming message: ' + System.lineSeparator() + request)
+                       logger.trace('Exited ' + method)
                        return request
                } catch (BpmnError e) {
                        throw e;
                } catch (Exception e) {
-                       msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+                       logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+                                       'Caught exception in ' + method, "BPMN",
+                                       ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
                        exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Invalid Message")
                }
        }
@@ -1111,16 +1178,16 @@ public class DoCreateVfModule extends VfModuleBase {
                        'execution=' + execution.getId() +
                        ')'
 
-               msoLogger.trace('Entered ' + method)
+               logger.trace('Entered ' + method)
 
                def request = execution.getVariable('DoCreateVfModuleRequest')
                String volumeGroupId = utils.getNodeText(request, "volume-group-id")
                if (volumeGroupId == null || volumeGroupId.isEmpty()) {
-                       msoLogger.debug('No volume group id is present')
+                       logger.debug('No volume group id is present')
                        return false
                }
                else {
-                       msoLogger.debug('Volume group id is present')
+                       logger.debug('Volume group id is present')
                        return true
                }
 
@@ -1132,16 +1199,16 @@ public class DoCreateVfModule extends VfModuleBase {
                        'execution=' + execution.getId() +
                        ')'
 
-               msoLogger.trace('Entered ' + method)
+               logger.trace('Entered ' + method)
 
                def request = execution.getVariable('DoCreateVfModuleRequest')
                String volumeGroupName = utils.getNodeText(request, "volume-group-name")
                if (volumeGroupName == null || volumeGroupName.isEmpty()) {
-                       msoLogger.debug('No volume group name is present')
+                       logger.debug('No volume group name is present')
                        return false
                }
                else {
-                       msoLogger.debug('Volume group name is present')
+                       logger.debug('Volume group name is present')
                        return true
                }
 
@@ -1166,6 +1233,7 @@ public class DoCreateVfModule extends VfModuleBase {
                def vfModuleModelName = execution.getVariable("DCVFM_vfModuleModelName")
                def vnfId = execution.getVariable("DCVFM_vnfId")
                def cloudSiteId = execution.getVariable("DCVFM_cloudSiteId")
+               def cloudOwner = execution.getVariable("DCVFM_cloudOwner")
                def sdncVersion = execution.getVariable("DCVFM_sdncVersion")
                def serviceModelInfo = execution.getVariable("serviceModelInfo")
                def vnfModelInfo = execution.getVariable("vnfModelInfo")
@@ -1336,7 +1404,7 @@ public class DoCreateVfModule extends VfModuleBase {
 
                }
 
-       msoLogger.debug("sdncRequest:  " + sdncRequest)
+       logger.debug("sdncRequest:  " + sdncRequest)
        return sdncRequest
 
        }
@@ -1346,9 +1414,9 @@ public class DoCreateVfModule extends VfModuleBase {
                        'execution=' + execution.getId() +
                        ')'
 
-               msoLogger.trace('Entered ' + method)
+               logger.trace('Entered ' + method)
                execution.setVariable("prefix", Prefix)
-               msoLogger.trace("STARTED preProcessSDNCActivateRequest Process")
+               logger.trace("STARTED preProcessSDNCActivateRequest Process")
                try{
                        String vnfId = execution.getVariable("DCVFM_vnfId")
                        String vfModuleId = execution.getVariable("DCVFM_vfModuleId")
@@ -1364,13 +1432,13 @@ public class DoCreateVfModule extends VfModuleBase {
                        String activateSDNCRequest = buildSDNCRequest(execution, svcInstId, "activate")
 
                        execution.setVariable("DCVFM_activateSDNCRequest", activateSDNCRequest)
-                       msoLogger.debug("Outgoing CommitSDNCRequest is: \n" + activateSDNCRequest)
+                       logger.debug("Outgoing CommitSDNCRequest is: \n" + activateSDNCRequest)
 
                }catch(Exception e){
-                       msoLogger.debug("Exception Occured Processing preProcessSDNCActivateRequest. Exception is:\n" + e)
+                       logger.debug("Exception Occured Processing preProcessSDNCActivateRequest. Exception is:\n" + e)
                        exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during  preProcessSDNCActivateRequest Method:\n" + e.getMessage())
                }
-               msoLogger.trace("COMPLETED  preProcessSDNCActivateRequest Process")
+               logger.trace("COMPLETED  preProcessSDNCActivateRequest Process")
        }
 
        public void postProcessVNFAdapterRequest(DelegateExecution execution) {
@@ -1378,23 +1446,23 @@ public class DoCreateVfModule extends VfModuleBase {
                        'execution=' + execution.getId() +
                        ')'
 
-               msoLogger.trace('Entered ' + method)
+               logger.trace('Entered ' + method)
                execution.setVariable("prefix",Prefix)
                try{
-               msoLogger.debug("STARTED postProcessVNFAdapterRequest Process")
+               logger.debug("STARTED postProcessVNFAdapterRequest Process")
 
                String vnfResponse = execution.getVariable("DCVFM_createVnfAResponse")
-               msoLogger.debug("VNF Adapter Response is: " + vnfResponse)
+               logger.debug("VNF Adapter Response is: " + vnfResponse)
 
                RollbackData rollbackData = execution.getVariable("rollbackData")
                if(vnfResponse != null){
 
                        if(vnfResponse.contains("createVfModuleResponse")){
-                               msoLogger.debug("Received a Good Response from VNF Adapter for CREATE_VF_MODULE Call.")
+                               logger.debug("Received a Good Response from VNF Adapter for CREATE_VF_MODULE Call.")
                                execution.setVariable("DCVFM_vnfVfModuleCreateCompleted", true)
                                String heatStackId = utils.getNodeText(vnfResponse, "vfModuleStackId")
                                execution.setVariable("DCVFM_heatStackId", heatStackId)
-                               msoLogger.debug("Received heat stack id from VNF Adapter: " + heatStackId)
+                               logger.debug("Received heat stack id from VNF Adapter: " + heatStackId)
                                rollbackData.put("VFMODULE", "heatstackid", heatStackId)
                                // Parse vnfOutputs for network_fqdn
                                if (vnfResponse.contains("vfModuleOutputs")) {
@@ -1414,22 +1482,22 @@ public class DoCreateVfModule extends VfModuleBase {
                                                        String key = element.getElementsByTagNameNS("*", "key").item(0).getTextContent()
                                                        if (key.equals("contrail-service-instance-fqdn")) {
                                                                String contrailServiceInstanceFqdn = element.getElementsByTagNameNS("*", "value").item(0).getTextContent()
-                                                               msoLogger.debug("Obtained contrailServiceInstanceFqdn: " + contrailServiceInstanceFqdn)
+                                                               logger.debug("Obtained contrailServiceInstanceFqdn: " + contrailServiceInstanceFqdn)
                                                                execution.setVariable("DCVFM_contrailServiceInstanceFqdn", contrailServiceInstanceFqdn)
                                                        }
                                                        else if (key.endsWith("contrail_network_policy_fqdn")) {
                                                                String contrailNetworkPolicyFqdn = element.getElementsByTagNameNS("*", "value").item(0).getTextContent()
-                                                               msoLogger.debug("Obtained contrailNetworkPolicyFqdn: " + contrailNetworkPolicyFqdn)
+                                                               logger.debug("Obtained contrailNetworkPolicyFqdn: " + contrailNetworkPolicyFqdn)
                                                                contrailNetworkPolicyFqdnList.add(contrailNetworkPolicyFqdn)
                                                        }
                                                        else if (key.equals("oam_management_v4_address")) {
                                                                String oamManagementV4Address = element.getElementsByTagNameNS("*", "value").item(0).getTextContent()
-                                                               msoLogger.debug("Obtained oamManagementV4Address: " + oamManagementV4Address)
+                                                               logger.debug("Obtained oamManagementV4Address: " + oamManagementV4Address)
                                                                execution.setVariable("DCVFM_oamManagementV4Address", oamManagementV4Address)
                                                        }
                                                        else if (key.equals("oam_management_v6_address")) {
                                                                String oamManagementV6Address = element.getElementsByTagNameNS("*", "value").item(0).getTextContent()
-                                                               msoLogger.debug("Obtained oamManagementV6Address: " + oamManagementV6Address)
+                                                               logger.debug("Obtained oamManagementV6Address: " + oamManagementV6Address)
                                                                execution.setVariable("DCVFM_oamManagementV6Address", oamManagementV6Address)
                                                        }
 
@@ -1440,11 +1508,11 @@ public class DoCreateVfModule extends VfModuleBase {
                                        }
                                }
                        }else{
-                               msoLogger.debug("Received a BAD Response from VNF Adapter for CREATE_VF_MODULE Call.")
+                               logger.debug("Received a BAD Response from VNF Adapter for CREATE_VF_MODULE Call.")
                                exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "VNF Adapter Error")
                        }
                }else{
-                       msoLogger.debug("Response from VNF Adapter is Null for CREATE_VF_MODULE Call.")
+                       logger.debug("Response from VNF Adapter is Null for CREATE_VF_MODULE Call.")
                        exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Empty response from VNF Adapter")
                }
 
@@ -1454,10 +1522,10 @@ public class DoCreateVfModule extends VfModuleBase {
                }catch(BpmnError b){
                        throw b
                }catch(Exception e){
-                       msoLogger.debug("Internal Error Occured in PostProcess Method")
+                       logger.debug("Internal Error Occured in PostProcess Method")
                        exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Internal Error Occured in PostProcess Method")
                }
-               msoLogger.trace("COMPLETED postProcessVnfAdapterResponse Process")
+               logger.trace("COMPLETED postProcessVnfAdapterResponse Process")
        }
 
 
@@ -1466,9 +1534,9 @@ public class DoCreateVfModule extends VfModuleBase {
                        'execution=' + execution.getId() +
                        ')'
 
-               msoLogger.trace('Entered ' + method)
+               logger.trace('Entered ' + method)
                execution.setVariable("prefix", Prefix)
-               msoLogger.trace("STARTED preProcessUpdateAAIVfModuleRequestOrch")
+               logger.trace("STARTED preProcessUpdateAAIVfModuleRequestOrch")
 
                try{
 
@@ -1485,13 +1553,15 @@ public class DoCreateVfModule extends VfModuleBase {
 
                        updateAAIVfModuleRequest = utils.formatXml(updateAAIVfModuleRequest)
                        execution.setVariable("DCVFM_updateAAIVfModuleRequest", updateAAIVfModuleRequest)
-                       msoLogger.debug("Outgoing UpdateAAIVfModuleRequest is: \n" + updateAAIVfModuleRequest)
+                       logger.debug("Outgoing UpdateAAIVfModuleRequest is: \n" + updateAAIVfModuleRequest)
 
                }catch(Exception e){
-                       msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing preProcessUpdateAAIVfModuleRequestOrch", "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+                       logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+                                       "Exception Occured Processing preProcessUpdateAAIVfModuleRequestOrch", "BPMN",
+                                       ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
                        exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during preProcessUpdateAAIVfModuleRequestOrch Method:\n" + e.getMessage())
                }
-               msoLogger.trace("COMPLETED preProcessUpdateAAIVfModuleRequestOrch")
+               logger.trace("COMPLETED preProcessUpdateAAIVfModuleRequestOrch")
 
        }
 
@@ -1500,9 +1570,9 @@ public class DoCreateVfModule extends VfModuleBase {
                        'execution=' + execution.getId() +
                        ')'
 
-               msoLogger.trace('Entered ' + method)
+               logger.trace('Entered ' + method)
                execution.setVariable("prefix", Prefix)
-               msoLogger.trace("STARTED preProcessUpdateAAIVfModuleStatus")
+               logger.trace("STARTED preProcessUpdateAAIVfModuleStatus")
 
                try{
 
@@ -1513,13 +1583,15 @@ public class DoCreateVfModule extends VfModuleBase {
 
                        updateAAIVfModuleRequest = utils.formatXml(updateAAIVfModuleRequest)
                        execution.setVariable("DCVFM_updateAAIVfModuleRequest", updateAAIVfModuleRequest)
-                       msoLogger.debug("Outgoing UpdateAAIVfModuleRequest is: \n" + updateAAIVfModuleRequest)
+                       logger.debug("Outgoing UpdateAAIVfModuleRequest is: \n" + updateAAIVfModuleRequest)
 
                }catch(Exception e){
-                       msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing preProcessUpdateAAIVfModuleStatus", "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+                       logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+                                       "Exception Occured Processing preProcessUpdateAAIVfModuleStatus", "BPMN",
+                                       ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
                        exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during preProcessUpdateAAIVfModuleStatus Method:\n" + e.getMessage())
                }
-               msoLogger.trace("COMPLETED preProcessUpdateAAIVfModuleStatus")
+               logger.trace("COMPLETED preProcessUpdateAAIVfModuleStatus")
 
        }
 
@@ -1529,9 +1601,9 @@ public class DoCreateVfModule extends VfModuleBase {
                        'execution=' + execution.getId() +
                        ')'
 
-               msoLogger.trace('Entered ' + method)
+               logger.trace('Entered ' + method)
                execution.setVariable("prefix", Prefix)
-               msoLogger.trace("STARTED preProcessUpdateAAIVfModuleRequestGroup")
+               logger.trace("STARTED preProcessUpdateAAIVfModuleRequestGroup")
 
                try{
 
@@ -1541,32 +1613,34 @@ public class DoCreateVfModule extends VfModuleBase {
 
                        updateAAIVfModuleRequest = utils.formatXml(updateAAIVfModuleRequest)
                        execution.setVariable("DCVFM_updateAAIVfModuleRequest", updateAAIVfModuleRequest)
-                       msoLogger.debug("Outgoing UpdateAAIVfModuleRequest is: \n" + updateAAIVfModuleRequest)
+                       logger.debug("Outgoing UpdateAAIVfModuleRequest is: \n" + updateAAIVfModuleRequest)
 
                }catch(Exception e){
-                       msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing preProcessUpdateAAIVfModuleRequestGroup", "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+                       logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+                                       "Exception Occured Processing preProcessUpdateAAIVfModuleRequestGroup", "BPMN",
+                                       ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
                        exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during preProcessUpdateAAIVfModuleRequestGroup Method:\n" + e.getMessage())
                }
-               msoLogger.trace("COMPLETED  preProcessUpdateAAIVfModuleRequestGroup")
+               logger.trace("COMPLETED  preProcessUpdateAAIVfModuleRequestGroup")
 
        }
 
        public void validateSDNCResponse(DelegateExecution execution, String response, String method){
 
                execution.setVariable("prefix",Prefix)
-               msoLogger.debug("STARTED ValidateSDNCResponse Process")
+               logger.debug("STARTED ValidateSDNCResponse Process")
 
                WorkflowException workflowException = execution.getVariable("WorkflowException")
                boolean successIndicator = execution.getVariable("SDNCA_SuccessIndicator")
 
-               msoLogger.debug("workflowException: " + workflowException)
+               logger.debug("workflowException: " + workflowException)
 
-               SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils(this)
+               SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
                sdncAdapterUtils.validateSDNCResponse(execution, response, workflowException, successIndicator)
 
                String sdncResponse = response
                if(execution.getVariable(Prefix + 'sdncResponseSuccess') == true){
-                       msoLogger.debug("Received a Good Response from SDNC Adapter for " + method + " SDNC Call.  Response is: \n" + sdncResponse)
+                       logger.debug("Received a Good Response from SDNC Adapter for " + method + " SDNC Call.  Response is: \n" + sdncResponse)
                        RollbackData rollbackData = execution.getVariable("rollbackData")
 
                        if(method.equals("assign")){
@@ -1578,19 +1652,19 @@ public class DoCreateVfModule extends VfModuleBase {
                        }
                        execution.setVariable("rollbackData", rollbackData)
                }else{
-                       msoLogger.debug("Received a BAD Response from SDNC Adapter for " + method + " SDNC Call.")
+                       logger.debug("Received a BAD Response from SDNC Adapter for " + method + " SDNC Call.")
                        throw new BpmnError("MSOWorkflowException")
                }
-               msoLogger.trace("COMPLETED ValidateSDNCResponse Process")
+               logger.trace("COMPLETED ValidateSDNCResponse Process")
        }
 
        public void preProcessUpdateAfterCreateRequest(DelegateExecution execution){
 
                execution.setVariable("prefix", Prefix)
-               msoLogger.trace("STARTED preProcessRequest Process")
+               logger.trace("STARTED preProcessRequest Process")
                try{
                        String response = execution.getVariable("DCVFM_assignSDNCAdapterResponse")
-                       msoLogger.debug("DCVFM_assignSDNCAdapterResponse: " + response)
+                       logger.debug("DCVFM_assignSDNCAdapterResponse: " + response)
 
                        String data = utils.getNodeXml(response, "response-data")
                        String vnfId = utils.getNodeText(data, "vnf-id")
@@ -1602,7 +1676,7 @@ public class DoCreateVfModule extends VfModuleBase {
 
                        String serviceOperation = "/VNF-API:vnfs/vnf-list/" + vnfId
                        def callbackUrl = execution.getVariable("DCVFM_sdncCallbackUrl")
-                       msoLogger.debug("callbackUrl: " + callbackUrl)
+                       logger.debug("callbackUrl: " + callbackUrl)
 
                        String SDNCGetRequest =
                                        """<sdncadapterworkflow:SDNCAdapterWorkflowRequest xmlns:ns5="http://org.onap/so/request/types/v1"
@@ -1619,13 +1693,15 @@ public class DoCreateVfModule extends VfModuleBase {
                                </sdncadapterworkflow:SDNCAdapterWorkflowRequest>"""
 
                        execution.setVariable("DCVFM_getSDNCRequest", SDNCGetRequest)
-                       msoLogger.debug("Outgoing GetSDNCRequest is: \n" + SDNCGetRequest)
+                       logger.debug("Outgoing GetSDNCRequest is: \n" + SDNCGetRequest)
 
                }catch(Exception e){
-                       msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Exception Occured Processing preProcessSDNCGetRequest", "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+                       logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+                                       "Exception Occured Processing preProcessSDNCGetRequest", "BPMN",
+                                       ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
                        exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during prepareProvision Method:\n" + e.getMessage())
                }
-               msoLogger.trace("COMPLETED preProcessSDNCGetRequest Process")
+               logger.trace("COMPLETED preProcessSDNCGetRequest Process")
        }
 
        public String buildUpdateAAIVfModuleRequest(DelegateExecution execution, boolean updateVolumeGroupId,
@@ -1662,7 +1738,7 @@ public class DoCreateVfModule extends VfModuleBase {
                                ${contrailFqdnString}
                        </UpdateAAIVfModuleRequest>"""
 
-       msoLogger.trace("updateAAIVfModule Request: " + updateAAIVfModuleRequest)
+       logger.trace("updateAAIVfModule Request: " + updateAAIVfModuleRequest)
        return updateAAIVfModuleRequest
 
        }
@@ -1711,7 +1787,7 @@ public class DoCreateVfModule extends VfModuleBase {
    public void queryCloudRegion (DelegateExecution execution) {
 
                execution.setVariable("prefix", Prefix)
-               msoLogger.trace("STARTED queryCloudRegion")
+               logger.trace("STARTED queryCloudRegion")
 
                try {
                        String cloudRegion = execution.getVariable("DCVFM_cloudSiteId")
@@ -1735,19 +1811,23 @@ public class DoCreateVfModule extends VfModuleBase {
                                execution.setVariable("DCVFM_isCloudRegionGood", true)
                        } else {
                                String errorMessage = "AAI Query Cloud Region Unsuccessful. AAI Response Code: " + execution.getVariable("DCVFM_queryCloudRegionReturnCode")
-                               msoLogger.debug(errorMessage)
+                               logger.debug(errorMessage)
                                exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
                                execution.setVariable("DCVFM_isCloudRegionGood", false)
                        }
-                       msoLogger.debug(" is Cloud Region Good: " + execution.getVariable("DCVFM_isCloudRegionGood"))
+                       logger.debug(" is Cloud Region Good: " + execution.getVariable("DCVFM_isCloudRegionGood"))
 
                } catch(BpmnError b){
-                       msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "Rethrowing MSOWorkflowException", "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + b.getMessage());
+                       logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+                                       "Rethrowing MSOWorkflowException", "BPMN",
+                                       ErrorCode.UnknownError.getValue(), "Exception is:\n" + b.getMessage());
                        throw b
                }catch (Exception ex) {
                        // try error
                        String errorMessage = "Bpmn error encountered in CreateVfModule flow. Unexpected Response from AAI - " + ex.getMessage()
-                       msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, "AAI Query Cloud Region Failed "+errorMessage, "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + ex);
+                       logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+                                       "AAI Query Cloud Region Failed " + errorMessage, "BPMN",
+                                       ErrorCode.UnknownError.getValue(), "Exception is:\n" + ex);
                        exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception occured during queryCloudRegion method")
                }
        }
@@ -1762,17 +1842,17 @@ public class DoCreateVfModule extends VfModuleBase {
 
           execution.setVariable("prefix",Prefix)
           try{
-                  msoLogger.debug("Caught a BPMN Exception")
-                  msoLogger.debug("Started processBPMNException Method")
-                  msoLogger.debug("Variables List: " + execution.getVariables())
+                  logger.debug("Caught a BPMN Exception")
+                  logger.debug("Started processBPMNException Method")
+                  logger.debug("Variables List: " + execution.getVariables())
                   if(execution.getVariable("WorkflowException") == null){
                           exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception occured during DoCreateVfModule Sub Process")
                   }
 
           }catch(Exception e){
-                  msoLogger.debug("Caught Exception during processBPMNException Method: " + e)
+                  logger.debug("Caught Exception during processBPMNException Method: " + e)
           }
-          msoLogger.debug("Completed processBPMNException Method")
+          logger.debug("Completed processBPMNException Method")
    }
 
    public void prepareCreateAAIVfModuleVolumeGroupRequest(DelegateExecution execution) {
@@ -1780,9 +1860,9 @@ public class DoCreateVfModule extends VfModuleBase {
                        'execution=' + execution.getId() +
                        ')'
 
-               msoLogger.trace('Entered ' + method)
+               logger.trace('Entered ' + method)
                execution.setVariable("prefix", Prefix)
-               msoLogger.trace("STARTED prepareCreateAAIVfModuleVolumeGroupRequest")
+               logger.trace("STARTED prepareCreateAAIVfModuleVolumeGroupRequest")
 
                try{
 
@@ -1805,13 +1885,15 @@ public class DoCreateVfModule extends VfModuleBase {
 
                        createAAIVfModuleVolumeGroupRequest = utils.formatXml(createAAIVfModuleVolumeGroupRequest)
                        execution.setVariable("DCVFM_createAAIVfModuleVolumeGroupRequest", createAAIVfModuleVolumeGroupRequest)
-                       msoLogger.debug("Outgoing CreateAAIVfModuleVolumeGroupRequest is: \n" + createAAIVfModuleVolumeGroupRequest)
+                       logger.debug("Outgoing CreateAAIVfModuleVolumeGroupRequest is: \n" + createAAIVfModuleVolumeGroupRequest)
 
                }catch(Exception e){
-                       msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Exception Occured Processing prepareCreateAAIVfModuleVolumeGroupRequest', "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+                       logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+                                       'Exception Occured Processing prepareCreateAAIVfModuleVolumeGroupRequest', "BPMN",
+                                       ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
                        exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during prepareCreateAAIVfModuleVolumeGroupRequest Method:\n" + e.getMessage())
                }
-               msoLogger.trace("COMPLETED  prepareCreateAAIVfModuleVolumeGroupRequest")
+               logger.trace("COMPLETED  prepareCreateAAIVfModuleVolumeGroupRequest")
 
        }
 
@@ -1820,9 +1902,9 @@ public class DoCreateVfModule extends VfModuleBase {
           'execution=' + execution.getId() +
           ')'
 
-          msoLogger.trace('Entered ' + method)
+          logger.trace('Entered ' + method)
           execution.setVariable("prefix", Prefix)
-          msoLogger.trace("STARTED createNetworkPoliciesInAAI")
+          logger.trace("STARTED createNetworkPoliciesInAAI")
 
           try {
                   // get variables
@@ -1831,7 +1913,7 @@ public class DoCreateVfModule extends VfModuleBase {
                   def rollbackData = execution.getVariable("rollbackData")
 
                   execution.setVariable("DCVFM_networkPolicyFqdnCount", fqdnCount)
-                  msoLogger.debug("DCVFM_networkPolicyFqdnCount - " + fqdnCount)
+                  logger.debug("DCVFM_networkPolicyFqdnCount - " + fqdnCount)
 
                   AaiUtil aaiUriUtil = new AaiUtil(this)
 
@@ -1852,75 +1934,41 @@ public class DoCreateVfModule extends VfModuleBase {
 
                                        if (resourceClient.exists(uri)) {
 
-                                               msoLogger.debug(" QueryAAINetworkPolicyByFQDN Success REST Response, , NetworkPolicy #" + counting)
+                                               logger.debug(" QueryAAINetworkPolicyByFQDN Success REST Response, , NetworkPolicy #" + counting)
 
                                        } else {
                                                // This network policy FQDN is not in AAI yet. Add it now
-                                               msoLogger.debug("This network policy FQDN is not in AAI yet: " + fqdn)
+                                               logger.debug("This network policy FQDN is not in AAI yet: " + fqdn)
                                                // Add the network policy with this FQDN to AAI
                                                def networkPolicyId = UUID.randomUUID().toString()
-                                               msoLogger.debug("Adding network-policy with network-policy-id " + networkPolicyId)
-
-                                               String aaiNamespace = aaiUriUtil.getNamespace()
-                                               msoLogger.debug('AAI namespace is: ' + aaiNamespace)
-                                               String payload = """<network-policy xmlns="${aaiNamespace}">
-                                                               <network-policy-id>${MsoUtils.xmlEscape(networkPolicyId)}</network-policy-id>
-                                                               <network-policy-fqdn>${MsoUtils.xmlEscape(fqdn)}</network-policy-fqdn>
-                                                               <heat-stack-id>${MsoUtils.xmlEscape(execution.getVariable("DCVFM_heatStackId"))}</heat-stack-id>
-                                                               </network-policy>""" as String
-
-                                               execution.setVariable("DCVFM_addNetworkPolicyAAIRequestBody", payload)
-
-                                               AAIResourceUri addUri = AAIUriFactory.createResourceUri(AAIObjectType.NETWORK_POLICY, networkPolicyId)
-                                               String addNetworkPolicyAAIRequest = aaiUriUtil.createAaiUri(addUri)
-
-                                               msoLogger.debug("AAI request endpoint: " + addNetworkPolicyAAIRequest)
-
-                                               def aaiRequestIdPut = UUID.randomUUID().toString()
-                                               RESTConfig configPut = new RESTConfig(addNetworkPolicyAAIRequest);
-                                               RESTClient clientPut = new RESTClient(configPut).addHeader("X-TransactionId", aaiRequestIdPut)
-                                                               .addHeader("X-FromAppId", "MSO")
-                                                               .addHeader("Content-Type", "application/xml")
-                                                               .addHeader("Accept","application/xml");
-                                               msoLogger.debug("invoking PUT call to AAI with payload:"+System.lineSeparator()+payload)
-                                               APIResponse responsePut = clientPut.httpPut(payload)
-                                               int returnCodePut = responsePut.getStatusCode()
-                                               execution.setVariable("DCVFM_aaiAddNetworkPolicyReturnCode", returnCodePut)
-                                               msoLogger.debug(" ***** AAI add network policy Response Code, NetworkPolicy #" + counting + " : " + returnCodePut)
-
-                                               String aaiResponseAsStringPut = responsePut.getResponseBodyAsString()
-                                               if (isOneOf(returnCodePut, 200, 201)) {
-                                                       msoLogger.debug("The return code from adding network policy is: "  + returnCodePut)
-                                                       // This network policy was created in AAI successfully
-                                                       execution.setVariable("DCVFM_addNetworkPolicyAAIResponse", aaiResponseAsStringPut)
-                                                       msoLogger.debug(" AddAAINetworkPolicy Success REST Response, , NetworkPolicy #" + counting + " : " + "\n" + aaiResponseAsStringPut)
-                                                       rollbackData.put("VFMODULE", "rollbackCreateNetworkPoliciesAAI", "true")
-                                                       rollbackData.put("VFMODULE", "contrailNetworkPolicyFqdn" + i, fqdn)
-                                                       execution.setVariable("rollbackData", rollbackData)
-
-                                               } else {
-                                                       // aai all errors
-                                                       String putErrorMessage = "Unable to add network-policy to AAI createNetworkPoliciesInAAI - " + returnCodePut
-                                                       msoLogger.debug(putErrorMessage)
-                                                       exceptionUtil.buildAndThrowWorkflowException(execution, 2500, putErrorMessage)
-                                               }
-
+                                               logger.debug("Adding network-policy with network-policy-id " + networkPolicyId)
+
+                                               NetworkPolicy policy = new NetworkPolicy()
+                                               policy.setNetworkPolicyId(networkPolicyId)
+                                               policy.setNetworkPolicyFqdn(fqdn)
+                                               policy.setHeatStackId(execution.getVariable("DCVFM_heatStackId"))
+                                               
+                                               AAIResourceUri netUri = AAIUriFactory.createResourceUri(AAIObjectType.NETWORK_POLICY, networkPolicyId)
+                                               resourceClient.create(netUri, policy)
+
+                                               rollbackData.put("VFMODULE", "rollbackCreateNetworkPoliciesAAI", "true")
+                                               rollbackData.put("VFMODULE", "contrailNetworkPolicyFqdn" + i, fqdn)
+                                               execution.setVariable("rollbackData", rollbackData)
                                        }
 
                                } // end loop
 
 
                   } else {
-                          msoLogger.debug("No contrail network policies to query/create")
+                          logger.debug("No contrail network policies to query/create")
 
                   }
 
           } catch (BpmnError e) {
                   throw e;
-
           } catch (Exception ex) {
                   String exceptionMessage = "Bpmn error encountered in DoCreateVfModule flow. createNetworkPoliciesInAAI() - " + ex.getMessage()
-                  msoLogger.debug(exceptionMessage)
+                  logger.debug(exceptionMessage)
                   exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
           }
 
@@ -1936,7 +1984,7 @@ public class DoCreateVfModule extends VfModuleBase {
                   'execution=' + execution.getId() +
                   ')'
 
-          msoLogger.trace('Entered ' + method)
+          logger.trace('Entered ' + method)
 
           try {
                   def rollbackData = execution.getVariable("rollbackData")
@@ -1966,14 +2014,16 @@ public class DoCreateVfModule extends VfModuleBase {
                                """
                           updateAAIGenericVnfRequest = utils.formatXml(updateAAIGenericVnfRequest)
                           execution.setVariable('DCVM_updateAAIGenericVnfRequest', updateAAIGenericVnfRequest)
-                          msoLogger.debug('Request for UpdateAAIGenericVnf:\n' + updateAAIGenericVnfRequest)
+                          logger.debug('Request for UpdateAAIGenericVnf:\n' + updateAAIGenericVnfRequest)
 
 
-                  msoLogger.trace('Exited ' + method)
+                  logger.trace('Exited ' + method)
           } catch (BpmnError e) {
                   throw e;
           } catch (Exception e) {
-                  msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, " Exception Encountered in " + method, "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+                  logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+                                  "Exception Encountered in " + method, "BPMN",
+                                  ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
 
                   exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepUpdateAAIGenericVnf(): ' + e.getMessage())
           }
@@ -1989,7 +2039,7 @@ public class DoCreateVfModule extends VfModuleBase {
                   'execution=' + execution.getId() +
                   ')'
 
-          msoLogger.trace('Entered ' + method)
+          logger.trace('Entered ' + method)
 
           try {
                   def rollbackData = execution.getVariable("rollbackData")
@@ -2012,11 +2062,13 @@ public class DoCreateVfModule extends VfModuleBase {
 
                   execution.setVariable("rollbackData", rollbackData)
 
-                  msoLogger.trace('Exited ' + method)
+                  logger.trace('Exited ' + method)
           } catch (BpmnError e) {
                   throw e;
           } catch (Exception e) {
-                       msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+                  logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+                                  'Caught exception in ' + method, "BPMN",
+                                  ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
                   exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in postProcessUpdateAAIGenericVnf(): ' + e.getMessage())
           }
    }
@@ -2024,22 +2076,22 @@ public class DoCreateVfModule extends VfModuleBase {
    public void queryCatalogDB (DelegateExecution execution) {
 
           String msg = ""
-          msoLogger.trace("queryCatalogDB ")
+          logger.trace("queryCatalogDB ")
 
           try {
                   boolean twoPhaseDesign = false
                   // check for input
 
                   String vfModuleModelName = execution.getVariable("DCVFM_vfModuleModelName")
-                  msoLogger.debug("vfModuleModelName: " + vfModuleModelName)
+                  logger.debug("vfModuleModelName: " + vfModuleModelName)
                   def vnfModelInfo = execution.getVariable("vnfModelInfo")
                   def vnfModelCustomizationUuid = jsonUtil.getJsonValue(vnfModelInfo, "modelCustomizationUuid")
 
-                  msoLogger.debug("vnfModelCustomizationUuid: " + vnfModelCustomizationUuid)
+                  logger.debug("vnfModelCustomizationUuid: " + vnfModelCustomizationUuid)
 
-                  JSONArray vnfs = catalog.getAllVnfsByVnfModelCustomizationUuid(execution, vnfModelCustomizationUuid, "v2")
+                  JSONArray vnfs = catalogDbUtils.getAllVnfsByVnfModelCustomizationUuid(execution, vnfModelCustomizationUuid, "v2")
 
-                  msoLogger.debug("Incoming Query Catalog DB for Vnf Response is: " + vnfModelCustomizationUuid)
+                  logger.debug("Incoming Query Catalog DB for Vnf Response is: " + vnfModelCustomizationUuid)
                   // Only one match here
                   if (vnfs != null) {
                           JSONObject vnfObject = vnfs.get(0)
@@ -2052,7 +2104,7 @@ public class DoCreateVfModule extends VfModuleBase {
                                   // Get multiStageDesign flag
 
                                   String multiStageDesignValue = vnf.getMultiStageDesign()
-                                  msoLogger.debug("multiStageDesign value from Catalog DB is: " + multiStageDesignValue)
+                                  logger.debug("multiStageDesign value from Catalog DB is: " + multiStageDesignValue)
                                   if (multiStageDesignValue != null) {
                                           if (multiStageDesignValue.equalsIgnoreCase("true")) {
                                                        twoPhaseDesign = true
@@ -2061,13 +2113,15 @@ public class DoCreateVfModule extends VfModuleBase {
                           }
                   }
 
-                  msoLogger.debug("setting twoPhaseDesign flag to: " + twoPhaseDesign)
+                  logger.debug("setting twoPhaseDesign flag to: " + twoPhaseDesign)
 
                   execution.setVariable("DCVFM_twoPhaseDesign", twoPhaseDesign)
           } catch (BpmnError e) {
                   throw e;
           } catch (Exception e) {
-                       msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, 'Caught exception in queryCatalogDB', "BPMN", MsoLogger.getServiceName(),MsoLogger.ErrorCode.UnknownError, "Exception is:\n" + e);
+                  logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+                                  'Caught exception in queryCatalogDB', "BPMN",
+                                  ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
                   exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in queryCatalogDB(): ' + e.getMessage())
           }
    }
@@ -2075,44 +2129,44 @@ public class DoCreateVfModule extends VfModuleBase {
 
    public void preProcessRollback (DelegateExecution execution) {
 
-          msoLogger.trace("preProcessRollback")
+          logger.trace("preProcessRollback")
           try {
 
                   Object workflowException = execution.getVariable("WorkflowException");
 
                   if (workflowException instanceof WorkflowException) {
-                          msoLogger.debug("Prev workflowException: " + workflowException.getErrorMessage())
+                          logger.debug("Prev workflowException: " + workflowException.getErrorMessage())
                           execution.setVariable("prevWorkflowException", workflowException);
                           //execution.setVariable("WorkflowException", null);
                   }
           } catch (BpmnError e) {
-                  msoLogger.debug("BPMN Error during preProcessRollback")
+                  logger.debug("BPMN Error during preProcessRollback")
           } catch(Exception ex) {
                   String msg = "Exception in preProcessRollback. " + ex.getMessage()
-                  msoLogger.debug(msg)
+                  logger.debug(msg)
           }
-          msoLogger.trace("Exit preProcessRollback")
+          logger.trace("Exit preProcessRollback")
    }
 
    public void postProcessRollback (DelegateExecution execution) {
 
-          msoLogger.trace("postProcessRollback")
+          logger.trace("postProcessRollback")
           String msg = ""
           try {
                   Object workflowException = execution.getVariable("prevWorkflowException");
                   if (workflowException instanceof WorkflowException) {
-                          msoLogger.debug("Setting prevException to WorkflowException: ")
+                          logger.debug("Setting prevException to WorkflowException: ")
                           execution.setVariable("WorkflowException", workflowException);
                   }
                   execution.setVariable("rollbackData", null)
           } catch (BpmnError b) {
-                  msoLogger.debug("BPMN Error during postProcessRollback")
+                  logger.debug("BPMN Error during postProcessRollback")
                   throw b;
           } catch(Exception ex) {
                   msg = "Exception in postProcessRollback. " + ex.getMessage()
-                  msoLogger.debug(msg)
+                  logger.debug(msg)
           }
-          msoLogger.trace("Exit postProcessRollback")
+          logger.trace("Exit postProcessRollback")
    }
 
 }