diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
index d15be38..ef2388f 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
@@ -32,17 +32,20 @@
 import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
 import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
 import org.openecomp.mso.bpmn.common.scripts.SDNCAdapterUtils
+import org.openecomp.mso.bpmn.common.scripts.CatalogDbUtils;
 import org.openecomp.mso.bpmn.core.RollbackData
 import org.openecomp.mso.bpmn.core.WorkflowException
 import org.openecomp.mso.rest.APIResponse;
 import org.openecomp.mso.rest.RESTClient
 import org.openecomp.mso.rest.RESTConfig
 
+import java.util.List;
 import java.util.UUID;
 
 import org.camunda.bpm.engine.delegate.BpmnError
 import org.camunda.bpm.engine.runtime.Execution
 import org.json.JSONObject;
+import org.json.JSONArray;
 import org.apache.commons.lang3.*
 import org.apache.commons.codec.binary.Base64;
 import org.springframework.web.util.UriUtils;
@@ -77,6 +80,7 @@
 	String Prefix="DCRESI_"
 	ExceptionUtil exceptionUtil = new ExceptionUtil()
 	JsonUtils jsonUtil = new JsonUtils()
+	CatalogDbUtils cutils = new CatalogDbUtils()
 
 	public void preProcessRequest (Execution execution) {
 		def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
@@ -402,7 +406,7 @@
 	    String serviceInstanceName = execution.getVariable("serviceInstanceName")
 	    String nsServiceName = resourceType + "_" + serviceInstanceName
 	    execution.setVariable("nsServiceName", nsServiceName)
-	    utils.log("INFO", "Prepare VFC Request nsServiceName:" + nsServiceName, isDebugEnabled)
+	    utils.log("INFO", "Prepare Resource Request nsServiceName:" + nsServiceName, isDebugEnabled)
         String globalSubscriberId = execution.getVariable("globalSubscriberId")
         String serviceType = execution.getVariable("serviceType")
         String serviceId = execution.getVariable("serviceInstanceId")
@@ -412,7 +416,7 @@
         String resourcesStr = jsonUtil.getJsonValue(incomingRequest, "service.parameters.resources")  
         String nsServiceDescription = jsonUtil.getJsonValue(incomingRequest, "service.description")  
         execution.setVariable("nsServiceDescription", nsServiceDescription)
-        utils.log("INFO", "Prepare VFC Request nsServiceDescription:" + nsServiceDescription, isDebugEnabled)
+        utils.log("INFO", "Prepare Resource Request nsServiceDescription:" + nsServiceDescription, isDebugEnabled)
         List<String> resourceList = jsonUtil.StringArrayToList(execution, resourcesStr) 
         //reset the variables
         execution.setVariable("resourceUUID", "")
@@ -427,18 +431,102 @@
                 execution.setVariable("resourceUUID", resourceUUID)
                 execution.setVariable("resourceInvariantUUID", resourceInvariantUUID)
                 execution.setVariable("resourceParameters", resourceParameters)
-                utils.log("INFO", "Prepare VFC Request resourceType:" + resourceType, isDebugEnabled)
-                utils.log("INFO", "Prepare VFC Request resourceUUID:" + resourceUUID, isDebugEnabled)
-                utils.log("INFO", "Prepare VFC Request resourceParameters:" + resourceParameters, isDebugEnabled)
+                utils.log("INFO", "Prepare Resource Request resourceType:" + resourceType, isDebugEnabled)
+                utils.log("INFO", "Prepare Resource Request resourceUUID:" + resourceUUID, isDebugEnabled)
+                utils.log("INFO", "Prepare Resource Request resourceParameters:" + resourceParameters, isDebugEnabled)
             } 
         }
-	    utils.log("INFO", "Prepare VFC Request finished", isDebugEnabled)
+	    utils.log("INFO", "Prepare Controller Request finished", isDebugEnabled)
+	}
+	/**
+	 * sequence resource. we should analyze resource sequence from service template
+	 * Here we make VF first, and then network for E2E service.
+	 */
+	public void sequenceResoure(execution){
+	    def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+        utils.log("INFO", "======== Start sequenceResoure Process ======== ", isDebugEnabled)  
+	    String serviceModelUUID = execution.getVariable("modelUuid")
+        JSONArray networks = cutils.getAllNetworksByServiceModelUuid(execution, serviceModelUUID)
+        utils.log("DEBUG", "obtained Network list: " + networks, isDebugEnabled)            
+        if (networks == null) {
+            utils.log("INFO", "No matching networks in Catalog DB for serviceModelUUID=" + serviceModelUUID, isDebugEnabled)
+        }
+        String incomingRequest = execution.getVariable("uuiRequest")
+        String resourcesStr = jsonUtil.getJsonValue(incomingRequest, "service.parameters.resources")  
+        List<String> resourceList = jsonUtil.StringArrayToList(execution, resourcesStr) 
+        // Only one match herenetwork
+        List<String> nsResources = new ArrayList<String>()
+        List<String> wanResources = new ArrayList<String>()
+        List<String> resourceSequence = new  ArrayList<String>()
+        for(String resource : resourceList){
+            String resourceName = jsonUtil.getJsonValue(resource, "resourceName")  
+            String resourceUUID = jsonUtil.getJsonValue(resource, "resourceId")
+            //check is network.
+            boolean isNetwork = false;
+            if(networks != null){
+                for(int i = 0; i < networks.size(); i++){
+                    String networkUUID = jsonUtil.getJsonValueForKey(networks.get(i), "modelVersionId")
+                    if(StringUtils.equals(resourceUUID, networkUUID)){
+                        isNetwork = true
+                        break
+                    }
+                }
+            }
+            if(isNetwork){
+                wanResources.add(resourceName)
+            }else{
+                nsResources.add(resourceName)
+            }
+        }
+        resourceSequence.addAll(nsResources)
+        resourceSequence.addAll(wanResources)
+        String isContainsWanResource = wanResources.isEmpty() ? "false" : "true"
+        execution.setVariable("isContainsWanResource", isContainsWanResource)
+        execution.setVariable("currentResourceIndex", 0)
+        execution.setVariable("resourceSequence", resourceSequence)
+        utils.log("INFO", "resourceSequence: " + resourceSequence, isDebugEnabled)  
+        execution.setVariable("wanResources", wanResources)
+        utils.log("INFO", "======== COMPLETED sequenceResoure Process ======== ", isDebugEnabled)  
 	}
 	
+	public void getCurrentResoure(execution){
+	    def isDebugEnabled=execution.getVariable("isDebugLogEnabled")   
+        utils.log("INFO", "======== Start getCurrentResoure Process ======== ", isDebugEnabled)    
+	    def currentIndex = execution.getVariable("currentResourceIndex")
+	    List<String> resourceSequence = execution.getVariable("resourceSequence")  
+	    List<String> wanResources = execution.getVariable("wanResources")  
+	    String resourceName =  resourceSequence.get(currentIndex)
+	    execution.setVariable("resourceType",resourceName)
+	    if(wanResources.contains(resourceName)){
+	        execution.setVariable("controllerInfo", "SDN-C")
+	    }else{
+	        execution.setVariable("controllerInfo", "VF-C")
+	    }
+        utils.log("INFO", "======== COMPLETED getCurrentResoure Process ======== ", isDebugEnabled)  
+    }
+
 	   /**
-     * post config request.
+     * sequence resource
      */
-	public void postConfigRequest(execution){
-	    //now do noting
-	}
+    public void parseNextResource(execution){
+        def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+        utils.log("INFO", "======== Start parseNextResource Process ======== ", isDebugEnabled)    
+        def currentIndex = execution.getVariable("currentResourceIndex")
+        def nextIndex =  currentIndex + 1
+        execution.setVariable("currentResourceIndex", nextIndex)
+        List<String> resourceSequence = execution.getVariable("resourceSequence")    
+        if(nextIndex >= resourceSequence.size()){
+            execution.setVariable("allResourceFinished", "true")
+        }else{
+            execution.setVariable("allResourceFinished", "false")
+        }
+        utils.log("INFO", "======== COMPLETED parseNextResource Process ======== ", isDebugEnabled)       
+    }
+    
+      /**
+      * post config request.
+      */
+     public void postConfigRequest(execution){
+         //now do noting
+     } 
 }
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy
index ecc1488..bf61013 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy
@@ -35,6 +35,7 @@
 import org.openecomp.mso.rest.RESTClient
 import org.openecomp.mso.rest.RESTConfig
 
+import java.util.List;
 import java.util.UUID;
 import javax.xml.parsers.DocumentBuilder
 import javax.xml.parsers.DocumentBuilderFactory
@@ -589,5 +590,72 @@
        }    
        utils.log("INFO", " ======== END preResourceDelete Process ======== ", isDebugEnabled)
    }
+   
+   public void sequenceResource(execution){
+       def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+
+       utils.log("INFO", " ======== STARTED sequenceResource Process ======== ", isDebugEnabled)
+       List<String> nsResources = new ArrayList<String>()
+       List<String> wanResources = new ArrayList<String>()
+       List<String> resourceSequence = new  ArrayList<String>()
+       
+       String serviceRelationShip = execution.getVariable("serviceRelationShip")
+               
+       
+       def jsonSlurper = new JsonSlurper()
+       def jsonOutput = new JsonOutput()         
+       List relationShipList =  jsonSlurper.parseText(serviceRelationShip)
+               
+       if (relationShipList != null) {
+           relationShipList.each {
+               if(StringUtils.containsIgnoreCase(it.resourceType, "overlay") || StringUtils.containsIgnoreCase(it.resourceType, "underlay")){
+                   wanResources.add(it.resourceType)
+               }else{
+                   nsResources.add(it.resourceType)
+               }
+           }
+       }     
+       resourceSequence.addAll(wanResources)
+       resourceSequence.addAll(nsResources)
+       String isContainsWanResource = wanResources.isEmpty() ? "false" : "true"
+       execution.setVariable("isContainsWanResource", isContainsWanResource)
+       execution.setVariable("currentResourceIndex", 0)
+       execution.setVariable("resourceSequence", resourceSequence)
+       utils.log("INFO", "resourceSequence: " + resourceSequence, isDebugEnabled)  
+       execution.setVariable("wanResources", wanResources)
+       utils.log("INFO", " ======== END sequenceResource Process ======== ", isDebugEnabled)
+   }
+   
+   public void getCurrentResource(execution){
+       def isDebugEnabled=execution.getVariable("isDebugLogEnabled")   
+       utils.log("INFO", "======== Start getCurrentResoure Process ======== ", isDebugEnabled)    
+       def currentIndex = execution.getVariable("currentResourceIndex")
+       List<String> resourceSequence = execution.getVariable("resourceSequence")  
+       List<String> wanResources = execution.getVariable("wanResources")  
+       String resourceName =  resourceSequence.get(currentIndex)
+       execution.setVariable("resourceType",resourceName)
+       if(wanResources.contains(resourceName)){
+           execution.setVariable("controllerInfo", "SDN-C")
+       }else{
+           execution.setVariable("controllerInfo", "VF-C")
+       }
+       utils.log("INFO", "======== COMPLETED getCurrentResoure Process ======== ", isDebugEnabled)  
+   }
+   
+   public void parseNextResource(execution){
+       def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+       utils.log("INFO", "======== Start parseNextResource Process ======== ", isDebugEnabled)    
+       def currentIndex = execution.getVariable("currentResourceIndex")
+       def nextIndex =  currentIndex + 1
+       execution.setVariable("currentResourceIndex", nextIndex)
+       List<String> resourceSequence = execution.getVariable("resourceSequence")    
+       if(nextIndex >= resourceSequence.size()){
+           execution.setVariable("allResourceFinished", "true")
+       }else{
+           execution.setVariable("allResourceFinished", "false")
+       }
+       utils.log("INFO", "======== COMPLETED parseNextResource Process ======== ", isDebugEnabled)            
+   }
+   
 }
  
\ No newline at end of file
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn
index 8fc761c..24d5a7b 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn
@@ -22,7 +22,7 @@
       <bpmn:sequenceFlow id="SequenceFlow_1dsbjjb" name="" sourceRef="StartEvent_0v1ffn4" targetRef="ScriptTask_0u3lw39" />
       <bpmn:sequenceFlow id="SequenceFlow_1yay321" name="" sourceRef="ScriptTask_0u3lw39" targetRef="EndEvent_0eznq6x" />
     </bpmn:subProcess>
-    <bpmn:callActivity id="DoCreateE2EServiceInstance" name="Call DoCreateE2EServiceInstance&#10;" calledElement="DoCreateE2EServiceInstance">
+    <bpmn:callActivity id="DoCreateE2EServiceInstance" name="Call DoCreateE2EServiceInstanceV3&#10;" calledElement="DoCreateE2EServiceInstanceV3">
       <bpmn:extensionElements>
         <camunda:out source="WorkflowException" target="WorkflowException" />
         <camunda:in source="msoRequestId" target="msoRequestId" />
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteCustomE2EServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteCustomE2EServiceInstance.bpmn
index 2983589..84c370e 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteCustomE2EServiceInstance.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteCustomE2EServiceInstance.bpmn
@@ -22,7 +22,7 @@
       <bpmn:sequenceFlow id="SequenceFlow_0guajy5" name="" sourceRef="StartEvent_121296y" targetRef="ScriptTask_1c6ogpt" />
       <bpmn:sequenceFlow id="SequenceFlow_0dbt753" name="" sourceRef="ScriptTask_1c6ogpt" targetRef="EndEvent_1dw3dwx" />
     </bpmn:subProcess>
-    <bpmn:callActivity id="CallActivity_1vyx9hu" name="Call DoCustomDeleteE2EServiceInstance&#10;" calledElement="DoCustomDeleteE2EServiceInstance">
+    <bpmn:callActivity id="CallActivity_1vyx9hu" name="Call DoCustomDeleteE2EServiceInstanceV3&#10;" calledElement="DoCustomDeleteE2EServiceInstanceV3">
       <bpmn:extensionElements>
         <camunda:out source="WorkflowException" target="WorkflowException" />
         <camunda:in source="msoRequestId" target="msoRequestId" />
