diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java
index c22bb32..2d77bf6 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java
@@ -187,11 +187,7 @@
             Holder<Map<String, String>> outputs) throws VnfException {
         logger.debug("Querying VNF " + vnfNameOrId + " in " + cloudOwner + "/" + cloudSiteId + "/" + tenantId);
 
-        // Will capture execution time for metrics
-        long startTime = System.currentTimeMillis();
-        long subStartTime = System.currentTimeMillis();
-
-        VduInstance vduInstance = null;
+        VduInstance vduInstance;
         CloudInfo cloudInfo = new CloudInfo(cloudSiteId, cloudOwner, tenantId, null);
 
         VduPlugin vduPlugin = getVduPlugin(cloudSiteId, cloudOwner);
@@ -252,7 +248,6 @@
      */
     @Override
     public void rollbackVnf(VnfRollback rollback) throws VnfException {
-        long startTime = System.currentTimeMillis();
         // rollback may be null (e.g. if stack already existed when Create was called)
         if (rollback == null) {
             logger.info(LoggingAnchor.THREE, MessageEnum.RA_ROLLBACK_NULL.toString(), "OpenStack", "rollbackVnf");
@@ -279,7 +274,6 @@
         // Use the VduPlugin to delete the VF Module.
         VduPlugin vduPlugin = getVduPlugin(cloudSiteId, cloudOwner);
 
-        long subStartTime = System.currentTimeMillis();
         try {
             // TODO: Get a reasonable timeout. Use a global property, or store the creation timeout in rollback object
             // and use that.
@@ -336,7 +330,7 @@
                 logger.debug("Unable to convert " + inputValue + " to an integer!", e);
                 return null;
             }
-        } else if (type.equalsIgnoreCase("json")) {
+        } else if ("json".equalsIgnoreCase(type)) {
             try {
                 JsonNode jsonNode = JSON_MAPPER.readTree(JSON_MAPPER.writeValueAsString(inputValue));
                 return jsonNode;
@@ -344,7 +338,7 @@
                 logger.debug("Unable to convert " + inputValue + " to a JsonNode!", e);
                 return null;
             }
-        } else if (type.equalsIgnoreCase("boolean")) {
+        } else if ("boolean".equalsIgnoreCase(type)) {
             return new Boolean(inputValue.toString());
         }
 
@@ -353,7 +347,7 @@
     }
 
     private Map<String, String> copyStringOutputs(Map<String, Object> stackOutputs) {
-        Map<String, String> stringOutputs = new HashMap<String, String>();
+        Map<String, String> stringOutputs = new HashMap<>();
         for (String key : stackOutputs.keySet()) {
             if (stackOutputs.get(key) instanceof String) {
                 stringOutputs.put(key, (String) stackOutputs.get(key));
@@ -447,7 +441,7 @@
         if (objectMap == null) {
             return null;
         }
-        Map<String, String> stringMap = new HashMap<String, String>();
+        Map<String, String> stringMap = new HashMap<>();
         for (String key : objectMap.keySet()) {
             if (!stringMap.containsKey(key)) {
                 Object obj = objectMap.get(key);
@@ -540,8 +534,6 @@
             String volumeGroupId, String baseVfModuleId, String modelCustomizationUuid, Map<String, Object> inputs,
             Boolean failIfExists, Boolean backout, Boolean enableBridge, MsoRequest msoRequest, Holder<String> vnfId,
             Holder<Map<String, String>> outputs, Holder<VnfRollback> rollback) throws VnfException {
-        // Will capture execution time for metrics
-        long startTime = System.currentTimeMillis();
 
         // Require a model customization ID. Every VF Module definition must have one.
         if (modelCustomizationUuid == null || modelCustomizationUuid.isEmpty()) {
@@ -665,7 +657,6 @@
         // Use the VduPlugin.
         VduPlugin vduPlugin = getVduPlugin(cloudSiteId, cloudOwner);
 
-        long subStartTime1 = System.currentTimeMillis();
         try {
             vduInstance = vduPlugin.queryVdu(cloudInfo, vfModuleName);
         } catch (VduException me) {
@@ -761,8 +752,7 @@
 
         // If a Volume Group was provided, query its outputs for inclusion in Module input parameters
         if (volumeGroupId != null) {
-            long subStartTime2 = System.currentTimeMillis();
-            VduInstance volumeVdu = null;
+            VduInstance volumeVdu;
             try {
                 volumeVdu = vduPlugin.queryVdu(cloudInfo, volumeGroupId);
             } catch (VduException me) {
@@ -811,8 +801,7 @@
             }
 
             if (baseVfModuleId != null) {
-                long subStartTime2 = System.currentTimeMillis();
-                VduInstance baseVdu = null;
+                VduInstance baseVdu;
                 try {
                     baseVdu = vduPlugin.queryVdu(cloudInfo, baseVfModuleId);
                 } catch (MsoException me) {
@@ -887,19 +876,19 @@
         // Create the combined set of parameters from the incoming request, base-module outputs,
         // volume-module outputs. Also, convert all variables to their native object types.
 
-        HashMap<String, Object> goldenInputs = new HashMap<String, Object>();
-        List<String> extraInputs = new ArrayList<String>();
+        HashMap<String, Object> goldenInputs = new HashMap<>();
+        List<String> extraInputs = new ArrayList<>();
 
         Boolean skipInputChecks = false;
 
         if (skipInputChecks) {
-            goldenInputs = new HashMap<String, Object>();
+            goldenInputs = new HashMap<>();
             for (String key : inputs.keySet()) {
                 goldenInputs.put(key, inputs.get(key));
             }
         } else {
             // Build maps for the parameters (including aliases) to simplify checks
-            HashMap<String, HeatTemplateParam> params = new HashMap<String, HeatTemplateParam>();
+            HashMap<String, HeatTemplateParam> params = new HashMap<>();
 
             Set<HeatTemplateParam> paramSet = heatTemplate.getParameters();
             logger.debug("paramSet has " + paramSet.size() + " entries");
@@ -909,7 +898,7 @@
 
                 // Include aliases.
                 String alias = htp.getParamAlias();
-                if (alias != null && !alias.equals("") && !params.containsKey(alias)) {
+                if (alias != null && !"".equals(alias) && !params.containsKey(alias)) {
                     params.put(alias, htp);
                 }
             }
@@ -1026,7 +1015,6 @@
 
 
         // Here we go... ready to deploy the VF Module.
-        long instantiateVduStartTime = System.currentTimeMillis();
         if (backout == null)
             backout = true;
 
@@ -1088,11 +1076,9 @@
             MsoRequest msoRequest, Holder<Map<String, String>> outputs) throws VnfException {
 
         logger.debug("Deleting VF Module " + vfModuleId + " in " + cloudOwner + "/" + cloudSiteId + "/" + tenantId);
-        // Will capture execution time for metrics
-        long startTime = System.currentTimeMillis();
 
         // Capture the output parameters on a delete, so need to query first
-        VduInstance vduInstance = null;
+        VduInstance vduInstance;
         CloudInfo cloudInfo = new CloudInfo(cloudSiteId, cloudOwner, tenantId, null);
 
         // Use the VduPlugin.
@@ -1123,7 +1109,6 @@
         // - a vnfInstance object with status of NOTFOUND (VDU did not exist, treat as success)
         // - a vnfInstance object with status of FAILED (error)
         // Also, VduException could be thrown.
-        long subStartTime = System.currentTimeMillis();
         try {
             // TODO: Get an appropriate timeout value - require access to the model
             vduPlugin.deleteVdu(cloudInfo, vfModuleId, 5);
@@ -1166,11 +1151,11 @@
             CloudSite cloudSite = cloudSiteOp.get();
             String orchestrator = cloudSite.getOrchestrator();
 
-            if (orchestrator.equalsIgnoreCase("CLOUDIFY")) {
+            if ("CLOUDIFY".equalsIgnoreCase(orchestrator)) {
                 return cloudifyUtils;
-            } else if (orchestrator.equalsIgnoreCase("HEAT")) {
+            } else if ("HEAT".equalsIgnoreCase(orchestrator)) {
                 return heatUtils;
-            } else if (orchestrator.equalsIgnoreCase("MULTICLOUD")) {
+            } else if ("MULTICLOUD".equalsIgnoreCase(orchestrator)) {
                 return multicloudUtils;
             } else {
                 // Default if cloudSite record exists - return HEAT plugin - will fail later
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java
index a68bd3e..5697ed5 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java
@@ -88,11 +88,9 @@
 
         String xml = genSdncReq(request, mappedTunables);
 
-        long sdncStartTime = System.currentTimeMillis();
         SDNCResponseCommon response = connector.send(xml, mappedTunables);
 
-        long bpStartTime = System.currentTimeMillis();
-        boolean callbackSuccess = bpRestCallback.send(request.getBPNotificationUrl(), response.toJson());
+        bpRestCallback.send(request.getBPNotificationUrl(), response.toJson());
     }
 
     private Element addChild(Element parent, String tag) {
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/rest/HealthCheckHandler.java b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/rest/HealthCheckHandler.java
index cff3606..2dcdf11 100644
--- a/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/rest/HealthCheckHandler.java
+++ b/adapters/mso-vfc-adapter/src/main/java/org/onap/so/adapters/vfc/rest/HealthCheckHandler.java
@@ -28,8 +28,6 @@
 import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.Response;
 import org.apache.http.HttpStatus;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Component;
 
 /**
@@ -44,8 +42,6 @@
 @Component
 public class HealthCheckHandler {
 
-    private static Logger logger = LoggerFactory.getLogger(HealthCheckHandler.class);
-
 
     private static final String CHECK_HTML =
             "<!DOCTYPE html><html><head><meta charset=\"ISO-8859-1\"><title>Health Check</title></head><body>Application ready</body></html>";
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
index 94517cc..a08206b 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
@@ -628,11 +628,12 @@
 
     protected void processNetworks(ToscaResourceStructure toscaResourceStruct, Service service)
             throws ArtifactInstallerException {
-        List<NodeTemplate> nodeTemplatesVLList = toscaResourceStruct.getSdcCsarHelper().getServiceVlList();
 
-        if (nodeTemplatesVLList != null) {
-            for (NodeTemplate vlNode : nodeTemplatesVLList) {
-                String networkResourceModelName = vlNode.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_NAME);
+        List<IEntityDetails> vlEntityList = getEntityDetails(toscaResourceStruct, SdcTypes.VL, SdcTypes.SERVICE);
+
+        if (vlEntityList != null) {
+            for (IEntityDetails vlEntity : vlEntityList) {
+                String networkResourceModelName = vlEntity.getMetadata().getValue(SdcPropertyNames.PROPERTY_NAME_NAME);
 
                 TempNetworkHeatTemplateLookup tempNetworkLookUp =
                         tempNetworkLookupRepo.findFirstBynetworkResourceModelName(networkResourceModelName);
@@ -641,7 +642,7 @@
                     HeatTemplate heatTemplate =
                             heatRepo.findByArtifactUuid(tempNetworkLookUp.getHeatTemplateArtifactUuid());
                     if (heatTemplate != null) {
-                        NetworkResourceCustomization networkCustomization = createNetwork(vlNode, toscaResourceStruct,
+                        NetworkResourceCustomization networkCustomization = createNetwork(vlEntity, toscaResourceStruct,
                                 heatTemplate, tempNetworkLookUp.getAicVersionMax(),
                                 tempNetworkLookUp.getAicVersionMin(), service);
                         service.getNetworkCustomizations().add(networkCustomization);
@@ -651,7 +652,7 @@
                     }
                 } else {
                     NetworkResourceCustomization networkCustomization =
-                            createNetwork(vlNode, toscaResourceStruct, null, null, null, service);
+                            createNetwork(vlEntity, toscaResourceStruct, null, null, null, service);
                     service.getNetworkCustomizations().add(networkCustomization);
                     logger.debug("No NetworkResourceName found in TempNetworkHeatTemplateLookup for "
                             + networkResourceModelName);
@@ -1493,13 +1494,13 @@
         return cvnfcCustomization;
     }
 
-    protected NetworkResourceCustomization createNetwork(NodeTemplate networkNodeTemplate,
+    protected NetworkResourceCustomization createNetwork(IEntityDetails networkEntity,
             ToscaResourceStructure toscaResourceStructure, HeatTemplate heatTemplate, String aicMax, String aicMin,
             Service service) {
 
         NetworkResourceCustomization networkResourceCustomization =
                 networkCustomizationRepo.findOneByModelCustomizationUUID(
-                        networkNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID));
+                        networkEntity.getMetadata().getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID));
 
         boolean networkUUIDsMatch = true;
         // Check to make sure the NetworkResourceUUID on the Customization record matches the NetworkResourceUUID from
@@ -1507,8 +1508,7 @@
         // If not we'll update the Customization record with latest from the distribution
         if (networkResourceCustomization != null) {
             String existingNetworkModelUUID = networkResourceCustomization.getNetworkResource().getModelUUID();
-            String latestNetworkModelUUID =
-                    networkNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_UUID);
+            String latestNetworkModelUUID = networkEntity.getMetadata().getValue(SdcPropertyNames.PROPERTY_NAME_UUID);
 
             if (!existingNetworkModelUUID.equals(latestNetworkModelUUID)) {
                 networkUUIDsMatch = false;
@@ -1519,7 +1519,7 @@
         if (networkResourceCustomization != null && !networkUUIDsMatch) {
 
             NetworkResource networkResource =
-                    createNetworkResource(networkNodeTemplate, toscaResourceStructure, heatTemplate, aicMax, aicMin);
+                    createNetworkResource(networkEntity, toscaResourceStructure, heatTemplate, aicMax, aicMin);
 
             networkResourceCustomization.setNetworkResource(networkResource);
 
@@ -1527,14 +1527,13 @@
 
 
         } else if (networkResourceCustomization == null) {
-            networkResourceCustomization =
-                    createNetworkResourceCustomization(networkNodeTemplate, toscaResourceStructure);
+            networkResourceCustomization = createNetworkResourceCustomization(networkEntity, toscaResourceStructure);
 
             NetworkResource networkResource = findExistingNetworkResource(service,
-                    networkNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_UUID));
+                    networkEntity.getMetadata().getValue(SdcPropertyNames.PROPERTY_NAME_UUID));
             if (networkResource == null)
-                networkResource = createNetworkResource(networkNodeTemplate, toscaResourceStructure, heatTemplate,
-                        aicMax, aicMin);
+                networkResource =
+                        createNetworkResource(networkEntity, toscaResourceStructure, heatTemplate, aicMax, aicMin);
 
             networkResource.addNetworkResourceCustomization(networkResourceCustomization);
             networkResourceCustomization.setNetworkResource(networkResource);
@@ -1557,31 +1556,34 @@
         return networkResource;
     }
 
-    protected NetworkResourceCustomization createNetworkResourceCustomization(NodeTemplate networkNodeTemplate,
+    protected NetworkResourceCustomization createNetworkResourceCustomization(IEntityDetails networkEntity,
             ToscaResourceStructure toscaResourceStructure) {
         NetworkResourceCustomization networkResourceCustomization = new NetworkResourceCustomization();
         networkResourceCustomization.setModelInstanceName(
-                testNull(networkNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_NAME)));
+                testNull(networkEntity.getMetadata().getValue(SdcPropertyNames.PROPERTY_NAME_NAME)));
         networkResourceCustomization.setModelCustomizationUUID(
-                testNull(networkNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID)));
+                testNull(networkEntity.getMetadata().getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID)));
 
         networkResourceCustomization.setNetworkTechnology(
-                testNull(toscaResourceStructure.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(networkNodeTemplate,
-                        SdcPropertyNames.PROPERTY_NAME_NETWORKTECHNOLOGY)));
-        networkResourceCustomization.setNetworkType(testNull(toscaResourceStructure.getSdcCsarHelper()
-                .getNodeTemplatePropertyLeafValue(networkNodeTemplate, SdcPropertyNames.PROPERTY_NAME_NETWORKTYPE)));
-        networkResourceCustomization.setNetworkRole(testNull(toscaResourceStructure.getSdcCsarHelper()
-                .getNodeTemplatePropertyLeafValue(networkNodeTemplate, SdcPropertyNames.PROPERTY_NAME_NETWORKROLE)));
-        networkResourceCustomization.setNetworkScope(testNull(toscaResourceStructure.getSdcCsarHelper()
-                .getNodeTemplatePropertyLeafValue(networkNodeTemplate, SdcPropertyNames.PROPERTY_NAME_NETWORKSCOPE)));
+                getLeafPropertyValue(networkEntity, SdcPropertyNames.PROPERTY_NAME_NETWORKTECHNOLOGY));
+
+        networkResourceCustomization
+                .setNetworkType(getLeafPropertyValue(networkEntity, SdcPropertyNames.PROPERTY_NAME_NETWORKTYPE));
+
+        networkResourceCustomization
+                .setNetworkRole(getLeafPropertyValue(networkEntity, SdcPropertyNames.PROPERTY_NAME_NETWORKROLE));
+
+        networkResourceCustomization
+                .setNetworkScope(getLeafPropertyValue(networkEntity, SdcPropertyNames.PROPERTY_NAME_NETWORKSCOPE));
+
         return networkResourceCustomization;
     }
 
-    protected NetworkResource createNetworkResource(NodeTemplate networkNodeTemplate,
+    protected NetworkResource createNetworkResource(IEntityDetails vlEntity,
             ToscaResourceStructure toscaResourceStructure, HeatTemplate heatTemplate, String aicMax, String aicMin) {
         NetworkResource networkResource = new NetworkResource();
-        String providerNetwork = toscaResourceStructure.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(
-                networkNodeTemplate, SdcPropertyNames.PROPERTY_NAME_PROVIDERNETWORK_ISPROVIDERNETWORK);
+        String providerNetwork =
+                getLeafPropertyValue(vlEntity, SdcPropertyNames.PROPERTY_NAME_PROVIDERNETWORK_ISPROVIDERNETWORK);
 
         if ("true".equalsIgnoreCase(providerNetwork)) {
             networkResource.setNeutronNetworkType(PROVIDER);
@@ -1589,21 +1591,19 @@
             networkResource.setNeutronNetworkType(BASIC);
         }
 
-        networkResource.setModelName(
-                testNull(networkNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_NAME)));
+        networkResource.setModelName(testNull(vlEntity.getMetadata().getValue(SdcPropertyNames.PROPERTY_NAME_NAME)));
 
         networkResource.setModelInvariantUUID(
-                testNull(networkNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_INVARIANTUUID)));
-        networkResource.setModelUUID(
-                testNull(networkNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_UUID)));
-        networkResource.setModelVersion(
-                testNull(networkNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_VERSION)));
+                testNull(vlEntity.getMetadata().getValue(SdcPropertyNames.PROPERTY_NAME_INVARIANTUUID)));
+        networkResource.setModelUUID(testNull(vlEntity.getMetadata().getValue(SdcPropertyNames.PROPERTY_NAME_UUID)));
+        networkResource
+                .setModelVersion(testNull(vlEntity.getMetadata().getValue(SdcPropertyNames.PROPERTY_NAME_VERSION)));
 
         networkResource.setAicVersionMax(aicMax);
         networkResource.setAicVersionMin(aicMin);
-        networkResource.setToscaNodeType(networkNodeTemplate.getType());
-        networkResource.setDescription(
-                testNull(networkNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_DESCRIPTION)));
+        networkResource.setToscaNodeType(vlEntity.getToscaType());
+        networkResource
+                .setDescription(testNull(vlEntity.getMetadata().getValue(SdcPropertyNames.PROPERTY_NAME_DESCRIPTION)));
         networkResource.setOrchestrationMode(HEAT);
         networkResource.setHeatTemplate(heatTemplate);
         return networkResource;
@@ -2672,6 +2672,41 @@
                 + vfModuleStructure.getVfModuleMetadata().getVfModuleModelName();
     }
 
+    protected List<IEntityDetails> getEntityDetails(ToscaResourceStructure toscaResourceStruct, SdcTypes entityType,
+            SdcTypes topologyTemplate) {
+
+        EntityQuery entityQuery = EntityQuery.newBuilder(entityType).build();
+        TopologyTemplateQuery topologyTemplateQuery = TopologyTemplateQuery.newBuilder(topologyTemplate).build();
+        List<IEntityDetails> entityDetails =
+                toscaResourceStruct.getSdcCsarHelper().getEntity(entityQuery, topologyTemplateQuery, false);
+
+        return entityDetails;
+
+    }
+
+    protected List<IEntityDetails> getEntityDetails(ToscaResourceStructure toscaResourceStruct, String entityType,
+            SdcTypes topologyTemplate) {
+
+        EntityQuery entityQuery = EntityQuery.newBuilder(entityType).build();
+        TopologyTemplateQuery topologyTemplateQuery = TopologyTemplateQuery.newBuilder(topologyTemplate).build();
+        List<IEntityDetails> entityDetails =
+                toscaResourceStruct.getSdcCsarHelper().getEntity(entityQuery, topologyTemplateQuery, true);
+
+        return entityDetails;
+
+    }
+
+    protected String getLeafPropertyValue(IEntityDetails entityDetails, String propName) {
+
+        Property leafProperty = entityDetails.getProperties().get(propName);
+
+        if (leafProperty != null && leafProperty.getValue() != null) {
+            return leafProperty.getValue().toString();
+        }
+
+        return null;
+    }
+
     protected String getPropertyInput(String propertyName) {
 
         String inputName = new String();
diff --git a/asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInstallerTest.java b/asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInstallerTest.java
index bd8e877..115af3a 100644
--- a/asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInstallerTest.java
+++ b/asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInstallerTest.java
@@ -45,6 +45,7 @@
 import org.onap.sdc.api.notification.IArtifactInfo;
 import org.onap.sdc.api.notification.INotificationData;
 import org.onap.sdc.api.notification.IResourceInstance;
+import org.onap.sdc.tosca.parser.api.IEntityDetails;
 import org.onap.sdc.tosca.parser.api.ISdcCsarHelper;
 import org.onap.sdc.tosca.parser.impl.SdcCsarHelperImpl;
 import org.onap.sdc.tosca.parser.impl.SdcPropertyNames;
@@ -102,6 +103,8 @@
     @Mock
     private NodeTemplate nodeTemplate;
     @Mock
+    private IEntityDetails entityDetails;
+    @Mock
     private ToscaResourceStructure toscaResourceStructure;
     @Mock
     private ServiceProxyResourceCustomization spResourceCustomization;
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/listener/db/PostCompletionRequestsDbListener.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/listener/db/PostCompletionRequestsDbListener.java
new file mode 100644
index 0000000..f888e53
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/listener/db/PostCompletionRequestsDbListener.java
@@ -0,0 +1,33 @@
+/*-
+ * ============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.db;
+
+import org.onap.so.bpmn.common.BuildingBlockExecution;
+import org.onap.so.db.request.beans.InfraActiveRequests;
+
+public interface PostCompletionRequestsDbListener {
+
+    public boolean shouldRunFor(BuildingBlockExecution execution);
+
+    public void run(InfraActiveRequests request, BuildingBlockExecution execution);
+
+
+}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/listener/db/RequestsDbListenerRunner.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/listener/db/RequestsDbListenerRunner.java
new file mode 100644
index 0000000..68cda5c
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/listener/db/RequestsDbListenerRunner.java
@@ -0,0 +1,65 @@
+/*-
+ * ============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.db;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Optional;
+import java.util.stream.Collectors;
+import javax.annotation.PostConstruct;
+import org.onap.so.bpmn.common.BuildingBlockExecution;
+import org.onap.so.bpmn.common.listener.ListenerRunner;
+import org.onap.so.bpmn.common.listener.flowmanipulator.FlowManipulatorListenerRunner;
+import org.onap.so.db.request.beans.InfraActiveRequests;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+@Component
+public class RequestsDbListenerRunner extends ListenerRunner {
+
+
+    private static Logger logger = LoggerFactory.getLogger(FlowManipulatorListenerRunner.class);
+
+    protected List<PostCompletionRequestsDbListener> postListeners;
+
+    @PostConstruct
+    protected void init() {
+
+        postListeners =
+                new ArrayList<>(Optional.ofNullable(context.getBeansOfType(PostCompletionRequestsDbListener.class))
+                        .orElse(new HashMap<>()).values());
+
+    }
+
+    public void post(InfraActiveRequests request, BuildingBlockExecution execution) {
+
+        List<PostCompletionRequestsDbListener> filtered =
+                filterListeners(postListeners, (item -> item.shouldRunFor(execution)));
+
+        logger.info("Running post request db listeners:\n{}",
+                filtered.stream().map(item -> item.getClass().getName()).collect(Collectors.joining("\n")));
+        filtered.forEach(item -> item.run(request, execution));
+
+    }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy
index 21f9484..df8735a 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy
@@ -267,7 +267,7 @@
 				execution.setVariable(Prefix + "queryAAIResponse", l3Network.get())
 				execution.setVariable(Prefix + "isAAIGood", true)
 				if (relationships.isPresent()){
-					if(relationships.get().getRelatedAAIUris(AAIObjectType.VF_MODULE).isEmpty()){
+					if(!relationships.get().getRelatedAAIUris(AAIObjectType.VF_MODULE).isEmpty()){
 						execution.setVariable(Prefix + "isVfRelationshipExist", true)
 						isVfRelationshipExist = true
 						String relationshipMessage = "AAI Query Success Response but 'vf-module' relationship exist, not allowed to delete: network Id: " + networkId
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/AbstractSDNCTask.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/AbstractSDNCTask.java
new file mode 100644
index 0000000..c134f31
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/AbstractSDNCTask.java
@@ -0,0 +1,22 @@
+package org.onap.so.bpmn.infrastructure.sdnc.tasks;
+
+import java.net.URI;
+import javax.ws.rs.core.UriBuilder;
+import org.onap.so.client.sdnc.beans.SDNCRequest;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.env.Environment;
+import org.springframework.stereotype.Component;
+
+@Component
+public class AbstractSDNCTask {
+
+    @Autowired
+    Environment env;
+
+
+    public URI buildCallbackURI(SDNCRequest sdncRequest) {
+        UriBuilder builder = UriBuilder.fromPath(env.getRequiredProperty("mso.workflow.message.endpoint"))
+                .path(sdncRequest.getCorrelationName()).path(sdncRequest.getCorrelationValue());
+        return builder.build();
+    }
+}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCActivateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCActivateTasks.java
index e4dd355..b85e331 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCActivateTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCActivateTasks.java
@@ -22,8 +22,6 @@
 
 package org.onap.so.bpmn.infrastructure.sdnc.tasks;
 
-import java.net.URI;
-import javax.ws.rs.core.UriBuilder;
 import org.onap.sdnc.northbound.client.model.GenericResourceApiNetworkOperationInformation;
 import org.onap.sdnc.northbound.client.model.GenericResourceApiVfModuleOperationInformation;
 import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfOperationInformation;
@@ -52,7 +50,7 @@
 import org.springframework.stereotype.Component;
 
 @Component
-public class SDNCActivateTasks {
+public class SDNCActivateTasks extends AbstractSDNCTask {
 
     public static final String SDNC_REQUEST = "SDNCRequest";
     @Autowired
@@ -77,9 +75,9 @@
             GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
             CloudRegion cloudRegion = gBBInput.getCloudRegion();
             Customer customer = gBBInput.getCustomer();
-            GenericResourceApiVnfOperationInformation req =
-                    sdncVnfResources.activateVnf(vnf, serviceInstance, customer, cloudRegion, requestContext);
             SDNCRequest sdncRequest = new SDNCRequest();
+            GenericResourceApiVnfOperationInformation req = sdncVnfResources.activateVnf(vnf, serviceInstance, customer,
+                    cloudRegion, requestContext, buildCallbackURI(sdncRequest));
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.VNF);
             execution.setVariable(SDNC_REQUEST, sdncRequest);
@@ -127,11 +125,8 @@
             Customer customer = gBBInput.getCustomer();
             CloudRegion cloudRegion = gBBInput.getCloudRegion();
             SDNCRequest sdncRequest = new SDNCRequest();
-            UriBuilder builder = UriBuilder.fromPath(env.getRequiredProperty("mso.workflow.message.endpoint"))
-                    .path(sdncRequest.getCorrelationName()).path(sdncRequest.getCorrelationValue());
-            URI uri = builder.build();
             GenericResourceApiVfModuleOperationInformation req = sdncVfModuleResources.activateVfModule(vfModule, vnf,
-                    serviceInstance, customer, cloudRegion, requestContext, uri);
+                    serviceInstance, customer, cloudRegion, requestContext, buildCallbackURI(sdncRequest));
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.VFMODULE);
             execution.setVariable(SDNC_REQUEST, sdncRequest);
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java
index c100cd6..ab2647a 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java
@@ -22,8 +22,6 @@
 
 package org.onap.so.bpmn.infrastructure.sdnc.tasks;
 
-import java.net.URI;
-import javax.ws.rs.core.UriBuilder;
 import org.onap.sdnc.northbound.client.model.GenericResourceApiNetworkOperationInformation;
 import org.onap.sdnc.northbound.client.model.GenericResourceApiServiceOperationInformation;
 import org.onap.sdnc.northbound.client.model.GenericResourceApiVfModuleOperationInformation;
@@ -55,7 +53,7 @@
 import org.springframework.stereotype.Component;
 
 @Component
-public class SDNCAssignTasks {
+public class SDNCAssignTasks extends AbstractSDNCTask {
     private static final Logger logger = LoggerFactory.getLogger(SDNCAssignTasks.class);
     public static final String SDNC_REQUEST = "SDNCRequest";
     @Autowired
@@ -100,9 +98,11 @@
             GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
             Customer customer = gBBInput.getCustomer();
             CloudRegion cloudRegion = gBBInput.getCloudRegion();
-            GenericResourceApiVnfOperationInformation req = sdncVnfResources.assignVnf(vnf, serviceInstance, customer,
-                    cloudRegion, requestContext, Boolean.TRUE.equals(vnf.isCallHoming()));
             SDNCRequest sdncRequest = new SDNCRequest();
+
+            GenericResourceApiVnfOperationInformation req =
+                    sdncVnfResources.assignVnf(vnf, serviceInstance, customer, cloudRegion, requestContext,
+                            Boolean.TRUE.equals(vnf.isCallHoming()), buildCallbackURI(sdncRequest));
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.VNF);
             execution.setVariable(SDNC_REQUEST, sdncRequest);
@@ -128,11 +128,9 @@
             Customer customer = gBBInput.getCustomer();
             CloudRegion cloudRegion = gBBInput.getCloudRegion();
             SDNCRequest sdncRequest = new SDNCRequest();
-            UriBuilder builder = UriBuilder.fromPath(env.getRequiredProperty("mso.workflow.message.endpoint"))
-                    .path(sdncRequest.getCorrelationName()).path(sdncRequest.getCorrelationValue());
-            URI uri = builder.build();
-            GenericResourceApiVfModuleOperationInformation req = sdncVfModuleResources.assignVfModule(vfModule,
-                    volumeGroup, vnf, serviceInstance, customer, cloudRegion, requestContext, uri);
+            GenericResourceApiVfModuleOperationInformation req =
+                    sdncVfModuleResources.assignVfModule(vfModule, volumeGroup, vnf, serviceInstance, customer,
+                            cloudRegion, requestContext, buildCallbackURI(sdncRequest));
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.VFMODULE);
             execution.setVariable(SDNC_REQUEST, sdncRequest);
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCChangeAssignTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCChangeAssignTasks.java
index acf48ac..c5ebc5e 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCChangeAssignTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCChangeAssignTasks.java
@@ -20,8 +20,6 @@
 
 package org.onap.so.bpmn.infrastructure.sdnc.tasks;
 
-import java.net.URI;
-import javax.ws.rs.core.UriBuilder;
 import org.onap.sdnc.northbound.client.model.GenericResourceApiNetworkOperationInformation;
 import org.onap.sdnc.northbound.client.model.GenericResourceApiServiceOperationInformation;
 import org.onap.sdnc.northbound.client.model.GenericResourceApiVfModuleOperationInformation;
@@ -49,7 +47,7 @@
 import org.springframework.stereotype.Component;
 
 @Component
-public class SDNCChangeAssignTasks {
+public class SDNCChangeAssignTasks extends AbstractSDNCTask {
     public static final String SDNC_REQUEST = "SDNCRequest";
     @Autowired
     private SDNCNetworkResources sdncNetworkResources;
@@ -88,9 +86,10 @@
             GenericVnf genericVnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
             ServiceInstance serviceInstance =
                     extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID);
-            GenericResourceApiVnfOperationInformation req = sdncVnfResources.changeModelVnf(genericVnf, serviceInstance,
-                    gBBInput.getCustomer(), gBBInput.getCloudRegion(), gBBInput.getRequestContext());
             SDNCRequest sdncRequest = new SDNCRequest();
+            GenericResourceApiVnfOperationInformation req =
+                    sdncVnfResources.changeModelVnf(genericVnf, serviceInstance, gBBInput.getCustomer(),
+                            gBBInput.getCloudRegion(), gBBInput.getRequestContext(), buildCallbackURI(sdncRequest));
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.VNF);
             execution.setVariable(SDNC_REQUEST, sdncRequest);
@@ -127,11 +126,8 @@
             VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID);
             Customer customer = gBBInput.getCustomer();
             SDNCRequest sdncRequest = new SDNCRequest();
-            UriBuilder builder = UriBuilder.fromPath(env.getRequiredProperty("mso.workflow.message.endpoint"))
-                    .path(sdncRequest.getCorrelationName()).path(sdncRequest.getCorrelationValue());
-            URI uri = builder.build();
             GenericResourceApiVfModuleOperationInformation req = sdncVfModuleResources.changeAssignVfModule(vfModule,
-                    vnf, serviceInstance, customer, cloudRegion, requestContext, uri);
+                    vnf, serviceInstance, customer, cloudRegion, requestContext, buildCallbackURI(sdncRequest));
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.VFMODULE);
             execution.setVariable(SDNC_REQUEST, sdncRequest);
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCDeactivateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCDeactivateTasks.java
index 3fc2519..3c42f76 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCDeactivateTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCDeactivateTasks.java
@@ -22,8 +22,6 @@
 
 package org.onap.so.bpmn.infrastructure.sdnc.tasks;
 
-import java.net.URI;
-import javax.ws.rs.core.UriBuilder;
 import org.onap.sdnc.northbound.client.model.GenericResourceApiNetworkOperationInformation;
 import org.onap.sdnc.northbound.client.model.GenericResourceApiServiceOperationInformation;
 import org.onap.sdnc.northbound.client.model.GenericResourceApiVfModuleOperationInformation;
@@ -53,7 +51,7 @@
 import org.springframework.stereotype.Component;
 
 @Component
-public class SDNCDeactivateTasks {
+public class SDNCDeactivateTasks extends AbstractSDNCTask {
 
     public static final String SDNC_REQUEST = "SDNCRequest";
     @Autowired
@@ -82,11 +80,8 @@
             Customer customer = gBBInput.getCustomer();
             CloudRegion cloudRegion = gBBInput.getCloudRegion();
             SDNCRequest sdncRequest = new SDNCRequest();
-            UriBuilder builder = UriBuilder.fromPath(env.getRequiredProperty("mso.workflow.message.endpoint"))
-                    .path(sdncRequest.getCorrelationName()).path(sdncRequest.getCorrelationValue());
-            URI uri = builder.build();
             GenericResourceApiVfModuleOperationInformation req = sdncVfModuleResources.deactivateVfModule(vfModule, vnf,
-                    serviceInstance, customer, cloudRegion, requestContext, uri);
+                    serviceInstance, customer, cloudRegion, requestContext, buildCallbackURI(sdncRequest));
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.VFMODULE);
             execution.setVariable(SDNC_REQUEST, sdncRequest);
@@ -111,9 +106,9 @@
             vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
             CloudRegion cloudRegion = gBBInput.getCloudRegion();
             Customer customer = gBBInput.getCustomer();
-            GenericResourceApiVnfOperationInformation req =
-                    sdncVnfResources.deactivateVnf(vnf, serviceInstance, customer, cloudRegion, requestContext);
             SDNCRequest sdncRequest = new SDNCRequest();
+            GenericResourceApiVnfOperationInformation req = sdncVnfResources.deactivateVnf(vnf, serviceInstance,
+                    customer, cloudRegion, requestContext, buildCallbackURI(sdncRequest));
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.VNF);
             execution.setVariable(SDNC_REQUEST, sdncRequest);
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasks.java
index 4721bf5..e3c9785 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasks.java
@@ -22,8 +22,6 @@
 
 package org.onap.so.bpmn.infrastructure.sdnc.tasks;
 
-import java.net.URI;
-import javax.ws.rs.core.UriBuilder;
 import org.onap.sdnc.northbound.client.model.GenericResourceApiNetworkOperationInformation;
 import org.onap.sdnc.northbound.client.model.GenericResourceApiServiceOperationInformation;
 import org.onap.sdnc.northbound.client.model.GenericResourceApiVfModuleOperationInformation;
@@ -53,7 +51,7 @@
 import org.springframework.stereotype.Component;
 
 @Component
-public class SDNCUnassignTasks {
+public class SDNCUnassignTasks extends AbstractSDNCTask {
 
     public static final String SDNC_REQUEST = "SDNCRequest";
     @Autowired
@@ -98,11 +96,8 @@
             RequestContext requestContext = gBBInput.getRequestContext();
             VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID);
             SDNCRequest sdncRequest = new SDNCRequest();
-            UriBuilder builder = UriBuilder.fromPath(env.getRequiredProperty("mso.workflow.message.endpoint"))
-                    .path(sdncRequest.getCorrelationName()).path(sdncRequest.getCorrelationValue());
-            URI uri = builder.build();
-            GenericResourceApiVfModuleOperationInformation req =
-                    sdncVfModuleResources.unassignVfModule(vfModule, vnf, serviceInstance, requestContext, uri);
+            GenericResourceApiVfModuleOperationInformation req = sdncVfModuleResources.unassignVfModule(vfModule, vnf,
+                    serviceInstance, requestContext, buildCallbackURI(sdncRequest));
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.VFMODULE);
             execution.setVariable(SDNC_REQUEST, sdncRequest);
@@ -120,9 +115,9 @@
             RequestContext requestContext = gBBInput.getRequestContext();
             Customer customer = gBBInput.getCustomer();
             CloudRegion cloudRegion = gBBInput.getCloudRegion();
-            GenericResourceApiVnfOperationInformation req =
-                    sdncVnfResources.unassignVnf(vnf, serviceInstance, customer, cloudRegion, requestContext);
             SDNCRequest sdncRequest = new SDNCRequest();
+            GenericResourceApiVnfOperationInformation req = sdncVnfResources.unassignVnf(vnf, serviceInstance, customer,
+                    cloudRegion, requestContext, buildCallbackURI(sdncRequest));
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.VNF);
             execution.setVariable(SDNC_REQUEST, sdncRequest);
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java
index a17556f..073dead 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java
@@ -28,6 +28,7 @@
 import org.camunda.bpm.engine.delegate.DelegateExecution;
 import org.onap.aai.domain.yang.Vnfc;
 import org.onap.so.bpmn.common.DelegateExecutionImpl;
+import org.onap.so.bpmn.common.listener.db.RequestsDbListenerRunner;
 import org.onap.so.bpmn.common.listener.flowmanipulator.FlowManipulatorListenerRunner;
 import org.onap.so.bpmn.common.workflow.context.WorkflowCallbackResponse;
 import org.onap.so.bpmn.common.workflow.context.WorkflowContextHolder;
@@ -81,6 +82,8 @@
     private CatalogDbClient catalogDbClient;
     @Autowired
     private FlowManipulatorListenerRunner flowManipulatorListenerRunner;
+    @Autowired
+    private RequestsDbListenerRunner requestsDbListener;
 
     public void selectBB(DelegateExecution execution) {
         List<ExecuteBuildingBlock> flowsToExecute =
@@ -225,6 +228,7 @@
             request.setProgress(Long.valueOf(100));
             request.setRequestStatus("COMPLETE");
             request.setLastModifiedBy("CamundaBPMN");
+            requestsDbListener.post(request, new DelegateExecutionImpl(execution));
             requestDbclient.updateInfraActiveRequests(request);
         } catch (Exception ex) {
             workflowAction.buildAndThrowException(execution, "Error Updating Request Database", ex);
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/MultiStageSkipListener.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/MultiStageSkipListener.java
index fd0de08..376a27e 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/MultiStageSkipListener.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/MultiStageSkipListener.java
@@ -24,16 +24,18 @@
 import java.util.List;
 import org.onap.so.bpmn.common.BBConstants;
 import org.onap.so.bpmn.common.BuildingBlockExecution;
+import org.onap.so.bpmn.common.listener.db.PostCompletionRequestsDbListener;
 import org.onap.so.bpmn.common.listener.flowmanipulator.FlowManipulator;
 import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock;
 import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetupUtils;
 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.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
 @Component
-public class MultiStageSkipListener implements FlowManipulator {
+public class MultiStageSkipListener implements FlowManipulator, PostCompletionRequestsDbListener {
 
     @Autowired
     protected BBInputSetupUtils bbInputSetupUtils;
@@ -41,12 +43,21 @@
     @Autowired
     private CatalogDbClient catalogDbClient;
 
+    private static final String G_MULTI_STAGE_DESIGN = "multiStageDesign";
+
     @Override
     public boolean shouldRunFor(String currentBBName, boolean isFirst, BuildingBlockExecution execution) {
         return ((boolean) execution.getVariable(BBConstants.G_ALACARTE)) && "AssignVfModuleBB".equals(currentBBName)
                 && isFirst;
     }
 
+
+    @Override
+    public boolean shouldRunFor(BuildingBlockExecution execution) {
+
+        return (boolean) execution.getVariable(G_MULTI_STAGE_DESIGN);
+    }
+
     @Override
     public void run(List<ExecuteBuildingBlock> flowsToExecute, ExecuteBuildingBlock currentBB,
             BuildingBlockExecution execution) {
@@ -61,10 +72,15 @@
                 if (vnfCust != null && vnfCust.getMultiStageDesign() != null
                         && vnfCust.getMultiStageDesign().equalsIgnoreCase("true")) {
                     flowsToExecute.retainAll(Collections.singletonList(currentBB));
+                    execution.setVariable(G_MULTI_STAGE_DESIGN, Boolean.valueOf(vnfCust.getMultiStageDesign()));
                 }
             }
         }
 
     }
 
+    @Override
+    public void run(InfraActiveRequests request, BuildingBlockExecution execution) {
+        request.setFlowStatus("Successfully completed Assign Building Block only due to multi-stage-design VNF");
+    }
 }
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/SDNCVnfResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/SDNCVnfResources.java
index 0e32955..12aae1e 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/SDNCVnfResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/SDNCVnfResources.java
@@ -22,6 +22,7 @@
 
 package org.onap.so.client.orchestration;
 
+import java.net.URI;
 import org.onap.sdnc.northbound.client.model.GenericResourceApiRequestActionEnumeration;
 import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfOperationInformation;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
@@ -50,47 +51,48 @@
     private SDNCClient sdncClient;
 
     public GenericResourceApiVnfOperationInformation assignVnf(GenericVnf vnf, ServiceInstance serviceInstance,
-            Customer customer, CloudRegion cloudRegion, RequestContext requestContext, boolean homing) {
+            Customer customer, CloudRegion cloudRegion, RequestContext requestContext, boolean homing,
+            URI callbackURI) {
         return sdncRM.reqMapper(SDNCSvcOperation.VNF_TOPOLOGY_OPERATION, SDNCSvcAction.ASSIGN,
                 GenericResourceApiRequestActionEnumeration.CREATEVNFINSTANCE, vnf, serviceInstance, customer,
-                cloudRegion, requestContext, homing);
+                cloudRegion, requestContext, homing, callbackURI);
     }
 
     public GenericResourceApiVnfOperationInformation activateVnf(GenericVnf vnf, ServiceInstance serviceInstance,
-            Customer customer, CloudRegion cloudRegion, RequestContext requestContext) {
+            Customer customer, CloudRegion cloudRegion, RequestContext requestContext, URI callbackURI) {
         return sdncRM.reqMapper(SDNCSvcOperation.VNF_TOPOLOGY_OPERATION, SDNCSvcAction.ACTIVATE,
                 GenericResourceApiRequestActionEnumeration.CREATEVNFINSTANCE, vnf, serviceInstance, customer,
-                cloudRegion, requestContext, false);
+                cloudRegion, requestContext, false, callbackURI);
     }
 
 
     public GenericResourceApiVnfOperationInformation deactivateVnf(GenericVnf vnf, ServiceInstance serviceInstance,
-            Customer customer, CloudRegion cloudRegion, RequestContext requestContext) {
+            Customer customer, CloudRegion cloudRegion, RequestContext requestContext, URI callbackURI) {
         return sdncRM.reqMapper(SDNCSvcOperation.VNF_TOPOLOGY_OPERATION, SDNCSvcAction.DEACTIVATE,
                 GenericResourceApiRequestActionEnumeration.DELETEVNFINSTANCE, vnf, serviceInstance, customer,
-                cloudRegion, requestContext, false);
+                cloudRegion, requestContext, false, callbackURI);
     }
 
 
     public GenericResourceApiVnfOperationInformation unassignVnf(GenericVnf vnf, ServiceInstance serviceInstance,
-            Customer customer, CloudRegion cloudRegion, RequestContext requestContext) {
+            Customer customer, CloudRegion cloudRegion, RequestContext requestContext, URI callbackURI) {
         return sdncRM.reqMapper(SDNCSvcOperation.VNF_TOPOLOGY_OPERATION, SDNCSvcAction.UNASSIGN,
                 GenericResourceApiRequestActionEnumeration.DELETEVNFINSTANCE, vnf, serviceInstance, customer,
-                cloudRegion, requestContext, false);
+                cloudRegion, requestContext, false, callbackURI);
     }
 
     public GenericResourceApiVnfOperationInformation deleteVnf(GenericVnf vnf, ServiceInstance serviceInstance,
-            Customer customer, CloudRegion cloudRegion, RequestContext requestContext) {
+            Customer customer, CloudRegion cloudRegion, RequestContext requestContext, URI callbackURI) {
         return sdncRM.reqMapper(SDNCSvcOperation.VNF_TOPOLOGY_OPERATION, SDNCSvcAction.DEACTIVATE,
                 GenericResourceApiRequestActionEnumeration.DELETEVNFINSTANCE, vnf, serviceInstance, customer,
-                cloudRegion, requestContext, false);
+                cloudRegion, requestContext, false, callbackURI);
     }
 
     public GenericResourceApiVnfOperationInformation changeModelVnf(GenericVnf vnf, ServiceInstance serviceInstance,
-            Customer customer, CloudRegion cloudRegion, RequestContext requestContext) {
+            Customer customer, CloudRegion cloudRegion, RequestContext requestContext, URI callbackURI) {
         return sdncRM.reqMapper(SDNCSvcOperation.VNF_TOPOLOGY_OPERATION, SDNCSvcAction.CHANGE_ASSIGN,
                 GenericResourceApiRequestActionEnumeration.CREATEVNFINSTANCE, vnf, serviceInstance, customer,
-                cloudRegion, requestContext, false);
+                cloudRegion, requestContext, false, callbackURI);
     }
 
     public String queryVnf(GenericVnf vnf) throws MapperException, BadResponseException {
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapper.java
index e39e202..bef4ec3 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapper.java
@@ -20,6 +20,7 @@
 
 package org.onap.so.client.sdnc.mapper;
 
+import java.net.URI;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
@@ -56,7 +57,8 @@
 
     public GenericResourceApiVnfOperationInformation reqMapper(SDNCSvcOperation svcOperation, SDNCSvcAction svcAction,
             GenericResourceApiRequestActionEnumeration requestAction, GenericVnf vnf, ServiceInstance serviceInstance,
-            Customer customer, CloudRegion cloudRegion, RequestContext requestContext, boolean homing) {
+            Customer customer, CloudRegion cloudRegion, RequestContext requestContext, boolean homing,
+            URI callbackUrl) {
         String sdncReqId = UUID.randomUUID().toString();
         String msoRequestId = UUID.randomUUID().toString();
         if (requestContext != null && requestContext.getMsoRequestId() != null) {
@@ -64,7 +66,7 @@
         }
         GenericResourceApiVnfOperationInformation req = new GenericResourceApiVnfOperationInformation();
         GenericResourceApiSdncrequestheaderSdncRequestHeader sdncRequestHeader =
-                generalTopologyObjectMapper.buildSdncRequestHeader(svcAction, sdncReqId);
+                generalTopologyObjectMapper.buildSdncRequestHeader(svcAction, sdncReqId, callbackUrl.toString());
         GenericResourceApiRequestinformationRequestInformation requestInformation = generalTopologyObjectMapper
                 .buildGenericResourceApiRequestinformationRequestInformation(msoRequestId, requestAction);
         GenericResourceApiServiceinformationServiceInformation serviceInformation =
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCActivateTaskTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCActivateTaskTest.java
index ffd4f74..510dc47 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCActivateTaskTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCActivateTaskTest.java
@@ -94,11 +94,11 @@
 
     @Test
     public void activateVnfTest() throws Exception {
-        doReturn(new GenericResourceApiVnfOperationInformation()).when(sdncVnfResources).activateVnf(genericVnf,
-                serviceInstance, customer, cloudRegion, requestContext);
+        doReturn(new GenericResourceApiVnfOperationInformation()).when(sdncVnfResources).activateVnf(eq(genericVnf),
+                eq(serviceInstance), eq(customer), eq(cloudRegion), eq(requestContext), any(URI.class));
         sdncActivateTasks.activateVnf(execution);
-        verify(sdncVnfResources, times(1)).activateVnf(genericVnf, serviceInstance, customer, cloudRegion,
-                requestContext);
+        verify(sdncVnfResources, times(1)).activateVnf(eq(genericVnf), eq(serviceInstance), eq(customer),
+                eq(cloudRegion), eq(requestContext), any(URI.class));
         SDNCRequest sdncRequest = execution.getVariable("SDNCRequest");
         assertEquals(SDNCTopology.VNF, sdncRequest.getTopology());
     }
@@ -106,8 +106,8 @@
     @Test
     public void activateVnfTestException() throws Exception {
         expectedException.expect(BpmnError.class);
-        doThrow(RuntimeException.class).when(sdncVnfResources).activateVnf(genericVnf, serviceInstance, customer,
-                cloudRegion, requestContext);
+        doThrow(RuntimeException.class).when(sdncVnfResources).activateVnf(eq(genericVnf), eq(serviceInstance),
+                eq(customer), eq(cloudRegion), eq(requestContext), any(URI.class));
         sdncActivateTasks.activateVnf(execution);
     }
 
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasksTest.java
index 982868d..b72766c 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasksTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasksTest.java
@@ -113,12 +113,12 @@
 
     @Test
     public void assignVnfTest() throws Exception {
-        doReturn(new GenericResourceApiVnfOperationInformation()).when(sdncVnfResources).assignVnf(genericVnf,
-                serviceInstance, customer, cloudRegion, requestContext, false);
+        doReturn(new GenericResourceApiVnfOperationInformation()).when(sdncVnfResources).assignVnf(eq(genericVnf),
+                eq(serviceInstance), eq(customer), eq(cloudRegion), eq(requestContext), eq(false), any(URI.class));
         execution.setVariable("generalBuildingBlock", gBBInput);
         sdncAssignTasks.assignVnf(execution);
-        verify(sdncVnfResources, times(1)).assignVnf(genericVnf, serviceInstance, customer, cloudRegion, requestContext,
-                false);
+        verify(sdncVnfResources, times(1)).assignVnf(eq(genericVnf), eq(serviceInstance), eq(customer), eq(cloudRegion),
+                eq(requestContext), eq(false), any(URI.class));
         SDNCRequest sdncRequest = execution.getVariable("SDNCRequest");
         assertEquals(SDNCTopology.VNF, sdncRequest.getTopology());
     }
@@ -126,8 +126,8 @@
     @Test
     public void assignVnfExceptionTest() throws Exception {
         expectedException.expect(BpmnError.class);
-        doThrow(RuntimeException.class).when(sdncVnfResources).assignVnf(genericVnf, serviceInstance, customer,
-                cloudRegion, requestContext, false);
+        doThrow(RuntimeException.class).when(sdncVnfResources).assignVnf(eq(genericVnf), eq(serviceInstance),
+                eq(customer), eq(cloudRegion), eq(requestContext), eq(false), any(URI.class));
         sdncAssignTasks.assignVnf(execution);
     }
 
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCChangeAssignTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCChangeAssignTasksTest.java
index 8c25bea..96ff01f 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCChangeAssignTasksTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCChangeAssignTasksTest.java
@@ -80,11 +80,11 @@
 
     @Test
     public void changeModelVnfTest() throws Exception {
-        doReturn(new GenericResourceApiVnfOperationInformation()).when(sdncVnfResources).changeModelVnf(genericVnf,
-                serviceInstance, customer, cloudRegion, requestContext);
+        doReturn(new GenericResourceApiVnfOperationInformation()).when(sdncVnfResources).changeModelVnf(eq(genericVnf),
+                eq(serviceInstance), eq(customer), eq(cloudRegion), eq(requestContext), any(URI.class));
         sdncChangeAssignTasks.changeModelVnf(execution);
-        verify(sdncVnfResources, times(1)).changeModelVnf(genericVnf, serviceInstance, customer, cloudRegion,
-                requestContext);
+        verify(sdncVnfResources, times(1)).changeModelVnf(eq(genericVnf), eq(serviceInstance), eq(customer),
+                eq(cloudRegion), eq(requestContext), any(URI.class));
         SDNCRequest sdncRequest = execution.getVariable("SDNCRequest");
         assertEquals(SDNCTopology.VNF, sdncRequest.getTopology());
     }
@@ -92,8 +92,8 @@
     @Test
     public void changeModelVnfExceptionTest() throws Exception {
         expectedException.expect(BpmnError.class);
-        doThrow(RuntimeException.class).when(sdncVnfResources).changeModelVnf(genericVnf, serviceInstance, customer,
-                cloudRegion, requestContext);
+        doThrow(RuntimeException.class).when(sdncVnfResources).changeModelVnf(eq(genericVnf), eq(serviceInstance),
+                eq(customer), eq(cloudRegion), eq(requestContext), any(URI.class));
         sdncChangeAssignTasks.changeModelVnf(execution);
     }
 
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCDeactivateTaskTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCDeactivateTaskTest.java
index d8a1b01..3714f9d 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCDeactivateTaskTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCDeactivateTaskTest.java
@@ -107,19 +107,19 @@
 
     @Test
     public void deactivateVnfTest() throws Exception {
-        doReturn(new GenericResourceApiVnfOperationInformation()).when(sdncVnfResources).deactivateVnf(genericVnf,
-                serviceInstance, customer, cloudRegion, requestContext);
+        doReturn(new GenericResourceApiVnfOperationInformation()).when(sdncVnfResources).deactivateVnf(eq(genericVnf),
+                eq(serviceInstance), eq(customer), eq(cloudRegion), eq(requestContext), any(URI.class));
         sdncDeactivateTasks.deactivateVnf(execution);
-        verify(sdncVnfResources, times(1)).deactivateVnf(genericVnf, serviceInstance, customer, cloudRegion,
-                requestContext);
+        verify(sdncVnfResources, times(1)).deactivateVnf(eq(genericVnf), eq(serviceInstance), eq(customer),
+                eq(cloudRegion), eq(requestContext), any(URI.class));
         SDNCRequest sdncRequest = execution.getVariable("SDNCRequest");
         assertEquals(SDNCTopology.VNF, sdncRequest.getTopology());
     }
 
     @Test
     public void deactivateVnfExceptionTest() throws Exception {
-        doThrow(RuntimeException.class).when(sdncVnfResources).deactivateVnf(genericVnf, serviceInstance, customer,
-                cloudRegion, requestContext);
+        doThrow(RuntimeException.class).when(sdncVnfResources).deactivateVnf(eq(genericVnf), eq(serviceInstance),
+                eq(customer), eq(cloudRegion), eq(requestContext), any(URI.class));
         expectedException.expect(BpmnError.class);
         sdncDeactivateTasks.deactivateVnf(execution);
     }
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasksTest.java
index b29d15c..98f6bfa 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasksTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasksTest.java
@@ -125,11 +125,11 @@
 
     @Test
     public void unassignVnfTest() throws Exception {
-        doReturn(new GenericResourceApiVnfOperationInformation()).when(sdncVnfResources).unassignVnf(genericVnf,
-                serviceInstance, customer, cloudRegion, requestContext);
+        doReturn(new GenericResourceApiVnfOperationInformation()).when(sdncVnfResources).unassignVnf(eq(genericVnf),
+                eq(serviceInstance), eq(customer), eq(cloudRegion), eq(requestContext), any(URI.class));
         sdncUnassignTasks.unassignVnf(execution);
-        verify(sdncVnfResources, times(1)).unassignVnf(genericVnf, serviceInstance, customer, cloudRegion,
-                requestContext);
+        verify(sdncVnfResources, times(1)).unassignVnf(eq(genericVnf), eq(serviceInstance), eq(customer),
+                eq(cloudRegion), eq(requestContext), any(URI.class));
         SDNCRequest sdncRequest = execution.getVariable("SDNCRequest");
         assertEquals(SDNCTopology.VNF, sdncRequest.getTopology());
     }
@@ -137,8 +137,8 @@
     @Test
     public void unassignVnfExceptionTest() throws Exception {
         expectedException.expect(BpmnError.class);
-        doThrow(RuntimeException.class).when(sdncVnfResources).unassignVnf(genericVnf, serviceInstance, customer,
-                cloudRegion, requestContext);
+        doThrow(RuntimeException.class).when(sdncVnfResources).unassignVnf(eq(genericVnf), eq(serviceInstance),
+                eq(customer), eq(cloudRegion), eq(requestContext), any(URI.class));
         sdncUnassignTasks.unassignVnf(execution);
     }
 
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/MultiStageSkipTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/MultiStageSkipListenerTest.java
similarity index 85%
rename from bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/MultiStageSkipTest.java
rename to bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/MultiStageSkipListenerTest.java
index b6f8aaf..9e2eac4 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/MultiStageSkipTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/MultiStageSkipListenerTest.java
@@ -36,16 +36,16 @@
 import org.onap.so.bpmn.common.BBConstants;
 import org.onap.so.bpmn.common.BuildingBlockExecution;
 import org.onap.so.bpmn.common.DelegateExecutionImpl;
-import org.onap.so.bpmn.infrastructure.workflow.tasks.listeners.MultiStageSkipListener;
 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.tasks.BBInputSetupUtils;
 import org.onap.so.db.catalog.beans.VnfResourceCustomization;
 import org.onap.so.db.catalog.client.CatalogDbClient;
+import org.onap.so.db.request.beans.InfraActiveRequests;
 
 @RunWith(MockitoJUnitRunner.class)
-public class MultiStageSkipTest {
+public class MultiStageSkipListenerTest {
 
     @Mock
     private CatalogDbClient catalogDbClient;
@@ -71,6 +71,12 @@
         assertFalse("should not be triggered",
                 multiStageSkipListener.shouldRunFor("AssignVfModuleBB2", true, execution));
 
+        execution.setVariable("multiStageDesign", true);
+        assertTrue("should be triggered", multiStageSkipListener.shouldRunFor(execution));
+
+        execution.setVariable("multiStageDesign", false);
+        assertFalse("should not be triggered", multiStageSkipListener.shouldRunFor(execution));
+
 
     }
 
@@ -107,6 +113,15 @@
         assertEquals("Flows should only have Assign", flowsToExecute.size(), 1);
         assertEquals("Flows should only have Assign", flowsToExecute.get(0).getBuildingBlock().getBpmnFlowName(),
                 "AssignVfModuleBB");
+    }
 
+    @Test
+    public void postCompletionRequestsDbListenerTest() {
+        InfraActiveRequests request = new InfraActiveRequests();
+        BuildingBlockExecution execution = new DelegateExecutionImpl(new DelegateExecutionFake());
+        multiStageSkipListener.run(request, execution);
+
+        assertEquals("Successfully completed Assign Building Block only due to multi-stage-design VNF",
+                request.getFlowStatus());
     }
 }
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/SDNCVnfResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/SDNCVnfResourcesTest.java
index 4c0e2b8..0ccf056 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/SDNCVnfResourcesTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/SDNCVnfResourcesTest.java
@@ -28,6 +28,8 @@
 import static org.mockito.Mockito.doThrow;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
+import java.net.URI;
+import java.net.URISyntaxException;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -66,6 +68,7 @@
     private CloudRegion cloudRegion;
     private RequestContext requestContext;
     private GenericResourceApiVnfOperationInformation sdncReq;
+    private URI testURI;
 
     @Before
     public void before() {
@@ -75,6 +78,11 @@
         cloudRegion = buildCloudRegion();
         requestContext = buildRequestContext();
         sdncReq = new GenericResourceApiVnfOperationInformation();
+        try {
+            testURI = new URI("http://localhost:9800");
+        } catch (URISyntaxException e) {
+
+        }
     }
 
     @Test
@@ -82,12 +90,12 @@
         doReturn(sdncReq).when(MOCK_vnfTopologyOperationRequestMapper).reqMapper(isA(SDNCSvcOperation.class),
                 isA(SDNCSvcAction.class), isA(GenericResourceApiRequestActionEnumeration.class), isA(GenericVnf.class),
                 isA(ServiceInstance.class), isA(Customer.class), isA(CloudRegion.class), isA(RequestContext.class),
-                anyBoolean());
-        sdncVnfResources.assignVnf(genericVnf, serviceInstance, customer, cloudRegion, requestContext, false);
+                anyBoolean(), any(URI.class));
+        sdncVnfResources.assignVnf(genericVnf, serviceInstance, customer, cloudRegion, requestContext, false, testURI);
         verify(MOCK_vnfTopologyOperationRequestMapper, times(1)).reqMapper(isA(SDNCSvcOperation.class),
                 isA(SDNCSvcAction.class), isA(GenericResourceApiRequestActionEnumeration.class), isA(GenericVnf.class),
                 isA(ServiceInstance.class), isA(Customer.class), isA(CloudRegion.class), isA(RequestContext.class),
-                anyBoolean());
+                anyBoolean(), any(URI.class));
     }
 
     @Test
@@ -95,12 +103,12 @@
         doReturn(sdncReq).when(MOCK_vnfTopologyOperationRequestMapper).reqMapper(isA(SDNCSvcOperation.class),
                 isA(SDNCSvcAction.class), isA(GenericResourceApiRequestActionEnumeration.class), isA(GenericVnf.class),
                 isA(ServiceInstance.class), isA(Customer.class), isA(CloudRegion.class), isA(RequestContext.class),
-                anyBoolean());
-        sdncVnfResources.activateVnf(genericVnf, serviceInstance, customer, cloudRegion, requestContext);
+                anyBoolean(), any(URI.class));
+        sdncVnfResources.activateVnf(genericVnf, serviceInstance, customer, cloudRegion, requestContext, testURI);
         verify(MOCK_vnfTopologyOperationRequestMapper, times(1)).reqMapper(isA(SDNCSvcOperation.class),
                 isA(SDNCSvcAction.class), isA(GenericResourceApiRequestActionEnumeration.class), isA(GenericVnf.class),
                 isA(ServiceInstance.class), isA(Customer.class), isA(CloudRegion.class), isA(RequestContext.class),
-                anyBoolean());
+                anyBoolean(), any(URI.class));
     }
 
     @Test
@@ -108,12 +116,12 @@
         doReturn(sdncReq).when(MOCK_vnfTopologyOperationRequestMapper).reqMapper(isA(SDNCSvcOperation.class),
                 isA(SDNCSvcAction.class), isA(GenericResourceApiRequestActionEnumeration.class), isA(GenericVnf.class),
                 isA(ServiceInstance.class), isA(Customer.class), isA(CloudRegion.class), isA(RequestContext.class),
-                anyBoolean());
-        sdncVnfResources.deleteVnf(genericVnf, serviceInstance, customer, cloudRegion, requestContext);
+                anyBoolean(), any(URI.class));
+        sdncVnfResources.deleteVnf(genericVnf, serviceInstance, customer, cloudRegion, requestContext, testURI);
         verify(MOCK_vnfTopologyOperationRequestMapper, times(1)).reqMapper(isA(SDNCSvcOperation.class),
                 isA(SDNCSvcAction.class), isA(GenericResourceApiRequestActionEnumeration.class), isA(GenericVnf.class),
                 isA(ServiceInstance.class), isA(Customer.class), isA(CloudRegion.class), isA(RequestContext.class),
-                anyBoolean());
+                anyBoolean(), any(URI.class));
     }
 
     @Test
@@ -137,11 +145,12 @@
         doReturn(sdncReq).when(MOCK_vnfTopologyOperationRequestMapper).reqMapper(isA(SDNCSvcOperation.class),
                 isA(SDNCSvcAction.class), isA(GenericResourceApiRequestActionEnumeration.class), isA(GenericVnf.class),
                 isA(ServiceInstance.class), isA(Customer.class), isA(CloudRegion.class), isA(RequestContext.class),
-                anyBoolean());
-        sdncVnfResources.changeModelVnf(genericVnf, serviceInstance, customer, cloudRegion, requestContext);
-        verify(MOCK_vnfTopologyOperationRequestMapper, times(1)).reqMapper(SDNCSvcOperation.VNF_TOPOLOGY_OPERATION,
-                SDNCSvcAction.CHANGE_ASSIGN, GenericResourceApiRequestActionEnumeration.CREATEVNFINSTANCE, genericVnf,
-                serviceInstance, customer, cloudRegion, requestContext, false);
+                anyBoolean(), any(URI.class));
+        sdncVnfResources.changeModelVnf(genericVnf, serviceInstance, customer, cloudRegion, requestContext, testURI);
+        verify(MOCK_vnfTopologyOperationRequestMapper, times(1)).reqMapper(eq(SDNCSvcOperation.VNF_TOPOLOGY_OPERATION),
+                eq(SDNCSvcAction.CHANGE_ASSIGN), eq(GenericResourceApiRequestActionEnumeration.CREATEVNFINSTANCE),
+                eq(genericVnf), eq(serviceInstance), eq(customer), eq(cloudRegion), eq(requestContext), eq(false),
+                any(URI.class));
     }
 
     @Test
@@ -150,12 +159,12 @@
                 eq(SDNCSvcOperation.VNF_TOPOLOGY_OPERATION), eq(SDNCSvcAction.DEACTIVATE),
                 isA(GenericResourceApiRequestActionEnumeration.class), any(GenericVnf.class),
                 any(ServiceInstance.class), any(Customer.class), any(CloudRegion.class), any(RequestContext.class),
-                anyBoolean());
-        sdncVnfResources.deactivateVnf(genericVnf, serviceInstance, customer, cloudRegion, requestContext);
+                anyBoolean(), any(URI.class));
+        sdncVnfResources.deactivateVnf(genericVnf, serviceInstance, customer, cloudRegion, requestContext, testURI);
         verify(MOCK_vnfTopologyOperationRequestMapper, times(1)).reqMapper(eq(SDNCSvcOperation.VNF_TOPOLOGY_OPERATION),
                 eq(SDNCSvcAction.DEACTIVATE), isA(GenericResourceApiRequestActionEnumeration.class),
                 any(GenericVnf.class), any(ServiceInstance.class), any(Customer.class), any(CloudRegion.class),
-                any(RequestContext.class), anyBoolean());
+                any(RequestContext.class), anyBoolean(), any(URI.class));
 
     }
 
@@ -166,8 +175,8 @@
                 eq(SDNCSvcOperation.VNF_TOPOLOGY_OPERATION), eq(SDNCSvcAction.DEACTIVATE),
                 isA(GenericResourceApiRequestActionEnumeration.class), any(GenericVnf.class),
                 any(ServiceInstance.class), any(Customer.class), any(CloudRegion.class), any(RequestContext.class),
-                anyBoolean());
-        sdncVnfResources.deactivateVnf(genericVnf, serviceInstance, customer, cloudRegion, requestContext);
+                anyBoolean(), any(URI.class));
+        sdncVnfResources.deactivateVnf(genericVnf, serviceInstance, customer, cloudRegion, requestContext, testURI);
     }
 
     @Test
@@ -176,12 +185,12 @@
                 eq(SDNCSvcOperation.VNF_TOPOLOGY_OPERATION), eq(SDNCSvcAction.UNASSIGN),
                 isA(GenericResourceApiRequestActionEnumeration.class), any(GenericVnf.class),
                 any(ServiceInstance.class), any(Customer.class), any(CloudRegion.class), any(RequestContext.class),
-                anyBoolean());
-        sdncVnfResources.unassignVnf(genericVnf, serviceInstance, customer, cloudRegion, requestContext);
+                anyBoolean(), any(URI.class));
+        sdncVnfResources.unassignVnf(genericVnf, serviceInstance, customer, cloudRegion, requestContext, testURI);
         verify(MOCK_vnfTopologyOperationRequestMapper, times(1)).reqMapper(eq(SDNCSvcOperation.VNF_TOPOLOGY_OPERATION),
                 eq(SDNCSvcAction.UNASSIGN), isA(GenericResourceApiRequestActionEnumeration.class),
                 any(GenericVnf.class), any(ServiceInstance.class), any(Customer.class), any(CloudRegion.class),
-                any(RequestContext.class), anyBoolean());
+                any(RequestContext.class), anyBoolean(), any(URI.class));
     }
 
     @Test
@@ -191,7 +200,7 @@
                 eq(SDNCSvcOperation.VNF_TOPOLOGY_OPERATION), eq(SDNCSvcAction.UNASSIGN),
                 isA(GenericResourceApiRequestActionEnumeration.class), any(GenericVnf.class),
                 any(ServiceInstance.class), any(Customer.class), any(CloudRegion.class), any(RequestContext.class),
-                anyBoolean());
-        sdncVnfResources.unassignVnf(genericVnf, serviceInstance, customer, cloudRegion, requestContext);
+                anyBoolean(), any(URI.class));
+        sdncVnfResources.unassignVnf(genericVnf, serviceInstance, customer, cloudRegion, requestContext, testURI);
     }
 }
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapperTest.java
index cecf34e..0083617 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapperTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sdnc/mapper/VnfTopologyOperationRequestMapperTest.java
@@ -23,15 +23,18 @@
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
+import java.net.URI;
 import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.Map;
 import java.util.List;
+import java.util.Map;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.InjectMocks;
 import org.mockito.Spy;
 import org.mockito.junit.MockitoJUnitRunner;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiRequestActionEnumeration;
+import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfOperationInformation;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer;
 import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf;
@@ -45,8 +48,6 @@
 import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceInstance;
 import org.onap.so.client.sdnc.beans.SDNCSvcAction;
 import org.onap.so.client.sdnc.beans.SDNCSvcOperation;
-import org.onap.sdnc.northbound.client.model.GenericResourceApiRequestActionEnumeration;
-import org.onap.sdnc.northbound.client.model.GenericResourceApiVnfOperationInformation;
 
 @RunWith(MockitoJUnitRunner.class)
 public class VnfTopologyOperationRequestMapperTest {
@@ -127,11 +128,11 @@
         GenericResourceApiVnfOperationInformation vnfOpInformation =
                 mapper.reqMapper(SDNCSvcOperation.VNF_TOPOLOGY_OPERATION, SDNCSvcAction.ASSIGN,
                         GenericResourceApiRequestActionEnumeration.CREATEVNFINSTANCE, vnf, serviceInstance, customer,
-                        cloudRegion, requestContext, true);
+                        cloudRegion, requestContext, true, new URI("http://localhost:8080"));
         GenericResourceApiVnfOperationInformation vnfOpInformationNullReqContext =
                 mapper.reqMapper(SDNCSvcOperation.VNF_TOPOLOGY_OPERATION, SDNCSvcAction.ASSIGN,
                         GenericResourceApiRequestActionEnumeration.CREATEVNFINSTANCE, vnf, serviceInstance, customer,
-                        cloudRegion, null, true);
+                        cloudRegion, null, true, new URI("http://localhost:8080"));
 
         assertNull(vnfOpInformation.getServiceInformation().getOnapModelInformation().getModelCustomizationUuid());
         assertEquals("vnfModelCustomizationUUID",
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ContactCamundaException.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ContactCamundaException.java
index 6b38eec..d5fc017 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ContactCamundaException.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ContactCamundaException.java
@@ -23,7 +23,7 @@
 public class ContactCamundaException extends ApiException {
 
     private static final String contactCamundaErrorMessage =
-            "Unable to get process-instance history from Camunda for requestId: %s due to error: %s";
+            "Unable to get %s history from Camunda for requestId: %s due to error: %s";
 
     private ContactCamundaException(Builder builder) {
         super(builder);
@@ -32,9 +32,9 @@
     public static class Builder extends ApiException.Builder<Builder> {
 
 
-        public Builder(String requestId, String error, int httpResponseCode, String messageID) {
-            super(contactCamundaErrorMessage.format(contactCamundaErrorMessage, requestId, error), httpResponseCode,
-                    messageID);
+        public Builder(String query, String requestId, String error, int httpResponseCode, String messageID) {
+            super(contactCamundaErrorMessage.format(contactCamundaErrorMessage, query, requestId, error),
+                    httpResponseCode, messageID);
         }
 
         public ContactCamundaException build() {
diff --git a/mso-api-handlers/mso-api-handler-infra/pom.xml b/mso-api-handlers/mso-api-handler-infra/pom.xml
index dc665a9..a3b9827 100644
--- a/mso-api-handlers/mso-api-handler-infra/pom.xml
+++ b/mso-api-handlers/mso-api-handler-infra/pom.xml
@@ -88,6 +88,10 @@
       </exclusions>
     </dependency>
     <dependency>
+      <groupId>org.springframework.retry</groupId>
+      <artifactId>spring-retry</artifactId>
+    </dependency>
+    <dependency>
       <groupId>commons-lang</groupId>
       <artifactId>commons-lang</artifactId>
       <version>2.6</version>
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/CamundaRequestHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/CamundaRequestHandler.java
new file mode 100644
index 0000000..451fa64
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/CamundaRequestHandler.java
@@ -0,0 +1,180 @@
+package org.onap.so.apihandlerinfra;
+
+import java.security.GeneralSecurityException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.xml.bind.DatatypeConverter;
+import org.apache.http.HttpStatus;
+import org.camunda.bpm.engine.impl.persistence.entity.HistoricActivityInstanceEntity;
+import org.camunda.bpm.engine.impl.persistence.entity.HistoricProcessInstanceEntity;
+import org.onap.so.apihandler.common.ErrorNumbers;
+import org.onap.so.apihandlerinfra.exceptions.ContactCamundaException;
+import org.onap.so.utils.CryptoUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.ParameterizedTypeReference;
+import org.springframework.core.env.Environment;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+import org.springframework.retry.policy.SimpleRetryPolicy;
+import org.springframework.retry.support.RetryTemplate;
+import org.springframework.stereotype.Component;
+import org.springframework.web.client.ResourceAccessException;
+import org.springframework.web.client.RestClientException;
+import org.springframework.web.client.RestTemplate;
+
+@Component
+public class CamundaRequestHandler {
+
+    private static Logger logger = LoggerFactory.getLogger(CamundaRequestHandler.class);
+
+    @Autowired
+    private RestTemplate restTemplate;
+
+    @Autowired
+    private Environment env;
+
+    public ResponseEntity<List<HistoricProcessInstanceEntity>> getCamundaProcessInstanceHistory(String requestId) {
+        RetryTemplate retryTemplate = setRetryTemplate();
+        String path = env.getProperty("mso.camunda.rest.history.uri") + requestId;
+        String targetUrl = env.getProperty("mso.camundaURL") + path;
+        HttpHeaders headers =
+                setCamundaHeaders(env.getRequiredProperty("mso.camundaAuth"), env.getRequiredProperty("mso.msoKey"));
+
+        HttpEntity<?> requestEntity = new HttpEntity<>(headers);
+
+        return retryTemplate.execute(context -> {
+            if (context.getLastThrowable() != null) {
+                logger.error("Retrying: Last call resulted in exception: ", context.getLastThrowable());
+            }
+            if (context.getRetryCount() == 0) {
+                logger.info("Querying Camunda for process-instance history for requestId: {}", requestId);
+            } else {
+                logger.info("Retry: {} of 3. Querying Camunda for process-instance history for requestId: {}",
+                        context.getRetryCount(), requestId);
+            }
+            return restTemplate.exchange(targetUrl, HttpMethod.GET, requestEntity,
+                    new ParameterizedTypeReference<List<HistoricProcessInstanceEntity>>() {});
+        });
+    }
+
+    protected ResponseEntity<List<HistoricActivityInstanceEntity>> getCamundaActivityHistory(String processInstanceId,
+            String requestId) throws ContactCamundaException {
+        RetryTemplate retryTemplate = setRetryTemplate();
+        String path = env.getProperty("mso.camunda.rest.activity.uri") + processInstanceId;
+        String targetUrl = env.getProperty("mso.camundaURL") + path;
+        HttpHeaders headers =
+                setCamundaHeaders(env.getRequiredProperty("mso.camundaAuth"), env.getRequiredProperty("mso.msoKey"));
+        HttpEntity<?> requestEntity = new HttpEntity<>(headers);
+        try {
+            return retryTemplate.execute(context -> {
+                if (context.getLastThrowable() != null) {
+                    logger.error("Retrying: Last call resulted in exception: ", context.getLastThrowable());
+                }
+                if (context.getRetryCount() == 0) {
+                    logger.info(
+                            "Querying Camunda for activity-instance history for processInstanceId: {}, for requestId: {}",
+                            processInstanceId, requestId);
+                } else {
+                    logger.info(
+                            "Retry: {} of 3. Querying Camunda for activity-instance history for processInstanceId: {}, for requestId: {}",
+                            context.getRetryCount(), processInstanceId, requestId);
+                }
+
+                return restTemplate.exchange(targetUrl, HttpMethod.GET, requestEntity,
+                        new ParameterizedTypeReference<List<HistoricActivityInstanceEntity>>() {});
+            });
+
+        } catch (RestClientException e) {
+            logger.error(
+                    "Error querying Camunda for activity-instance history for processInstanceId: {}, for requestId: {}, exception: {}",
+                    processInstanceId, requestId, e.getMessage());
+            throw new ContactCamundaException.Builder("activity-instance", requestId, e.toString(),
+                    HttpStatus.SC_INTERNAL_SERVER_ERROR, ErrorNumbers.SVC_DETAILED_SERVICE_ERROR).cause(e).build();
+        }
+    }
+
+    protected String getTaskName(String requestId) throws ContactCamundaException {
+        ResponseEntity<List<HistoricProcessInstanceEntity>> response = null;
+        ResponseEntity<List<HistoricActivityInstanceEntity>> activityResponse = null;
+        String processInstanceId = null;
+        try {
+            response = getCamundaProcessInstanceHistory(requestId);
+        } catch (RestClientException e) {
+            logger.error("Error querying Camunda for process-instance history for requestId: {}, exception: {}",
+                    requestId, e.getMessage());
+            throw new ContactCamundaException.Builder("process-instance", requestId, e.toString(),
+                    HttpStatus.SC_INTERNAL_SERVER_ERROR, ErrorNumbers.SVC_DETAILED_SERVICE_ERROR).cause(e).build();
+        }
+
+        List<HistoricProcessInstanceEntity> historicProcessInstanceList = response.getBody();
+
+        if (historicProcessInstanceList != null) {
+            Collections.reverse(historicProcessInstanceList);
+            processInstanceId = historicProcessInstanceList.get(0).getId();
+        } else {
+            return "No processInstances returned for requestId: " + requestId;
+        }
+
+        if (processInstanceId != null) {
+            activityResponse = getCamundaActivityHistory(processInstanceId, requestId);
+        } else {
+            return "No processInstanceId returned for requestId: " + requestId;
+        }
+
+        return getActivityName(activityResponse.getBody());
+    }
+
+    protected String getActivityName(List<HistoricActivityInstanceEntity> activityInstanceList) {
+        String activityName = null;
+        HistoricActivityInstanceEntity activityInstance = null;
+        String result = null;
+
+        if (activityInstanceList == null || activityInstanceList.isEmpty()) {
+            result = "No results returned on activityInstance history lookup.";
+        } else {
+            activityInstance = activityInstanceList.get(0);
+            activityName = activityInstance.getActivityName();
+
+            if (activityName == null) {
+                result = "Task name is null.";
+            } else {
+                result = "Last task executed: " + activityName;
+            }
+        }
+
+        return result;
+    }
+
+    protected HttpHeaders setCamundaHeaders(String auth, String msoKey) {
+        HttpHeaders headers = new HttpHeaders();
+        List<org.springframework.http.MediaType> acceptableMediaTypes = new ArrayList<>();
+        acceptableMediaTypes.add(org.springframework.http.MediaType.APPLICATION_JSON);
+        headers.setAccept(acceptableMediaTypes);
+        try {
+            String userCredentials = CryptoUtils.decrypt(auth, msoKey);
+            if (userCredentials != null) {
+                headers.add(HttpHeaders.AUTHORIZATION,
+                        "Basic " + DatatypeConverter.printBase64Binary(userCredentials.getBytes()));
+            }
+        } catch (GeneralSecurityException e) {
+            logger.error("Security exception", e);
+        }
+        return headers;
+    }
+
+    protected RetryTemplate setRetryTemplate() {
+        RetryTemplate retryTemplate = new RetryTemplate();
+        Map<Class<? extends Throwable>, Boolean> retryableExceptions = new HashMap<>();
+        retryableExceptions.put(ResourceAccessException.class, true);
+        SimpleRetryPolicy policy = new SimpleRetryPolicy(4, retryableExceptions);
+        retryTemplate.setRetryPolicy(policy);
+        return retryTemplate;
+    }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/E2EServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/E2EServiceInstances.java
index af76417..d3a279f 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/E2EServiceInstances.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/E2EServiceInstances.java
@@ -92,6 +92,8 @@
 
     private static final String END_OF_THE_TRANSACTION = "End of the transaction, the final response is: ";
 
+    private static final String SERVICE_ID = "serviceId";
+
     @Autowired
     private MsoRequest msoRequest;
 
@@ -138,7 +140,7 @@
     public Response updateE2EServiceInstance(String request, @PathParam("version") String version,
             @PathParam("serviceId") String serviceId) throws ApiException {
 
-        instanceIdMap.put("serviceId", serviceId);
+        instanceIdMap.put(SERVICE_ID, serviceId);
 
         return updateE2EserviceInstances(request, Action.updateInstance, version);
     }
@@ -155,9 +157,9 @@
     @Produces(MediaType.APPLICATION_JSON)
     @ApiOperation(value = "Delete E2E Service Instance on a specified version and serviceId", response = Response.class)
     public Response deleteE2EServiceInstance(String request, @PathParam("version") String version,
-            @PathParam("serviceId") String serviceId) throws ApiException {
+            @PathParam(SERVICE_ID) String serviceId) throws ApiException {
 
-        instanceIdMap.put("serviceId", serviceId);
+        instanceIdMap.put(SERVICE_ID, serviceId);
 
         return deleteE2EserviceInstances(request, Action.deleteInstance, instanceIdMap, version);
     }
@@ -167,7 +169,7 @@
     @ApiOperation(value = "Find e2eServiceInstances Requests for a given serviceId and operationId",
             response = Response.class)
     @Produces(MediaType.APPLICATION_JSON)
-    public Response getE2EServiceInstances(@PathParam("serviceId") String serviceId,
+    public Response getE2EServiceInstances(@PathParam(SERVICE_ID) String serviceId,
             @PathParam("version") String version, @PathParam("operationId") String operationId) {
         return getE2EServiceInstance(serviceId, operationId, version);
     }
@@ -184,10 +186,10 @@
     @Produces(MediaType.APPLICATION_JSON)
     @ApiOperation(value = "Scale E2E Service Instance on a specified version", response = Response.class)
     public Response scaleE2EServiceInstance(String request, @PathParam("version") String version,
-            @PathParam("serviceId") String serviceId) throws ApiException {
+            @PathParam(SERVICE_ID) String serviceId) throws ApiException {
 
         logger.debug("------------------scale begin------------------");
-        instanceIdMap.put("serviceId", serviceId);
+        instanceIdMap.put(SERVICE_ID, serviceId);
         return scaleE2EserviceInstances(request, Action.scaleInstance, version);
     }
 
@@ -207,7 +209,7 @@
     public Response compareModelwithTargetVersion(String request, @PathParam("serviceId") String serviceId,
             @PathParam("version") String version) throws ApiException {
 
-        instanceIdMap.put("serviceId", serviceId);
+        instanceIdMap.put(SERVICE_ID, serviceId);
 
         return compareModelwithTargetVersion(request, Action.compareModel, instanceIdMap, version);
     }
@@ -216,7 +218,6 @@
             HashMap<String, String> instanceIdMap, String version) throws ApiException {
 
         String requestId = UUID.randomUUID().toString();
-        long startTime = System.currentTimeMillis();
 
         CompareModelsRequest e2eCompareModelReq;
 
@@ -237,12 +238,12 @@
             return response;
         }
 
-        return runCompareModelBPMWorkflow(e2eCompareModelReq, requestJSON, requestId, startTime, action, version);
+        return runCompareModelBPMWorkflow(e2eCompareModelReq, requestJSON, requestId, action, version);
 
     }
 
     private Response runCompareModelBPMWorkflow(CompareModelsRequest e2eCompareModelReq, String requestJSON,
-            String requestId, long startTime, Action action, String version) throws ApiException {
+            String requestId, Action action, String version) throws ApiException {
 
         // Define RecipeLookupResult info here instead of query DB for efficiency
         String workflowUrl = "/mso/async/services/CompareModelofE2EServiceInstance";
@@ -259,7 +260,7 @@
 
             // Capture audit event
             logger.debug("MSO API Handler Posting call to BPEL engine for url: " + requestClient.getUrl());
-            String serviceId = instanceIdMap.get("serviceId");
+            String serviceId = instanceIdMap.get(SERVICE_ID);
             String serviceType = e2eCompareModelReq.getServiceType();
             RequestClientParameter postParam = new RequestClientParameter.Builder().setRequestId(requestId)
                     .setBaseVfModule(false).setRecipeTimeout(recipeTimeout).setRequestAction(action.name())
@@ -334,7 +335,6 @@
     private Response deleteE2EserviceInstances(String requestJSON, Action action, HashMap<String, String> instanceIdMap,
             String version) throws ApiException {
         // TODO should be a new one or the same service instance Id
-        long startTime = System.currentTimeMillis();
         E2EServiceInstanceDeleteRequest e2eDelReq;
 
         ObjectMapper mapper = new ObjectMapper();
@@ -397,7 +397,7 @@
 
             // Capture audit event
             logger.debug("MSO API Handler Posting call to BPEL engine for url: " + requestClient.getUrl());
-            String serviceId = instanceIdMap.get("serviceId");
+            String serviceId = instanceIdMap.get(SERVICE_ID);
             String serviceInstanceType = e2eDelReq.getServiceType();
             RequestClientParameter clientParam = new RequestClientParameter.Builder().setRequestId(requestId)
                     .setBaseVfModule(false).setRecipeTimeout(recipeLookupResult.getRecipeTimeout())
@@ -436,9 +436,8 @@
     private Response updateE2EserviceInstances(String requestJSON, Action action, String version) throws ApiException {
 
         String requestId = UUID.randomUUID().toString();
-        long startTime = System.currentTimeMillis();
         E2EServiceInstanceRequest e2eSir;
-        String serviceId = instanceIdMap.get("serviceId");
+        String serviceId = instanceIdMap.get(SERVICE_ID);
 
         ObjectMapper mapper = new ObjectMapper();
         try {
@@ -552,7 +551,6 @@
             HashMap<String, String> instanceIdMap, String version) throws ApiException {
 
         String requestId = UUID.randomUUID().toString();
-        long startTime = System.currentTimeMillis();
         E2EServiceInstanceRequest e2eSir;
 
         MsoRequest msoRequest = new MsoRequest();
@@ -663,7 +661,6 @@
     private Response scaleE2EserviceInstances(String requestJSON, Action action, String version) throws ApiException {
 
         String requestId = UUID.randomUUID().toString();
-        long startTime = System.currentTimeMillis();
         E2EServiceInstanceScaleRequest e2eScaleReq;
 
         ObjectMapper mapper = new ObjectMapper();
@@ -725,7 +722,7 @@
 
             // Capture audit event
             logger.debug("MSO API Handler Posting call to BPEL engine for url: " + requestClient.getUrl());
-            String serviceId = instanceIdMap.get("serviceId");
+            String serviceId = instanceIdMap.get(SERVICE_ID);
             String serviceInstanceType = e2eScaleReq.getService().getServiceType();
             RequestClientParameter postParam = new RequestClientParameter.Builder().setRequestId(requestId)
                     .setBaseVfModule(false).setRecipeTimeout(recipeLookupResult.getRecipeTimeout())
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/InstanceManagement.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/InstanceManagement.java
index d8a7cb3..ade13e7 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/InstanceManagement.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/InstanceManagement.java
@@ -105,13 +105,9 @@
     private Response processCustomWorkflowRequest(String requestJSON, Actions action,
             HashMap<String, String> instanceIdMap, String version, String requestId,
             ContainerRequestContext requestContext) throws ApiException {
-        String serviceInstanceId = null;
-        if (instanceIdMap != null) {
-            serviceInstanceId = instanceIdMap.get("serviceInstanceId");
-        }
+        String serviceInstanceId;
         Boolean aLaCarte = true;
-        long startTime = System.currentTimeMillis();
-        ServiceInstancesRequest sir = null;
+        ServiceInstancesRequest sir;
         String apiVersion = version.substring(1);
 
         String requestUri = requestHandlerUtils.getRequestUri(requestContext, uriPrefix);
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java
index 9e92c29..6f36fb2 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/OrchestrationRequests.java
@@ -46,6 +46,7 @@
 import org.onap.so.apihandler.common.ErrorNumbers;
 import org.onap.so.apihandler.common.ResponseBuilder;
 import org.onap.so.apihandlerinfra.exceptions.ApiException;
+import org.onap.so.apihandlerinfra.exceptions.ContactCamundaException;
 import org.onap.so.apihandlerinfra.exceptions.ValidateException;
 import org.onap.so.apihandlerinfra.logging.ErrorLoggerInfo;
 import org.onap.so.constants.OrchestrationRequestFormat;
@@ -91,6 +92,9 @@
     @Autowired
     private ResponseBuilder builder;
 
+    @Autowired
+    private CamundaRequestHandler camundaRequestHandler;
+
     @GET
     @Path("/{version:[vV][4-7]}/{requestId}")
     @ApiOperation(value = "Find Orchestrated Requests for a given requestId", response = Response.class)
@@ -424,10 +428,19 @@
     }
 
     protected void mapRequestStatusAndExtSysErrSrcToRequest(InfraActiveRequests iar, RequestStatus status,
-            String format) {
+            String format) throws ContactCamundaException {
         String rollbackStatusMessage = iar.getRollbackStatusMessage();
         String flowStatusMessage = iar.getFlowStatus();
         String retryStatusMessage = iar.getRetryStatusMessage();
+        String taskName = null;
+
+        if (flowStatusMessage != null && !flowStatusMessage.equals("Successfully completed all Building Blocks")
+                && !flowStatusMessage.equals("All Rollback flows have completed successfully")) {
+            taskName = camundaRequestHandler.getTaskName(iar.getRequestId());
+            if (taskName != null) {
+                flowStatusMessage = flowStatusMessage + " TASK INFORMATION: " + taskName;
+            }
+        }
 
         String statusMessages = null;
         if (iar.getStatusMessage() != null) {
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 c3f3234..9ab95a2 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
@@ -27,7 +27,6 @@
 import static org.onap.so.logger.HttpHeadersConstants.REQUESTOR_ID;
 import java.io.IOException;
 import java.net.URL;
-import java.security.GeneralSecurityException;
 import java.sql.Timestamp;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -37,7 +36,6 @@
 import javax.ws.rs.container.ContainerRequestContext;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.Response;
-import javax.xml.bind.DatatypeConverter;
 import org.apache.commons.lang.StringUtils;
 import org.apache.http.HttpResponse;
 import org.apache.http.HttpStatus;
@@ -78,21 +76,16 @@
 import org.onap.so.serviceinstancebeans.RequestParameters;
 import org.onap.so.serviceinstancebeans.ServiceInstancesRequest;
 import org.onap.so.serviceinstancebeans.ServiceInstancesResponse;
-import org.onap.so.utils.CryptoUtils;
 import org.onap.so.utils.UUIDChecker;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.slf4j.MDC;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.core.ParameterizedTypeReference;
 import org.springframework.core.env.Environment;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpMethod;
 import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Component;
 import org.springframework.web.client.HttpStatusCodeException;
-import org.springframework.web.client.RestTemplate;
+import org.springframework.web.client.RestClientException;
 import com.fasterxml.jackson.annotation.JsonInclude.Include;
 import com.fasterxml.jackson.databind.ObjectMapper;
 
@@ -119,7 +112,7 @@
     private MsoRequest msoRequest;
 
     @Autowired
-    private RestTemplate restTemplate;
+    private CamundaRequestHandler camundaRequestHandler;
 
     @Autowired
     private CatalogDbClient catalogDbClient;
@@ -323,25 +316,20 @@
     public boolean camundaHistoryCheck(InfraActiveRequests duplicateRecord, InfraActiveRequests currentActiveReq)
             throws RequestDbFailureException, ContactCamundaException {
         String requestId = duplicateRecord.getRequestId();
-        String path = env.getProperty("mso.camunda.rest.history.uri") + requestId;
-        String targetUrl = env.getProperty("mso.camundaURL") + path;
-        HttpHeaders headers =
-                setCamundaHeaders(env.getRequiredProperty("mso.camundaAuth"), env.getRequiredProperty("mso.msoKey"));
-        HttpEntity<?> requestEntity = new HttpEntity<>(headers);
         ResponseEntity<List<HistoricProcessInstanceEntity>> response = null;
         try {
-            response = restTemplate.exchange(targetUrl, HttpMethod.GET, requestEntity,
-                    new ParameterizedTypeReference<List<HistoricProcessInstanceEntity>>() {});
-        } catch (HttpStatusCodeException e) {
-            ErrorLoggerInfo errorLoggerInfo =
-                    new ErrorLoggerInfo.Builder(MessageEnum.APIH_DUPLICATE_CHECK_EXC, ErrorCode.DataError)
-                            .errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build();
+            response = camundaRequestHandler.getCamundaProcessInstanceHistory(requestId);
+        } catch (RestClientException e) {
+            logger.error("Error querying Camunda for process-instance history for requestId: {}, exception: {}",
+                    requestId, e.getMessage());
             ContactCamundaException contactCamundaException =
-                    new ContactCamundaException.Builder(requestId, e.toString(), HttpStatus.SC_INTERNAL_SERVER_ERROR,
-                            ErrorNumbers.SVC_DETAILED_SERVICE_ERROR).cause(e).errorInfo(errorLoggerInfo).build();
+                    new ContactCamundaException.Builder("process-instance", requestId, e.toString(),
+                            HttpStatus.SC_INTERNAL_SERVER_ERROR, ErrorNumbers.SVC_DETAILED_SERVICE_ERROR).cause(e)
+                                    .build();
             updateStatus(currentActiveReq, Status.FAILED, contactCamundaException.getMessage());
             throw contactCamundaException;
         }
+
         if (response.getBody().isEmpty()) {
             updateStatus(duplicateRecord, Status.COMPLETE, "Request Completed");
         }
@@ -355,23 +343,6 @@
         return false;
     }
 
-    protected HttpHeaders setCamundaHeaders(String auth, String msoKey) {
-        HttpHeaders headers = new HttpHeaders();
-        List<org.springframework.http.MediaType> acceptableMediaTypes = new ArrayList<>();
-        acceptableMediaTypes.add(org.springframework.http.MediaType.APPLICATION_JSON);
-        headers.setAccept(acceptableMediaTypes);
-        try {
-            String userCredentials = CryptoUtils.decrypt(auth, msoKey);
-            if (userCredentials != null) {
-                headers.add(HttpHeaders.AUTHORIZATION,
-                        "Basic " + DatatypeConverter.printBase64Binary(userCredentials.getBytes()));
-            }
-        } catch (GeneralSecurityException e) {
-            logger.error("Security exception", e);
-        }
-        return headers;
-    }
-
     public ServiceInstancesRequest convertJsonToServiceInstanceRequest(String requestJSON, Actions action,
             String requestId, String requestUri) throws ApiException {
         try {
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Network.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Network.java
index c44f1f0..ec3df21 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Network.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Network.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 - 2019 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
@@ -38,8 +40,6 @@
 import org.onap.so.db.request.beans.InfraActiveRequests;
 import org.onap.so.serviceinstancebeans.ServiceInstancesRequest;
 import org.onap.so.serviceinstancebeans.ServiceInstancesResponse;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.slf4j.MDC;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
@@ -50,8 +50,6 @@
 @Path("/onap/so/infra/serviceInstantiation")
 public class Network {
 
-    private static Logger logger = LoggerFactory.getLogger(Network.class);
-
     @Autowired
     private NetworkRestHandler networkRestHandler;
 
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/ServiceInstance.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/ServiceInstance.java
index bf10fcc..07e8092 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/ServiceInstance.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/ServiceInstance.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 - 2019 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
@@ -38,8 +40,6 @@
 import org.onap.so.db.request.beans.InfraActiveRequests;
 import org.onap.so.serviceinstancebeans.ServiceInstancesRequest;
 import org.onap.so.serviceinstancebeans.ServiceInstancesResponse;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.slf4j.MDC;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
@@ -50,8 +50,6 @@
 @Path("/onap/so/infra/serviceInstantiation")
 public class ServiceInstance {
 
-    private static Logger logger = LoggerFactory.getLogger(ServiceInstance.class);
-
     @Autowired
     private ServiceInstanceRestHandler requestHandler;
 
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/VfModules.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/VfModules.java
index 1a2688f..1b9eb1f 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/VfModules.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/VfModules.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 - 2019 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
@@ -39,8 +41,6 @@
 import org.onap.so.serviceinstancebeans.ModelType;
 import org.onap.so.serviceinstancebeans.ServiceInstancesRequest;
 import org.onap.so.serviceinstancebeans.ServiceInstancesResponse;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.slf4j.MDC;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
@@ -51,8 +51,6 @@
 @Path("/onap/so/infra/serviceInstantiation")
 public class VfModules {
 
-    private static Logger logger = LoggerFactory.getLogger(VfModules.class);
-
     @Autowired
     private VFModuleRestHandler restHandler;
 
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Vnf.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Vnf.java
index b161713..a8ccdee 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Vnf.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Vnf.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 - 2019 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
@@ -37,8 +39,6 @@
 import org.onap.so.db.request.beans.InfraActiveRequests;
 import org.onap.so.serviceinstancebeans.ServiceInstancesRequest;
 import org.onap.so.serviceinstancebeans.ServiceInstancesResponse;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.slf4j.MDC;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
@@ -49,8 +49,6 @@
 @Path("/onap/so/infra/serviceInstantiation")
 public class Vnf {
 
-    private static Logger logger = LoggerFactory.getLogger(Vnf.class);
-
     @Autowired
     private BpmnRequestBuilder requestBuilder;
 
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Volumes.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Volumes.java
index afabdd9..d3e394d 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Volumes.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Volumes.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 - 2019 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
@@ -40,8 +42,6 @@
 import org.onap.so.serviceinstancebeans.ModelType;
 import org.onap.so.serviceinstancebeans.ServiceInstancesRequest;
 import org.onap.so.serviceinstancebeans.ServiceInstancesResponse;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.slf4j.MDC;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
@@ -52,8 +52,6 @@
 @Path("/onap/so/infra/serviceInstantiation")
 public class Volumes {
 
-    private static Logger logger = LoggerFactory.getLogger(Volumes.class);
-
     @Autowired
     private BpmnRequestBuilder requestBuilder;
 
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/resources/application.yaml b/mso-api-handlers/mso-api-handler-infra/src/main/resources/application.yaml
index 136acfb..93a4ae9 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/resources/application.yaml
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/resources/application.yaml
@@ -26,6 +26,10 @@
         uri: /sobpmnengine/task
       history:
         uri: /sobpmnengine/history/process-instance?variables=mso-request-id_eq_
+      activity:
+        uri: /sobpmnengine/history/activity-instance?processInstanceId=
+  camundaURL: http://localhost:8089
+  camundaAuth: E8E19DD16CC90D2E458E8FF9A884CC0452F8F3EB8E321F96038DE38D5C1B0B02DFAE00B88E2CF6E2A4101AB2C011FC161212EE
                 
 spring:
   datasource:
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/CamundaRequestHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/CamundaRequestHandlerTest.java
new file mode 100644
index 0000000..e6b5163
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/CamundaRequestHandlerTest.java
@@ -0,0 +1,327 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 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.apihandlerinfra;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.List;
+import org.camunda.bpm.engine.impl.persistence.entity.HistoricActivityInstanceEntity;
+import org.camunda.bpm.engine.impl.persistence.entity.HistoricProcessInstanceEntity;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Spy;
+import org.mockito.junit.MockitoJUnitRunner;
+import org.onap.so.apihandlerinfra.exceptions.ContactCamundaException;
+import org.onap.so.apihandlerinfra.exceptions.RequestDbFailureException;
+import org.springframework.core.ParameterizedTypeReference;
+import org.springframework.core.env.Environment;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.client.HttpClientErrorException;
+import org.springframework.web.client.HttpStatusCodeException;
+import org.springframework.web.client.ResourceAccessException;
+import org.springframework.web.client.RestTemplate;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+@RunWith(MockitoJUnitRunner.class)
+public class CamundaRequestHandlerTest {
+
+    @Mock
+    private RestTemplate restTemplate;
+
+    @Mock
+    private Environment env;
+
+    @InjectMocks
+    @Spy
+    private CamundaRequestHandler camundaRequestHandler;
+
+    @Rule
+    public ExpectedException thrown = ExpectedException.none();
+
+    private static final String REQUEST_ID = "eca3a1b1-43ab-457e-ab1c-367263d148b4";
+    private ResponseEntity<List<HistoricActivityInstanceEntity>> activityInstanceResponse = null;
+    private ResponseEntity<List<HistoricProcessInstanceEntity>> processInstanceResponse = null;
+    private List<HistoricActivityInstanceEntity> activityInstanceList = null;
+    private List<HistoricProcessInstanceEntity> processInstanceList = null;
+
+
+
+    @Before
+    public void setup() throws IOException {
+        ObjectMapper mapper = new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+        activityInstanceList = mapper.readValue(
+                new String(Files.readAllBytes(
+                        Paths.get("src/test/resources/OrchestrationRequest/ActivityInstanceHistoryResponse.json"))),
+                new TypeReference<List<HistoricActivityInstanceEntity>>() {});
+        processInstanceList = mapper.readValue(
+                new String(Files.readAllBytes(
+                        Paths.get("src/test/resources/OrchestrationRequest/ProcessInstanceHistoryResponse.json"))),
+                new TypeReference<List<HistoricProcessInstanceEntity>>() {});
+        processInstanceResponse =
+                new ResponseEntity<List<HistoricProcessInstanceEntity>>(processInstanceList, HttpStatus.ACCEPTED);
+        activityInstanceResponse =
+                new ResponseEntity<List<HistoricActivityInstanceEntity>>(activityInstanceList, HttpStatus.ACCEPTED);
+
+        doReturn("/sobpmnengine/history/process-instance?variables=mso-request-id_eq_").when(env)
+                .getProperty("mso.camunda.rest.history.uri");
+        doReturn("/sobpmnengine/history/activity-instance?processInstanceId=").when(env)
+                .getProperty("mso.camunda.rest.activity.uri");
+        doReturn("auth").when(env).getRequiredProperty("mso.camundaAuth");
+        doReturn("key").when(env).getRequiredProperty("mso.msoKey");
+        doReturn("http://localhost:8089").when(env).getProperty("mso.camundaURL");
+    }
+
+    public HttpHeaders setHeaders() {
+        HttpHeaders headers = new HttpHeaders();
+        List<org.springframework.http.MediaType> acceptableMediaTypes = new ArrayList<>();
+        acceptableMediaTypes.add(org.springframework.http.MediaType.APPLICATION_JSON);
+        headers.setAccept(acceptableMediaTypes);
+        headers.add(HttpHeaders.AUTHORIZATION, "auth");
+
+        return headers;
+    }
+
+    @Test
+    public void getActivityNameTest() throws IOException {
+        String expectedActivityName = "Last task executed: BB to Execute";
+        String actualActivityName = camundaRequestHandler.getActivityName(activityInstanceList);
+
+        assertEquals(expectedActivityName, actualActivityName);
+    }
+
+    @Test
+    public void getActivityNameNullActivityNameTest() throws IOException {
+        String expectedActivityName = "Task name is null.";
+        HistoricActivityInstanceEntity activityInstance = new HistoricActivityInstanceEntity();
+        List<HistoricActivityInstanceEntity> activityInstanceList = new ArrayList<>();
+        activityInstanceList.add(activityInstance);
+
+        String actualActivityName = camundaRequestHandler.getActivityName(activityInstanceList);
+
+        assertEquals(expectedActivityName, actualActivityName);
+    }
+
+    @Test
+    public void getActivityNameNullListTest() throws IOException {
+        String expectedActivityName = "No results returned on activityInstance history lookup.";
+        List<HistoricActivityInstanceEntity> activityInstanceList = null;
+        String actualActivityName = camundaRequestHandler.getActivityName(activityInstanceList);
+
+        assertEquals(expectedActivityName, actualActivityName);
+    }
+
+    @Test
+    public void getActivityNameEmptyListTest() throws IOException {
+        String expectedActivityName = "No results returned on activityInstance history lookup.";
+        List<HistoricActivityInstanceEntity> activityInstanceList = new ArrayList<>();
+        String actualActivityName = camundaRequestHandler.getActivityName(activityInstanceList);
+
+        assertEquals(expectedActivityName, actualActivityName);
+    }
+
+    @Test
+    public void getTaskNameTest() throws IOException, ContactCamundaException {
+        doReturn(processInstanceResponse).when(camundaRequestHandler).getCamundaProcessInstanceHistory(REQUEST_ID);
+        doReturn(activityInstanceResponse).when(camundaRequestHandler)
+                .getCamundaActivityHistory("c4c6b647-a26e-11e9-b144-0242ac14000b", REQUEST_ID);
+        doReturn("Last task executed: BB to Execute").when(camundaRequestHandler).getActivityName(activityInstanceList);
+        String expectedTaskName = "Last task executed: BB to Execute";
+
+        String actualTaskName = camundaRequestHandler.getTaskName(REQUEST_ID);
+
+        assertEquals(expectedTaskName, actualTaskName);
+    }
+
+    @Test
+    public void getTaskNameNullProcessInstanceListTest() throws IOException, ContactCamundaException {
+        ResponseEntity<List<HistoricProcessInstanceEntity>> response = new ResponseEntity<>(null, HttpStatus.OK);
+        doReturn(response).when(camundaRequestHandler).getCamundaProcessInstanceHistory(REQUEST_ID);
+        String expected = "No processInstances returned for requestId: " + REQUEST_ID;
+
+        String actual = camundaRequestHandler.getTaskName(REQUEST_ID);
+
+        assertEquals(expected, actual);
+    }
+
+    @Test
+    public void getTaskNameNullProcessInstanceIdTest() throws IOException, ContactCamundaException {
+        HistoricProcessInstanceEntity processInstance = new HistoricProcessInstanceEntity();
+        List<HistoricProcessInstanceEntity> processInstanceList = new ArrayList<>();
+        processInstanceList.add(processInstance);
+        ResponseEntity<List<HistoricProcessInstanceEntity>> response =
+                new ResponseEntity<>(processInstanceList, HttpStatus.OK);
+        doReturn(response).when(camundaRequestHandler).getCamundaProcessInstanceHistory(REQUEST_ID);
+        String expected = "No processInstanceId returned for requestId: " + REQUEST_ID;
+
+        String actual = camundaRequestHandler.getTaskName(REQUEST_ID);
+
+        assertEquals(expected, actual);
+    }
+
+    @Test
+    public void getTaskNameProcessInstanceLookupFailureTest() throws IOException, ContactCamundaException {
+        doThrow(HttpClientErrorException.class).when(camundaRequestHandler)
+                .getCamundaProcessInstanceHistory(REQUEST_ID);
+
+        thrown.expect(ContactCamundaException.class);
+        camundaRequestHandler.getTaskName(REQUEST_ID);
+    }
+
+    @Test
+    public void getCamundaActivityHistoryTest() throws IOException, ContactCamundaException {
+        HttpHeaders headers = setHeaders();
+        HttpEntity<?> requestEntity = new HttpEntity<>(headers);
+        String targetUrl = "http://localhost:8089/sobpmnengine/history/activity-instance?processInstanceId="
+                + "c4c6b647-a26e-11e9-b144-0242ac14000b";
+        doReturn(activityInstanceResponse).when(restTemplate).exchange(targetUrl, HttpMethod.GET, requestEntity,
+                new ParameterizedTypeReference<List<HistoricActivityInstanceEntity>>() {});
+        doReturn(headers).when(camundaRequestHandler).setCamundaHeaders("auth", "key");
+        ResponseEntity<List<HistoricActivityInstanceEntity>> actualResponse =
+                camundaRequestHandler.getCamundaActivityHistory("c4c6b647-a26e-11e9-b144-0242ac14000b", REQUEST_ID);
+        assertEquals(activityInstanceResponse, actualResponse);
+    }
+
+    @Test
+    public void getCamundaActivityHistoryErrorTest() {
+        HttpHeaders headers = setHeaders();
+        HttpEntity<?> requestEntity = new HttpEntity<>(headers);
+        String targetUrl = "http://localhost:8089/sobpmnengine/history/activity-instance?processInstanceId="
+                + "c4c6b647-a26e-11e9-b144-0242ac14000b";
+        doThrow(new ResourceAccessException("IOException")).when(restTemplate).exchange(targetUrl, HttpMethod.GET,
+                requestEntity, new ParameterizedTypeReference<List<HistoricActivityInstanceEntity>>() {});
+        doReturn(headers).when(camundaRequestHandler).setCamundaHeaders("auth", "key");
+
+        try {
+            camundaRequestHandler.getCamundaActivityHistory("c4c6b647-a26e-11e9-b144-0242ac14000b", REQUEST_ID);
+        } catch (ContactCamundaException e) {
+            // Exception thrown after retries are completed
+        }
+
+        verify(restTemplate, times(4)).exchange(targetUrl, HttpMethod.GET, requestEntity,
+                new ParameterizedTypeReference<List<HistoricActivityInstanceEntity>>() {});
+    }
+
+    @Test
+    public void getCamundaProccesInstanceHistoryTest() throws IOException, ContactCamundaException {
+        HttpHeaders headers = setHeaders();
+        HttpEntity<?> requestEntity = new HttpEntity<>(headers);
+        String targetUrl =
+                "http://localhost:8089/sobpmnengine/history/process-instance?variables=mso-request-id_eq_" + REQUEST_ID;
+        doReturn(processInstanceResponse).when(restTemplate).exchange(targetUrl, HttpMethod.GET, requestEntity,
+                new ParameterizedTypeReference<List<HistoricProcessInstanceEntity>>() {});
+        doReturn(headers).when(camundaRequestHandler).setCamundaHeaders("auth", "key");
+
+        ResponseEntity<List<HistoricProcessInstanceEntity>> actualResponse =
+                camundaRequestHandler.getCamundaProcessInstanceHistory(REQUEST_ID);
+        assertEquals(processInstanceResponse, actualResponse);
+    }
+
+    @Test
+    public void getCamundaProccesInstanceHistoryRetryTest() {
+        HttpHeaders headers = setHeaders();
+        HttpEntity<?> requestEntity = new HttpEntity<>(headers);
+        String targetUrl =
+                "http://localhost:8089/sobpmnengine/history/process-instance?variables=mso-request-id_eq_" + REQUEST_ID;
+        doThrow(new ResourceAccessException("I/O error")).when(restTemplate).exchange(targetUrl, HttpMethod.GET,
+                requestEntity, new ParameterizedTypeReference<List<HistoricProcessInstanceEntity>>() {});
+        doReturn(headers).when(camundaRequestHandler).setCamundaHeaders("auth", "key");
+
+        try {
+            camundaRequestHandler.getCamundaProcessInstanceHistory(REQUEST_ID);
+        } catch (ResourceAccessException e) {
+            // Exception thrown after retries are completed
+        }
+        verify(restTemplate, times(4)).exchange(targetUrl, HttpMethod.GET, requestEntity,
+                new ParameterizedTypeReference<List<HistoricProcessInstanceEntity>>() {});
+    }
+
+    @Test
+    public void getCamundaProccesInstanceHistoryNoRetryTest() {
+        HttpHeaders headers = setHeaders();
+        HttpEntity<?> requestEntity = new HttpEntity<>(headers);
+        String targetUrl =
+                "http://localhost:8089/sobpmnengine/history/process-instance?variables=mso-request-id_eq_" + REQUEST_ID;
+        doThrow(HttpClientErrorException.class).when(restTemplate).exchange(targetUrl, HttpMethod.GET, requestEntity,
+                new ParameterizedTypeReference<List<HistoricProcessInstanceEntity>>() {});
+        doReturn(headers).when(camundaRequestHandler).setCamundaHeaders("auth", "key");
+
+        try {
+            camundaRequestHandler.getCamundaProcessInstanceHistory(REQUEST_ID);
+        } catch (HttpStatusCodeException e) {
+            // Exception thrown, no retries
+        }
+        verify(restTemplate, times(1)).exchange(targetUrl, HttpMethod.GET, requestEntity,
+                new ParameterizedTypeReference<List<HistoricProcessInstanceEntity>>() {});
+    }
+
+    @Test
+    public void getCamundaProccesInstanceHistoryFailThenSuccessTest() throws IOException, ContactCamundaException {
+        HttpHeaders headers = setHeaders();
+        HttpEntity<?> requestEntity = new HttpEntity<>(headers);
+        String targetUrl =
+                "http://localhost:8089/sobpmnengine/history/process-instance?variables=mso-request-id_eq_" + REQUEST_ID;
+        when(restTemplate.exchange(targetUrl, HttpMethod.GET, requestEntity,
+                new ParameterizedTypeReference<List<HistoricProcessInstanceEntity>>() {}))
+                        .thenThrow(new ResourceAccessException("I/O Exception")).thenReturn(processInstanceResponse);
+        doReturn(headers).when(camundaRequestHandler).setCamundaHeaders("auth", "key");
+
+        ResponseEntity<List<HistoricProcessInstanceEntity>> actualResponse =
+                camundaRequestHandler.getCamundaProcessInstanceHistory(REQUEST_ID);
+        assertEquals(processInstanceResponse, actualResponse);
+        verify(restTemplate, times(2)).exchange(targetUrl, HttpMethod.GET, requestEntity,
+                new ParameterizedTypeReference<List<HistoricProcessInstanceEntity>>() {});
+    }
+
+    @Test
+    public void setCamundaHeadersTest() throws ContactCamundaException, RequestDbFailureException {
+        String encryptedAuth = "015E7ACF706C6BBF85F2079378BDD2896E226E09D13DC2784BA309E27D59AB9FAD3A5E039DF0BB8408"; // user:password
+        String key = "07a7159d3bf51a0e53be7a8f89699be7";
+
+        HttpHeaders headers = camundaRequestHandler.setCamundaHeaders(encryptedAuth, key);
+        List<org.springframework.http.MediaType> acceptedType = headers.getAccept();
+
+        String expectedAcceptedType = "application/json";
+        assertEquals(expectedAcceptedType, acceptedType.get(0).toString());
+        String basicAuth = headers.getFirst(HttpHeaders.AUTHORIZATION);
+        String expectedBasicAuth = "Basic dXNlcjpwYXNzd29yZA==";
+
+        assertEquals(expectedBasicAuth, basicAuth);
+    }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsTest.java
index f82f5ac..12f0ffc 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsTest.java
@@ -26,6 +26,7 @@
 import static com.github.tomakehurst.wiremock.client.WireMock.equalToJson;
 import static com.github.tomakehurst.wiremock.client.WireMock.get;
 import static com.github.tomakehurst.wiremock.client.WireMock.post;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching;
 import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
 import static com.shazam.shazamcrest.MatcherAssert.assertThat;
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
@@ -42,6 +43,7 @@
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 import org.apache.http.HttpStatus;
+import org.junit.Before;
 import org.junit.Test;
 import org.onap.so.apihandler.common.ErrorNumbers;
 import org.onap.so.db.request.beans.InfraActiveRequests;
@@ -92,6 +94,21 @@
         return list;
     }
 
+    @Before
+    public void setup() throws IOException {
+        wireMockServer.stubFor(get(urlMatching("/sobpmnengine/history/process-instance.*")).willReturn(aResponse()
+                .withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+                .withBody(new String(Files.readAllBytes(
+                        Paths.get("src/test/resources/OrchestrationRequest/ProcessInstanceHistoryResponse.json"))))
+                .withStatus(org.apache.http.HttpStatus.SC_OK)));
+        wireMockServer.stubFor(
+                get(("/sobpmnengine/history/activity-instance?processInstanceId=c4c6b647-a26e-11e9-b144-0242ac14000b"))
+                        .willReturn(aResponse().withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+                                .withBody(new String(Files.readAllBytes(Paths.get(
+                                        "src/test/resources/OrchestrationRequest/ActivityInstanceHistoryResponse.json"))))
+                                .withStatus(HttpStatus.SC_OK)));
+    }
+
     @Test
     public void testGetOrchestrationRequest() throws Exception {
         setupTestGetOrchestrationRequest();
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsUnitTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsUnitTest.java
index fc548a7..5023155 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsUnitTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsUnitTest.java
@@ -25,6 +25,7 @@
 import static org.hamcrest.CoreMatchers.is;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertThat;
+import static org.mockito.Mockito.doReturn;
 import javax.ws.rs.core.Response;
 import org.apache.commons.lang.StringUtils;
 import org.junit.Before;
@@ -55,6 +56,8 @@
     private ResponseBuilder builder;
     @Mock
     private Response response;
+    @Mock
+    private CamundaRequestHandler camundaRequestHandler;
     @Rule
     public ExpectedException thrown = ExpectedException.none();
     @InjectMocks
@@ -68,6 +71,7 @@
     private static final String FLOW_STATUS = "FlowStatus";
     private static final String RETRY_STATUS_MESSAGE = "RetryStatusMessage";
     private static final String ROLLBACK_STATUS_MESSAGE = "RollbackStatusMessage";
+    private static final String TASK_INFORMATION = " TASK INFORMATION: Last task executed: Call SDNC";
     private InfraActiveRequests iar;
     boolean includeCloudRequest = false;
     private static final String ROLLBACK_EXT_SYSTEM_ERROR_SOURCE = "SDNC";
@@ -79,14 +83,23 @@
         iar.setRequestScope(SERVICE);
         iar.setRequestId(REQUEST_ID);
         iar.setServiceInstanceId(SERVICE_INSTANCE_ID);
+        iar.setExtSystemErrorSource(EXT_SYSTEM_ERROR_SOURCE);
+        iar.setRollbackExtSystemErrorSource(ROLLBACK_EXT_SYSTEM_ERROR_SOURCE);
+        iar.setFlowStatus(FLOW_STATUS);
+        iar.setRollbackStatusMessage(ROLLBACK_STATUS_MESSAGE);
+        iar.setRetryStatusMessage(RETRY_STATUS_MESSAGE);
     }
 
     @Test
     public void mapInfraActiveRequestToRequestWithOriginalRequestIdTest() throws ApiException {
+        doReturn("Last task executed: Call SDNC").when(camundaRequestHandler).getTaskName(REQUEST_ID);
         InstanceReferences instanceReferences = new InstanceReferences();
         instanceReferences.setServiceInstanceId(SERVICE_INSTANCE_ID);
         RequestStatus requestStatus = new RequestStatus();
         requestStatus.setRequestState(iar.getRequestStatus());
+        requestStatus.setStatusMessage(String.format("FLOW STATUS: %s RETRY STATUS: %s ROLLBACK STATUS: %s",
+                FLOW_STATUS + TASK_INFORMATION, RETRY_STATUS_MESSAGE, ROLLBACK_STATUS_MESSAGE));
+
         Request expected = new Request();
         expected.setRequestId(REQUEST_ID);
         expected.setOriginalRequestId(ORIGINAL_REQUEST_ID);
@@ -103,10 +116,13 @@
 
     @Test
     public void mapInfraActiveRequestToRequestOriginalRequestIdNullTest() throws ApiException {
+        doReturn("Last task executed: Call SDNC").when(camundaRequestHandler).getTaskName(REQUEST_ID);
         InstanceReferences instanceReferences = new InstanceReferences();
         instanceReferences.setServiceInstanceId(SERVICE_INSTANCE_ID);
         RequestStatus requestStatus = new RequestStatus();
         requestStatus.setRequestState(iar.getRequestStatus());
+        requestStatus.setStatusMessage(String.format("FLOW STATUS: %s RETRY STATUS: %s ROLLBACK STATUS: %s",
+                FLOW_STATUS + TASK_INFORMATION, RETRY_STATUS_MESSAGE, ROLLBACK_STATUS_MESSAGE));
         Request expected = new Request();
         expected.setRequestId(REQUEST_ID);
         expected.setInstanceReferences(instanceReferences);
@@ -120,10 +136,13 @@
 
     @Test
     public void mapRequestStatusAndExtSysErrSrcToRequestFalseTest() throws ApiException {
+        doReturn("Last task executed: Call SDNC").when(camundaRequestHandler).getTaskName(REQUEST_ID);
         InstanceReferences instanceReferences = new InstanceReferences();
         instanceReferences.setServiceInstanceId(SERVICE_INSTANCE_ID);
         RequestStatus requestStatus = new RequestStatus();
         requestStatus.setRequestState(iar.getRequestStatus());
+        requestStatus.setStatusMessage(String.format("FLOW STATUS: %s RETRY STATUS: %s ROLLBACK STATUS: %s",
+                FLOW_STATUS + TASK_INFORMATION, RETRY_STATUS_MESSAGE, ROLLBACK_STATUS_MESSAGE));
 
         Request expected = new Request();
         expected.setRequestId(REQUEST_ID);
@@ -140,6 +159,7 @@
 
     @Test
     public void mapRequestStatusAndExtSysErrSrcToRequestStatusDetailTest() throws ApiException {
+        doReturn(null).when(camundaRequestHandler).getTaskName(REQUEST_ID);
         InstanceReferences instanceReferences = new InstanceReferences();
         instanceReferences.setServiceInstanceId(SERVICE_INSTANCE_ID);
         RequestStatus requestStatus = new RequestStatus();
@@ -157,11 +177,6 @@
         expected.setRequestScope(SERVICE);
 
         includeCloudRequest = false;
-        iar.setExtSystemErrorSource(EXT_SYSTEM_ERROR_SOURCE);
-        iar.setRollbackExtSystemErrorSource(ROLLBACK_EXT_SYSTEM_ERROR_SOURCE);
-        iar.setFlowStatus(FLOW_STATUS);
-        iar.setRollbackStatusMessage(ROLLBACK_STATUS_MESSAGE);
-        iar.setRetryStatusMessage(RETRY_STATUS_MESSAGE);
 
         Request actual = orchestrationRequests.mapInfraActiveRequestToRequest(iar, includeCloudRequest,
                 OrchestrationRequestFormat.STATUSDETAIL.toString());
@@ -170,12 +185,13 @@
 
     @Test
     public void mapRequestStatusAndExtSysErrSrcToRequestDetailTest() throws ApiException {
+        doReturn("Last task executed: Call SDNC").when(camundaRequestHandler).getTaskName(REQUEST_ID);
         InstanceReferences instanceReferences = new InstanceReferences();
         instanceReferences.setServiceInstanceId(SERVICE_INSTANCE_ID);
         RequestStatus requestStatus = new RequestStatus();
         requestStatus.setRequestState(iar.getRequestStatus());
         requestStatus.setStatusMessage(String.format("FLOW STATUS: %s RETRY STATUS: %s ROLLBACK STATUS: %s",
-                FLOW_STATUS, RETRY_STATUS_MESSAGE, ROLLBACK_STATUS_MESSAGE));
+                FLOW_STATUS + TASK_INFORMATION, RETRY_STATUS_MESSAGE, ROLLBACK_STATUS_MESSAGE));
 
         Request expected = new Request();
         expected.setRequestId(REQUEST_ID);
@@ -184,11 +200,78 @@
         expected.setRequestScope(SERVICE);
 
         includeCloudRequest = false;
-        iar.setExtSystemErrorSource(EXT_SYSTEM_ERROR_SOURCE);
-        iar.setRollbackExtSystemErrorSource(ROLLBACK_EXT_SYSTEM_ERROR_SOURCE);
-        iar.setFlowStatus(FLOW_STATUS);
-        iar.setRollbackStatusMessage(ROLLBACK_STATUS_MESSAGE);
-        iar.setRetryStatusMessage(RETRY_STATUS_MESSAGE);
+
+        Request actual = orchestrationRequests.mapInfraActiveRequestToRequest(iar, includeCloudRequest,
+                OrchestrationRequestFormat.DETAIL.toString());
+
+        assertThat(actual, sameBeanAs(expected));
+    }
+
+    @Test
+    public void mapRequestStatusAndExtSysErrSrcToRequestNoFlowStatusTest() throws ApiException {
+        InstanceReferences instanceReferences = new InstanceReferences();
+        instanceReferences.setServiceInstanceId(SERVICE_INSTANCE_ID);
+        RequestStatus requestStatus = new RequestStatus();
+        requestStatus.setRequestState(iar.getRequestStatus());
+        requestStatus.setStatusMessage(
+                String.format("RETRY STATUS: %s ROLLBACK STATUS: %s", RETRY_STATUS_MESSAGE, ROLLBACK_STATUS_MESSAGE));
+
+        Request expected = new Request();
+        expected.setRequestId(REQUEST_ID);
+        expected.setInstanceReferences(instanceReferences);
+        expected.setRequestStatus(requestStatus);
+        expected.setRequestScope(SERVICE);
+
+        includeCloudRequest = false;
+        iar.setFlowStatus(null);
+
+        Request actual = orchestrationRequests.mapInfraActiveRequestToRequest(iar, includeCloudRequest,
+                OrchestrationRequestFormat.DETAIL.toString());
+
+        assertThat(actual, sameBeanAs(expected));
+    }
+
+    @Test
+    public void mapRequestStatusAndExtSysErrSrcToRequestFlowStatusSuccessfulCompletionTest() throws ApiException {
+        InstanceReferences instanceReferences = new InstanceReferences();
+        instanceReferences.setServiceInstanceId(SERVICE_INSTANCE_ID);
+        RequestStatus requestStatus = new RequestStatus();
+        requestStatus.setRequestState(iar.getRequestStatus());
+        requestStatus.setStatusMessage(String.format("FLOW STATUS: %s RETRY STATUS: %s ROLLBACK STATUS: %s",
+                "Successfully completed all Building Blocks", RETRY_STATUS_MESSAGE, ROLLBACK_STATUS_MESSAGE));
+
+        Request expected = new Request();
+        expected.setRequestId(REQUEST_ID);
+        expected.setInstanceReferences(instanceReferences);
+        expected.setRequestStatus(requestStatus);
+        expected.setRequestScope(SERVICE);
+
+        includeCloudRequest = false;
+        iar.setFlowStatus("Successfully completed all Building Blocks");
+
+        Request actual = orchestrationRequests.mapInfraActiveRequestToRequest(iar, includeCloudRequest,
+                OrchestrationRequestFormat.DETAIL.toString());
+
+        assertThat(actual, sameBeanAs(expected));
+    }
+
+    @Test
+    public void mapRequestStatusAndExtSysErrSrcToRequestFlowStatusSuccessfulRollbackTest() throws ApiException {
+        InstanceReferences instanceReferences = new InstanceReferences();
+        instanceReferences.setServiceInstanceId(SERVICE_INSTANCE_ID);
+        RequestStatus requestStatus = new RequestStatus();
+        requestStatus.setRequestState(iar.getRequestStatus());
+        requestStatus.setStatusMessage(String.format("FLOW STATUS: %s RETRY STATUS: %s ROLLBACK STATUS: %s",
+                "All Rollback flows have completed successfully", RETRY_STATUS_MESSAGE, ROLLBACK_STATUS_MESSAGE));
+
+        Request expected = new Request();
+        expected.setRequestId(REQUEST_ID);
+        expected.setInstanceReferences(instanceReferences);
+        expected.setRequestStatus(requestStatus);
+        expected.setRequestScope(SERVICE);
+
+        includeCloudRequest = false;
+        iar.setFlowStatus("All Rollback flows have completed successfully");
 
         Request actual = orchestrationRequests.mapInfraActiveRequestToRequest(iar, includeCloudRequest,
                 OrchestrationRequestFormat.DETAIL.toString());
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestHandlerUtilsTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestHandlerUtilsTest.java
index 62a6f44..5306888 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestHandlerUtilsTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestHandlerUtilsTest.java
@@ -76,6 +76,9 @@
     @Autowired
     private RequestHandlerUtils requestHandlerUtils;
 
+    @Autowired
+    private CamundaRequestHandler camundaRequestHandler;
+
     @Value("${wiremock.server.port}")
     private String wiremockPort;
 
@@ -327,7 +330,7 @@
     public void setCamundaHeadersTest() throws ContactCamundaException, RequestDbFailureException {
         String encryptedAuth = "015E7ACF706C6BBF85F2079378BDD2896E226E09D13DC2784BA309E27D59AB9FAD3A5E039DF0BB8408"; // user:password
         String key = "07a7159d3bf51a0e53be7a8f89699be7";
-        HttpHeaders headers = requestHandlerUtils.setCamundaHeaders(encryptedAuth, key);
+        HttpHeaders headers = camundaRequestHandler.setCamundaHeaders(encryptedAuth, key);
         List<org.springframework.http.MediaType> acceptedType = headers.getAccept();
         String expectedAcceptedType = "application/json";
         assertEquals(expectedAcceptedType, acceptedType.get(0).toString());
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 b72e512..4b2644b 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
@@ -2917,19 +2917,6 @@
     }
 
     @Test
-    public void setCamundaHeadersTest() throws ContactCamundaException, RequestDbFailureException {
-        String encryptedAuth = "015E7ACF706C6BBF85F2079378BDD2896E226E09D13DC2784BA309E27D59AB9FAD3A5E039DF0BB8408"; // user:password
-        String key = "07a7159d3bf51a0e53be7a8f89699be7";
-        HttpHeaders headers = requestHandlerUtils.setCamundaHeaders(encryptedAuth, key);
-        List<org.springframework.http.MediaType> acceptedType = headers.getAccept();
-        String expectedAcceptedType = "application/json";
-        assertEquals(expectedAcceptedType, acceptedType.get(0).toString());
-        String basicAuth = headers.getFirst(HttpHeaders.AUTHORIZATION);
-        String expectedBasicAuth = "Basic dXNlcjpwYXNzd29yZA==";
-        assertEquals(expectedBasicAuth, basicAuth);
-    }
-
-    @Test
     public void handleReplaceInstance_Test() throws JsonParseException, JsonMappingException, IOException {
         String replaceVfModule = inputStream("/ReplaceVfModule.json");
         ObjectMapper mapper = new ObjectMapper();
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/ActivityInstanceHistoryResponse.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/ActivityInstanceHistoryResponse.json
new file mode 100644
index 0000000..efd80f3
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/ActivityInstanceHistoryResponse.json
@@ -0,0 +1,48 @@
+[
+   {
+      "id":"Call_BBToExecute:c4f603e4-a26e-11e9-b144-0242ac14000b",
+      "parentActivityInstanceId":"c4c6b647-a26e-11e9-b144-0242ac14000b",
+      "activityId":"Call_BBToExecute",
+      "activityName":"BB to Execute",
+      "activityType":"callActivity",
+      "processDefinitionKey":"ExecuteBuildingBlock",
+      "processDefinitionId":"ExecuteBuildingBlock:1:a46566de-a26b-11e9-b144-0242ac14000b",
+      "processInstanceId":"c4c6b647-a26e-11e9-b144-0242ac14000b",
+      "executionId":"c4f603e3-a26e-11e9-b144-0242ac14000b",
+      "taskId":null,
+      "calledProcessInstanceId":"c4f603e6-a26e-11e9-b144-0242ac14000b",
+      "calledCaseInstanceId":null,
+      "assignee":null,
+      "startTime":"2019-07-09T17:27:04.607+0000",
+      "endTime":"2019-07-09T17:27:05.545+0000",
+      "durationInMillis":938,
+      "canceled":true,
+      "completeScope":false,
+      "tenantId":null,
+      "removalTime":null,
+      "rootProcessInstanceId":"c2fd4066-a26e-11e9-b144-0242ac14000b"
+   },
+   {
+      "id":"EndEvent_0mvmk3i:c59b1d39-a26e-11e9-b144-0242ac14000b",
+      "parentActivityInstanceId":"SubProcess_0tv8zda:c5852427-a26e-11e9-b144-0242ac14000b",
+      "activityId":"EndEvent_0mvmk3i",
+      "activityName":null,
+      "activityType":"noneEndEvent",
+      "processDefinitionKey":"ExecuteBuildingBlock",
+      "processDefinitionId":"ExecuteBuildingBlock:1:a46566de-a26b-11e9-b144-0242ac14000b",
+      "processInstanceId":"c4c6b647-a26e-11e9-b144-0242ac14000b",
+      "executionId":"c5852426-a26e-11e9-b144-0242ac14000b",
+      "taskId":null,
+      "calledProcessInstanceId":null,
+      "calledCaseInstanceId":null,
+      "assignee":null,
+      "startTime":"2019-07-09T17:27:05.689+0000",
+      "endTime":"2019-07-09T17:27:05.689+0000",
+      "durationInMillis":0,
+      "canceled":false,
+      "completeScope":true,
+      "tenantId":null,
+      "removalTime":null,
+      "rootProcessInstanceId":"c2fd4066-a26e-11e9-b144-0242ac14000b"
+   }
+ ]
\ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/OrchestrationFilterResponse.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/OrchestrationFilterResponse.json
index 3b2eca7..96fed36 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/OrchestrationFilterResponse.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/OrchestrationFilterResponse.json
@@ -61,7 +61,7 @@
         },
         "requestStatus": {
           "requestState": "COMPLETE",
-          "statusMessage": "STATUS: Vf Module has been deleted successfully. FLOW STATUS: Building blocks 1 of 3 completed. ROLLBACK STATUS: Rollback has been completed successfully.",
+          "statusMessage": "STATUS: Vf Module has been deleted successfully. FLOW STATUS: Building blocks 1 of 3 completed. TASK INFORMATION: Last task executed: BB to Execute ROLLBACK STATUS: Rollback has been completed successfully.",
           "percentProgress": 100,
           "timestamp": "Thu, 22 Dec 2016 08:30:28 GMT"
         }
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/OrchestrationList.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/OrchestrationList.json
index baddb21..8018413 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/OrchestrationList.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/OrchestrationList.json
@@ -58,7 +58,7 @@
             },
             "requestStatus":{
                "requestState":"PENDING",
-               "statusMessage":"FLOW STATUS: Building blocks 1 of 3 completed. RETRY STATUS: Retry 2/5 will be started in 8 min. ROLLBACK STATUS: Rollback has been completed successfully.",
+               "statusMessage":"FLOW STATUS: Building blocks 1 of 3 completed. TASK INFORMATION: Last task executed: BB to Execute RETRY STATUS: Retry 2/5 will be started in 8 min. ROLLBACK STATUS: Rollback has been completed successfully.",
                "percentProgress":0,
                "timestamp": "Thu, 22 Dec 2016 08:30:28 GMT"
             }
@@ -321,7 +321,7 @@
             },
             "requestStatus":{
                "requestState":"PENDING",
-               "statusMessage":"STATUS: Adding members. FLOW STATUS: Building blocks 1 of 3 completed. RETRY STATUS: Retry 2/5 will be started in 8 min. ROLLBACK STATUS: Rollback has been completed successfully.",
+               "statusMessage":"STATUS: Adding members. FLOW STATUS: Building blocks 1 of 3 completed. TASK INFORMATION: Last task executed: BB to Execute RETRY STATUS: Retry 2/5 will be started in 8 min. ROLLBACK STATUS: Rollback has been completed successfully.",
                "percentProgress":0,
                "timestamp": "Thu, 22 Dec 2016 08:30:28 GMT"
             }
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/ProcessInstanceHistoryResponse.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/ProcessInstanceHistoryResponse.json
new file mode 100644
index 0000000..faa2834
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/ProcessInstanceHistoryResponse.json
@@ -0,0 +1,44 @@
+[
+   {
+      "id":"c2fd4066-a26e-11e9-b144-0242ac14000b",
+      "businessKey":"84eacc7b-b046-4333-9272-5e8513bdd4cc",
+      "processDefinitionId":"WorkflowActionBB:1:a461210d-a26b-11e9-b144-0242ac14000b",
+      "processDefinitionKey":"WorkflowActionBB",
+      "processDefinitionName":"WorkflowActionBB",
+      "processDefinitionVersion":1,
+      "startTime":"2019-07-09T17:27:01.299+0000",
+      "endTime":"2019-07-09T17:27:06.585+0000",
+      "removalTime":null,
+      "durationInMillis":5286,
+      "startUserId":null,
+      "startActivityId":"Start_WorkflowActionBB",
+      "deleteReason":null,
+      "rootProcessInstanceId":"c2fd4066-a26e-11e9-b144-0242ac14000b",
+      "superProcessInstanceId":null,
+      "superCaseInstanceId":null,
+      "caseInstanceId":null,
+      "tenantId":null,
+      "state":"COMPLETED"
+   },
+   {
+      "id":"c4c6b647-a26e-11e9-b144-0242ac14000b",
+      "businessKey":null,
+      "processDefinitionId":"ExecuteBuildingBlock:1:a46566de-a26b-11e9-b144-0242ac14000b",
+      "processDefinitionKey":"ExecuteBuildingBlock",
+      "processDefinitionName":"ExecuteBuildingBlock",
+      "processDefinitionVersion":1,
+      "startTime":"2019-07-09T17:27:04.298+0000",
+      "endTime":"2019-07-09T17:27:05.690+0000",
+      "removalTime":null,
+      "durationInMillis":1392,
+      "startUserId":null,
+      "startActivityId":"Start_ExecuteBuildingBlock",
+      "deleteReason":null,
+      "rootProcessInstanceId":"c2fd4066-a26e-11e9-b144-0242ac14000b",
+      "superProcessInstanceId":"c2fd4066-a26e-11e9-b144-0242ac14000b",
+      "superCaseInstanceId":null,
+      "caseInstanceId":null,
+      "tenantId":null,
+      "state":"COMPLETED"
+   }
+ ]
\ No newline at end of file
