diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy
index 4233147..3d62a6c 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy
@@ -31,6 +31,7 @@
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
 import org.onap.so.bpmn.common.scripts.MsoUtils
 import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
+import org.onap.so.bpmn.core.domain.ModelInfo
 import org.onap.so.bpmn.core.json.JsonUtils
 import org.onap.so.bpmn.core.UrnPropertiesReader
 import org.slf4j.Logger
@@ -80,45 +81,14 @@
                 //the operationType from worflow(first node) is highest priority.
                 operationType = jsonUtil.getJsonValue(recipeParamsFromWf, "operationType")
             }
-
-
-            // TODO: based on the resource type decide action and operation type
-            String sdnc_svcAction = "deactivate"
-            switch (resourceInputObj.getResourceModelInfo().getModelName()) {
-                case ~/[\w\s\W]*SOTNConnectivity[\w\s\W]*/ :
-                    operationType = "SOTNConnectivity"
-                    break
-
-                case ~/[\w\s\W]*sotnvpnattachment[\w\s\W]*/ :
-                    operationType = "SOTNAttachment"
-                    break
-
-                case ~/[\w\s\W]*SiteVF[\w\s\W]*/ :
-                    operationType = "Site"
-                    break
-
-                case ~/[\w\s\W]*deviceVF[\w\s\W]*/ :
-                    operationType = "SDWANDevice"
-                    execution.setVariable("isActivateRequired", "true")
-                    break
-
-                case ~/[\w\s\W]*SDWANConnectivity[\w\s\W]*/ :
-                    operationType = "SDWANConnectivity"
-                    break
-
-                case ~/[\w\s\W]*sdwanvpnattachment[\w\s\W]*/ :
-                    operationType = "SDWANAttachment"
-                    break
-
-                case ~/[\w\s\W]*SiteWANVF[\w\s\W]*/ :
-                    operationType = "SDWANPort"
-                    execution.setVariable("isActivateRequired", "true")
-                    break
-
-                default:
-                    break
+            String operationTypeFromConfig = UrnPropertiesReader.getVariable("resource-config." + resourceInputObj.resourceModelInfo.getModelName() + ".operation-type")
+            if (StringUtils.isNotEmpty(operationTypeFromConfig)) {
+                // highest priority if operation type configured
+                operationType = operationTypeFromConfig
             }
 
+            // based on the resource type decide action and operation type
+            String sdnc_svcAction = "deactivate"
             String sdnc_requestAction = StringUtils.capitalize(sdnc_svcAction) + operationType +"Instance"
             execution.setVariable(Prefix + "svcAction", sdnc_svcAction)
             execution.setVariable(Prefix + "requestAction", sdnc_requestAction)
@@ -161,13 +131,12 @@
             String modelName = resourceInputObj.getResourceModelInfo().getModelName()
             String modelVersion = resourceInputObj.getResourceModelInfo().getModelVersion()
             String resourceInstnaceId = resourceInputObj.getResourceInstancenUuid()
+            String modelType = resourceInputObj.getResourceModelInfo().getModelType()
             // 1. prepare assign topology via SDNC Adapter SUBFLOW call
             String sdncTopologyDeleteRequest = ""
 
-            switch (modelName) {
-                case ~/[\w\s\W]*deviceVF[\w\s\W]*/ :
-                case ~/[\w\s\W]*SiteWANVF[\w\s\W]*/ :
-                case ~/[\w\s\W]*SiteVF[\w\s\W]*/:
+            switch (modelType) {
+                case "VNF" :
                     sdncTopologyDeleteRequest = """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
                                                               xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1" 
                                                               xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
@@ -224,8 +193,17 @@
                              </aetgt:SDNCAdapterWorkflowRequest>""".trim()
                     break
 
-                case ~/[\w\s\W]*sdwanvpnattachment[\w\s\W]*/ :
-                case ~/[\w\s\W]*sotnvpnattachment[\w\s\W]*/ :
+                case "GROUP" :
+                    //When a new resource creation request reaches SO, the parent resources information needs to be provided
+                    //while creating the child resource.
+                    String vnfid = resourceInputObj.getVnfId()
+                    ModelInfo vfModelInfo = resourceInputObj.getVfModelInfo()
+                    String vnfmodelInvariantUuid = vfModelInfo.getModelInvariantUuid()
+                    String vnfmodelCustomizationUuid = vfModelInfo.getModelCustomizationUuid()
+                    String vnfmodelUuid = vfModelInfo.getModelUuid()
+                    String vnfmodelVersion = vfModelInfo.getModelVersion()
+                    String vnfmodelName = vfModelInfo.getModelName()
+
                     sdncTopologyDeleteRequest = """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
                                                               xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1" 
                                                               xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
@@ -233,7 +211,7 @@
                                     <sdncadapter:RequestId>${msoUtils.xmlEscape(hdrRequestId)}</sdncadapter:RequestId>
                                     <sdncadapter:SvcInstanceId>${msoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
                                     <sdncadapter:SvcAction>${msoUtils.xmlEscape(sdnc_svcAction)}</sdncadapter:SvcAction>
-                                    <sdncadapter:SvcOperation>connection-attachment-topology-operation</sdncadapter:SvcOperation>
+                                    <sdncadapter:SvcOperation>vf-module-topology-operation</sdncadapter:SvcOperation>
                                     <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
                                     <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
                                  </sdncadapter:RequestHeader>
@@ -257,26 +235,40 @@
                                         </onap-model-information>
                                         <service-instance-id>${msoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
                                         <global-customer-id>${msoUtils.xmlEscape(globalCustomerId)}</global-customer-id>
-                                        <subscriber-name></subscriber-name>
+                                        <subscriber-name>${msoUtils.xmlEscape(globalCustomerId)}</subscriber-name>
                                      </service-information>
-                                     <allotted-resource-information>
-                                        <allotted-resource-id>$resourceInstnaceId</allotted-resource-id>
-                                        <allotted-resource-type></allotted-resource-type>
-                                        <parent-service-instance-id></parent-service-instance-id>
-                                        <onap-model-information>
-                                             <model-invariant-uuid>${msoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-uuid>
-                                             <model-customization-uuid>${msoUtils.xmlEscape(modelCustomizationUuid)}</model-customization-uuid>
-                                             <model-uuid>${msoUtils.xmlEscape(modelUuid)}</model-uuid>
-                                             <model-version>${msoUtils.xmlEscape(modelVersion)}</model-version>
-                                             <model-name>${msoUtils.xmlEscape(modelName)}</model-name>
-                                        </onap-model-information>
-                                     </allotted-resource-information>
-                                     <connection-attachment-request-input>
-                                     </connection-attachment-request-input>
+                                     <vnf-information>
+                                      <vnf-id>$vnfid</vnf-id>
+                                      <vnf-type></vnf-type>
+                                      <onap-model-information>
+                                        <model-invariant-uuid>${msoUtils.xmlEscape(vnfmodelInvariantUuid)}</model-invariant-uuid>
+                                        <model-customization-uuid>${msoUtils.xmlEscape(vnfmodelCustomizationUuid)}</model-customization-uuid>
+                                        <model-uuid>${msoUtils.xmlEscape(vnfmodelUuid)}</model-uuid>
+                                        <model-version>${msoUtils.xmlEscape(vnfmodelVersion)}</model-version>
+                                        <model-name>${msoUtils.xmlEscape(vnfmodelName)}</model-name>
+                                      </onap-model-information>
+                                    </vnf-information>
+                                    <vf-module-information>
+                                      <vf-module-id>$resourceInstnaceId</vf-module-id>
+                                      <vf-module-type></vf-module-type>
+                                      <from-preload>false</from-preload>
+                                      <onap-model-information>
+                                        <model-invariant-uuid>${msoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-uuid>
+                                        <model-customization-uuid>${msoUtils.xmlEscape(modelCustomizationUuid)}</model-customization-uuid>
+                                        <model-uuid>${msoUtils.xmlEscape(modelUuid)}</model-uuid>
+                                        <model-version>${msoUtils.xmlEscape(modelVersion)}</model-version>
+                                        <model-name>${msoUtils.xmlEscape(modelName)}</model-name>
+                                      </onap-model-information>
+                                    </vf-module-information>
+                                    <vf-module-request-input>
+                                      <vf-module-input-parameters>
+                                      </vf-module-input-parameters>
+                                    </vf-module-request-input>
                                 </sdncadapterworkflow:SDNCRequestData>
                              </aetgt:SDNCAdapterWorkflowRequest>""".trim()
                     break
 
+                // for SDWANConnectivity and SOTNConnectivity:
                 default:
                     sdncTopologyDeleteRequest = """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
                                                               xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1" 
@@ -325,6 +317,7 @@
                                      </network-request-input>
                                 </sdncadapterworkflow:SDNCRequestData>
                              </aetgt:SDNCAdapterWorkflowRequest>""".trim()
+
             }
 
             String sdncTopologyDeleteRequesAsString = utils.formatXml(sdncTopologyDeleteRequest)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy
index 714348e..49f0e14 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy
@@ -31,6 +31,8 @@
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
 import org.onap.so.bpmn.common.scripts.MsoUtils
 import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
+import org.onap.so.bpmn.core.domain.ModelInfo
+import org.onap.so.bpmn.core.domain.ResourceType
 import org.onap.so.bpmn.core.json.JsonUtils
 import org.onap.so.bpmn.core.UrnPropertiesReader
 import org.slf4j.Logger
@@ -52,7 +54,7 @@
     JsonUtils jsonUtil = new JsonUtils()
 
     SDNCAdapterUtils sdncAdapterUtils = new SDNCAdapterUtils()
-    
+
     MsoUtils msoUtils = new MsoUtils()
 
     public void preProcessRequest(DelegateExecution execution){
@@ -84,62 +86,18 @@
                 //the operationType from worflow(first node) is highest priority.
                 operationType = jsonUtil.getJsonValue(recipeParamsFromWf, "operationType")
             }
+            String operationTypeFromConfig = UrnPropertiesReader.getVariable("resource-config." + resourceInputObj.resourceModelInfo.getModelName() + ".operation-type")
+            if (StringUtils.isNotEmpty(operationTypeFromConfig)) {
+                // highest priority if operation type configured
+                operationType = operationTypeFromConfig
+            }
 
 
             //For sdnc, generate svc_action and request_action
             String sdnc_svcAction = "delete"
-            switch (resourceInputObj.getResourceModelInfo().getModelName()) {
-
-                case ~/[\w\s\W]*overlay[\w\s\W]*/ :
-                    ///This will be resolved in R3.
-                    sdnc_svcAction ="deactivate"
-                    operationType = "NCINetwork"
-                    break
-
-                case ~/[\w\s\W]*underlay[\w\s\W]*/ :
-                    //This will be resolved in R3.
-                    operationType ="Network"
-                    break
-
-                case ~/[\w\s\W]*SOTNConnectivity[\w\s\W]*/ :
-                    operationType = "SOTNConnectivity"
-                    execution.setVariable("isActivateRequired", "true")
-                    break
-
-                case ~/[\w\s\W]*sotnvpnattachment[\w\s\W]*/ :
-                    operationType = "SOTNAttachment"
-                    execution.setVariable("isActivateRequired", "true")
-                    break
-
-                case ~/[\w\s\W]*SiteVF[\w\s\W]*/ :
-                    operationType = "Site"
-                    execution.setVariable("isActivateRequired", "true")
-                    break
-
-                case ~/[\w\s\W]*deviceVF[\w\s\W]*/ :
-                    operationType = "SDWANDevice"
-                    execution.setVariable("isActivateRequired", "true")
-                    break
-
-                case ~/[\w\s\W]*SDWANConnectivity[\w\s\W]*/ :
-                    operationType = "SDWANConnectivity"
-                    execution.setVariable("isActivateRequired", "true")
-                    break
-
-                case ~/[\w\s\W]*sdwanvpnattachment[\w\s\W]*/ :
-                    operationType = "SDWANAttachment"
-                    execution.setVariable("isActivateRequired", "true")
-                    break
-
-                case ~/[\w\s\W]*SiteWANVF[\w\s\W]*/ :
-                    operationType = "SDWANPort"
-                    execution.setVariable("isActivateRequired", "true")
-                    break
-
-                default:
-                    break
-            }
-            String sdnc_requestAction = StringUtils.capitalize(sdnc_svcAction) + operationType +"Instance"
+            String sdnc_requestAction = StringUtils.capitalize(sdnc_svcAction) + operationType + "Instance"
+            String isActivateRequired = UrnPropertiesReader.getVariable("resource-config." + resourceInputObj.resourceModelInfo.getModelName() + ".activation-required")
+            execution.setVariable("isActivateRequired", isActivateRequired)
             execution.setVariable(Prefix + "svcAction", sdnc_svcAction)
             execution.setVariable(Prefix + "requestAction", sdnc_requestAction)
             execution.setVariable(Prefix + "serviceInstanceId", resourceInputObj.getServiceInstanceId())
@@ -190,13 +148,13 @@
             String modelName = resourceInputObj.getResourceModelInfo().getModelName()
             String modelVersion = resourceInputObj.getResourceModelInfo().getModelVersion()
             String resourceInstnaceId = resourceInputObj.getResourceInstancenUuid()
+            String modelType = resourceInputObj.getResourceModelInfo().getModelType()
+
             // 1. prepare assign topology via SDNC Adapter SUBFLOW call
             String sdncTopologyDeleteRequest = ""
 
-            switch (modelName) {
-                case ~/[\w\s\W]*deviceVF[\w\s\W]*/ :
-                case ~/[\w\s\W]*SiteWANVF[\w\s\W]*/ :
-                case ~/[\w\s\W]*SiteVF[\w\s\W]*/:
+            switch (modelType) {
+                case "VNF":
                     sdncTopologyDeleteRequest = """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
                                                               xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1" 
                                                               xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
@@ -252,60 +210,82 @@
                                 </sdncadapterworkflow:SDNCRequestData>
                              </aetgt:SDNCAdapterWorkflowRequest>""".trim()
                     break
+                case "GROUP" :
+                    //When a new resource creation request reaches SO, the parent resources information needs to be provided
+                    //while creating the child resource.
+                    String vnfid = resourceInputObj.getVnfId()
+                    ModelInfo vfModelInfo = resourceInputObj.getVfModelInfo()
+                    String vnfmodelInvariantUuid = vfModelInfo.getModelInvariantUuid()
+                    String vnfmodelCustomizationUuid = vfModelInfo.getModelCustomizationUuid()
+                    String vnfmodelUuid = vfModelInfo.getModelUuid()
+                    String vnfmodelVersion = vfModelInfo.getModelVersion()
+                    String vnfmodelName = vfModelInfo.getModelName()
 
-                case ~/[\w\s\W]*sdwanvpnattachment[\w\s\W]*/ :
-                case ~/[\w\s\W]*sotnvpnattachment[\w\s\W]*/ :
-                    sdncTopologyDeleteRequest = """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
-                                                              xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1" 
-                                                              xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
-                                 <sdncadapter:RequestHeader>
+                    sdncTopologyDeleteRequest = """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1" 
+                                                        xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1" 
+                                                        xmlns:sdncadapterworkflow="http://org.onap/so/workflow/schema/v1">
+                                  <sdncadapter:RequestHeader>
                                     <sdncadapter:RequestId>${msoUtils.xmlEscape(hdrRequestId)}</sdncadapter:RequestId>
                                     <sdncadapter:SvcInstanceId>${msoUtils.xmlEscape(serviceInstanceId)}</sdncadapter:SvcInstanceId>
                                     <sdncadapter:SvcAction>${msoUtils.xmlEscape(sdnc_svcAction)}</sdncadapter:SvcAction>
-                                    <sdncadapter:SvcOperation>connection-attachment-topology-operation</sdncadapter:SvcOperation>
+                                    <sdncadapter:SvcOperation>vf-module-topology-operation</sdncadapter:SvcOperation>
                                     <sdncadapter:CallbackUrl>sdncCallback</sdncadapter:CallbackUrl>
                                     <sdncadapter:MsoAction>generic-resource</sdncadapter:MsoAction>
-                                 </sdncadapter:RequestHeader>
-                                 <sdncadapterworkflow:SDNCRequestData>
-                                     <request-information>
-                                        <request-id>${msoUtils.xmlEscape(hdrRequestId)}</request-id>
-                                        <request-action>${msoUtils.xmlEscape(sdnc_requestAction)}</request-action>
-                                        <source>${msoUtils.xmlEscape(source)}</source>
-                                        <notification-url></notification-url>
-                                        <order-number></order-number>
-                                        <order-version></order-version>
-                                     </request-information>
-                                     <service-information>
-                                        <service-id>${msoUtils.xmlEscape(serviceInstanceId)}</service-id>
-                                        <subscription-service-type>${msoUtils.xmlEscape(serviceType)}</subscription-service-type>
-                                        <onap-model-information>
-                                             <model-invariant-uuid>${msoUtils.xmlEscape(serviceModelInvariantUuid)}</model-invariant-uuid>
-                                             <model-uuid>${msoUtils.xmlEscape(serviceModelUuid)}</model-uuid>
-                                             <model-version>${msoUtils.xmlEscape(serviceModelVersion)}</model-version>
-                                             <model-name>${msoUtils.xmlEscape(serviceModelName)}</model-name>
-                                        </onap-model-information>
-                                        <service-instance-id>${msoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
-                                        <global-customer-id>${msoUtils.xmlEscape(globalCustomerId)}</global-customer-id>
-                                        <subscriber-name></subscriber-name>
-                                     </service-information>
-                                     <allotted-resource-information>
-                                        <allotted-resource-id>$resourceInstnaceId</allotted-resource-id>
-                                        <allotted-resource-type></allotted-resource-type>
-                                        <parent-service-instance-id></parent-service-instance-id>
-                                        <onap-model-information>
-                                             <model-invariant-uuid>${msoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-uuid>
-                                             <model-customization-uuid>${msoUtils.xmlEscape(modelCustomizationUuid)}</model-customization-uuid>
-                                             <model-uuid>${msoUtils.xmlEscape(modelUuid)}</model-uuid>
-                                             <model-version>${msoUtils.xmlEscape(modelVersion)}</model-version>
-                                             <model-name>${msoUtils.xmlEscape(modelName)}</model-name>
-                                        </onap-model-information>
-                                     </allotted-resource-information>
-                                     <connection-attachment-request-input>
-                                     </connection-attachment-request-input>
-                                </sdncadapterworkflow:SDNCRequestData>
-                             </aetgt:SDNCAdapterWorkflowRequest>""".trim()
+                                  </sdncadapter:RequestHeader>
+                                  <sdncadapterworkflow:SDNCRequestData>
+                                    <request-information>
+                                      <request-id>${msoUtils.xmlEscape(hdrRequestId)}</request-id>
+                                      <request-action>${msoUtils.xmlEscape(sdnc_requestAction)}</request-action>
+                                      <source>${msoUtils.xmlEscape(source)}</source>
+                                      <notification-url></notification-url>
+                                      <order-number></order-number>
+                                      <order-version></order-version>
+                                    </request-information>
+                                    <service-information>
+                                      <service-id>${msoUtils.xmlEscape(serviceInstanceId)}</service-id>
+                                      <subscription-service-type>${msoUtils.xmlEscape(serviceType)}</subscription-service-type>
+                                      <onap-model-information>
+                                        <model-invariant-uuid>${msoUtils.xmlEscape(serviceModelInvariantUuid)}</model-invariant-uuid>
+                                        <model-uuid>${msoUtils.xmlEscape(serviceModelUuid)}</model-uuid>
+                                        <model-version>${msoUtils.xmlEscape(serviceModelVersion)}</model-version>
+                                        <model-name>${msoUtils.xmlEscape(serviceModelName)}</model-name>
+                                      </onap-model-information>
+                                      <service-instance-id>${msoUtils.xmlEscape(serviceInstanceId)}</service-instance-id>
+                                      <global-customer-id>${msoUtils.xmlEscape(globalCustomerId)}</global-customer-id>
+                                      <subscriber-name>${msoUtils.xmlEscape(globalCustomerId)}</subscriber-name>
+                                    </service-information>
+                                    <vnf-information>
+                                      <vnf-id>$vnfid</vnf-id>
+                                      <vnf-type></vnf-type>
+                                      <onap-model-information>
+                                        <model-invariant-uuid>${msoUtils.xmlEscape(vnfmodelInvariantUuid)}</model-invariant-uuid>
+                                        <model-customization-uuid>${msoUtils.xmlEscape(vnfmodelCustomizationUuid)}</model-customization-uuid>
+                                        <model-uuid>${msoUtils.xmlEscape(vnfmodelUuid)}</model-uuid>
+                                        <model-version>${msoUtils.xmlEscape(vnfmodelVersion)}</model-version>
+                                        <model-name>${msoUtils.xmlEscape(vnfmodelName)}</model-name>
+                                      </onap-model-information>
+                                    </vnf-information>
+                                    <vf-module-information>
+                                      <vf-module-id>$resourceInstnaceId</vf-module-id>
+                                      <vf-module-type></vf-module-type>
+                                      <from-preload>false</from-preload>
+                                      <onap-model-information>
+                                        <model-invariant-uuid>${msoUtils.xmlEscape(modelInvariantUuid)}</model-invariant-uuid>
+                                        <model-customization-uuid>${msoUtils.xmlEscape(modelCustomizationUuid)}</model-customization-uuid>
+                                        <model-uuid>${msoUtils.xmlEscape(modelUuid)}</model-uuid>
+                                        <model-version>${msoUtils.xmlEscape(modelVersion)}</model-version>
+                                        <model-name>${msoUtils.xmlEscape(modelName)}</model-name>
+                                      </onap-model-information>
+                                    </vf-module-information>
+                                    <vf-module-request-input>
+                                      <vf-module-input-parameters>
+                                      </vf-module-input-parameters>
+                                    </vf-module-request-input>
+                                  </sdncadapterworkflow:SDNCRequestData>
+                                </aetgt:SDNCAdapterWorkflowRequest>""".trim()
                     break
 
+            // for SDWANConnectivity and SOTNConnectivity:
                 default:
                     sdncTopologyDeleteRequest = """<aetgt:SDNCAdapterWorkflowRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
                                                               xmlns:sdncadapter="http://org.onap.so/workflow/sdnc/adapter/schema/v1" 
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy
index 305e4f3..e24597a 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy
@@ -21,9 +21,11 @@
  */
 package org.onap.so.bpmn.infrastructure.scripts
 
+
 import groovy.json.JsonOutput
 import groovy.json.JsonSlurper
 import org.apache.commons.lang3.StringUtils
+import org.apache.commons.lang3.tuple.ImmutablePair
 import org.camunda.bpm.engine.delegate.BpmnError
 import org.camunda.bpm.engine.delegate.DelegateExecution
 import org.json.JSONArray
@@ -36,8 +38,12 @@
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
 import org.onap.so.bpmn.common.scripts.MsoUtils
 import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.bpmn.core.domain.GroupResource
 import org.onap.so.bpmn.core.domain.Resource
+import org.onap.so.bpmn.core.domain.ResourceType
 import org.onap.so.bpmn.core.domain.ServiceDecomposition
+import org.onap.so.bpmn.core.domain.VnfResource
+import org.onap.so.bpmn.core.domain.VnfcResource
 import org.onap.so.bpmn.core.json.JsonUtils
 import org.onap.so.client.HttpClient
 import org.onap.so.client.HttpClientFactory
@@ -253,6 +259,62 @@
         return jObj
     }
 
+    private Relationship getRelationShipFromNode(groovy.util.slurpersupport.Node relationshipNode) {
+        Relationship relationship = new Relationship()
+        def rtn = relationshipNode.childNodes()
+        List<RelationshipData> relationshipDatas = new ArrayList<>()
+        List<RelatedToProperty> relationshipProperties = new ArrayList<>()
+        while (rtn.hasNext()) {
+            groovy.util.slurpersupport.Node node = rtn.next()
+            def key = node.name()
+
+            if(key.equals("related-to")){
+                def rt = node.text()
+                relationship.setRelatedTo(rt)
+            } else if (key.equals("related-link")){
+                def rl = node.text()
+                relationship.setRelatedLink(rl)
+            } else if (key.equals("relationship-label")){
+                def label = node.text()
+                relationship.setRelationshipLabel(label)
+            } else if (key.equals("relationship-data")){
+                def rData = node.childNodes()
+                RelationshipData relationshipData = new RelationshipData()
+                while(rData.hasNext()){
+                    groovy.util.slurpersupport.Node datanode = rData.next()
+                    def dataKey = datanode.name()
+                    if(dataKey.equals("relationship-key")) {
+                        relationshipData.setRelationshipKey(datanode.text())
+                    } else if(dataKey.equals("relationship-value")) {
+                        relationshipData.setRelationshipValue(datanode.text())
+                    }
+                }
+                relationshipDatas.add(relationshipData)
+            } else if (key.equals("related-to-property")){
+                def rProperty = node.childNodes()
+                RelatedToProperty relationshipProperty = new RelatedToProperty()
+                while(rProperty.hasNext()){
+                    groovy.util.slurpersupport.Node propnode = rProperty.next()
+
+                    def dataKey = propnode.name()
+                    if(dataKey.equals("property-key")) {
+                        relationshipProperty.setPropertyKey(propnode.text())
+                    } else if(dataKey.equals("property-value")) {
+                        relationshipProperty.setPropertyValue(propnode.text())
+                    }
+
+                }
+                relationshipProperties.add(relationshipProperty)
+            }
+
+        }
+        relationship.getRelationshipData().addAll(relationshipDatas)
+        relationship.getRelatedToProperty().addAll(relationshipProperties)
+
+        logger.debug("Relationship related to Resource:" + relationship.toString())
+        return relationship
+    }
+
    public void getCurrentNS(DelegateExecution execution){
        logger.info( "======== Start getCurrentNS Process ======== ")
 
@@ -290,19 +352,31 @@
         }
     }
 
-	private void generateRelatedResourceInfo(String response, JSONObject jObj){
+	private void generateRelatedResourceInfo(String response, JSONObject jObj, boolean processRelationship){
 
 		def xml = new XmlSlurper().parseText(response)
 		def rtn = xml.childNodes()
 		while (rtn.hasNext()) {
 			groovy.util.slurpersupport.Node node = rtn.next()
 			def key = node.name()
-			def value = node.text()
-			jObj.put(key, value)
+            if (key.equals("relationship-list") && processRelationship) {
+                def relns = node.childNodes()
+                JSONArray jArray = new JSONArray()
+                while (relns.hasNext()) {
+                    groovy.util.slurpersupport.Node relNode = relns.next()
+                    Relationship relationship = getRelationShipFromNode(relNode)
+                    def relationObj = getRelationShipData(relationship)
+                    jArray.put(relationObj)
+                }
+                jObj.put(key, jArray)
+            } else {
+                def value = node.text()
+                jObj.put(key, value)
+            }
 		}
 	}
 
-	private JSONObject getRelatedResourceInAAI (DelegateExecution execution, JSONObject jObj)
+	private JSONObject getRelatedResourceInAAI (DelegateExecution execution, JSONObject jObj, boolean processRelationship)
 	{
 		logger.debug(" ***** Started getRelatedResourceInAAI *****")
 
@@ -330,7 +404,7 @@
 			execution.setVariable(Prefix + "SuccessIndicator", true)
 			execution.setVariable(Prefix + "FoundIndicator", true)
 
-			generateRelatedResourceInfo(aaiResponse, jObj)
+			generateRelatedResourceInfo(aaiResponse, jObj, processRelationship)
 
 			//get model-invariant-uuid and model-uuid
 			String modelInvariantId = ""
@@ -374,7 +448,7 @@
                 relationShipList = jsonSlurper.parseText(serviceRelationShip)
             }
 
-            List<Resource> deleteRealResourceList = new ArrayList<Resource>()
+            List<ImmutablePair<Resource, List<Resource>>> deleteRealResourceList = new ArrayList<ImmutablePair<Resource, List<Resource>>>()
 
             //Set the real resource instance id to the decomosed resource list
             //reset the resource instance id , because in the decompose flow ,its a random one.
@@ -382,21 +456,27 @@
             if (relationShipList != null) {
                 relationShipList.each {
 
-                    JSONObject obj = getRelatedResourceInAAI(execution, (JSONObject)it)
+                    JSONObject obj = getRelatedResourceInAAI(execution, (JSONObject)it, true)
 
                     for (Resource resource : deleteResourceList) {
 
-                        String modelName = resource.getModelInfo().getModelName()
+                        boolean matches = processMatchingResource(resource, obj)
+                        if((matches) && resource.getResourceType().equals(ResourceType.VNF))  {
+                            List<Resource> delGroupList = new ArrayList<Resource>()
+                            JSONArray vfRelationship = obj.getJSONArray("relationship-list")
+                            for (int idx = 0; idx < vfRelationship.length(); idx++) {
+                                JSONObject vfItem = vfRelationship.getJSONObject(idx)
+                                JSONObject groupObject = getRelatedResourceInAAI(execution, vfItem, false)
+                                List<GroupResource> groups = ((VnfResource)resource).getGroups()
+                                for (GroupResource group : groups){
+                                    if(processMatchingResource(group, groupObject)){
+                                        delGroupList.add(group)
+                                    }
+                                }
+                            }
+                            def delMap = new ImmutablePair(resource, delGroupList)
 
-                        String modelCustomizationUuid = resource.getModelInfo().getModelCustomizationUuid()
-                        if (StringUtils.containsIgnoreCase(obj.get("resourceType"), modelName)) {
-                            resource.setResourceId(obj.get("resourceInstanceId"))
-                            deleteRealResourceList.add(resource)
-                        }
-                        else if (modelCustomizationUuid.equals(obj.get("modelCustomizationId"))) {
-                            resource.setResourceId(obj.get("resourceInstanceId"))
-                            resource.setResourceInstanceName(obj.get("resourceType"))
-                            deleteRealResourceList.add(resource)
+                            deleteRealResourceList.add(delMap)
                         }
                     }
                 }
@@ -420,6 +500,24 @@
         logger.debug(" ***** exit postDecomposeService() of  delete generic e2e service flow ***** ")
     }
 
+    private boolean processMatchingResource(Resource resource, JSONObject obj) {
+        boolean matches = false
+        String modelName = resource.getModelInfo().getModelName()
+
+        String modelCustomizationUuid = resource.getModelInfo().getModelCustomizationUuid()
+        if (StringUtils.containsIgnoreCase(obj.get("resourceType"), modelName)) {
+            resource.setResourceId(obj.get("resourceInstanceId"))
+            //deleteRealResourceList.add(resource)
+            matches = true;
+        } else if (modelCustomizationUuid.equals(obj.get("modelCustomizationId"))) {
+            resource.setResourceId(obj.get("resourceInstanceId"))
+            resource.setResourceInstanceName(obj.get("resourceType"))
+            //deleteRealResourceList.add(resource)
+            matches = true;
+        }
+        return matches
+    }
+
     public void preInitResourcesOperStatus(DelegateExecution execution){
         logger.debug(" ======== STARTED preInitResourcesOperStatus Process ======== ")
         try{
@@ -436,11 +534,12 @@
             execution.setVariable("serviceInstanceId", serviceId)
             execution.setVariable("operationId", operationId)
             execution.setVariable("operationType", operationType)
-            List<Resource> deleteResourceList = execution.getVariable("deleteResourceList")
+            List<ImmutablePair<Resource, List<Resource>>> deleteResourceList = execution.getVariable("deleteResourceList")
 
             String serviceRelationShip = execution.getVariable("serviceRelationShip")
-            for(Resource resource : deleteResourceList){
-                    resourceTemplateUUIDs  = resourceTemplateUUIDs + resource.getModelInfo().getModelCustomizationUuid() + ":"
+            for (ImmutablePair rc : deleteResourceList) {
+                Resource resource = rc.getKey()
+                resourceTemplateUUIDs = resourceTemplateUUIDs + resource.getModelInfo().getModelCustomizationUuid() + ":"
             }
 
             def dbAdapterEndpoint = UrnPropertiesReader.getVariable("mso.adapters.openecomp.db.endpoint", execution)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy
index 616c654..0920206 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy
@@ -22,7 +22,12 @@
  */
 package org.onap.so.bpmn.infrastructure.scripts
 
+import org.apache.commons.lang3.tuple.ImmutablePair
+import org.onap.so.bpmn.common.resource.ResourceRequestBuilder
 import org.onap.so.bpmn.common.scripts.CatalogDbUtilsFactory
+import org.onap.so.bpmn.core.domain.GroupResource
+import org.onap.so.bpmn.core.domain.ModelInfo
+import org.onap.so.bpmn.core.domain.ResourceType
 
 import static org.apache.commons.lang3.StringUtils.isBlank
 
@@ -151,17 +156,61 @@
         List<Resource> wanResources = new ArrayList<Resource>()
 
         // get delete resource list and order list
-        List<Resource> delResourceList = execution.getVariable("deleteResourceList")
+        List<ImmutablePair<Resource, List<Resource>>> delResourceList = execution.getVariable("deleteResourceList")
 
         ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
         String serviceModelName = serviceDecomposition.getModelInfo().getModelName();
-        
+        String serviceModelUuid = serviceDecomposition.getModelInfo().getModelUuid();
+
+        Map<String, Map<String, Object>> parentVNF = new HashMap<>()
+
+        // get Sequence from properties
         def resourceSequence = BPMNProperties.getResourceSequenceProp(serviceModelName)
 
+        // get Sequence from catalog db csar(model)
+        if(resourceSequence == null) {
+            resourceSequence = ResourceRequestBuilder.getResourceSequence(serviceModelUuid)
+            logger.info("Get Sequence from catalog db csar : " + resourceSequence)
+        }
+
         if(resourceSequence != null) {
             for (resourceType in resourceSequence.reverse()) {
-                for (resource in delResourceList) {
+
+                boolean vfFound = false
+
+                for (ImmutablePair resourceTuple : delResourceList) {
+                    Resource resource = resourceTuple.getKey()
+                    List<Resource> groupResources = resourceTuple.getValue()
+
                     if (StringUtils.containsIgnoreCase(resource.getModelInfo().getModelName(), resourceType)) {
+
+
+
+                        // if resource type is vnfResource then check for groups also
+                        // Did not use continue because if same model type is used twice
+                        // then we would like to add it twice for processing
+                        // e.g.  S{ V1{G1, G2, G1}} --> S{ {G2, G1, G1}V1}
+                        // we will add in reverse order for deletion
+                        if (resource instanceof VnfResource) {
+                            if (resource.getGroupOrder() != null && !StringUtils.isEmpty(resource.getGroupOrder())) {
+                                String[] grpSequence = resource.getGroupOrder().split(",")
+
+                                Map<String, Object> parentVNFData = new HashMap<>()
+                                parentVNFData.put("vfModelInfo", resource.getModelInfo())
+                                parentVNFData.put("vnf-id", resource.getResourceId())
+
+                                for (String grpType in grpSequence.reverse()) {
+                                    for (GroupResource gResource in groupResources) {
+                                        if (StringUtils.containsIgnoreCase(gResource.getModelInfo().getModelName(), grpType)) {
+                                            sequencedResourceList.add(gResource)
+                                            // Store parent VNF info for the group resource id
+                                            parentVNF.put(gResource.getResourceId(), parentVNFData)
+                                        }
+                                    }
+                                }
+                            }
+                        }
+
                         sequencedResourceList.add(resource)
 
                         if (resource instanceof NetworkResource) {
@@ -173,11 +222,32 @@
         }else {
             //define sequenced resource list, we deploy vf first and then network and then ar
             //this is defaule sequence
+            // While deleting we will delete in resource order group resource, ar, network, then VF.
             List<VnfResource> vnfResourceList = new ArrayList<VnfResource>()
             List<AllottedResource> arResourceList = new ArrayList<AllottedResource>()
-            for (Resource rc : delResourceList) {
+            for (ImmutablePair resourceTuple : delResourceList) {
+                Resource rc = resourceTuple.getKey()
+                List<Resource> groupResources = resourceTuple.getValue()
+
                 if (rc instanceof VnfResource) {
                     vnfResourceList.add(rc)
+                    if (rc.getGroupOrder() != null && !StringUtils.isEmpty(rc.getGroupOrder())) {
+                        String[] grpSequence = rc.getGroupOrder().split(",")
+
+                        Map<String, Object> parentVNFData = new HashMap<>()
+                        parentVNFData.put("vfModelInfo", rc.getModelInfo())
+                        parentVNFData.put("vnf-id", rc.getResourceId())
+
+                        for (String grpType in grpSequence.reverse()) {
+                            for (GroupResource gResource in groupResources) {
+                                if (StringUtils.containsIgnoreCase(gResource.getModelInfo().getModelName(), grpType)) {
+                                    sequencedResourceList.add(gResource)
+                                    // Store parent VNF info for the group resource id
+                                    parentVNF.put(gResource.getResourceId(), parentVNFData)
+                                }
+                            }
+                        }
+                    }
                 } else if (rc instanceof NetworkResource) {
                 	wanResources.add(rc)
                 } else if (rc instanceof AllottedResource) {
@@ -199,6 +269,7 @@
         execution.setVariable("isContainsWanResource", isContainsWanResource)
         execution.setVariable("currentResourceIndex", 0)
         execution.setVariable("sequencedResourceList", sequencedResourceList)
+        execution.setVariable("parentVNF", parentVNF)
         logger.debug("resourceSequence: " + resourceSequence)
         logger.debug(" ======== END sequenceResource Process ======== ")
     }
@@ -262,6 +333,17 @@
             ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
             resourceInput.setServiceModelInfo(serviceDecomposition.getModelInfo());
             resourceInput.setServiceType(serviceType)
+            resourceInput.getResourceModelInfo().setModelType(currentResource.getResourceType().toString())
+            if (currentResource.getResourceType() == ResourceType.GROUP) {
+                Map<String, Map<String, Object>> parentVNF = execution.getVariable("parentVNF")
+                if((null != parentVNF) && (null!=parentVNF.get(currentResource.getResourceId()))){
+                    Map<String, Object> parentVNFData = parentVNF.get(currentResource.getResourceId())
+                    ModelInfo parentVNFModel = parentVNFData.get("vfModelInfo")
+                    String parentResourceId = parentVNFData.get("vnf-id")
+                    resourceInput.setVfModelInfo(parentVNFModel)
+                    resourceInput.setVnfId(parentResourceId)
+                }
+            }
 
             String recipeURL = BPMNProperties.getProperty("bpelURL", "http://mso:8080") + recipeUri
 
