diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCConfiguration.java b/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCConfiguration.java
index 2eace75..60abdc3 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCConfiguration.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCConfiguration.java
@@ -9,9 +9,9 @@
  * 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.
@@ -57,9 +57,10 @@
     public static final String TOSCA_CSAR = "TOSCA_CSAR";
     public static final String WORKFLOW = "WORKFLOW";
     public static final String VF_MODULES_METADATA = "VF_MODULES_METADATA";
+    public static final String CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT = "CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT";
 
-    private static final String[] SUPPORTED_ARTIFACT_TYPES =
-            {HEAT, HEAT_ARTIFACT, HEAT_ENV, HEAT_NESTED, HEAT_NET, HEAT_VOL, OTHER, TOSCA_CSAR, VF_MODULES_METADATA};
+    private static final String[] SUPPORTED_ARTIFACT_TYPES = {HEAT, HEAT_ARTIFACT, HEAT_ENV, HEAT_NESTED, HEAT_NET,
+            HEAT_VOL, OTHER, TOSCA_CSAR, VF_MODULES_METADATA, CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT, WORKFLOW};
 
     public static final List<String> SUPPORTED_ARTIFACT_TYPES_LIST =
             Collections.unmodifiableList(Arrays.asList(SUPPORTED_ARTIFACT_TYPES));
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/installer/VfResourceStructure.java b/asdc-controller/src/main/java/org/onap/so/asdc/installer/VfResourceStructure.java
index 16e9fda..0f58a21 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/installer/VfResourceStructure.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/installer/VfResourceStructure.java
@@ -115,6 +115,7 @@
             case ASDCConfiguration.HEAT_ARTIFACT:
             case ASDCConfiguration.HEAT_NET:
             case ASDCConfiguration.OTHER:
+            case ASDCConfiguration.CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT:
                 artifactsMapByUUID.put(artifactinfo.getArtifactUUID(), vfModuleArtifact);
                 break;
             case ASDCConfiguration.VF_MODULES_METADATA:
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 ad3e2d8..6f0d2d7 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
@@ -1071,6 +1071,7 @@
                     break;
                 case ASDCConfiguration.HEAT_NET:
                 case ASDCConfiguration.OTHER:
+                case ASDCConfiguration.CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT:
                     logger.warn("{} {} {} {}", MessageEnum.ASDC_ARTIFACT_TYPE_NOT_SUPPORT.toString(),
                             vfModuleArtifact.getArtifactInfo().getArtifactType() + "(Artifact Name:"
                                     + vfModuleArtifact.getArtifactInfo().getArtifactName() + ")",
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HandlePNF.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HandlePNF.groovy
index 90c2b92..261f107 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HandlePNF.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HandlePNF.groovy
@@ -23,7 +23,6 @@
 import org.apache.commons.lang3.StringUtils
 import org.camunda.bpm.engine.delegate.DelegateExecution
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
-import org.onap.so.bpmn.common.scripts.CatalogDbUtils
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
 import org.onap.so.bpmn.core.json.JsonUtils
 import org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames
@@ -35,11 +34,10 @@
 
     ExceptionUtil exceptionUtil = new ExceptionUtil()
     JsonUtils jsonUtil = new JsonUtils()
-    CatalogDbUtils cutils = new CatalogDbUtils()
 
     @Override
     void preProcessRequest(DelegateExecution execution) {
-        msoLogger.debug("Start preProcess for HandlePNF")
+        logger.debug("Start preProcess for HandlePNF")
 
         // set correlation ID
         def resourceInput = execution.getVariable("resourceInput")
@@ -47,38 +45,38 @@
         String correlationId = jsonUtil.getJsonValue(serInput, "service.parameters.requestInputs.ont_ont_pnf_name")
         if (!StringUtils.isEmpty(correlationId)) {
             execution.setVariable(ExecutionVariableNames.CORRELATION_ID, correlationId)
-            msoLogger.debug("Found correlation id : " + correlationId)
+            logger.debug("Found correlation id : " + correlationId)
         } else {
-            msoLogger.error("== correlation id is empty ==")
+            logger.error("== correlation id is empty ==")
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "correlation id is not provided")
         }
 
         // next task will set the uuid
-        msoLogger.debug("exit preProcess for HandlePNF")
+        logger.debug("exit preProcess for HandlePNF")
     }
 
     void postProcessRequest(DelegateExecution execution) {
-        msoLogger.debug("start postProcess for HandlePNF")
+        logger.debug("start postProcess for HandlePNF")
 
-        msoLogger.debug("exit postProcess for HandlePNF")
+        logger.debug("exit postProcess for HandlePNF")
     }
 
     public void sendSyncResponse (DelegateExecution execution) {
-        msoLogger.debug(" *** sendSyncResponse *** ")
+        logger.debug(" *** sendSyncResponse *** ")
 
         try {
             String operationStatus = "finished"
             // RESTResponse for main flow
             String resourceOperationResp = """{"operationStatus":"${operationStatus}"}""".trim()
-            msoLogger.debug(" sendSyncResponse to APIH:" + "\n" + resourceOperationResp)
+            logger.debug(" sendSyncResponse to APIH:" + "\n" + resourceOperationResp)
             sendWorkflowResponse(execution, 202, resourceOperationResp)
             execution.setVariable("sentSyncResponse", true)
 
         } catch (Exception ex) {
             String msg = "Exception in sendSyncResponse:" + ex.getMessage()
-            msoLogger.debug(msg)
+            logger.debug(msg)
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
         }
-        msoLogger.debug(" ***** Exit sendSyncResponse *****")
+        logger.debug(" ***** Exit sendSyncResponse *****")
     }
 }
diff --git a/common/src/main/java/org/onap/so/client/aai/entities/uri/HttpLookupUri.java b/common/src/main/java/org/onap/so/client/aai/entities/uri/HttpLookupUri.java
index f086a6a..37d21b3 100644
--- a/common/src/main/java/org/onap/so/client/aai/entities/uri/HttpLookupUri.java
+++ b/common/src/main/java/org/onap/so/client/aai/entities/uri/HttpLookupUri.java
@@ -21,6 +21,8 @@
 package org.onap.so.client.aai.entities.uri;
 
 import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
 import java.net.URI;
 import java.util.Map;
 import java.util.Optional;
@@ -42,7 +44,7 @@
 
 public abstract class HttpLookupUri extends AAISimpleUri implements HttpAwareUri {
 
-    private Optional<String> cachedValue = Optional.empty();
+    private transient Optional<String> cachedValue = Optional.empty();
     private final AAIObjectType aaiType;
 
     protected HttpLookupUri(AAIObjectType type, Object... values) {
@@ -78,8 +80,7 @@
                 throw new GraphInventoryPayloadException("could not map payload: " + resultJson, e);
             }
         }
-        Optional<String> cachedValueOpt = this.getCachedValue();
-        return cachedValueOpt.isPresent() ? cachedValueOpt.get() : "";
+        return cachedValue.get();
     }
 
     protected Optional<String> extractRelatedLink(String jsonString) throws IOException {
@@ -139,6 +140,22 @@
         return new AAIResourcesClient();
     }
 
+    private void writeObject(ObjectOutputStream oos) throws IOException {
+
+        oos.writeUTF(this.cachedValue.orElse(""));
+    }
+
+    private void readObject(ObjectInputStream ois) throws IOException {
+
+        String value = ois.readUTF();
+        if ("".equals(value)) {
+            this.cachedValue = Optional.empty();
+        } else {
+            this.cachedValue = Optional.ofNullable(value);
+        }
+
+    }
+
     @Override
     public abstract URI buildNoNetwork();
 }
diff --git a/common/src/test/java/org/onap/so/client/aai/entities/uri/ServiceInstanceUriTest.java b/common/src/test/java/org/onap/so/client/aai/entities/uri/ServiceInstanceUriTest.java
index e829666..9bef35e 100644
--- a/common/src/test/java/org/onap/so/client/aai/entities/uri/ServiceInstanceUriTest.java
+++ b/common/src/test/java/org/onap/so/client/aai/entities/uri/ServiceInstanceUriTest.java
@@ -31,8 +31,14 @@
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
 import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.nio.file.Files;
@@ -50,9 +56,11 @@
 import org.mockito.Spy;
 import org.mockito.junit.MockitoJUnitRunner;
 import org.onap.so.client.aai.AAIClient;
+import org.onap.so.client.aai.AAIObjectType;
 import org.onap.so.client.aai.AAIResourcesClient;
 import org.onap.so.client.aai.entities.AAIResultWrapper;
 import org.onap.so.client.defaultproperties.DefaultAAIPropertiesImpl;
+import org.onap.so.client.graphinventory.entities.uri.Depth;
 import org.onap.so.client.graphinventory.exceptions.GraphInventoryPayloadException;
 import org.onap.so.client.graphinventory.exceptions.GraphInventoryUriComputationException;
 import org.onap.so.client.graphinventory.exceptions.GraphInventoryUriNotFoundException;
@@ -227,4 +235,42 @@
         exception.expect(NotFoundException.class);
         spy.build();
     }
+
+    @Test
+    public void serializeTest() throws IOException, ClassNotFoundException, GraphInventoryUriNotFoundException,
+            GraphInventoryPayloadException {
+        ServiceInstanceUri instance = new ServiceInstanceUri("key3");
+        final String content = new String(
+                Files.readAllBytes(Paths.get(AAI_JSON_FILE_LOCATION + "service-instance-pathed-query.json")));
+
+        ServiceInstanceUri spy = spy(instance);
+        AAIResourcesClient mockResourcesClient = mock(AAIResourcesClient.class);
+        AAIResultWrapper wrapper = mock(AAIResultWrapper.class);
+        when(mockResourcesClient.get(ArgumentMatchers.<AAIResourceUri>any(AAIResourceUri.class),
+                ArgumentMatchers.<Class<NotFoundException>>any())).thenReturn(wrapper);
+        when(wrapper.getJson()).thenReturn(content);
+        when(spy.getResourcesClient()).thenReturn(mockResourcesClient);
+        spy.build();
+        instance = spy.clone();
+        ByteArrayOutputStream bos = new ByteArrayOutputStream();
+
+        ObjectOutputStream objectOutputStream = new ObjectOutputStream(bos);
+        objectOutputStream.writeObject(instance);
+        objectOutputStream.flush();
+        objectOutputStream.close();
+
+        ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
+
+        ObjectInputStream objectInputStream = new ObjectInputStream(bis);
+        ServiceInstanceUri e2 = (ServiceInstanceUri) objectInputStream.readObject();
+        objectInputStream.close();
+
+        ServiceInstanceUri spy2 = spy(e2);
+
+        assertEquals(spy2.build().toString(), instance.build().toString());
+
+        // use the cached value do not call out to external system
+        verify(spy2, times(0)).getResourcesClient();
+
+    }
 }
