diff --git a/adapters/mso-catalog-db-adapter/pom.xml b/adapters/mso-catalog-db-adapter/pom.xml
index 9ec98cf..da1bff6 100644
--- a/adapters/mso-catalog-db-adapter/pom.xml
+++ b/adapters/mso-catalog-db-adapter/pom.xml
@@ -84,40 +84,6 @@
     </plugins>
     <pluginManagement>
       <plugins>
-        <!--This plugin's configuration is used to store Eclipse m2e settings 
-					only. It has no influence on the Maven build itself. -->
-        <plugin>
-          <groupId>org.eclipse.m2e</groupId>
-          <artifactId>lifecycle-mapping</artifactId>
-          <version>1.0.0</version>
-          <configuration>
-            <lifecycleMappingMetadata>
-              <pluginExecutions>
-                <pluginExecution>
-                  <pluginExecutionFilter>
-                    <groupId>
-											org.jvnet.jax-ws-commons
-										</groupId>
-                    <artifactId>
-											jaxws-maven-plugin
-										</artifactId>
-                    <versionRange>
-											[2.3,)
-										</versionRange>
-                    <goals>
-                      <goal>wsgen</goal>
-                    </goals>
-                  </pluginExecutionFilter>
-                  <action>
-                    <ignore>
-                    </ignore>
-                  </action>
-                </pluginExecution>
-              </pluginExecutions>
-            </lifecycleMappingMetadata>
-          </configuration>
-        </plugin>
-
         <plugin>
           <groupId>org.jacoco</groupId>
           <artifactId>jacoco-maven-plugin</artifactId>
diff --git a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java
index f82c7ac..707a2a4 100644
--- a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java
+++ b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java
@@ -22,6 +22,7 @@
 
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
@@ -733,4 +734,12 @@
         assertNull(workflow);
     }
 
+    @Test
+    public void getCloudSites() {
+        List<CloudSite> cloudSites = client.getCloudSites();
+        assertNotNull(cloudSites);
+        assertNotEquals(0, cloudSites.size());
+    }
+
+
 }
diff --git a/adapters/mso-workflow-message-adapter/src/test/java/org/onap/so/adapters/workflowmessage/BPRestCallbackTest.java b/adapters/mso-workflow-message-adapter/src/test/java/org/onap/so/adapters/workflowmessage/BPRestCallbackTest.java
deleted file mode 100644
index 21917c3..0000000
--- a/adapters/mso-workflow-message-adapter/src/test/java/org/onap/so/adapters/workflowmessage/BPRestCallbackTest.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.workflowmessage;
-
-import org.apache.http.entity.ContentType;
-import org.junit.Test;
-import org.mockito.Mock;
-
-import static junit.framework.Assert.assertFalse;
-
-public class BPRestCallbackTest {
-
-    @Mock
-    ContentType contentType;
-
-    @Test
-    public void testSendExceptionCase() {
-
-        BPRestCallback test = new BPRestCallback();
-        test.send("workflowMessageUrl/", "messageType", "correlator", contentType,"message");
-        assertFalse(test.send("workflowMessageUrl/", "messageType", "correlator", contentType,"message"));
-
-        }
-    }
diff --git a/adapters/mso-workflow-message-adapter/src/test/java/org/onap/so/adapters/workflowmessage/WMAdapterRestTest.java b/adapters/mso-workflow-message-adapter/src/test/java/org/onap/so/adapters/workflowmessage/WMAdapterRestTest.java
deleted file mode 100644
index 08728fa..0000000
--- a/adapters/mso-workflow-message-adapter/src/test/java/org/onap/so/adapters/workflowmessage/WMAdapterRestTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *l
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.adapters.workflowmessage;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-public class WMAdapterRestTest {
-
-    @Test(expected = ClassFormatError.class)
-    public void testHealthCheckException() throws Exception {
-
-        WMAdapterRest test = new WMAdapterRest();
-        test.healthcheck("34388737-cdad-4d96-ae6f-39d08024b495");
-        Assert.assertFalse(true);
-
-    }
-
-    @Test(expected = ClassFormatError.class)
-    public void testReceiveWorkflowMsgException() throws Exception {
-        WMAdapterRest test = new WMAdapterRest();
-        test.receiveWorkflowMessage("contentTypeHeader", "messageType", "correlator", "content");
-        Assert.assertFalse(true);
-
-    }
-}
-
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/listener/validation/WorkflowActionCompletion.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/listener/validation/WorkflowActionCompletion.java
new file mode 100644
index 0000000..1018d7f
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/listener/validation/WorkflowActionCompletion.java
@@ -0,0 +1,25 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.common.listener.validation;
+
+public interface WorkflowActionCompletion extends WorkflowActionListener {
+
+}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/listener/validation/WorkflowActionListener.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/listener/validation/WorkflowActionListener.java
new file mode 100644
index 0000000..4788c55
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/listener/validation/WorkflowActionListener.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.common.listener.validation;
+
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+
+public interface WorkflowActionListener {
+
+    /**
+     * Should this listener run for given bb
+     * 
+     * @return
+     * 
+     */
+    public boolean shouldRunFor(String bbName, String eventName);
+
+    /**
+     * Determines whether or not the listener should be executed
+     * 
+     * 
+     * @param execution
+     * @return
+     */
+    public void executeListener(DelegateExecution execution);
+
+}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/listener/validation/WorkflowActionListenerRunner.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/listener/validation/WorkflowActionListenerRunner.java
new file mode 100644
index 0000000..806c1b8
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/listener/validation/WorkflowActionListenerRunner.java
@@ -0,0 +1,64 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.common.listener.validation;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Optional;
+import javax.annotation.PostConstruct;
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.onap.so.listener.ListenerRunner;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+
+
+@Component
+public class WorkflowActionListenerRunner extends ListenerRunner {
+
+    private static Logger logger = LoggerFactory.getLogger(WorkflowActionListenerRunner.class);
+
+    protected List<WorkflowActionListener> workflowActionListeners;
+
+    @PostConstruct
+    protected void init() {
+        workflowActionListeners = new ArrayList<>(Optional
+                .ofNullable(context.getBeansOfType(WorkflowActionListener.class)).orElse(new HashMap<>()).values());
+    }
+
+    public void executeAsyncListeners(String bbName, DelegateExecution execution, String eventName) {
+        try {
+            logger.info("NotifyingWorkflowActionListeners");
+            runNotifications(workflowActionListeners, bbName, execution, eventName);
+        } catch (Exception e) {
+            logger.error("Error in Notifying Workflow Action Listeners", e);
+        }
+    }
+
+    protected void runNotifications(List<? extends WorkflowActionListener> listeners, String bbName,
+            DelegateExecution execution, String eventName) {
+        List<? extends WorkflowActionListener> filtered =
+                filterListeners(listeners, (item -> item.shouldRunFor(bbName, eventName)));
+        filtered.forEach(item -> item.executeListener(execution));
+    }
+}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java
index dcb9e08..fcac86b 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java
@@ -23,9 +23,7 @@
 package org.onap.so.bpmn.servicedecomposition.tasks;
 
 import java.io.IOException;
-import java.io.ObjectOutputStream;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 import java.util.Optional;
@@ -76,12 +74,11 @@
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
-import com.fasterxml.jackson.core.JsonParseException;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.JsonMappingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.SerializationFeature;
+import com.fasterxml.jackson.databind.type.TypeFactory;
 
 @Component("BBInputSetupUtils")
 public class BBInputSetupUtils {
@@ -177,39 +174,32 @@
     }
 
     public InfraActiveRequests loadOriginalInfraActiveRequestById(String requestId) {
-
         return this.requestsDbClient.getInfraActiveRequestbyRequestId(
                 this.requestsDbClient.getInfraActiveRequestbyRequestId(requestId).getOriginalRequestId());
     }
 
     public List<ExecuteBuildingBlock> loadOriginalFlowExecutionPath(String requestId) {
-
-        List<ExecuteBuildingBlock> asList = null;
         if (requestId != null) {
-
             InfraActiveRequests request = loadInfraActiveRequestById(requestId);
-
             if (request.getOriginalRequestId() != null) {
-
                 RequestProcessingData requestProcessingData =
                         this.requestsDbClient.getRequestProcessingDataBySoRequestIdAndName(
                                 request.getOriginalRequestId(), PROCESSING_DATA_NAME_EXECUTION_FLOWS);
-
-                ObjectMapper om = new ObjectMapper();
                 try {
-                    ExecuteBuildingBlock[] asArray =
-                            om.readValue(requestProcessingData.getValue(), ExecuteBuildingBlock[].class);
-                    asList = Arrays.asList(asArray);
+                    ObjectMapper om = new ObjectMapper();
+                    TypeFactory typeFactory = objectMapper.getTypeFactory();
+                    return om.readValue(requestProcessingData.getValue(),
+                            typeFactory.constructCollectionType(List.class, ExecuteBuildingBlock.class));
                 } catch (Exception e) {
                     logger.error(DATA_LOAD_ERROR, e);
+                    throw new RuntimeException("Error Loading Original Request Data", e);
                 }
+            } else {
+                throw new RuntimeException("Original Request Id is null for record: " + requestId);
             }
-
         } else {
-            logger.debug(REQUEST_ERROR);
+            throw new RuntimeException("Null Request Id Passed in");
         }
-
-        return asList;
     }
 
     public Service getCatalogServiceByModelUUID(String modelUUID) {
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/AsyncTaskExecutor.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/AsyncTaskExecutor.java
new file mode 100644
index 0000000..56526c7
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/AsyncTaskExecutor.java
@@ -0,0 +1,21 @@
+package org.onap.so.bpmn.core.plugins;
+
+import org.camunda.bpm.engine.delegate.ExecutionListener;
+import org.camunda.bpm.engine.impl.bpmn.parser.AbstractBpmnParseListener;
+import org.camunda.bpm.engine.impl.pvm.process.ActivityImpl;
+import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl;
+import org.camunda.bpm.engine.impl.util.xml.Element;
+import org.springframework.stereotype.Component;
+
+@Component
+public class AsyncTaskExecutor extends AbstractBpmnParseListener {
+
+    private void injectTaskExecutorExecutionListener(ActivityImpl activity) {
+        activity.addListener(ExecutionListener.EVENTNAME_END, new AsyncTaskExecutorListener());
+    }
+
+    @Override
+    public void parseEndEvent(Element endEventElement, ScopeImpl scope, ActivityImpl activity) {
+        injectTaskExecutorExecutionListener(activity);
+    }
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/AsyncTaskExecutorListener.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/AsyncTaskExecutorListener.java
new file mode 100644
index 0000000..94f4b31
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/AsyncTaskExecutorListener.java
@@ -0,0 +1,42 @@
+package org.onap.so.bpmn.core.plugins;
+
+import org.camunda.bpm.engine.RepositoryService;
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.camunda.bpm.engine.delegate.ExecutionListener;
+import org.onap.so.bpmn.common.listener.validation.WorkflowActionListenerRunner;
+import org.onap.so.spring.SpringContextHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AsyncTaskExecutorListener implements ExecutionListener {
+    private final Logger logger = LoggerFactory.getLogger(AsyncTaskExecutorListener.class);
+
+
+    private WorkflowActionListenerRunner listenerRunner;
+
+    @Override
+    public void notify(DelegateExecution execution) throws Exception {
+        if (!isBlank(execution.getCurrentActivityName())) {
+            try {
+                String id = execution.getId();
+                if (id != null) {
+                    RepositoryService repositoryService = execution.getProcessEngineServices().getRepositoryService();
+                    String processName = repositoryService.createProcessDefinitionQuery()
+                            .processDefinitionId(execution.getProcessDefinitionId()).singleResult().getName();
+                    logger.info("ProcessName : {}", processName);
+                    if (processName != null) {
+                        listenerRunner =
+                                SpringContextHelper.getAppContext().getBean(WorkflowActionListenerRunner.class);
+                        listenerRunner.executeAsyncListeners(processName, execution, ExecutionListener.EVENTNAME_END);
+                    }
+                }
+            } catch (Exception e) {
+                logger.error("Error occured in executing Complete Task Listeners", e);
+            }
+        }
+    }
+
+    private boolean isBlank(Object object) {
+        return object == null || "".equals(object.toString().trim());
+    }
+}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/BPMNProcessCompletePlugin.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/BPMNProcessCompletePlugin.java
new file mode 100644
index 0000000..96c6af4
--- /dev/null
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/BPMNProcessCompletePlugin.java
@@ -0,0 +1,51 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.core.plugins;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.camunda.bpm.engine.impl.bpmn.parser.BpmnParseListener;
+import org.camunda.bpm.engine.impl.cfg.AbstractProcessEnginePlugin;
+import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+
+
+@Component
+public class BPMNProcessCompletePlugin extends AbstractProcessEnginePlugin {
+
+    @Autowired
+    private AsyncTaskExecutor asyncTaskExecutor;
+
+    @Override
+    public void preInit(ProcessEngineConfigurationImpl processEngineConfiguration) {
+        List<BpmnParseListener> preParseListeners = processEngineConfiguration.getCustomPreBPMNParseListeners();
+        if (preParseListeners == null) {
+            preParseListeners = new ArrayList<>();
+            processEngineConfiguration.setCustomPreBPMNParseListeners(preParseListeners);
+        }
+        preParseListeners.add(asyncTaskExecutor);
+    }
+
+}
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/WorkflowActionBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/WorkflowActionBB.bpmn
index efdee86..bb90042 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/WorkflowActionBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/WorkflowActionBB.bpmn
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="2.0.3">
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0">
   <bpmn:process id="WorkflowActionBB" name="WorkflowActionBB" isExecutable="true">
     <bpmn:startEvent id="Start_WorkflowActionBB" name="start">
       <bpmn:outgoing>SequenceFlow_15s0okp</bpmn:outgoing>
@@ -46,7 +46,7 @@
       <bpmn:outgoing>SequenceFlow_0l7kaba</bpmn:outgoing>
     </bpmn:exclusiveGateway>
     <bpmn:sequenceFlow id="SequenceFlow_1m2eezj" name="Completed = true" sourceRef="ExclusiveGateway_Finished" targetRef="ExclusiveGateway_isTopLevelFlowC">
-      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${execution.getVariable("completed")==true&amp;&amp;execution.getVariable("isRollback")==false&amp;&amp;execution.getVariable("handlingCode")=="Success"}</bpmn:conditionExpression>
+      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("completed")==true&&execution.getVariable("isRollback")==false&&execution.getVariable("handlingCode")=="Success"}]]></bpmn:conditionExpression>
     </bpmn:sequenceFlow>
     <bpmn:serviceTask id="Task_RetrieveBBExectuionList" name="Retrieve BB Execution List" camunda:expression="${WorkflowAction.selectExecutionList(execution)}">
       <bpmn:incoming>SequenceFlow_15s0okp</bpmn:incoming>
@@ -54,7 +54,7 @@
     </bpmn:serviceTask>
     <bpmn:serviceTask id="Task_SendSync" name="Send Sync Ack API Handler" camunda:asyncAfter="true" camunda:expression="${WorkflowActionBBTasks.sendSyncAck(execution)}">
       <bpmn:incoming>SequenceFlow_0sckerv</bpmn:incoming>
-      <bpmn:outgoing>SequenceFlow_1wb59ic</bpmn:outgoing>
+      <bpmn:outgoing>SequenceFlow_1lrz41x</bpmn:outgoing>
     </bpmn:serviceTask>
     <bpmn:serviceTask id="Task_UpdateRequestComplete" name="Update Request To Complete" camunda:expression="${WorkflowActionBBTasks.updateRequestStatusToComplete(execution)}">
       <bpmn:incoming>SequenceFlow_0kf5sen</bpmn:incoming>
@@ -83,7 +83,7 @@
       </bpmn:exclusiveGateway>
       <bpmn:sequenceFlow id="SequenceFlow_024g0d1" name="no" sourceRef="ExclusiveGateway_10q79b6" targetRef="Task_UpdateDb" />
       <bpmn:sequenceFlow id="SequenceFlow_0vi883o" name="yes" sourceRef="ExclusiveGateway_10q79b6" targetRef="Task_SendSyncAckError">
-        <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${execution.getVariable("isTopLevelFlow")==true&amp;&amp;execution.getVariable("sentSyncResponse")==false}</bpmn:conditionExpression>
+        <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("isTopLevelFlow")==true&&execution.getVariable("sentSyncResponse")==false}]]></bpmn:conditionExpression>
       </bpmn:sequenceFlow>
       <bpmn:sequenceFlow id="SequenceFlow_0eana0l" sourceRef="Task_SendSyncAckError" targetRef="Task_UpdateDb" />
       <bpmn:serviceTask id="Task_SendSyncAckError" name="Send Sync Ack API Handler" camunda:asyncAfter="true" camunda:expression="${WorkflowActionBBTasks.sendSyncAck(execution)}">
@@ -92,10 +92,10 @@
       </bpmn:serviceTask>
     </bpmn:subProcess>
     <bpmn:sequenceFlow id="SequenceFlow_0v588sm" name="Rollback = true" sourceRef="ExclusiveGateway_Finished" targetRef="Task_RollbackExecutionPath">
-      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${execution.getVariable("handlingCode")=="Rollback"||execution.getVariable("handlingCode")=="RollbackToAssigned"||execution.getVariable("handlingCode")=="RollbackToCreated"}</bpmn:conditionExpression>
+      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("handlingCode")=="Rollback"||execution.getVariable("handlingCode")=="RollbackToAssigned"||execution.getVariable("handlingCode")=="RollbackToCreated"}]]></bpmn:conditionExpression>
     </bpmn:sequenceFlow>
     <bpmn:sequenceFlow id="SequenceFlow_1atzsgn" sourceRef="Task_RollbackExecutionPath" targetRef="Task_SelectBB">
-      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${execution.getVariable("isRollbackNeeded")==true}</bpmn:conditionExpression>
+      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("isRollbackNeeded")==true}]]></bpmn:conditionExpression>
     </bpmn:sequenceFlow>
     <bpmn:serviceTask id="Task_RollbackExecutionPath" name="Rollback Execution Path" camunda:expression="${WorkflowActionBBTasks.rollbackExecutionPath(execution)}">
       <bpmn:incoming>SequenceFlow_0v588sm</bpmn:incoming>
@@ -104,7 +104,7 @@
     </bpmn:serviceTask>
     <bpmn:sequenceFlow id="SequenceFlow_0vc9go9" sourceRef="Task_RetrieveBBExectuionList" targetRef="ExclusiveGateway_isTopLevelFlow" />
     <bpmn:sequenceFlow id="SequenceFlow_11530ei" name="Abort = true" sourceRef="ExclusiveGateway_Finished" targetRef="ExclusiveGateway_isTopLevelFlowAbort">
-      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${execution.getVariable("handlingCode")=="Abort"}</bpmn:conditionExpression>
+      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("handlingCode")=="Abort"}]]></bpmn:conditionExpression>
     </bpmn:sequenceFlow>
     <bpmn:serviceTask id="Task_AbortAndCallErrorHandling" name="Update Request To Failed" camunda:expression="${WorkflowActionBBFailure.updateRequestStatusToFailed(execution)}">
       <bpmn:incoming>SequenceFlow_02ksbt0</bpmn:incoming>
@@ -115,7 +115,6 @@
       <bpmn:incoming>SequenceFlow_1r570x3</bpmn:incoming>
     </bpmn:endEvent>
     <bpmn:sequenceFlow id="SequenceFlow_1p8yxu6" sourceRef="Task_AbortAndCallErrorHandling" targetRef="EndEvent_0lzz1ya" />
-    <bpmn:sequenceFlow id="SequenceFlow_1wb59ic" sourceRef="Task_SendSync" targetRef="Task_PreValidateWorkflow" />
     <bpmn:sequenceFlow id="SequenceFlow_01j184u" sourceRef="ExclusiveGateway_Finished" targetRef="Task_0a31dkf" />
     <bpmn:serviceTask id="Task_0a31dkf" name="Check Retry Status" camunda:expression="${WorkflowActionBBTasks.checkRetryStatus(execution)}">
       <bpmn:incoming>SequenceFlow_01j184u</bpmn:incoming>
@@ -128,7 +127,7 @@
     </bpmn:exclusiveGateway>
     <bpmn:sequenceFlow id="SequenceFlow_0sckerv" name="yes" sourceRef="ExclusiveGateway_isTopLevelFlow" targetRef="Task_SendSync" />
     <bpmn:sequenceFlow id="SequenceFlow_0unbew4" name="no" sourceRef="ExclusiveGateway_isTopLevelFlow" targetRef="Task_PreValidateWorkflow">
-      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${execution.getVariable("isTopLevelFlow")==false}</bpmn:conditionExpression>
+      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("isTopLevelFlow")==false}]]></bpmn:conditionExpression>
     </bpmn:sequenceFlow>
     <bpmn:exclusiveGateway id="ExclusiveGateway_isTopLevelFlowAbort" name="Is Top-Level Flow?" default="SequenceFlow_02ksbt0">
       <bpmn:incoming>SequenceFlow_11530ei</bpmn:incoming>
@@ -137,7 +136,7 @@
     </bpmn:exclusiveGateway>
     <bpmn:sequenceFlow id="SequenceFlow_02ksbt0" name="yes" sourceRef="ExclusiveGateway_isTopLevelFlowAbort" targetRef="Task_AbortAndCallErrorHandling" />
     <bpmn:sequenceFlow id="SequenceFlow_1r570x3" name="no" sourceRef="ExclusiveGateway_isTopLevelFlowAbort" targetRef="EndEvent_0lzz1ya">
-      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${execution.getVariable("isTopLevelFlow")==false}</bpmn:conditionExpression>
+      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("isTopLevelFlow")==false}]]></bpmn:conditionExpression>
     </bpmn:sequenceFlow>
     <bpmn:exclusiveGateway id="ExclusiveGateway_isTopLevelFlowC" name="Is Top-Level Flow?" default="SequenceFlow_0kf5sen">
       <bpmn:incoming>SequenceFlow_1m2eezj</bpmn:incoming>
@@ -145,13 +144,13 @@
       <bpmn:outgoing>SequenceFlow_0kf5sen</bpmn:outgoing>
     </bpmn:exclusiveGateway>
     <bpmn:sequenceFlow id="SequenceFlow_0x4urgp" name="no" sourceRef="ExclusiveGateway_isTopLevelFlowC" targetRef="End_WorkflowActionBB">
-      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${execution.getVariable("isTopLevelFlow")==false}</bpmn:conditionExpression>
+      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("isTopLevelFlow")==false}]]></bpmn:conditionExpression>
     </bpmn:sequenceFlow>
     <bpmn:endEvent id="End_RollbackFailed" name="end">
       <bpmn:incoming>SequenceFlow_1ui67mc</bpmn:incoming>
     </bpmn:endEvent>
     <bpmn:sequenceFlow id="SequenceFlow_11dlyzt" name="Rollback Not Needed" sourceRef="Task_RollbackExecutionPath" targetRef="Task_UpdateRequestToFailed">
-      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${execution.getVariable("isRollbackNeeded")==false}</bpmn:conditionExpression>
+      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("isRollbackNeeded")==false}]]></bpmn:conditionExpression>
     </bpmn:sequenceFlow>
     <bpmn:serviceTask id="Task_UpdateRequestToFailed" name="Update Request To Failed" camunda:expression="${WorkflowActionBBFailure.updateRequestStatusToFailedWithRollback(execution)}">
       <bpmn:incoming>SequenceFlow_11dlyzt</bpmn:incoming>
@@ -159,7 +158,7 @@
       <bpmn:outgoing>SequenceFlow_1ui67mc</bpmn:outgoing>
     </bpmn:serviceTask>
     <bpmn:sequenceFlow id="SequenceFlow_0l7kaba" name="Rollback Completed" sourceRef="ExclusiveGateway_Finished" targetRef="Task_UpdateRequestToFailed">
-      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${execution.getVariable("completed")==true&amp;&amp;execution.getVariable("isRollback")==true&amp;&amp;execution.getVariable("handlingCode")=="Success"}</bpmn:conditionExpression>
+      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("completed")==true&&execution.getVariable("isRollback")==true&&execution.getVariable("handlingCode")=="Success"}]]></bpmn:conditionExpression>
     </bpmn:sequenceFlow>
     <bpmn:sequenceFlow id="SequenceFlow_1ui67mc" sourceRef="Task_UpdateRequestToFailed" targetRef="End_RollbackFailed" />
     <bpmn:subProcess id="SubProcess_0fuugr9" name="Java Exception Handling Sub Process" triggeredByEvent="true">
@@ -186,7 +185,7 @@
     <bpmn:sequenceFlow id="SequenceFlow_1tfizxf" sourceRef="Task_PreValidateWorkflow" targetRef="Task_SelectBB" />
     <bpmn:serviceTask id="Task_PreValidateWorkflow" name="PreValidate Workflow" camunda:expression="${WorkflowValidatorRunner.preValidate(execution.getVariable(&#34;requestAction&#34;), execution)}">
       <bpmn:incoming>SequenceFlow_0unbew4</bpmn:incoming>
-      <bpmn:incoming>SequenceFlow_1wb59ic</bpmn:incoming>
+      <bpmn:incoming>SequenceFlow_0etawv5</bpmn:incoming>
       <bpmn:outgoing>SequenceFlow_1tfizxf</bpmn:outgoing>
     </bpmn:serviceTask>
     <bpmn:serviceTask id="ServiceTask_0lbkcyp" name="Post Processing Execute BB" camunda:expression="${WorkflowActionBBTasks.postProcessingExecuteBB(execution)}">
@@ -196,6 +195,19 @@
     <bpmn:sequenceFlow id="SequenceFlow_1hsqed1" sourceRef="Call_ExecuteBB" targetRef="ServiceTask_0lbkcyp" />
     <bpmn:sequenceFlow id="SequenceFlow_1fftixk" sourceRef="ServiceTask_0lbkcyp" targetRef="ExclusiveGateway_Finished" />
     <bpmn:sequenceFlow id="SequenceFlow_1pnkpim" sourceRef="Task_0a31dkf" targetRef="Task_SelectBB" />
+    <bpmn:exclusiveGateway id="ExclusiveGateway_1dez26n" name="Generated Id&#39;s?">
+      <bpmn:incoming>SequenceFlow_1lrz41x</bpmn:incoming>
+      <bpmn:outgoing>SequenceFlow_0etawv5</bpmn:outgoing>
+      <bpmn:outgoing>SequenceFlow_0ilo6lo</bpmn:outgoing>
+    </bpmn:exclusiveGateway>
+    <bpmn:sequenceFlow id="SequenceFlow_1lrz41x" sourceRef="Task_SendSync" targetRef="ExclusiveGateway_1dez26n" />
+    <bpmn:sequenceFlow id="SequenceFlow_0etawv5" name="no" sourceRef="ExclusiveGateway_1dez26n" targetRef="Task_PreValidateWorkflow">
+      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("generateIdsOnly") == null || execution.getVariable("generateIdsOnly")==false}]]></bpmn:conditionExpression>
+    </bpmn:sequenceFlow>
+    <bpmn:endEvent id="EndEvent_12f15tu" name="End">
+      <bpmn:incoming>SequenceFlow_0ilo6lo</bpmn:incoming>
+    </bpmn:endEvent>
+    <bpmn:sequenceFlow id="SequenceFlow_0ilo6lo" name="yes" sourceRef="ExclusiveGateway_1dez26n" targetRef="EndEvent_12f15tu" />
   </bpmn:process>
   <bpmn:error id="Error_0kd2o2a" name="java.lang.Exception" errorCode="java.lang.Exception" />
   <bpmndi:BPMNDiagram id="BPMNDiagram_1">
@@ -213,8 +225,8 @@
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_15s0okp_di" bpmnElement="SequenceFlow_15s0okp">
-        <di:waypoint x="-398" y="120" />
-        <di:waypoint x="-365" y="120" />
+        <di:waypoint xsi:type="dc:Point" x="-398" y="120" />
+        <di:waypoint xsi:type="dc:Point" x="-365" y="120" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="-381" y="99" width="0" height="0" />
         </bpmndi:BPMNLabel>
@@ -223,8 +235,8 @@
         <dc:Bounds x="560" y="80" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_0mqrkxv_di" bpmnElement="SequenceFlow_0mqrkxv">
-        <di:waypoint x="339" y="120" />
-        <di:waypoint x="400" y="120" />
+        <di:waypoint xsi:type="dc:Point" x="339" y="120" />
+        <di:waypoint xsi:type="dc:Point" x="400" y="120" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="324.5" y="105" width="90" height="0" />
         </bpmndi:BPMNLabel>
@@ -239,9 +251,9 @@
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_1m2eezj_di" bpmnElement="SequenceFlow_1m2eezj">
-        <di:waypoint x="949" y="132" />
-        <di:waypoint x="980" y="165" />
-        <di:waypoint x="1060" y="165" />
+        <di:waypoint xsi:type="dc:Point" x="949" y="132" />
+        <di:waypoint xsi:type="dc:Point" x="980" y="165" />
+        <di:waypoint xsi:type="dc:Point" x="1060" y="165" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="968" y="168" width="83" height="12" />
         </bpmndi:BPMNLabel>
@@ -250,15 +262,15 @@
         <dc:Bounds x="-365" y="80" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNShape id="ServiceTask_0654g3m_di" bpmnElement="Task_SendSync">
-        <dc:Bounds x="-132" y="-6" width="100" height="80" />
+        <dc:Bounds x="-100" y="-76" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNShape id="ServiceTask_0wzh11j_di" bpmnElement="Task_UpdateRequestComplete">
         <dc:Bounds x="1161" y="206" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_1pz6edz_di" bpmnElement="SequenceFlow_1pz6edz">
-        <di:waypoint x="1261" y="246" />
-        <di:waypoint x="1322" y="246" />
-        <di:waypoint x="1322" y="183" />
+        <di:waypoint xsi:type="dc:Point" x="1261" y="246" />
+        <di:waypoint xsi:type="dc:Point" x="1322" y="246" />
+        <di:waypoint xsi:type="dc:Point" x="1322" y="183" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1247" y="231" width="90" height="0" />
         </bpmndi:BPMNLabel>
@@ -279,16 +291,16 @@
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_0v588sm_di" bpmnElement="SequenceFlow_0v588sm">
-        <di:waypoint x="936" y="145" />
-        <di:waypoint x="936" y="262" />
-        <di:waypoint x="339" y="262" />
+        <di:waypoint xsi:type="dc:Point" x="936" y="145" />
+        <di:waypoint xsi:type="dc:Point" x="936" y="262" />
+        <di:waypoint xsi:type="dc:Point" x="339" y="262" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="769.202380952381" y="272" width="73" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_1atzsgn_di" bpmnElement="SequenceFlow_1atzsgn">
-        <di:waypoint x="289" y="222" />
-        <di:waypoint x="289" y="160" />
+        <di:waypoint xsi:type="dc:Point" x="289" y="222" />
+        <di:waypoint xsi:type="dc:Point" x="289" y="160" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="259" y="191" width="90" height="0" />
         </bpmndi:BPMNLabel>
@@ -297,16 +309,16 @@
         <dc:Bounds x="239" y="222" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_0vc9go9_di" bpmnElement="SequenceFlow_0vc9go9">
-        <di:waypoint x="-265" y="120" />
-        <di:waypoint x="-228" y="120" />
+        <di:waypoint xsi:type="dc:Point" x="-265" y="120" />
+        <di:waypoint xsi:type="dc:Point" x="-228" y="120" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="-246" y="105" width="0" height="0" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_11530ei_di" bpmnElement="SequenceFlow_11530ei">
-        <di:waypoint x="946" y="105" />
-        <di:waypoint x="983" y="44" />
-        <di:waypoint x="1060" y="45" />
+        <di:waypoint xsi:type="dc:Point" x="946" y="105" />
+        <di:waypoint xsi:type="dc:Point" x="983" y="44" />
+        <di:waypoint xsi:type="dc:Point" x="1060" y="45" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="975" y="17" width="58" height="12" />
         </bpmndi:BPMNLabel>
@@ -321,28 +333,19 @@
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_1p8yxu6_di" bpmnElement="SequenceFlow_1p8yxu6">
-        <di:waypoint x="1276" y="-36" />
-        <di:waypoint x="1359" y="-36" />
-        <di:waypoint x="1359" y="45" />
-        <di:waypoint x="1386" y="45" />
+        <di:waypoint xsi:type="dc:Point" x="1276" y="-36" />
+        <di:waypoint xsi:type="dc:Point" x="1359" y="-36" />
+        <di:waypoint xsi:type="dc:Point" x="1359" y="45" />
+        <di:waypoint xsi:type="dc:Point" x="1386" y="45" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1329" y="5" width="90" height="0" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
-      <bpmndi:BPMNEdge id="SequenceFlow_1wb59ic_di" bpmnElement="SequenceFlow_1wb59ic">
-        <di:waypoint x="-32" y="34" />
-        <di:waypoint x="32" y="34" />
-        <di:waypoint x="32" y="120" />
-        <di:waypoint x="80" y="120" />
-        <bpmndi:BPMNLabel>
-          <dc:Bounds x="47" y="77" width="0" height="0" />
-        </bpmndi:BPMNLabel>
-      </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_01j184u_di" bpmnElement="SequenceFlow_01j184u">
-        <di:waypoint x="936" y="95" />
-        <di:waypoint x="936" y="55" />
-        <di:waypoint x="936" y="55" />
-        <di:waypoint x="936" y="4" />
+        <di:waypoint xsi:type="dc:Point" x="936" y="95" />
+        <di:waypoint xsi:type="dc:Point" x="936" y="55" />
+        <di:waypoint xsi:type="dc:Point" x="936" y="55" />
+        <di:waypoint xsi:type="dc:Point" x="936" y="4" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="906" y="49" width="90" height="0" />
         </bpmndi:BPMNLabel>
@@ -357,16 +360,16 @@
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_0sckerv_di" bpmnElement="SequenceFlow_0sckerv">
-        <di:waypoint x="-202" y="96" />
-        <di:waypoint x="-202" y="34" />
-        <di:waypoint x="-132" y="34" />
+        <di:waypoint xsi:type="dc:Point" x="-202" y="96" />
+        <di:waypoint xsi:type="dc:Point" x="-202" y="-36" />
+        <di:waypoint xsi:type="dc:Point" x="-100" y="-36" />
         <bpmndi:BPMNLabel>
-          <dc:Bounds x="-195" y="55.55555555555556" width="18" height="12" />
+          <dc:Bounds x="-195" y="17.612903225806477" width="19" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_0unbew4_di" bpmnElement="SequenceFlow_0unbew4">
-        <di:waypoint x="-178" y="120" />
-        <di:waypoint x="80" y="120" />
+        <di:waypoint xsi:type="dc:Point" x="-178" y="120" />
+        <di:waypoint xsi:type="dc:Point" x="80" y="120" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="-87" y="99.95468180757382" width="12" height="12" />
         </bpmndi:BPMNLabel>
@@ -378,16 +381,16 @@
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_02ksbt0_di" bpmnElement="SequenceFlow_02ksbt0">
-        <di:waypoint x="1085" y="20" />
-        <di:waypoint x="1085" y="-37" />
-        <di:waypoint x="1176" y="-37" />
+        <di:waypoint xsi:type="dc:Point" x="1085" y="20" />
+        <di:waypoint xsi:type="dc:Point" x="1085" y="-37" />
+        <di:waypoint xsi:type="dc:Point" x="1176" y="-37" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1091" y="-8" width="19" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_1r570x3_di" bpmnElement="SequenceFlow_1r570x3">
-        <di:waypoint x="1110" y="45" />
-        <di:waypoint x="1386" y="45" />
+        <di:waypoint xsi:type="dc:Point" x="1110" y="45" />
+        <di:waypoint xsi:type="dc:Point" x="1386" y="45" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1242" y="20" width="12" height="12" />
         </bpmndi:BPMNLabel>
@@ -399,10 +402,10 @@
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_0x4urgp_di" bpmnElement="SequenceFlow_0x4urgp">
-        <di:waypoint x="1110" y="165" />
-        <di:waypoint x="1220" y="165" />
-        <di:waypoint x="1220" y="165" />
-        <di:waypoint x="1304" y="165" />
+        <di:waypoint xsi:type="dc:Point" x="1110" y="165" />
+        <di:waypoint xsi:type="dc:Point" x="1220" y="165" />
+        <di:waypoint xsi:type="dc:Point" x="1220" y="165" />
+        <di:waypoint xsi:type="dc:Point" x="1304" y="165" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1256" y="140" width="12" height="12" />
         </bpmndi:BPMNLabel>
@@ -414,9 +417,9 @@
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_11dlyzt_di" bpmnElement="SequenceFlow_11dlyzt">
-        <di:waypoint x="289" y="302" />
-        <di:waypoint x="289" y="368" />
-        <di:waypoint x="960" y="368" />
+        <di:waypoint xsi:type="dc:Point" x="289" y="302" />
+        <di:waypoint xsi:type="dc:Point" x="289" y="368" />
+        <di:waypoint xsi:type="dc:Point" x="960" y="368" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="381.45685840707966" y="325" width="63" height="24" />
         </bpmndi:BPMNLabel>
@@ -428,33 +431,33 @@
         <dc:Bounds x="960" y="325" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_0l7kaba_di" bpmnElement="SequenceFlow_0l7kaba">
-        <di:waypoint x="942" y="139" />
-        <di:waypoint x="976" y="252" />
-        <di:waypoint x="1016" y="252" />
-        <di:waypoint x="1016" y="325" />
+        <di:waypoint xsi:type="dc:Point" x="942" y="139" />
+        <di:waypoint xsi:type="dc:Point" x="976" y="252" />
+        <di:waypoint xsi:type="dc:Point" x="1016" y="252" />
+        <di:waypoint xsi:type="dc:Point" x="1016" y="325" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="959" y="255" width="52" height="24" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_1edjl5x_di" bpmnElement="SequenceFlow_1edjl5x">
-        <di:waypoint x="556" y="657" />
-        <di:waypoint x="602" y="657" />
+        <di:waypoint xsi:type="dc:Point" x="556" y="657" />
+        <di:waypoint xsi:type="dc:Point" x="602" y="657" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="534" y="636" width="90" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_0wvzfgf_di" bpmnElement="SequenceFlow_0wvzfgf">
-        <di:waypoint x="813" y="657" />
-        <di:waypoint x="880" y="657" />
+        <di:waypoint xsi:type="dc:Point" x="813" y="657" />
+        <di:waypoint xsi:type="dc:Point" x="880" y="657" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="801.5" y="636" width="90" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_1ui67mc_di" bpmnElement="SequenceFlow_1ui67mc">
-        <di:waypoint x="1060" y="365" />
-        <di:waypoint x="1134" y="365" />
-        <di:waypoint x="1134" y="365" />
-        <di:waypoint x="1159" y="365" />
+        <di:waypoint xsi:type="dc:Point" x="1060" y="365" />
+        <di:waypoint xsi:type="dc:Point" x="1134" y="365" />
+        <di:waypoint xsi:type="dc:Point" x="1134" y="365" />
+        <di:waypoint xsi:type="dc:Point" x="1159" y="365" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1104" y="359" width="90" height="13" />
         </bpmndi:BPMNLabel>
@@ -466,25 +469,25 @@
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_024g0d1_di" bpmnElement="SequenceFlow_024g0d1">
-        <di:waypoint x="652" y="657" />
-        <di:waypoint x="683" y="657" />
-        <di:waypoint x="683" y="657" />
-        <di:waypoint x="713" y="657" />
+        <di:waypoint xsi:type="dc:Point" x="652" y="657" />
+        <di:waypoint xsi:type="dc:Point" x="683" y="657" />
+        <di:waypoint xsi:type="dc:Point" x="683" y="657" />
+        <di:waypoint xsi:type="dc:Point" x="713" y="657" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="677" y="634" width="12" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_0vi883o_di" bpmnElement="SequenceFlow_0vi883o">
-        <di:waypoint x="627" y="632" />
-        <di:waypoint x="627" y="548" />
-        <di:waypoint x="713" y="548" />
+        <di:waypoint xsi:type="dc:Point" x="627" y="632" />
+        <di:waypoint xsi:type="dc:Point" x="627" y="548" />
+        <di:waypoint xsi:type="dc:Point" x="713" y="548" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="633" y="584" width="18" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_0eana0l_di" bpmnElement="SequenceFlow_0eana0l">
-        <di:waypoint x="763" y="588" />
-        <di:waypoint x="763" y="617" />
+        <di:waypoint xsi:type="dc:Point" x="763" y="588" />
+        <di:waypoint xsi:type="dc:Point" x="763" y="617" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="778" y="596.5" width="0" height="12" />
         </bpmndi:BPMNLabel>
@@ -511,15 +514,15 @@
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_11d126w_di" bpmnElement="SequenceFlow_11d126w">
-        <di:waypoint x="606" y="875" />
-        <di:waypoint x="690" y="875" />
+        <di:waypoint xsi:type="dc:Point" x="606" y="875" />
+        <di:waypoint xsi:type="dc:Point" x="690" y="875" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="603" y="854" width="0" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_0w4sx88_di" bpmnElement="SequenceFlow_0w4sx88">
-        <di:waypoint x="790" y="875" />
-        <di:waypoint x="856" y="875" />
+        <di:waypoint xsi:type="dc:Point" x="790" y="875" />
+        <di:waypoint xsi:type="dc:Point" x="856" y="875" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="778" y="854" width="0" height="12" />
         </bpmndi:BPMNLabel>
@@ -528,25 +531,25 @@
         <dc:Bounds x="400" y="80" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_0mew9im_di" bpmnElement="SequenceFlow_0mew9im">
-        <di:waypoint x="500" y="120" />
-        <di:waypoint x="560" y="120" />
+        <di:waypoint xsi:type="dc:Point" x="500" y="120" />
+        <di:waypoint xsi:type="dc:Point" x="560" y="120" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="530" y="99" width="0" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_0kf5sen_di" bpmnElement="SequenceFlow_0kf5sen">
-        <di:waypoint x="1085" y="190" />
-        <di:waypoint x="1085" y="246" />
-        <di:waypoint x="1161" y="246" />
+        <di:waypoint xsi:type="dc:Point" x="1085" y="190" />
+        <di:waypoint xsi:type="dc:Point" x="1085" y="246" />
+        <di:waypoint xsi:type="dc:Point" x="1161" y="246" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="1091" y="218" width="19" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_1tfizxf_di" bpmnElement="SequenceFlow_1tfizxf">
-        <di:waypoint x="180" y="120" />
-        <di:waypoint x="211" y="120" />
-        <di:waypoint x="211" y="120" />
-        <di:waypoint x="239" y="120" />
+        <di:waypoint xsi:type="dc:Point" x="180" y="120" />
+        <di:waypoint xsi:type="dc:Point" x="211" y="120" />
+        <di:waypoint xsi:type="dc:Point" x="211" y="120" />
+        <di:waypoint xsi:type="dc:Point" x="239" y="120" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="226" y="120" width="0" height="0" />
         </bpmndi:BPMNLabel>
@@ -558,27 +561,60 @@
         <dc:Bounds x="735" y="80" width="100" height="80" />
       </bpmndi:BPMNShape>
       <bpmndi:BPMNEdge id="SequenceFlow_1hsqed1_di" bpmnElement="SequenceFlow_1hsqed1">
-        <di:waypoint x="660" y="120" />
-        <di:waypoint x="735" y="120" />
+        <di:waypoint xsi:type="dc:Point" x="660" y="120" />
+        <di:waypoint xsi:type="dc:Point" x="735" y="120" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="697.5" y="99" width="0" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_1fftixk_di" bpmnElement="SequenceFlow_1fftixk">
-        <di:waypoint x="835" y="120" />
-        <di:waypoint x="911" y="120" />
+        <di:waypoint xsi:type="dc:Point" x="835" y="120" />
+        <di:waypoint xsi:type="dc:Point" x="911" y="120" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="873" y="99" width="0" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
       <bpmndi:BPMNEdge id="SequenceFlow_1pnkpim_di" bpmnElement="SequenceFlow_1pnkpim">
-        <di:waypoint x="886" y="-36" />
-        <di:waypoint x="289" y="-36" />
-        <di:waypoint x="289" y="80" />
+        <di:waypoint xsi:type="dc:Point" x="886" y="-36" />
+        <di:waypoint xsi:type="dc:Point" x="289" y="-36" />
+        <di:waypoint xsi:type="dc:Point" x="289" y="80" />
         <bpmndi:BPMNLabel>
           <dc:Bounds x="587.5" y="-57" width="0" height="12" />
         </bpmndi:BPMNLabel>
       </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="ExclusiveGateway_1dez26n_di" bpmnElement="ExclusiveGateway_1dez26n" isMarkerVisible="true">
+        <dc:Bounds x="105" y="-61" width="50" height="50" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="163" y="-48" width="61" height="24" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_1lrz41x_di" bpmnElement="SequenceFlow_1lrz41x">
+        <di:waypoint xsi:type="dc:Point" x="0" y="-36" />
+        <di:waypoint xsi:type="dc:Point" x="105" y="-36" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="52.5" y="-57" width="0" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge id="SequenceFlow_0etawv5_di" bpmnElement="SequenceFlow_0etawv5">
+        <di:waypoint xsi:type="dc:Point" x="130" y="-11" />
+        <di:waypoint xsi:type="dc:Point" x="130" y="80" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="139" y="29" width="12" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNShape id="EndEvent_12f15tu_di" bpmnElement="EndEvent_12f15tu">
+        <dc:Bounds x="112" y="-169.83592938733125" width="36" height="36" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="120" y="-195" width="19" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge id="SequenceFlow_0ilo6lo_di" bpmnElement="SequenceFlow_0ilo6lo">
+        <di:waypoint xsi:type="dc:Point" x="130" y="-61" />
+        <di:waypoint xsi:type="dc:Point" x="130" y="-134" />
+        <bpmndi:BPMNLabel>
+          <dc:Bounds x="136" y="-103" width="19" height="12" />
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
     </bpmndi:BPMNPlane>
   </bpmndi:BPMNDiagram>
 </bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareServiceInstanceDataTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareServiceInstanceDataTest.groovy
index afbace7..715a7df 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareServiceInstanceDataTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareServiceInstanceDataTest.groovy
@@ -1,3 +1,23 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
 package org.onap.so.bpmn.infrastructure.scripts
 
 import org.camunda.bpm.engine.delegate.BpmnError
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/FlowCompletionTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/FlowCompletionTasks.java
index e809ecd..206942f 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/FlowCompletionTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/FlowCompletionTasks.java
@@ -20,27 +20,14 @@
 
 package org.onap.so.bpmn.infrastructure.workflow.tasks;
 
-import java.util.ArrayList;
-import java.util.List;
-import org.camunda.bpm.engine.delegate.BpmnError;
-import org.camunda.bpm.engine.delegate.DelegateExecution;
 import org.onap.so.bpmn.common.BuildingBlockExecution;
-import org.onap.so.bpmn.common.workflow.context.WorkflowCallbackResponse;
-import org.onap.so.bpmn.common.workflow.context.WorkflowContextHolder;
 import org.onap.so.bpmn.core.WorkflowException;
-import org.onap.so.bpmn.servicedecomposition.entities.BuildingBlock;
-import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock;
-import org.onap.so.client.exception.ExceptionBuilder;
 import org.onap.so.db.request.beans.InfraActiveRequests;
 import org.onap.so.db.request.client.RequestsDbClient;
-import org.onap.so.serviceinstancebeans.RequestReferences;
-import org.onap.so.serviceinstancebeans.ServiceInstancesResponse;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
 
 @Component
 public class FlowCompletionTasks {
@@ -50,7 +37,9 @@
     @Autowired
     private RequestsDbClient requestDbclient;
 
+
     public void updateRequestDbStatus(BuildingBlockExecution execution) {
+
         try {
             String requestId = execution.getGeneralBuildingBlock().getRequestContext().getMsoRequestId();
             InfraActiveRequests request = requestDbclient.getInfraActiveRequestbyRequestId(requestId);
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
index 1f07166..11c6455 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
@@ -197,7 +197,9 @@
                 suppressRollback = false;
             }
             execution.setVariable("suppressRollback", suppressRollback);
+            boolean isResume = false;
             if (isUriResume(uri)) {
+                isResume = true;
                 logger.debug("replacing URI {}", uri);
                 uri = bbInputSetupUtils.loadOriginalInfraActiveRequestById(requestId).getRequestUrl();
                 logger.debug("for RESUME with original value {}", uri);
@@ -225,6 +227,12 @@
                 if (flowsToExecute == null) {
                     buildAndThrowException(execution, "Could not resume Macro flow. Error loading execution path.");
                 }
+            } else if (aLaCarte && isResume) {
+                flowsToExecute = bbInputSetupUtils.loadOriginalFlowExecutionPath(requestId);
+                if (flowsToExecute == null) {
+                    buildAndThrowException(execution,
+                            "Could not resume request with request Id: " + requestId + ". No flowsToExecute was found");
+                }
             } else {
                 if (aLaCarte) {
                     if (orchFlows == null || orchFlows.isEmpty()) {
@@ -387,7 +395,7 @@
                 flowNames.add(ebb.getBuildingBlock().getBpmnFlowName());
             }
 
-            if (!aLaCarte) {
+            if (!isResume) {
                 bbInputSetupUtils.persistFlowExecutionPath(requestId, flowsToExecute);
             }
             execution.setVariable("flowNames", flowNames);
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java
index eea8852..be6fc94 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionTest.java
@@ -45,11 +45,9 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Optional;
-import java.util.Set;
 import java.util.UUID;
 import org.camunda.bpm.engine.delegate.BpmnError;
 import org.camunda.bpm.engine.delegate.DelegateExecution;
@@ -66,7 +64,6 @@
 import org.onap.aai.domain.yang.GenericVnf;
 import org.onap.aai.domain.yang.GenericVnfs;
 import org.onap.aai.domain.yang.L3Network;
-import org.onap.aai.domain.yang.L3Networks;
 import org.onap.aai.domain.yang.Relationship;
 import org.onap.aai.domain.yang.RelationshipList;
 import org.onap.aai.domain.yang.ServiceInstance;
@@ -80,7 +77,6 @@
 import org.onap.so.bpmn.servicedecomposition.entities.BuildingBlock;
 import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock;
 import org.onap.so.bpmn.servicedecomposition.entities.WorkflowResourceIds;
-import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoVfModule;
 import org.onap.so.bpmn.servicedecomposition.tasks.exceptions.DuplicateNameException;
 import org.onap.so.client.aai.AAIObjectType;
 import org.onap.so.client.aai.entities.AAIResultWrapper;
@@ -103,8 +99,6 @@
 import org.onap.so.db.catalog.beans.VfModuleCustomization;
 import org.onap.so.db.catalog.beans.macro.NorthBoundRequest;
 import org.onap.so.db.catalog.beans.macro.OrchestrationFlow;
-import org.onap.so.db.request.beans.InfraActiveRequests;
-import org.onap.so.db.request.beans.RequestProcessingData;
 import org.onap.so.serviceinstancebeans.ModelInfo;
 import org.onap.so.serviceinstancebeans.RequestDetails;
 import org.onap.so.serviceinstancebeans.RequestParameters;
@@ -1476,9 +1470,19 @@
     }
 
     @Test
+    public void extractResourceIdAndTypeFromUriResumeTest() {
+        Resource resource = workflowAction.extractResourceIdAndTypeFromUri(
+                "http://localhost:9100/onap/so/infra/serviceInstantiation/v7/serviceInstances/4ff87c63-461b-4d83-8121-d351e6db216c/vnfs/eea9b93b-b5b9-4fad-9c35-12d52e4b683f/vfModules/33cb74cd-9cb3-4090-a3c0-1b8c8e235847/resume");
+        assertEquals(resource.getResourceId(), "33cb74cd-9cb3-4090-a3c0-1b8c8e235847");
+    }
+
+    @Test
     public void isUriResumeTest() {
         assertTrue(workflowAction.isUriResume(
                 "http://localhost:9100/onap/so/infra/orchestrationRequests/v7/requests/2f8ab587-ef6a-4456-b7b2-d73f9363dabd/resume"));
+        assertTrue(workflowAction.isUriResume(
+                "        http://localhost:9100/onap/so/infra/serviceInstantiation/v7/serviceInstances/4ff87c63-461b-4d83-8121-d351e6db216c/vnfs/eea9b93b-b5b9-4fad-9c35-12d52e4b683f/vfModules/33cb74cd-9cb3-4090-a3c0-1b8c8e235847/resume"));
+
         assertFalse(workflowAction.isUriResume("/v6/serviceInstances/123/vnfs/1234/vfmodules/5678/replace"));
     }
 
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/camundabeans/CamundaVIDRequest.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/camundabeans/CamundaVIDRequest.java
index 3880bd4..0f51341 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/camundabeans/CamundaVIDRequest.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/camundabeans/CamundaVIDRequest.java
@@ -116,6 +116,9 @@
         return serviceInput;
     }
 
+    @JsonProperty(CommonConstants.GENERATE_IDS)
+    private CamundaBooleanInput generateIds;
+
     @JsonProperty(CommonConstants.CAMUNDA_SERVICE_INPUT)
     public void setServiceInput(CamundaInput serviceInput) {
         this.serviceInput = serviceInput;
@@ -347,6 +350,12 @@
         return "CamundaRequest";
     }
 
+    public CamundaBooleanInput getGenerateIds() {
+        return generateIds;
+    }
 
+    public void setGenerateIds(CamundaBooleanInput generateIds) {
+        this.generateIds = generateIds;
+    }
 
 }
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java
index 5dd99f5..bc8af6e 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java
@@ -99,6 +99,7 @@
         return response;
     }
 
+    @Override
     public HttpResponse post(RequestClientParameter parameterObject) throws IOException {
         HttpPost post = new HttpPost(url);
         logger.debug(CAMUNDA_URL_MESAGE + url);
@@ -110,7 +111,7 @@
                 parameterObject.getVnfType(), parameterObject.getVfModuleType(), parameterObject.getNetworkType(),
                 parameterObject.getRequestDetails(), parameterObject.getApiVersion(), parameterObject.isaLaCarte(),
                 parameterObject.getRequestUri(), parameterObject.getRecipeParamXsd(),
-                parameterObject.getInstanceGroupId());
+                parameterObject.getInstanceGroupId(), parameterObject.isGenerateIdsOnly());
 
         StringEntity input = new StringEntity(jsonReq);
         input.setContentType(CommonConstants.CONTENT_TYPE_JSON);
@@ -169,7 +170,7 @@
             String serviceInstanceId, String pnfCorrelationId, String vnfId, String vfModuleId, String volumeGroupId,
             String networkId, String configurationId, String serviceType, String vnfType, String vfModuleType,
             String networkType, String requestDetails, String apiVersion, boolean aLaCarte, String requestUri,
-            String paramXsd, String instanceGroupId) {
+            String paramXsd, String instanceGroupId, boolean generateIdsOnly) {
         String jsonReq = null;
 
         try {
@@ -196,6 +197,8 @@
             CamundaInput requestUriInput = new CamundaInput();
             CamundaInput recipeParamsInput = new CamundaInput();
             CamundaInput instanceGroupIdInput = new CamundaInput();
+            CamundaBooleanInput generateIds = new CamundaBooleanInput();
+
 
             requestIdInput.setValue(StringUtils.defaultString(requestId));
             isBaseVfModuleInput.setValue(isBaseVfModule);
@@ -217,6 +220,7 @@
             requestUriInput.setValue(StringUtils.defaultString(requestUri));
             recipeParamsInput.setValue(paramXsd);
             instanceGroupIdInput.setValue(StringUtils.defaultString(instanceGroupId));
+            generateIds.setValue(generateIdsOnly);
 
             serviceInput.setValue(requestDetails);
             camundaRequest.setServiceInput(serviceInput);
@@ -242,6 +246,7 @@
             camundaRequest.setRequestUri(requestUriInput);
             camundaRequest.setRecipeParams(recipeParamsInput);
             camundaRequest.setInstanceGroupId(instanceGroupIdInput);
+            camundaRequest.setGenerateIds(generateIds);
 
             ObjectMapper mapper = new ObjectMapper();
             mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CommonConstants.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CommonConstants.java
index e48c98a..6d2bbfc 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CommonConstants.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CommonConstants.java
@@ -81,6 +81,7 @@
     public static final String X_LATEST_VERSION = "X-LatestVersion";
     public static final String INSTANCE_GROUP_ID = "instanceGroupId";
     public static final String INSTANCE_GROUP_INSTANCE_ID = "instanceGroupInstanceId";
+    public static final String GENERATE_IDS = "generateIdsOnly";
 
     private CommonConstants() {
         // prevent creating an instance of this class
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/RequestClientParameter.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/RequestClientParameter.java
index 20c512a..e098ea4 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/RequestClientParameter.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/RequestClientParameter.java
@@ -44,6 +44,7 @@
     private String recipeParamXsd;
     private String requestUri;
     private String instanceGroupId;
+    private boolean generateIdsOnly;
 
     private RequestClientParameter(Builder builder) {
         requestId = builder.requestId;
@@ -67,7 +68,7 @@
         aLaCarte = builder.aLaCarte;
         requestUri = builder.requestUri;
         instanceGroupId = builder.instanceGroupId;
-
+        generateIdsOnly = builder.generateIdsOnly;
     }
 
     public String getRequestId() {
@@ -154,6 +155,14 @@
         return instanceGroupId;
     }
 
+    public boolean isGenerateIdsOnly() {
+        return generateIdsOnly;
+    }
+
+    public void setGenerateIdsOnly(boolean generateIdsOnly) {
+        this.generateIdsOnly = generateIdsOnly;
+    }
+
     public static class Builder {
         private String requestId;
         private boolean isBaseVfModule = false;
@@ -176,6 +185,7 @@
         private String recipeParamXsd;
         private String requestUri;
         private String instanceGroupId;
+        private boolean generateIdsOnly;
 
         public Builder setRequestId(String requestId) {
             this.requestId = requestId;
@@ -282,6 +292,11 @@
             return this;
         }
 
+        public Builder setGenerateIds(boolean generateIdsOnly) {
+            this.generateIdsOnly = generateIdsOnly;
+            return this;
+        }
+
         public RequestClientParameter build() {
             return new RequestClientParameter(this);
         }
diff --git a/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/common/CamundaClientTest.java b/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/common/CamundaClientTest.java
index 36d004e..94c62a9 100644
--- a/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/common/CamundaClientTest.java
+++ b/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/common/CamundaClientTest.java
@@ -47,11 +47,11 @@
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.MockitoAnnotations;
+import org.skyscreamer.jsonassert.JSONAssert;
 import org.springframework.mock.env.MockEnvironment;
 import com.fasterxml.jackson.core.JsonGenerationException;
 import com.fasterxml.jackson.databind.JsonMappingException;
 
-
 /**
  * This class implements test methods of Camunda Beans.
  *
@@ -164,10 +164,10 @@
         String testResult = testClient.wrapVIDRequest(requestId, isBaseVfModule, recipeTimeout, requestAction,
                 serviceInstanceId, pnfCorrelationId, vnfId, vfModuleId, volumeGroupId, networkId, configurationId,
                 serviceType, vnfType, vfModuleType, networkType, requestDetails, apiVersion, aLaCarte, requestUri, "",
-                instanceGroupId);
+                instanceGroupId, false);
         String expected = inputStream("/WrappedVIDRequest.json");
 
-        assertEquals(expected, testResult);
+        JSONAssert.assertEquals(expected, testResult, false);
     }
 
     @Test
diff --git a/mso-api-handlers/mso-api-handler-common/src/test/resources/CamundaClientTest/WrappedVIDRequest.json b/mso-api-handlers/mso-api-handler-common/src/test/resources/CamundaClientTest/WrappedVIDRequest.json
index b9d0a8c..3353f8c 100644
--- a/mso-api-handlers/mso-api-handler-common/src/test/resources/CamundaClientTest/WrappedVIDRequest.json
+++ b/mso-api-handlers/mso-api-handler-common/src/test/resources/CamundaClientTest/WrappedVIDRequest.json
@@ -1 +1,102 @@
-{"variables":{"bpmnRequest":{"value":"{requestDetails: }","type":"String"},"requestId":{"value":"f7ce78bb-423b-11e7-93f8-0050569a796","type":"String"},"mso-request-id":{"value":"f7ce78bb-423b-11e7-93f8-0050569a796","type":"String"},"isBaseVfModule":{"value":true,"type":"Boolean"},"recipeTimeout":{"value":10000,"type":"Integer"},"requestAction":{"value":"createInstance","type":"String"},"serviceInstanceId":{"value":"12345679","type":"String"},"pnfCorrelationId":{"value":"12345679","type":"String"},"vnfId":{"value":"234567891","type":"String"},"vfModuleId":{"value":"345678912","type":"String"},"volumeGroupId":{"value":"456789123","type":"String"},"networkId":{"value":"567891234","type":"String"},"configurationId":{"value":"678912345","type":"String"},"serviceType":{"value":"testService","type":"String"},"vnfType":{"value":"testVnf","type":"String"},"vfModuleType":{"value":"vfModuleType","type":"String"},"networkType":{"value":"networkType","type":"String"},"recipeParams":{"value":"","type":"String"},"host":{"value":null,"type":"String"},"apiVersion":{"value":"6","type":"String"},"aLaCarte":{"value":true,"type":"Boolean"},"requestUri":{"value":"v7/serviceInstances/assign","type":"String"},"instanceGroupId":{"value":"ff305d54-75b4-431b-adb2-eb6b9e5ff000","type":"String"}}}
\ No newline at end of file
+{
+	"variables": {
+		"bpmnRequest": {
+			"value": "{requestDetails: }",
+			"type": "String"
+		},
+		"requestId": {
+			"value": "f7ce78bb-423b-11e7-93f8-0050569a796",
+			"type": "String"
+		},
+		"mso-request-id": {
+			"value": "f7ce78bb-423b-11e7-93f8-0050569a796",
+			"type": "String"
+		},
+		"isBaseVfModule": {
+			"value": true,
+			"type": "Boolean"
+		},
+		"recipeTimeout": {
+			"value": 10000,
+			"type": "Integer"
+		},
+		"requestAction": {
+			"value": "createInstance",
+			"type": "String"
+		},
+		"serviceInstanceId": {
+			"value": "12345679",
+			"type": "String"
+		},
+		"pnfCorrelationId": {
+			"value": "12345679",
+			"type": "String"
+		},
+		"vnfId": {
+			"value": "234567891",
+			"type": "String"
+		},
+		"vfModuleId": {
+			"value": "345678912",
+			"type": "String"
+		},
+		"volumeGroupId": {
+			"value": "456789123",
+			"type": "String"
+		},
+		"networkId": {
+			"value": "567891234",
+			"type": "String"
+		},
+		"configurationId": {
+			"value": "678912345",
+			"type": "String"
+		},
+		"serviceType": {
+			"value": "testService",
+			"type": "String"
+		},
+		"vnfType": {
+			"value": "testVnf",
+			"type": "String"
+		},
+		"vfModuleType": {
+			"value": "vfModuleType",
+			"type": "String"
+		},
+		"networkType": {
+			"value": "networkType",
+			"type": "String"
+		},
+		"recipeParams": {
+			"value": "",
+			"type": "String"
+		},
+		"host": {
+			"value": null,
+			"type": "String"
+		},
+		"apiVersion": {
+			"value": "6",
+			"type": "String"
+		},
+		"aLaCarte": {
+			"value": true,
+			"type": "Boolean"
+		},
+		"requestUri": {
+			"value": "v7/serviceInstances/assign",
+			"type": "String"
+		},
+		"instanceGroupId": {
+			"value": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+			"type": "String"
+		},
+		"generateIdsOnly": {
+			"value": false,
+			"type": "Boolean"
+		}
+	}
+}
+
+
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/RequestHandlerUtils.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/RequestHandlerUtils.java
index dc38d4e..8cdc2aa 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/RequestHandlerUtils.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/RequestHandlerUtils.java
@@ -56,13 +56,22 @@
 import org.onap.so.apihandlerinfra.exceptions.ClientConnectionException;
 import org.onap.so.apihandlerinfra.exceptions.ContactCamundaException;
 import org.onap.so.apihandlerinfra.exceptions.DuplicateRequestException;
+import org.onap.so.apihandlerinfra.exceptions.RecipeNotFoundException;
 import org.onap.so.apihandlerinfra.exceptions.RequestDbFailureException;
 import org.onap.so.apihandlerinfra.exceptions.ValidateException;
 import org.onap.so.apihandlerinfra.exceptions.VfModuleNotFoundException;
 import org.onap.so.apihandlerinfra.infra.rest.handler.AbstractRestHandler;
 import org.onap.so.apihandlerinfra.logging.ErrorLoggerInfo;
 import org.onap.so.constants.Status;
+import org.onap.so.db.catalog.beans.NetworkResource;
+import org.onap.so.db.catalog.beans.NetworkResourceCustomization;
+import org.onap.so.db.catalog.beans.Recipe;
+import org.onap.so.db.catalog.beans.ServiceRecipe;
 import org.onap.so.db.catalog.beans.VfModule;
+import org.onap.so.db.catalog.beans.VfModuleCustomization;
+import org.onap.so.db.catalog.beans.VnfRecipe;
+import org.onap.so.db.catalog.beans.VnfResource;
+import org.onap.so.db.catalog.beans.VnfResourceCustomization;
 import org.onap.so.db.catalog.client.CatalogDbClient;
 import org.onap.so.db.request.beans.InfraActiveRequests;
 import org.onap.so.db.request.client.RequestsDbClient;
@@ -70,13 +79,19 @@
 import org.onap.so.logger.ErrorCode;
 import org.onap.so.logger.LogConstants;
 import org.onap.so.logger.MessageEnum;
+import org.onap.so.serviceinstancebeans.CloudConfiguration;
 import org.onap.so.serviceinstancebeans.ModelInfo;
 import org.onap.so.serviceinstancebeans.ModelType;
+import org.onap.so.serviceinstancebeans.Networks;
 import org.onap.so.serviceinstancebeans.RelatedInstance;
 import org.onap.so.serviceinstancebeans.RelatedInstanceList;
+import org.onap.so.serviceinstancebeans.RequestDetails;
 import org.onap.so.serviceinstancebeans.RequestParameters;
+import org.onap.so.serviceinstancebeans.Service;
 import org.onap.so.serviceinstancebeans.ServiceInstancesRequest;
 import org.onap.so.serviceinstancebeans.ServiceInstancesResponse;
+import org.onap.so.serviceinstancebeans.VfModules;
+import org.onap.so.serviceinstancebeans.Vnfs;
 import org.onap.so.utils.UUIDChecker;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -95,6 +110,8 @@
     private static Logger logger = LoggerFactory.getLogger(RequestHandlerUtils.class);
 
     private static final String SAVE_TO_DB = "save instance to db";
+    private static final String NAME = "name";
+    private static final String VALUE = "value";
 
     @Autowired
     private Environment env;
@@ -119,13 +136,14 @@
 
     public Response postBPELRequest(InfraActiveRequests currentActiveReq, RequestClientParameter requestClientParameter,
             String orchestrationUri, String requestScope) throws ApiException {
-        RequestClient requestClient = null;
         HttpResponse response = null;
+        RequestClient requestClient = null;
+
         try {
             requestClient = reqClientFactory.getRequestClient(orchestrationUri);
             response = requestClient.post(requestClientParameter);
         } catch (Exception e) {
-
+            logger.error("Error posting request to BPMN", e);
             ErrorLoggerInfo errorLoggerInfo =
                     new ErrorLoggerInfo.Builder(MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, ErrorCode.AvailabilityError)
                             .errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build();
@@ -134,7 +152,6 @@
                     new ClientConnectionException.Builder(url, HttpStatus.SC_BAD_GATEWAY,
                             ErrorNumbers.SVC_NO_SERVER_RESOURCES).cause(e).errorInfo(errorLoggerInfo).build();
             updateStatus(currentActiveReq, Status.FAILED, clientException.getMessage());
-
             throw clientException;
         }
 
@@ -144,9 +161,7 @@
                     ErrorCode.BusinessProcesssError).errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build();
             ClientConnectionException clientException = new ClientConnectionException.Builder(requestClient.getUrl(),
                     HttpStatus.SC_BAD_GATEWAY, ErrorNumbers.SVC_NO_SERVER_RESOURCES).errorInfo(errorLoggerInfo).build();
-
             updateStatus(currentActiveReq, Status.FAILED, clientException.getMessage());
-
             throw clientException;
         }
 
@@ -232,6 +247,9 @@
         }
     }
 
+
+
+    @Override
     public void updateStatus(InfraActiveRequests aq, Status status, String errorMessage)
             throws RequestDbFailureException {
         if ((status == Status.FAILED) || (status == Status.COMPLETE)) {
@@ -412,6 +430,7 @@
         throw dupException;
     }
 
+    @Override
     public String getRequestId(ContainerRequestContext requestContext) throws ValidateException {
         String requestId = null;
         if (requestContext.getProperty("requestId") != null) {
@@ -686,4 +705,567 @@
                 "(?s)(\"requestInfo\"\\s*?:\\s*?\\{.*?\"requestorId\"\\s*?:\\s*?\")(.*?)(\"[ ]*(?:,|\\R|\\}))",
                 "$1" + newRequestorId + "$3");
     }
+
+    public RecipeLookupResult getServiceInstanceOrchestrationURI(ServiceInstancesRequest sir, Actions action,
+            boolean alaCarteFlag, InfraActiveRequests currentActiveReq) throws ApiException {
+        RecipeLookupResult recipeLookupResult = null;
+        // if the aLaCarte flag is set to TRUE, the API-H should choose the VID_DEFAULT recipe for the requested action
+        ModelInfo modelInfo = sir.getRequestDetails().getModelInfo();
+        // Query MSO Catalog DB
+
+        if (action == Action.applyUpdatedConfig || action == Action.inPlaceSoftwareUpdate) {
+            recipeLookupResult = getDefaultVnfUri(sir, action);
+        } else if (action == Action.addMembers || action == Action.removeMembers) {
+            recipeLookupResult = new RecipeLookupResult("/mso/async/services/WorkflowActionBB", 180);
+        } else if (modelInfo.getModelType().equals(ModelType.service)) {
+            try {
+                recipeLookupResult = getServiceURI(sir, action, alaCarteFlag);
+            } catch (IOException e) {
+                ErrorLoggerInfo errorLoggerInfo =
+                        new ErrorLoggerInfo.Builder(MessageEnum.APIH_REQUEST_VALIDATION_ERROR, ErrorCode.SchemaError)
+                                .errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build();
+
+
+                ValidateException validateException =
+                        new ValidateException.Builder(e.getMessage(), HttpStatus.SC_BAD_REQUEST,
+                                ErrorNumbers.SVC_BAD_PARAMETER).cause(e).errorInfo(errorLoggerInfo).build();
+
+                updateStatus(currentActiveReq, Status.FAILED, validateException.getMessage());
+
+                throw validateException;
+            }
+        } else if (modelInfo.getModelType().equals(ModelType.vfModule)
+                || modelInfo.getModelType().equals(ModelType.volumeGroup)
+                || modelInfo.getModelType().equals(ModelType.vnf)) {
+            try {
+                recipeLookupResult = getVnfOrVfModuleUri(sir, action);
+            } catch (ValidationException e) {
+                ErrorLoggerInfo errorLoggerInfo =
+                        new ErrorLoggerInfo.Builder(MessageEnum.APIH_REQUEST_VALIDATION_ERROR, ErrorCode.SchemaError)
+                                .errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build();
+
+
+                ValidateException validateException =
+                        new ValidateException.Builder(e.getMessage(), HttpStatus.SC_BAD_REQUEST,
+                                ErrorNumbers.SVC_BAD_PARAMETER).cause(e).errorInfo(errorLoggerInfo).build();
+
+                updateStatus(currentActiveReq, Status.FAILED, validateException.getMessage());
+
+                throw validateException;
+            }
+        } else if (modelInfo.getModelType().equals(ModelType.network)) {
+            try {
+                recipeLookupResult = getNetworkUri(sir, action);
+            } catch (ValidationException e) {
+
+                ErrorLoggerInfo errorLoggerInfo =
+                        new ErrorLoggerInfo.Builder(MessageEnum.APIH_REQUEST_VALIDATION_ERROR, ErrorCode.SchemaError)
+                                .errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build();
+
+
+                ValidateException validateException =
+                        new ValidateException.Builder(e.getMessage(), HttpStatus.SC_BAD_REQUEST,
+                                ErrorNumbers.SVC_BAD_PARAMETER).cause(e).errorInfo(errorLoggerInfo).build();
+                updateStatus(currentActiveReq, Status.FAILED, validateException.getMessage());
+
+                throw validateException;
+            }
+        } else if (modelInfo.getModelType().equals(ModelType.instanceGroup)) {
+            recipeLookupResult = new RecipeLookupResult("/mso/async/services/WorkflowActionBB", 180);
+        }
+
+        if (recipeLookupResult == null) {
+            ErrorLoggerInfo errorLoggerInfo =
+                    new ErrorLoggerInfo.Builder(MessageEnum.APIH_DB_ACCESS_EXC, ErrorCode.DataError)
+                            .errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build();
+
+
+            RecipeNotFoundException recipeNotFoundExceptionException =
+                    new RecipeNotFoundException.Builder("Recipe could not be retrieved from catalog DB.",
+                            HttpStatus.SC_NOT_FOUND, ErrorNumbers.SVC_GENERAL_SERVICE_ERROR).errorInfo(errorLoggerInfo)
+                                    .build();
+
+            updateStatus(currentActiveReq, Status.FAILED, recipeNotFoundExceptionException.getMessage());
+            throw recipeNotFoundExceptionException;
+        }
+        return recipeLookupResult;
+    }
+
+    protected RecipeLookupResult getServiceURI(ServiceInstancesRequest servInstReq, Actions action,
+            boolean alaCarteFlag) throws IOException {
+        // SERVICE REQUEST
+        // Construct the default service name
+        // TODO need to make this a configurable property
+        String defaultServiceModelName = getDefaultModel(servInstReq);
+        RequestDetails requestDetails = servInstReq.getRequestDetails();
+        ModelInfo modelInfo = requestDetails.getModelInfo();
+        org.onap.so.db.catalog.beans.Service serviceRecord;
+        List<org.onap.so.db.catalog.beans.Service> serviceRecordList;
+        ServiceRecipe recipe = null;
+
+        if (alaCarteFlag) {
+            serviceRecord = catalogDbClient.getFirstByModelNameOrderByModelVersionDesc(defaultServiceModelName);
+            if (serviceRecord != null) {
+                recipe = catalogDbClient.getFirstByServiceModelUUIDAndAction(serviceRecord.getModelUUID(),
+                        action.toString());
+            }
+        } else {
+            serviceRecord = catalogDbClient.getServiceByID(modelInfo.getModelVersionId());
+            recipe = catalogDbClient.getFirstByServiceModelUUIDAndAction(modelInfo.getModelVersionId(),
+                    action.toString());
+            if (recipe == null) {
+                serviceRecordList = catalogDbClient
+                        .getServiceByModelInvariantUUIDOrderByModelVersionDesc(modelInfo.getModelInvariantId());
+                if (!serviceRecordList.isEmpty()) {
+                    for (org.onap.so.db.catalog.beans.Service record : serviceRecordList) {
+                        recipe = catalogDbClient.getFirstByServiceModelUUIDAndAction(record.getModelUUID(),
+                                action.toString());
+                        if (recipe != null) {
+                            break;
+                        }
+                    }
+                }
+            }
+        }
+
+        // if an aLaCarte flag was sent in the request, throw an error if the recipe was not found
+        RequestParameters reqParam = requestDetails.getRequestParameters();
+        if (reqParam != null && alaCarteFlag && recipe == null) {
+            return null;
+        } else if (!alaCarteFlag && recipe != null && Action.createInstance.equals(action)) {
+            mapToLegacyRequest(requestDetails);
+        } else if (recipe == null) { // aLaCarte wasn't sent, so we'll try the default
+            serviceRecord = catalogDbClient.getFirstByModelNameOrderByModelVersionDesc(defaultServiceModelName);
+            recipe = catalogDbClient.getFirstByServiceModelUUIDAndAction(serviceRecord.getModelUUID(),
+                    action.toString());
+        }
+        if (modelInfo.getModelVersionId() == null) {
+            modelInfo.setModelVersionId(serviceRecord.getModelUUID());
+        }
+        if (recipe == null) {
+            return null;
+        }
+        return new RecipeLookupResult(recipe.getOrchestrationUri(), recipe.getRecipeTimeout());
+    }
+
+    protected void mapToLegacyRequest(RequestDetails requestDetails) throws IOException {
+        RequestParameters reqParam;
+        if (requestDetails.getRequestParameters() == null) {
+            reqParam = new RequestParameters();
+        } else {
+            reqParam = requestDetails.getRequestParameters();
+        }
+        if (requestDetails.getCloudConfiguration() == null) {
+            CloudConfiguration cloudConfig = configureCloudConfig(reqParam);
+            if (cloudConfig != null) {
+                requestDetails.setCloudConfiguration(cloudConfig);
+            }
+        }
+
+        List<Map<String, Object>> userParams = configureUserParams(reqParam);
+        if (!userParams.isEmpty()) {
+            if (reqParam == null) {
+                requestDetails.setRequestParameters(new RequestParameters());
+            }
+            requestDetails.getRequestParameters().setUserParams(userParams);
+        }
+    }
+
+    private Service serviceMapper(Map<String, Object> params) throws IOException {
+        ObjectMapper obj = new ObjectMapper();
+        String input = obj.writeValueAsString(params.get("service"));
+        return obj.readValue(input, Service.class);
+    }
+
+    private void addUserParams(Map<String, Object> targetUserParams, List<Map<String, String>> sourceUserParams) {
+        for (Map<String, String> map : sourceUserParams) {
+            for (Map.Entry<String, String> entry : map.entrySet()) {
+                targetUserParams.put(entry.getKey(), entry.getValue());
+            }
+        }
+    }
+
+    protected List<Map<String, Object>> configureUserParams(RequestParameters reqParams) throws IOException {
+        logger.debug("Configuring UserParams for Macro Request");
+        Map<String, Object> userParams = new HashMap<>();
+
+        for (Map<String, Object> params : reqParams.getUserParams()) {
+            if (params.containsKey("service")) {
+                Service service = serviceMapper(params);
+
+                addUserParams(userParams, service.getInstanceParams());
+
+                for (Networks network : service.getResources().getNetworks()) {
+                    addUserParams(userParams, network.getInstanceParams());
+                }
+
+                for (Vnfs vnf : service.getResources().getVnfs()) {
+                    addUserParams(userParams, vnf.getInstanceParams());
+
+                    for (VfModules vfModule : vnf.getVfModules()) {
+                        addUserParams(userParams, vfModule.getInstanceParams());
+                    }
+                }
+            }
+        }
+
+        return mapFlatMapToNameValue(userParams);
+    }
+
+    protected List<Map<String, Object>> mapFlatMapToNameValue(Map<String, Object> flatMap) {
+        List<Map<String, Object>> targetUserParams = new ArrayList<>();
+
+        for (Map.Entry<String, Object> map : flatMap.entrySet()) {
+            Map<String, Object> targetMap = new HashMap<>();
+            targetMap.put(NAME, map.getKey());
+            targetMap.put(VALUE, map.getValue());
+            targetUserParams.add(targetMap);
+        }
+        return targetUserParams;
+    }
+
+    protected CloudConfiguration configureCloudConfig(RequestParameters reqParams) throws IOException {
+
+        for (Map<String, Object> params : reqParams.getUserParams()) {
+            if (params.containsKey("service")) {
+                Service service = serviceMapper(params);
+
+                Optional<CloudConfiguration> targetConfiguration = addCloudConfig(service.getCloudConfiguration());
+
+                if (targetConfiguration.isPresent()) {
+                    return targetConfiguration.get();
+                } else {
+                    for (Networks network : service.getResources().getNetworks()) {
+                        targetConfiguration = addCloudConfig(network.getCloudConfiguration());
+                        if (targetConfiguration.isPresent()) {
+                            return targetConfiguration.get();
+                        }
+                    }
+
+                    for (Vnfs vnf : service.getResources().getVnfs()) {
+                        targetConfiguration = addCloudConfig(vnf.getCloudConfiguration());
+
+                        if (targetConfiguration.isPresent()) {
+                            return targetConfiguration.get();
+                        }
+
+                        for (VfModules vfModule : vnf.getVfModules()) {
+                            targetConfiguration = addCloudConfig(vfModule.getCloudConfiguration());
+
+                            if (targetConfiguration.isPresent()) {
+                                return targetConfiguration.get();
+                            }
+                        }
+                    }
+                }
+            }
+        }
+
+        return null;
+    }
+
+    private RecipeLookupResult getDefaultVnfUri(ServiceInstancesRequest sir, Actions action) {
+        String defaultSource = getDefaultModel(sir);
+        VnfRecipe vnfRecipe = catalogDbClient.getFirstVnfRecipeByNfRoleAndAction(defaultSource, action.toString());
+        if (vnfRecipe == null) {
+            return null;
+        }
+        return new RecipeLookupResult(vnfRecipe.getOrchestrationUri(), vnfRecipe.getRecipeTimeout());
+    }
+
+
+    private RecipeLookupResult getNetworkUri(ServiceInstancesRequest sir, Actions action) throws ValidationException {
+        String defaultNetworkType = getDefaultModel(sir);
+        ModelInfo modelInfo = sir.getRequestDetails().getModelInfo();
+        String modelName = modelInfo.getModelName();
+        Recipe recipe = null;
+
+        if (modelInfo.getModelCustomizationId() != null) {
+            NetworkResourceCustomization networkResourceCustomization = catalogDbClient
+                    .getNetworkResourceCustomizationByModelCustomizationUUID(modelInfo.getModelCustomizationId());
+            if (networkResourceCustomization != null) {
+                NetworkResource networkResource = networkResourceCustomization.getNetworkResource();
+                if (networkResource != null) {
+                    if (modelInfo.getModelVersionId() == null) {
+                        modelInfo.setModelVersionId(networkResource.getModelUUID());
+                    }
+                    recipe = catalogDbClient.getFirstNetworkRecipeByModelNameAndAction(networkResource.getModelName(),
+                            action.toString());
+                } else {
+                    throw new ValidationException("no catalog entry found");
+                }
+            } else if (action != Action.deleteInstance) {
+                throw new ValidationException("modelCustomizationId for networkResourceCustomization lookup", true);
+            }
+        } else {
+            // ok for version < 3 and action delete
+            if (modelName != null) {
+                recipe = catalogDbClient.getFirstNetworkRecipeByModelNameAndAction(modelName, action.toString());
+            }
+        }
+
+        if (recipe == null) {
+            recipe = catalogDbClient.getFirstNetworkRecipeByModelNameAndAction(defaultNetworkType, action.toString());
+        }
+
+        return recipe != null ? new RecipeLookupResult(recipe.getOrchestrationUri(), recipe.getRecipeTimeout()) : null;
+    }
+
+
+    private Optional<CloudConfiguration> addCloudConfig(CloudConfiguration sourceCloudConfiguration) {
+        CloudConfiguration targetConfiguration = new CloudConfiguration();
+        if (sourceCloudConfiguration != null) {
+            targetConfiguration.setAicNodeClli(sourceCloudConfiguration.getAicNodeClli());
+            targetConfiguration.setTenantId(sourceCloudConfiguration.getTenantId());
+            targetConfiguration.setLcpCloudRegionId(sourceCloudConfiguration.getLcpCloudRegionId());
+            targetConfiguration.setCloudOwner(sourceCloudConfiguration.getCloudOwner());
+            return Optional.of(targetConfiguration);
+        }
+        return Optional.empty();
+    }
+
+    private RecipeLookupResult getVnfOrVfModuleUri(ServiceInstancesRequest servInstReq, Actions action)
+            throws ValidationException {
+
+        ModelInfo modelInfo = servInstReq.getRequestDetails().getModelInfo();
+        String vnfComponentType = modelInfo.getModelType().name();
+
+        RelatedInstanceList[] instanceList = null;
+        if (servInstReq.getRequestDetails() != null) {
+            instanceList = servInstReq.getRequestDetails().getRelatedInstanceList();
+        }
+
+        Recipe recipe;
+        String defaultSource = getDefaultModel(servInstReq);
+        String modelCustomizationId = modelInfo.getModelCustomizationId();
+        String modelCustomizationName = modelInfo.getModelCustomizationName();
+        String relatedInstanceModelVersionId = null;
+        String relatedInstanceModelInvariantId = null;
+        String relatedInstanceVersion = null;
+        String relatedInstanceModelCustomizationName = null;
+
+        if (instanceList != null) {
+
+            for (RelatedInstanceList relatedInstanceList : instanceList) {
+
+                RelatedInstance relatedInstance = relatedInstanceList.getRelatedInstance();
+                ModelInfo relatedInstanceModelInfo = relatedInstance.getModelInfo();
+                if (relatedInstanceModelInfo.getModelType().equals(ModelType.service)) {
+                    relatedInstanceModelVersionId = relatedInstanceModelInfo.getModelVersionId();
+                    relatedInstanceVersion = relatedInstanceModelInfo.getModelVersion();
+                }
+
+                if (relatedInstanceModelInfo.getModelType().equals(ModelType.vnf)) {
+                    relatedInstanceModelVersionId = relatedInstanceModelInfo.getModelVersionId();
+                    relatedInstanceModelInvariantId = relatedInstanceModelInfo.getModelInvariantId();
+                    relatedInstanceVersion = relatedInstanceModelInfo.getModelVersion();
+                    relatedInstanceModelCustomizationName = relatedInstanceModelInfo.getModelCustomizationName();
+                }
+            }
+
+            if (modelInfo.getModelType().equals(ModelType.vnf)) {
+                // a. For a vnf request (only create, no update currently):
+                // i. (v3-v4) If modelInfo.modelCustomizationId is provided, use it to validate catalog DB has record in
+                // vnf_resource_customization.model_customization_uuid.
+                // ii. (v2-v4) If modelInfo.modelCustomizationId is NOT provided (because it is a pre-1702 ASDC model or
+                // pre-v3), then modelInfo.modelCustomizationName must have
+                // been provided (else create request should be rejected). APIH should use the
+                // relatedInstance.modelInfo[service].modelVersionId** + modelInfo[vnf].modelCustomizationName
+                // to â€œjoinâ€�? service_to_resource_customizations with vnf_resource_customization to confirm a
+                // vnf_resource_customization.model_customization_uuid record exists.
+                // **If relatedInstance.modelInfo[service].modelVersionId was not provided, use
+                // relatedInstance.modelInfo[service].modelInvariantId + modelVersion instead to lookup modelVersionId
+                // (MODEL_UUID) in SERVICE table.
+                // iii. Regardless of how the value was provided/obtained above, APIH must always populate
+                // vnfModelCustomizationId in bpmnRequest. It would be assumed it was MSO generated
+                // during 1707 data migration if VID did not provide it originally on request.
+                // iv. Note: continue to construct the â€œvnf-typeâ€�? value and pass to BPMN (must still be populated
+                // in A&AI).
+                // 1. If modelCustomizationName is NOT provided on a vnf/vfModule request, use modelCustomizationId to
+                // look it up in our catalog to construct vnf-type value to pass to BPMN.
+
+                VnfResource vnfResource = null;
+                VnfResourceCustomization vrc = null;
+                // Validation for vnfResource
+
+                if (modelCustomizationId != null) {
+                    vrc = catalogDbClient.getVnfResourceCustomizationByModelCustomizationUUID(modelCustomizationId);
+                    if (vrc != null) {
+                        vnfResource = vrc.getVnfResources();
+                    }
+                } else {
+                    org.onap.so.db.catalog.beans.Service service =
+                            catalogDbClient.getServiceByID(relatedInstanceModelVersionId);
+                    if (service == null) {
+                        service = catalogDbClient.getServiceByModelVersionAndModelInvariantUUID(relatedInstanceVersion,
+                                relatedInstanceModelInvariantId);
+                    }
+
+                    if (service == null) {
+                        throw new ValidationException("service in relatedInstance");
+                    }
+                    for (VnfResourceCustomization vnfResourceCustom : service.getVnfCustomizations()) {
+                        if (vnfResourceCustom.getModelInstanceName().equals(modelCustomizationName)) {
+                            vrc = vnfResourceCustom;
+                        }
+                    }
+
+                    if (vrc != null) {
+                        vnfResource = vrc.getVnfResources();
+                        modelInfo.setModelCustomizationId(vrc.getModelCustomizationUUID());
+                        modelInfo.setModelCustomizationUuid(vrc.getModelCustomizationUUID());
+                    }
+                }
+
+                if (vnfResource == null) {
+                    throw new ValidationException("vnfResource");
+                } else {
+                    if (modelInfo.getModelVersionId() == null) {
+                        modelInfo.setModelVersionId(vnfResource.getModelUUID());
+                    }
+                }
+
+                VnfRecipe vnfRecipe = null;
+
+                if (vrc != null) {
+                    String nfRole = vrc.getNfRole();
+                    if (nfRole != null) {
+                        vnfRecipe =
+                                catalogDbClient.getFirstVnfRecipeByNfRoleAndAction(vrc.getNfRole(), action.toString());
+                    }
+                }
+
+                if (vnfRecipe == null) {
+                    vnfRecipe = catalogDbClient.getFirstVnfRecipeByNfRoleAndAction(defaultSource, action.toString());
+                }
+
+                if (vnfRecipe == null) {
+                    return null;
+                }
+
+                return new RecipeLookupResult(vnfRecipe.getOrchestrationUri(), vnfRecipe.getRecipeTimeout());
+            } else {
+                /*
+                 * (v5-v7) If modelInfo.modelCustomizationId is NOT provided (because it is a pre-1702 ASDC model or
+                 * pre-v3), then modelInfo.modelCustomizationName must have // been provided (else create request should
+                 * be rejected). APIH should use the relatedInstance.modelInfo[vnf].modelVersionId +
+                 * modelInfo[vnf].modelCustomizationName // to join vnf_to_resource_customizations with
+                 * vf_resource_customization to confirm a vf_resource_customization.model_customization_uuid record
+                 * exists. // Once the vnfs model_customization_uuid has been obtained, use it to find all vfModule
+                 * customizations for that vnf customization in the vnf_res_custom_to_vf_module_custom join table. //
+                 * For each vf_module_cust_model_customization_uuid value returned, use that UUID to query
+                 * vf_module_customization table along with modelInfo[vfModule|volumeGroup].modelVersionId to // confirm
+                 * record matches request data (and to identify the modelCustomizationId associated with the vfModule in
+                 * the request). This means taking each record found // in vf_module_customization and looking up in
+                 * vf_module (using vf_module_customizationâ€™s FK into vf_module) to find a match on
+                 * MODEL_INVARIANT_UUID (modelInvariantId) // and MODEL_VERSION (modelVersion).
+                 */
+                VfModuleCustomization vfmc = null;
+                VnfResource vnfr;
+                VnfResourceCustomization vnfrc;
+                VfModule vfModule = null;
+
+                if (modelInfo.getModelCustomizationId() != null) {
+                    vfmc = catalogDbClient
+                            .getVfModuleCustomizationByModelCuztomizationUUID(modelInfo.getModelCustomizationId());
+                } else {
+                    vnfr = catalogDbClient.getVnfResourceByModelUUID(relatedInstanceModelVersionId);
+                    if (vnfr == null) {
+                        vnfr = catalogDbClient.getFirstVnfResourceByModelInvariantUUIDAndModelVersion(
+                                relatedInstanceModelInvariantId, relatedInstanceVersion);
+                    }
+                    vnfrc = catalogDbClient.getFirstVnfResourceCustomizationByModelInstanceNameAndVnfResources(
+                            relatedInstanceModelCustomizationName, vnfr);
+
+                    List<VfModuleCustomization> list = vnfrc.getVfModuleCustomizations();
+
+                    String vfModuleModelUUID = modelInfo.getModelVersionId();
+                    for (VfModuleCustomization vf : list) {
+                        VfModuleCustomization vfmCustom;
+                        if (vfModuleModelUUID != null) {
+                            vfmCustom = catalogDbClient
+                                    .getVfModuleCustomizationByModelCustomizationUUIDAndVfModuleModelUUID(
+                                            vf.getModelCustomizationUUID(), vfModuleModelUUID);
+                            if (vfmCustom != null) {
+                                vfModule = vfmCustom.getVfModule();
+                            }
+                        } else {
+                            vfmCustom = catalogDbClient
+                                    .getVfModuleCustomizationByModelCuztomizationUUID(vf.getModelCustomizationUUID());
+                            if (vfmCustom != null) {
+                                vfModule = vfmCustom.getVfModule();
+                            } else {
+                                vfModule = catalogDbClient.getVfModuleByModelInvariantUUIDAndModelVersion(
+                                        relatedInstanceModelInvariantId, relatedInstanceVersion);
+                            }
+                        }
+
+                        if (vfModule != null) {
+                            modelInfo.setModelCustomizationId(vf.getModelCustomizationUUID());
+                            modelInfo.setModelCustomizationUuid(vf.getModelCustomizationUUID());
+                            break;
+                        }
+                    }
+                }
+
+                if (vfmc == null && vfModule == null) {
+                    throw new ValidationException("vfModuleCustomization");
+                } else if (vfModule == null && vfmc != null) {
+                    vfModule = vfmc.getVfModule(); // can't be null as vfModuleModelUUID is not-null property in
+                                                   // VfModuleCustomization table
+                }
+
+                if (modelInfo.getModelVersionId() == null) {
+                    modelInfo.setModelVersionId(vfModule.getModelUUID());
+                }
+
+
+                recipe = catalogDbClient.getFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction(
+                        vfModule.getModelUUID(), vnfComponentType, action.toString());
+                if (recipe == null) {
+                    List<VfModule> vfModuleRecords = catalogDbClient
+                            .getVfModuleByModelInvariantUUIDOrderByModelVersionDesc(vfModule.getModelInvariantUUID());
+                    if (!vfModuleRecords.isEmpty()) {
+                        for (VfModule record : vfModuleRecords) {
+                            recipe = catalogDbClient
+                                    .getFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction(
+                                            record.getModelUUID(), vnfComponentType, action.toString());
+                            if (recipe != null) {
+                                break;
+                            }
+                        }
+                    }
+                }
+                if (recipe == null) {
+                    recipe = catalogDbClient.getFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction(
+                            defaultSource, vnfComponentType, action.toString());
+                    if (recipe == null) {
+                        recipe = catalogDbClient.getFirstVnfComponentsRecipeByVnfComponentTypeAndAction(
+                                vnfComponentType, action.toString());
+                    }
+
+                    if (recipe == null) {
+                        return null;
+                    }
+                }
+            }
+        } else {
+
+            if (modelInfo.getModelType().equals(ModelType.vnf)) {
+                recipe = catalogDbClient.getFirstVnfRecipeByNfRoleAndAction(defaultSource, action.toString());
+                if (recipe == null) {
+                    return null;
+                }
+            } else {
+                recipe = catalogDbClient.getFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction(
+                        defaultSource, vnfComponentType, action.toString());
+
+                if (recipe == null) {
+                    return null;
+                }
+            }
+        }
+
+        return new RecipeLookupResult(recipe.getOrchestrationUri(), recipe.getRecipeTimeout());
+    }
 }
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ResumeOrchestrationRequest.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ResumeOrchestrationRequest.java
index b462415..7cf9e33 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ResumeOrchestrationRequest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ResumeOrchestrationRequest.java
@@ -151,7 +151,7 @@
         Boolean aLaCarte = sir.getRequestDetails().getRequestParameters().getALaCarte();
 
         String pnfCorrelationId = serviceInstances.getPnfCorrelationId(sir);
-        RecipeLookupResult recipeLookupResult = serviceInstances.getServiceInstanceOrchestrationURI(sir, action,
+        RecipeLookupResult recipeLookupResult = requestHandlerUtils.getServiceInstanceOrchestrationURI(sir, action,
                 msoRequest.getAlacarteFlag(sir), currentActiveRequest);
 
         requestDbSave(currentActiveRequest);
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java
index da101a2..91c6218 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java
@@ -24,10 +24,7 @@
 package org.onap.so.apihandlerinfra;
 
 import java.io.IOException;
-import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
 import java.util.Optional;
 import javax.transaction.Transactional;
 import javax.ws.rs.Consumes;
@@ -47,49 +44,30 @@
 import org.onap.so.apihandler.common.ErrorNumbers;
 import org.onap.so.apihandler.common.RequestClientParameter;
 import org.onap.so.apihandlerinfra.exceptions.ApiException;
-import org.onap.so.apihandlerinfra.exceptions.RecipeNotFoundException;
 import org.onap.so.apihandlerinfra.exceptions.RequestDbFailureException;
 import org.onap.so.apihandlerinfra.exceptions.ValidateException;
 import org.onap.so.apihandlerinfra.infra.rest.handler.AbstractRestHandler;
 import org.onap.so.apihandlerinfra.infra.rest.validators.RequestValidatorListenerRunner;
 import org.onap.so.apihandlerinfra.logging.ErrorLoggerInfo;
 import org.onap.so.constants.Status;
-import org.onap.so.db.catalog.beans.NetworkResource;
-import org.onap.so.db.catalog.beans.NetworkResourceCustomization;
-import org.onap.so.db.catalog.beans.Recipe;
-import org.onap.so.db.catalog.beans.ServiceRecipe;
-import org.onap.so.db.catalog.beans.VfModule;
-import org.onap.so.db.catalog.beans.VfModuleCustomization;
-import org.onap.so.db.catalog.beans.VnfRecipe;
-import org.onap.so.db.catalog.beans.VnfResource;
-import org.onap.so.db.catalog.beans.VnfResourceCustomization;
 import org.onap.so.db.catalog.client.CatalogDbClient;
 import org.onap.so.db.request.beans.InfraActiveRequests;
 import org.onap.so.db.request.client.RequestsDbClient;
 import org.onap.so.exceptions.ValidationException;
 import org.onap.so.logger.ErrorCode;
 import org.onap.so.logger.MessageEnum;
-import org.onap.so.serviceinstancebeans.CloudConfiguration;
 import org.onap.so.serviceinstancebeans.ModelInfo;
 import org.onap.so.serviceinstancebeans.ModelType;
-import org.onap.so.serviceinstancebeans.Networks;
-import org.onap.so.serviceinstancebeans.RelatedInstance;
-import org.onap.so.serviceinstancebeans.RelatedInstanceList;
 import org.onap.so.serviceinstancebeans.RequestDetails;
-import org.onap.so.serviceinstancebeans.RequestParameters;
 import org.onap.so.serviceinstancebeans.RequestReferences;
-import org.onap.so.serviceinstancebeans.Service;
 import org.onap.so.serviceinstancebeans.ServiceInstancesRequest;
 import org.onap.so.serviceinstancebeans.ServiceInstancesResponse;
-import org.onap.so.serviceinstancebeans.VfModules;
-import org.onap.so.serviceinstancebeans.Vnfs;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.core.env.Environment;
 import org.springframework.stereotype.Component;
 import org.springframework.web.client.RestTemplate;
-import com.fasterxml.jackson.databind.ObjectMapper;
 import io.swagger.v3.oas.annotations.OpenAPIDefinition;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.info.Info;
@@ -105,8 +83,6 @@
 public class ServiceInstances extends AbstractRestHandler {
 
     private static Logger logger = LoggerFactory.getLogger(MsoRequest.class);
-    private static String NAME = "name";
-    private static String VALUE = "value";
     private static String uriPrefix = "/serviceInstantiation/";
     private static final String SAVE_TO_DB = "save instance to db";
 
@@ -891,7 +867,7 @@
 
         serviceResponse.setRequestReferences(referencesResponse);
         RecipeLookupResult recipeLookupResult =
-                getServiceInstanceOrchestrationURI(sir, action, alaCarteFlag, currentActiveReq);
+                requestHandlerUtils.getServiceInstanceOrchestrationURI(sir, action, alaCarteFlag, currentActiveReq);
         String serviceInstanceType = requestHandlerUtils.getServiceType(requestScope, sir, alaCarteFlag);
 
         ModelInfo modelInfo = sir.getRequestDetails().getModelInfo();
@@ -1081,580 +1057,6 @@
                 .orElse("");
     }
 
-    protected RecipeLookupResult getServiceInstanceOrchestrationURI(ServiceInstancesRequest sir, Actions action,
-            boolean alaCarteFlag, InfraActiveRequests currentActiveReq) throws ApiException {
-        RecipeLookupResult recipeLookupResult = null;
-        // if the aLaCarte flag is set to TRUE, the API-H should choose the VID_DEFAULT
-        // recipe for the requested action
-        ModelInfo modelInfo = sir.getRequestDetails().getModelInfo();
-        // Query MSO Catalog DB
-
-        if (action == Action.applyUpdatedConfig || action == Action.inPlaceSoftwareUpdate) {
-            recipeLookupResult = getDefaultVnfUri(sir, action);
-        } else if (action == Action.addMembers || action == Action.removeMembers) {
-            recipeLookupResult = new RecipeLookupResult("/mso/async/services/WorkflowActionBB", 180);
-        } else if (modelInfo.getModelType().equals(ModelType.service)) {
-            try {
-                recipeLookupResult = getServiceURI(sir, action, alaCarteFlag);
-            } catch (IOException e) {
-                ErrorLoggerInfo errorLoggerInfo =
-                        new ErrorLoggerInfo.Builder(MessageEnum.APIH_REQUEST_VALIDATION_ERROR, ErrorCode.SchemaError)
-                                .errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build();
-
-                ValidateException validateException =
-                        new ValidateException.Builder(e.getMessage(), HttpStatus.SC_BAD_REQUEST,
-                                ErrorNumbers.SVC_BAD_PARAMETER).cause(e).errorInfo(errorLoggerInfo).build();
-
-                requestHandlerUtils.updateStatus(currentActiveReq, Status.FAILED, validateException.getMessage());
-
-                throw validateException;
-            }
-        } else if (modelInfo.getModelType().equals(ModelType.vfModule)
-                || modelInfo.getModelType().equals(ModelType.volumeGroup)
-                || modelInfo.getModelType().equals(ModelType.vnf)) {
-            try {
-                recipeLookupResult = getVnfOrVfModuleUri(sir, action);
-            } catch (ValidationException e) {
-                ErrorLoggerInfo errorLoggerInfo =
-                        new ErrorLoggerInfo.Builder(MessageEnum.APIH_REQUEST_VALIDATION_ERROR, ErrorCode.SchemaError)
-                                .errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build();
-
-                ValidateException validateException =
-                        new ValidateException.Builder(e.getMessage(), HttpStatus.SC_BAD_REQUEST,
-                                ErrorNumbers.SVC_BAD_PARAMETER).cause(e).errorInfo(errorLoggerInfo).build();
-
-                requestHandlerUtils.updateStatus(currentActiveReq, Status.FAILED, validateException.getMessage());
-
-                throw validateException;
-            }
-        } else if (modelInfo.getModelType().equals(ModelType.network)) {
-            try {
-                recipeLookupResult = getNetworkUri(sir, action);
-            } catch (ValidationException e) {
-
-                ErrorLoggerInfo errorLoggerInfo =
-                        new ErrorLoggerInfo.Builder(MessageEnum.APIH_REQUEST_VALIDATION_ERROR, ErrorCode.SchemaError)
-                                .errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build();
-
-                ValidateException validateException =
-                        new ValidateException.Builder(e.getMessage(), HttpStatus.SC_BAD_REQUEST,
-                                ErrorNumbers.SVC_BAD_PARAMETER).cause(e).errorInfo(errorLoggerInfo).build();
-                requestHandlerUtils.updateStatus(currentActiveReq, Status.FAILED, validateException.getMessage());
-
-                throw validateException;
-            }
-        } else if (modelInfo.getModelType().equals(ModelType.instanceGroup)) {
-            recipeLookupResult = new RecipeLookupResult("/mso/async/services/WorkflowActionBB", 180);
-        }
-
-        if (recipeLookupResult == null) {
-            ErrorLoggerInfo errorLoggerInfo =
-                    new ErrorLoggerInfo.Builder(MessageEnum.APIH_DB_ACCESS_EXC, ErrorCode.DataError)
-                            .errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build();
-
-            RecipeNotFoundException recipeNotFoundExceptionException =
-                    new RecipeNotFoundException.Builder("Recipe could not be retrieved from catalog DB.",
-                            HttpStatus.SC_NOT_FOUND, ErrorNumbers.SVC_GENERAL_SERVICE_ERROR).errorInfo(errorLoggerInfo)
-                                    .build();
-
-            requestHandlerUtils.updateStatus(currentActiveReq, Status.FAILED,
-                    recipeNotFoundExceptionException.getMessage());
-            throw recipeNotFoundExceptionException;
-        }
-        return recipeLookupResult;
-    }
-
-    protected RecipeLookupResult getServiceURI(ServiceInstancesRequest servInstReq, Actions action,
-            boolean alaCarteFlag) throws IOException {
-        // SERVICE REQUEST
-        // Construct the default service name
-        // TODO need to make this a configurable property
-        String defaultServiceModelName = requestHandlerUtils.getDefaultModel(servInstReq);
-        RequestDetails requestDetails = servInstReq.getRequestDetails();
-        ModelInfo modelInfo = requestDetails.getModelInfo();
-        org.onap.so.db.catalog.beans.Service serviceRecord;
-        List<org.onap.so.db.catalog.beans.Service> serviceRecordList;
-        ServiceRecipe recipe = null;
-
-        if (alaCarteFlag) {
-            serviceRecord = catalogDbClient.getFirstByModelNameOrderByModelVersionDesc(defaultServiceModelName);
-            if (serviceRecord != null) {
-                recipe = catalogDbClient.getFirstByServiceModelUUIDAndAction(serviceRecord.getModelUUID(),
-                        action.toString());
-            }
-        } else {
-            serviceRecord = catalogDbClient.getServiceByID(modelInfo.getModelVersionId());
-            recipe = catalogDbClient.getFirstByServiceModelUUIDAndAction(modelInfo.getModelVersionId(),
-                    action.toString());
-            if (recipe == null) {
-                serviceRecordList = catalogDbClient
-                        .getServiceByModelInvariantUUIDOrderByModelVersionDesc(modelInfo.getModelInvariantId());
-                if (!serviceRecordList.isEmpty()) {
-                    for (org.onap.so.db.catalog.beans.Service record : serviceRecordList) {
-                        recipe = catalogDbClient.getFirstByServiceModelUUIDAndAction(record.getModelUUID(),
-                                action.toString());
-                        if (recipe != null) {
-                            break;
-                        }
-                    }
-                }
-            }
-        }
-
-        // if an aLaCarte flag was sent in the request, throw an error if the recipe was
-        // not found
-        RequestParameters reqParam = requestDetails.getRequestParameters();
-        if (reqParam != null && alaCarteFlag && recipe == null) {
-            return null;
-        } else if (!alaCarteFlag && recipe != null && Action.createInstance.equals(action)) {
-            mapToLegacyRequest(requestDetails);
-        } else if (recipe == null) { // aLaCarte wasn't sent, so we'll try the default
-            serviceRecord = catalogDbClient.getFirstByModelNameOrderByModelVersionDesc(defaultServiceModelName);
-            recipe = catalogDbClient.getFirstByServiceModelUUIDAndAction(serviceRecord.getModelUUID(),
-                    action.toString());
-        }
-        if (modelInfo.getModelVersionId() == null) {
-            modelInfo.setModelVersionId(serviceRecord.getModelUUID());
-        }
-        if (recipe == null) {
-            return null;
-        }
-        return new RecipeLookupResult(recipe.getOrchestrationUri(), recipe.getRecipeTimeout());
-    }
-
-    protected void mapToLegacyRequest(RequestDetails requestDetails) throws IOException {
-        RequestParameters reqParam;
-        if (requestDetails.getRequestParameters() == null) {
-            reqParam = new RequestParameters();
-        } else {
-            reqParam = requestDetails.getRequestParameters();
-        }
-        if (requestDetails.getCloudConfiguration() == null) {
-            CloudConfiguration cloudConfig = configureCloudConfig(reqParam);
-            if (cloudConfig != null) {
-                requestDetails.setCloudConfiguration(cloudConfig);
-            }
-        }
-
-        List<Map<String, Object>> userParams = configureUserParams(reqParam);
-        if (!userParams.isEmpty()) {
-            if (reqParam == null) {
-                requestDetails.setRequestParameters(new RequestParameters());
-            }
-            requestDetails.getRequestParameters().setUserParams(userParams);
-        }
-    }
-
-    protected CloudConfiguration configureCloudConfig(RequestParameters reqParams) throws IOException {
-
-        for (Map<String, Object> params : reqParams.getUserParams()) {
-            if (params.containsKey("service")) {
-                Service service = serviceMapper(params);
-
-                Optional<CloudConfiguration> targetConfiguration = addCloudConfig(service.getCloudConfiguration());
-
-                if (targetConfiguration.isPresent()) {
-                    return targetConfiguration.get();
-                } else {
-                    for (Networks network : service.getResources().getNetworks()) {
-                        targetConfiguration = addCloudConfig(network.getCloudConfiguration());
-                        if (targetConfiguration.isPresent()) {
-                            return targetConfiguration.get();
-                        }
-                    }
-
-                    for (Vnfs vnf : service.getResources().getVnfs()) {
-                        targetConfiguration = addCloudConfig(vnf.getCloudConfiguration());
-
-                        if (targetConfiguration.isPresent()) {
-                            return targetConfiguration.get();
-                        }
-
-                        for (VfModules vfModule : vnf.getVfModules()) {
-                            targetConfiguration = addCloudConfig(vfModule.getCloudConfiguration());
-
-                            if (targetConfiguration.isPresent()) {
-                                return targetConfiguration.get();
-                            }
-                        }
-                    }
-                }
-            }
-        }
-
-        return null;
-    }
-
-    private Optional<CloudConfiguration> addCloudConfig(CloudConfiguration sourceCloudConfiguration) {
-        CloudConfiguration targetConfiguration = new CloudConfiguration();
-        if (sourceCloudConfiguration != null) {
-            targetConfiguration.setAicNodeClli(sourceCloudConfiguration.getAicNodeClli());
-            targetConfiguration.setTenantId(sourceCloudConfiguration.getTenantId());
-            targetConfiguration.setLcpCloudRegionId(sourceCloudConfiguration.getLcpCloudRegionId());
-            targetConfiguration.setCloudOwner(sourceCloudConfiguration.getCloudOwner());
-            return Optional.of(targetConfiguration);
-        }
-        return Optional.empty();
-    }
-
-    protected List<Map<String, Object>> configureUserParams(RequestParameters reqParams) throws IOException {
-        logger.debug("Configuring UserParams for Macro Request");
-        Map<String, Object> userParams = new HashMap<>();
-
-        for (Map<String, Object> params : reqParams.getUserParams()) {
-            if (params.containsKey("service")) {
-                Service service = serviceMapper(params);
-
-                addUserParams(userParams, service.getInstanceParams());
-
-                for (Networks network : service.getResources().getNetworks()) {
-                    addUserParams(userParams, network.getInstanceParams());
-                }
-
-                for (Vnfs vnf : service.getResources().getVnfs()) {
-                    addUserParams(userParams, vnf.getInstanceParams());
-
-                    for (VfModules vfModule : vnf.getVfModules()) {
-                        addUserParams(userParams, vfModule.getInstanceParams());
-                    }
-                }
-            }
-        }
-
-        return mapFlatMapToNameValue(userParams);
-    }
-
-    private Service serviceMapper(Map<String, Object> params) throws IOException {
-        ObjectMapper obj = new ObjectMapper();
-        String input = obj.writeValueAsString(params.get("service"));
-        return obj.readValue(input, Service.class);
-    }
-
-    private void addUserParams(Map<String, Object> targetUserParams, List<Map<String, String>> sourceUserParams) {
-        for (Map<String, String> map : sourceUserParams) {
-            for (Map.Entry<String, String> entry : map.entrySet()) {
-                targetUserParams.put(entry.getKey(), entry.getValue());
-            }
-        }
-    }
-
-    protected List<Map<String, Object>> mapFlatMapToNameValue(Map<String, Object> flatMap) {
-        List<Map<String, Object>> targetUserParams = new ArrayList<>();
-
-        for (Map.Entry<String, Object> map : flatMap.entrySet()) {
-            Map<String, Object> targetMap = new HashMap<>();
-            targetMap.put(NAME, map.getKey());
-            targetMap.put(VALUE, map.getValue());
-            targetUserParams.add(targetMap);
-        }
-        return targetUserParams;
-    }
-
-    private RecipeLookupResult getVnfOrVfModuleUri(ServiceInstancesRequest servInstReq, Actions action)
-            throws ValidationException {
-
-        ModelInfo modelInfo = servInstReq.getRequestDetails().getModelInfo();
-        String vnfComponentType = modelInfo.getModelType().name();
-
-        RelatedInstanceList[] instanceList = null;
-        if (servInstReq.getRequestDetails() != null) {
-            instanceList = servInstReq.getRequestDetails().getRelatedInstanceList();
-        }
-
-        Recipe recipe;
-        String defaultSource = requestHandlerUtils.getDefaultModel(servInstReq);
-        String modelCustomizationId = modelInfo.getModelCustomizationId();
-        String modelCustomizationName = modelInfo.getModelCustomizationName();
-        String relatedInstanceModelVersionId = null;
-        String relatedInstanceModelInvariantId = null;
-        String relatedInstanceVersion = null;
-        String relatedInstanceModelCustomizationName = null;
-
-        if (instanceList != null) {
-
-            for (RelatedInstanceList relatedInstanceList : instanceList) {
-
-                RelatedInstance relatedInstance = relatedInstanceList.getRelatedInstance();
-                ModelInfo relatedInstanceModelInfo = relatedInstance.getModelInfo();
-                if (relatedInstanceModelInfo.getModelType().equals(ModelType.service)) {
-                    relatedInstanceModelVersionId = relatedInstanceModelInfo.getModelVersionId();
-                    relatedInstanceVersion = relatedInstanceModelInfo.getModelVersion();
-                }
-
-                if (relatedInstanceModelInfo.getModelType().equals(ModelType.vnf)) {
-                    relatedInstanceModelVersionId = relatedInstanceModelInfo.getModelVersionId();
-                    relatedInstanceModelInvariantId = relatedInstanceModelInfo.getModelInvariantId();
-                    relatedInstanceVersion = relatedInstanceModelInfo.getModelVersion();
-                    relatedInstanceModelCustomizationName = relatedInstanceModelInfo.getModelCustomizationName();
-                }
-            }
-
-            if (modelInfo.getModelType().equals(ModelType.vnf)) {
-                // a. For a vnf request (only create, no update currently):
-                // i. (v3-v4) If modelInfo.modelCustomizationId is provided, use it to validate
-                // catalog DB has record in
-                // vnf_resource_customization.model_customization_uuid.
-                // ii. (v2-v4) If modelInfo.modelCustomizationId is NOT provided (because it is
-                // a pre-1702 ASDC model or
-                // pre-v3), then modelInfo.modelCustomizationName must have
-                // been provided (else create request should be rejected). APIH should use the
-                // relatedInstance.modelInfo[service].modelVersionId** +
-                // modelInfo[vnf].modelCustomizationName
-                // to â€œjoinâ€�? service_to_resource_customizations with
-                // vnf_resource_customization to confirm a
-                // vnf_resource_customization.model_customization_uuid record exists.
-                // **If relatedInstance.modelInfo[service].modelVersionId was not provided, use
-                // relatedInstance.modelInfo[service].modelInvariantId + modelVersion instead to
-                // lookup modelVersionId
-                // (MODEL_UUID) in SERVICE table.
-                // iii. Regardless of how the value was provided/obtained above, APIH must
-                // always populate
-                // vnfModelCustomizationId in bpmnRequest. It would be assumed it was MSO
-                // generated
-                // during 1707 data migration if VID did not provide it originally on request.
-                // iv. Note: continue to construct the â€œvnf-typeâ€�? value and pass to BPMN
-                // (must still be populated
-                // in A&AI).
-                // 1. If modelCustomizationName is NOT provided on a vnf/vfModule request, use
-                // modelCustomizationId to
-                // look it up in our catalog to construct vnf-type value to pass to BPMN.
-
-                VnfResource vnfResource = null;
-                VnfResourceCustomization vrc = null;
-                // Validation for vnfResource
-
-                if (modelCustomizationId != null) {
-                    vrc = catalogDbClient.getVnfResourceCustomizationByModelCustomizationUUID(modelCustomizationId);
-                    if (vrc != null) {
-                        vnfResource = vrc.getVnfResources();
-                    }
-                } else {
-                    org.onap.so.db.catalog.beans.Service service =
-                            catalogDbClient.getServiceByID(relatedInstanceModelVersionId);
-                    if (service == null) {
-                        service = catalogDbClient.getServiceByModelVersionAndModelInvariantUUID(relatedInstanceVersion,
-                                relatedInstanceModelInvariantId);
-                    }
-
-                    if (service == null) {
-                        throw new ValidationException("service in relatedInstance");
-                    }
-                    for (VnfResourceCustomization vnfResourceCustom : service.getVnfCustomizations()) {
-                        if (vnfResourceCustom.getModelInstanceName().equals(modelCustomizationName)) {
-                            vrc = vnfResourceCustom;
-                        }
-                    }
-
-                    if (vrc != null) {
-                        vnfResource = vrc.getVnfResources();
-                        modelInfo.setModelCustomizationId(vrc.getModelCustomizationUUID());
-                        modelInfo.setModelCustomizationUuid(vrc.getModelCustomizationUUID());
-                    }
-                }
-
-                if (vnfResource == null) {
-                    throw new ValidationException("vnfResource");
-                } else {
-                    if (modelInfo.getModelVersionId() == null) {
-                        modelInfo.setModelVersionId(vnfResource.getModelUUID());
-                    }
-                }
-
-                VnfRecipe vnfRecipe = null;
-
-                if (vrc != null) {
-                    String nfRole = vrc.getNfRole();
-                    if (nfRole != null) {
-                        vnfRecipe =
-                                catalogDbClient.getFirstVnfRecipeByNfRoleAndAction(vrc.getNfRole(), action.toString());
-                    }
-                }
-
-                if (vnfRecipe == null) {
-                    vnfRecipe = catalogDbClient.getFirstVnfRecipeByNfRoleAndAction(defaultSource, action.toString());
-                }
-
-                if (vnfRecipe == null) {
-                    return null;
-                }
-
-                return new RecipeLookupResult(vnfRecipe.getOrchestrationUri(), vnfRecipe.getRecipeTimeout());
-            } else {
-                /*
-                 * (v5-v7) If modelInfo.modelCustomizationId is NOT provided (because it is a pre-1702 ASDC model or
-                 * pre-v3), then modelInfo.modelCustomizationName must have // been provided (else create request should
-                 * be rejected). APIH should use the relatedInstance.modelInfo[vnf].modelVersionId +
-                 * modelInfo[vnf].modelCustomizationName // to join vnf_to_resource_customizations with
-                 * vf_resource_customization to confirm a vf_resource_customization.model_customization_uuid record
-                 * exists. // Once the vnfs model_customization_uuid has been obtained, use it to find all vfModule
-                 * customizations for that vnf customization in the vnf_res_custom_to_vf_module_custom join table. //
-                 * For each vf_module_cust_model_customization_uuid value returned, use that UUID to query
-                 * vf_module_customization table along with modelInfo[vfModule|volumeGroup].modelVersionId to // confirm
-                 * record matches request data (and to identify the modelCustomizationId associated with the vfModule in
-                 * the request). This means taking each record found // in vf_module_customization and looking up in
-                 * vf_module (using vf_module_customizationâ€™s FK into vf_module) to find a match on
-                 * MODEL_INVARIANT_UUID (modelInvariantId) // and MODEL_VERSION (modelVersion).
-                 */
-                VfModuleCustomization vfmc = null;
-                VnfResource vnfr;
-                VnfResourceCustomization vnfrc;
-                VfModule vfModule = null;
-
-                if (modelInfo.getModelCustomizationId() != null) {
-                    vfmc = catalogDbClient
-                            .getVfModuleCustomizationByModelCuztomizationUUID(modelInfo.getModelCustomizationId());
-                } else {
-                    vnfr = catalogDbClient.getVnfResourceByModelUUID(relatedInstanceModelVersionId);
-                    if (vnfr == null) {
-                        vnfr = catalogDbClient.getFirstVnfResourceByModelInvariantUUIDAndModelVersion(
-                                relatedInstanceModelInvariantId, relatedInstanceVersion);
-                    }
-                    vnfrc = catalogDbClient.getFirstVnfResourceCustomizationByModelInstanceNameAndVnfResources(
-                            relatedInstanceModelCustomizationName, vnfr);
-
-                    List<VfModuleCustomization> list = vnfrc.getVfModuleCustomizations();
-
-                    String vfModuleModelUUID = modelInfo.getModelVersionId();
-                    for (VfModuleCustomization vf : list) {
-                        VfModuleCustomization vfmCustom;
-                        if (vfModuleModelUUID != null) {
-                            vfmCustom = catalogDbClient
-                                    .getVfModuleCustomizationByModelCustomizationUUIDAndVfModuleModelUUID(
-                                            vf.getModelCustomizationUUID(), vfModuleModelUUID);
-                            if (vfmCustom != null) {
-                                vfModule = vfmCustom.getVfModule();
-                            }
-                        } else {
-                            vfmCustom = catalogDbClient
-                                    .getVfModuleCustomizationByModelCuztomizationUUID(vf.getModelCustomizationUUID());
-                            if (vfmCustom != null) {
-                                vfModule = vfmCustom.getVfModule();
-                            } else {
-                                vfModule = catalogDbClient.getVfModuleByModelInvariantUUIDAndModelVersion(
-                                        relatedInstanceModelInvariantId, relatedInstanceVersion);
-                            }
-                        }
-
-                        if (vfModule != null) {
-                            modelInfo.setModelCustomizationId(vf.getModelCustomizationUUID());
-                            modelInfo.setModelCustomizationUuid(vf.getModelCustomizationUUID());
-                            break;
-                        }
-                    }
-                }
-
-                if (vfmc == null && vfModule == null) {
-                    throw new ValidationException("vfModuleCustomization");
-                } else if (vfModule == null && vfmc != null) {
-                    vfModule = vfmc.getVfModule(); // can't be null as vfModuleModelUUID is not-null property in
-                    // VfModuleCustomization table
-                }
-
-                if (modelInfo.getModelVersionId() == null) {
-                    modelInfo.setModelVersionId(vfModule.getModelUUID());
-                }
-
-                recipe = catalogDbClient.getFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction(
-                        vfModule.getModelUUID(), vnfComponentType, action.toString());
-                if (recipe == null) {
-                    List<VfModule> vfModuleRecords = catalogDbClient
-                            .getVfModuleByModelInvariantUUIDOrderByModelVersionDesc(vfModule.getModelInvariantUUID());
-                    if (!vfModuleRecords.isEmpty()) {
-                        for (VfModule record : vfModuleRecords) {
-                            recipe = catalogDbClient
-                                    .getFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction(
-                                            record.getModelUUID(), vnfComponentType, action.toString());
-                            if (recipe != null) {
-                                break;
-                            }
-                        }
-                    }
-                }
-                if (recipe == null) {
-                    recipe = catalogDbClient.getFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction(
-                            defaultSource, vnfComponentType, action.toString());
-                    if (recipe == null) {
-                        recipe = catalogDbClient.getFirstVnfComponentsRecipeByVnfComponentTypeAndAction(
-                                vnfComponentType, action.toString());
-                    }
-
-                    if (recipe == null) {
-                        return null;
-                    }
-                }
-            }
-        } else {
-
-            if (modelInfo.getModelType().equals(ModelType.vnf)) {
-                recipe = catalogDbClient.getFirstVnfRecipeByNfRoleAndAction(defaultSource, action.toString());
-                if (recipe == null) {
-                    return null;
-                }
-            } else {
-                recipe = catalogDbClient.getFirstVnfComponentsRecipeByVfModuleModelUUIDAndVnfComponentTypeAndAction(
-                        defaultSource, vnfComponentType, action.toString());
-
-                if (recipe == null) {
-                    return null;
-                }
-            }
-        }
-
-        return new RecipeLookupResult(recipe.getOrchestrationUri(), recipe.getRecipeTimeout());
-    }
-
-    private RecipeLookupResult getDefaultVnfUri(ServiceInstancesRequest sir, Actions action) {
-
-        String defaultSource = requestHandlerUtils.getDefaultModel(sir);
-
-        VnfRecipe vnfRecipe = catalogDbClient.getFirstVnfRecipeByNfRoleAndAction(defaultSource, action.toString());
-
-        if (vnfRecipe == null) {
-            return null;
-        }
-
-        return new RecipeLookupResult(vnfRecipe.getOrchestrationUri(), vnfRecipe.getRecipeTimeout());
-    }
-
-    private RecipeLookupResult getNetworkUri(ServiceInstancesRequest sir, Actions action) throws ValidationException {
-
-        String defaultNetworkType = requestHandlerUtils.getDefaultModel(sir);
-
-        ModelInfo modelInfo = sir.getRequestDetails().getModelInfo();
-        String modelName = modelInfo.getModelName();
-        Recipe recipe = null;
-
-        if (modelInfo.getModelCustomizationId() != null) {
-            NetworkResourceCustomization networkResourceCustomization = catalogDbClient
-                    .getNetworkResourceCustomizationByModelCustomizationUUID(modelInfo.getModelCustomizationId());
-            if (networkResourceCustomization != null) {
-                NetworkResource networkResource = networkResourceCustomization.getNetworkResource();
-                if (networkResource != null) {
-                    if (modelInfo.getModelVersionId() == null) {
-                        modelInfo.setModelVersionId(networkResource.getModelUUID());
-                    }
-                    recipe = catalogDbClient.getFirstNetworkRecipeByModelNameAndAction(networkResource.getModelName(),
-                            action.toString());
-                } else {
-                    throw new ValidationException("no catalog entry found");
-                }
-            } else if (action != Action.deleteInstance) {
-                throw new ValidationException("modelCustomizationId for networkResourceCustomization lookup", true);
-            }
-        } else {
-            // ok for version < 3 and action delete
-            if (modelName != null) {
-                recipe = catalogDbClient.getFirstNetworkRecipeByModelNameAndAction(modelName, action.toString());
-            }
-        }
-
-        if (recipe == null) {
-            recipe = catalogDbClient.getFirstNetworkRecipeByModelNameAndAction(defaultNetworkType, action.toString());
-        }
-
-        return recipe != null ? new RecipeLookupResult(recipe.getOrchestrationUri(), recipe.getRecipeTimeout()) : null;
-    }
-
     private Response configurationRecipeLookup(String requestJSON, Action action, HashMap<String, String> instanceIdMap,
             String version, String requestId, String requestUri) throws ApiException {
         String serviceInstanceId;
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ResumeOrchestrationRequestTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ResumeOrchestrationRequestTest.java
index 1e75541..7f5f0dc 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ResumeOrchestrationRequestTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ResumeOrchestrationRequestTest.java
@@ -21,6 +21,7 @@
 
 import static com.shazam.shazamcrest.MatcherAssert.assertThat;
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+import static org.junit.Assert.assertEquals;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.anyBoolean;
 import static org.mockito.ArgumentMatchers.anyString;
@@ -30,7 +31,6 @@
 import static org.mockito.Mockito.doThrow;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
-import static org.junit.Assert.assertEquals;
 import java.io.IOException;
 import java.nio.file.Files;
 import java.nio.file.Paths;
@@ -56,10 +56,10 @@
 import org.onap.so.db.request.beans.InfraActiveRequests;
 import org.onap.so.db.request.client.RequestsDbClient;
 import org.onap.so.serviceinstancebeans.ModelInfo;
+import org.onap.so.serviceinstancebeans.ModelType;
 import org.onap.so.serviceinstancebeans.ServiceInstancesRequest;
 import org.springframework.web.client.HttpClientErrorException;
 import com.fasterxml.jackson.databind.ObjectMapper;
-import org.onap.so.serviceinstancebeans.ModelType;
 
 @RunWith(MockitoJUnitRunner.class)
 public class ResumeOrchestrationRequestTest {
@@ -258,7 +258,7 @@
         when(requestHandler.convertJsonToServiceInstanceRequest(anyString(), any(Actions.class), anyString(),
                 anyString())).thenReturn(sir);
         when(serviceInstances.getPnfCorrelationId(any(ServiceInstancesRequest.class))).thenReturn("pnfCorrelationId");
-        doReturn(lookupResult).when(serviceInstances).getServiceInstanceOrchestrationURI(sir, action, aLaCarte,
+        doReturn(lookupResult).when(requestHandler).getServiceInstanceOrchestrationURI(sir, action, aLaCarte,
                 currentActiveRequest);
         doReturn(requestClientParameter).when(resumeReq).setRequestClientParameter(lookupResult, version,
                 infraActiveRequest, currentActiveRequest, "pnfCorrelationId", aLaCarte, sir);
@@ -311,7 +311,7 @@
                 anyString())).thenReturn(sirNullALaCarte);
         when(serviceInstances.getPnfCorrelationId(any(ServiceInstancesRequest.class))).thenReturn("pnfCorrelationId");
         doReturn(false).when(msoRequest).getAlacarteFlag(sirNullALaCarte);
-        doReturn(lookupResult).when(serviceInstances).getServiceInstanceOrchestrationURI(sirNullALaCarte, action, false,
+        doReturn(lookupResult).when(requestHandler).getServiceInstanceOrchestrationURI(sirNullALaCarte, action, false,
                 currentActiveRequest);
         doReturn(requestClientParameter).when(resumeReq).setRequestClientParameter(lookupResult, version,
                 infraActiveRequest, currentActiveRequest, "pnfCorrelationId", aLaCarte, sirNullALaCarte);
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java
index 94436d5..61654d1 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java
@@ -2266,7 +2266,7 @@
         RequestParameters requestParameters = request.getRequestDetails().getRequestParameters();
         String userParamsTxt = inputStream("/userParams.txt");
 
-        List<Map<String, Object>> userParams = servInstances.configureUserParams(requestParameters);
+        List<Map<String, Object>> userParams = requestHandlerUtils.configureUserParams(requestParameters);
         System.out.println(userParams);
         assertTrue(userParams.size() > 0);
         assertTrue(userParams.get(0).containsKey("name"));
@@ -2280,7 +2280,7 @@
         ServiceInstancesRequest request =
                 mapper.readValue(inputStream("/MacroServiceInstance.json"), ServiceInstancesRequest.class);
         CloudConfiguration cloudConfig =
-                servInstances.configureCloudConfig(request.getRequestDetails().getRequestParameters());
+                requestHandlerUtils.configureCloudConfig(request.getRequestDetails().getRequestParameters());
 
         assertEquals("mdt25b", cloudConfig.getLcpCloudRegionId());
         assertEquals("aefb697db6524ddebfe4915591b0a347", cloudConfig.getTenantId());
@@ -2293,7 +2293,7 @@
                 mapper.readValue(inputStream("/MacroServiceInstance.json"), ServiceInstancesRequest.class);
         ServiceInstancesRequest expected =
                 mapper.readValue(inputStream("/LegacyMacroServiceInstance.json"), ServiceInstancesRequest.class);
-        servInstances.mapToLegacyRequest(request.getRequestDetails());
+        requestHandlerUtils.mapToLegacyRequest(request.getRequestDetails());
         System.out.println(mapper.writerWithDefaultPrettyPrinter().writeValueAsString(request));
         assertThat(request, sameBeanAs(expected));
     }
diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraActiveRequests.java b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraActiveRequests.java
index d0a4aa2..1f5fb8f 100644
--- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraActiveRequests.java
+++ b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraActiveRequests.java
@@ -23,8 +23,8 @@
 import java.util.Objects;
 import javax.persistence.Entity;
 import javax.persistence.Table;
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 import org.apache.commons.lang3.builder.ToStringBuilder;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 
 /**
  * InfraActiveRequests generated by hbm2java
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java
index 0486494..e60ef97 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java
@@ -766,6 +766,11 @@
         this.postSingleResource(cloudSiteClient, cloudSite);
     }
 
+    public List<CloudSite> getCloudSites() {
+        return this.getMultipleResources(cloudSiteClient, UriBuilder.fromUri(endpoint + CLOUD_SITE).build());
+    }
+
+
     public CloudSite getCloudSiteByClliAndAicVersion(String clli, String cloudVersion) {
         return this.getSingleResource(cloudSiteClient, getUri(UriBuilder.fromUri(findByClliAndCloudVersion)
                 .queryParam(CLLI, clli).queryParam(CLOUD_VERSION, cloudVersion).build().toString()));
