diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java
index dc5ff0d..1db0411 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java
@@ -339,7 +339,7 @@
                     workloadStack = JSON_MAPPER.treeToValue(node.at("/stacks/0"), Stack.class);
                 } else {
                     workloadStack = new Stack();
-                    workloadStack.setStackStatus(HeatStatus.NOTFOUND.toString());
+                    workloadStack.setStackStatus("NOT_FOUND");
                 }
             } catch (Exception e) {
                 logger.debug("Multicloud Get Exception mapping /stack/0: {} ", node.toString(), e);
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/mappers/StackInfoMapper.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/mappers/StackInfoMapper.java
index 8efa48c..d830e70 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/mappers/StackInfoMapper.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/mappers/StackInfoMapper.java
@@ -95,5 +95,6 @@
         heatStatusMap.put("UPDATE_IN_PROGRESS", HeatStatus.UPDATING);
         heatStatusMap.put("UPDATE_FAILED", HeatStatus.FAILED);
         heatStatusMap.put("UPDATE_COMPLETE", HeatStatus.UPDATED);
+        heatStatusMap.put("NOT_FOUND", HeatStatus.NOTFOUND);
     }
 }
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateInventoryTask.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateInventoryTask.java
index b4cdcb4..74cf7c3 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateInventoryTask.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/create/CreateInventoryTask.java
@@ -7,7 +7,7 @@
  * 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
@@ -48,6 +48,7 @@
     protected void executeExternalTask(ExternalTask externalTask, ExternalTaskService externalTaskService) {
         setupMDC(externalTask);
         boolean success = true;
+        boolean inventoryException = false;
         String auditInventoryString = externalTask.getVariable("auditInventoryResult");
         AAIObjectAuditList auditInventory = null;
         try {
@@ -61,6 +62,10 @@
                 logger.info("Executing External Task Create Inventory, Retry Number: {} \n {}", auditInventory,
                         externalTask.getRetries());
                 createInventory.createInventory(auditInventory);
+            } catch (InventoryException e) {
+                logger.error("Error during inventory of stack", e);
+                success = false;
+                inventoryException = true;
             } catch (Exception e) {
                 logger.error("Error during inventory of stack", e);
                 success = false;
@@ -68,6 +73,9 @@
             if (success) {
                 externalTaskService.complete(externalTask);
                 logger.debug("The External Task Id: {}  Successful", externalTask.getId());
+            } else if (inventoryException) {
+                logger.debug("The External Task Id: {}  Failed, Retry not needed", externalTask.getId());
+                externalTaskService.handleBpmnError(externalTask, "AAIInventoryFailure");
             } else {
                 if (externalTask.getRetries() == null) {
                     logger.debug("The External Task Id: {}  Failed, Setting Retries to Default Start Value: {}",
diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/inventory/create/CreateInventoryTaskTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/inventory/create/CreateInventoryTaskTest.java
index 03622db..8513f30 100644
--- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/inventory/create/CreateInventoryTaskTest.java
+++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/inventory/create/CreateInventoryTaskTest.java
@@ -10,6 +10,10 @@
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.MockitoAnnotations;
+import org.onap.so.client.graphinventory.GraphInventoryCommonObjectMapperProvider;
+import org.onap.so.objects.audit.AAIObjectAudit;
+import org.onap.so.objects.audit.AAIObjectAuditList;
+import com.fasterxml.jackson.core.JsonProcessingException;
 
 public class CreateInventoryTaskTest {
 
@@ -17,6 +21,9 @@
     ExternalTask externalTask;
 
     @Mock
+    CreateAAIInventory createAAIInventory;
+
+    @Mock
     ExternalTaskService externalTaskService;
 
     @InjectMocks
@@ -33,4 +40,17 @@
         inventoryTask.executeExternalTask(externalTask, externalTaskService);
         Mockito.verify(externalTaskService, times(1)).handleBpmnError(externalTask, "AAIInventoryFailure");
     }
+
+    @Test
+    public void testExecuteExternalTask_InventoryException() throws InventoryException, JsonProcessingException {
+        AAIObjectAuditList object = new AAIObjectAuditList();
+        AAIObjectAudit e = new AAIObjectAudit();
+        e.setDoesObjectExist(true);
+        object.getAuditList().add(e);
+        GraphInventoryCommonObjectMapperProvider objectMapper = new GraphInventoryCommonObjectMapperProvider();
+        doReturn(objectMapper.getMapper().writeValueAsString(e)).when(externalTask).getVariable("auditInventoryResult");
+        Mockito.doThrow(InventoryException.class).when(createAAIInventory).createInventory(Mockito.any());
+        inventoryTask.executeExternalTask(externalTask, externalTaskService);
+        Mockito.verify(externalTaskService, times(1)).handleBpmnError(externalTask, "AAIInventoryFailure");
+    }
 }
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java b/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java
index fc0197d..faa40a6 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java
@@ -62,7 +62,9 @@
 import org.onap.so.asdc.tenantIsolation.DistributionStatus;
 import org.onap.so.asdc.tenantIsolation.WatchdogDistribution;
 import org.onap.so.asdc.util.ASDCNotificationLogging;
+import org.onap.so.db.request.beans.WatchdogComponentDistributionStatus;
 import org.onap.so.db.request.beans.WatchdogDistributionStatus;
+import org.onap.so.db.request.data.repository.WatchdogComponentDistributionStatusRepository;
 import org.onap.so.db.request.data.repository.WatchdogDistributionStatusRepository;
 import org.onap.so.logger.ErrorCode;
 import org.onap.so.logger.MessageEnum;
@@ -94,6 +96,9 @@
     private WatchdogDistributionStatusRepository wdsRepo;
 
     @Autowired
+    protected WatchdogComponentDistributionStatusRepository watchdogCDStatusRepository;
+
+    @Autowired
     private ASDCConfiguration asdcConfig;
 
     @Autowired
@@ -106,6 +111,8 @@
 
     private static final String UUID_PARAM = "(UUID:";
 
+    protected static final String MSO = "SO";
+
     @Autowired
     private WatchdogDistribution wd;
 
@@ -270,6 +277,52 @@
         }
     }
 
+    protected void notifyErrorToAsdc(INotificationData iNotif, ToscaResourceStructure toscaResourceStructure,
+            DistributionStatusEnum deployStatus, VfResourceStructure resourceStructure, String errorMessage) {
+        // do csar lever first
+        this.sendCsarDeployNotification(iNotif, resourceStructure, toscaResourceStructure, deployStatus, errorMessage);
+        // at resource level
+        for (IResourceInstance resource : iNotif.getResources()) {
+            resourceStructure = new VfResourceStructure(iNotif, resource);
+            errorMessage = String.format("Resource with UUID: %s already exists", resource.getResourceUUID());
+            this.sendCsarDeployNotification(iNotif, resourceStructure, toscaResourceStructure, deployStatus,
+                    errorMessage);
+        }
+    }
+
+    protected boolean isCsarAlreadyDeployed(INotificationData iNotif, ToscaResourceStructure toscaResourceStructure) {
+        VfResourceStructure resourceStructure = null;
+        String errorMessage = "";
+        boolean csarAlreadyDeployed = false;
+        DistributionStatusEnum deployStatus = DistributionStatusEnum.DEPLOY_OK;
+        WatchdogComponentDistributionStatus wdStatus =
+                new WatchdogComponentDistributionStatus(iNotif.getDistributionID(), MSO);
+        try {
+            csarAlreadyDeployed = toscaInstaller.isCsarAlreadyDeployed(toscaResourceStructure);
+            if (csarAlreadyDeployed) {
+                deployStatus = DistributionStatusEnum.ALREADY_DEPLOYED;
+                resourceStructure = new VfResourceStructure(iNotif, null);
+                errorMessage = String.format("Csar with UUID: %s already exists",
+                        toscaResourceStructure.getToscaArtifact().getArtifactUUID());
+                wdStatus.setComponentDistributionStatus(DistributionStatusEnum.COMPONENT_DONE_OK.name());
+                watchdogCDStatusRepository.saveAndFlush(wdStatus);
+                logger.error(errorMessage);
+            }
+        } catch (ArtifactInstallerException e) {
+            deployStatus = DistributionStatusEnum.DEPLOY_ERROR;
+            resourceStructure = new VfResourceStructure(iNotif, null);
+            errorMessage = e.getMessage();
+            wdStatus.setComponentDistributionStatus(DistributionStatusEnum.COMPONENT_DONE_ERROR.name());
+            watchdogCDStatusRepository.saveAndFlush(wdStatus);
+            logger.warn("Tosca Checksums don't match, Tosca validation check failed", e);
+        }
+
+        if (deployStatus != DistributionStatusEnum.DEPLOY_OK) {
+            notifyErrorToAsdc(iNotif, toscaResourceStructure, deployStatus, resourceStructure, errorMessage);
+        }
+
+        return csarAlreadyDeployed;
+    }
 
     protected IDistributionClientDownloadResult downloadTheArtifact(IArtifactInfo artifact, String distributionId)
             throws ASDCDownloadException {
@@ -378,23 +431,14 @@
     }
 
     protected void sendCsarDeployNotification(INotificationData iNotif, ResourceStructure resourceStructure,
-            ToscaResourceStructure toscaResourceStructure, boolean deploySuccessful, String errorReason) {
+            ToscaResourceStructure toscaResourceStructure, DistributionStatusEnum statusEnum, String errorReason) {
 
         IArtifactInfo csarArtifact = toscaResourceStructure.getToscaArtifact();
 
-        if (deploySuccessful) {
+        this.sendASDCNotification(NotificationType.DEPLOY, csarArtifact.getArtifactURL(), asdcConfig.getConsumerID(),
+                resourceStructure.getNotification().getDistributionID(), statusEnum, errorReason,
+                System.currentTimeMillis());
 
-            this.sendASDCNotification(NotificationType.DEPLOY, csarArtifact.getArtifactURL(),
-                    asdcConfig.getConsumerID(), resourceStructure.getNotification().getDistributionID(),
-                    DistributionStatusEnum.DEPLOY_OK, errorReason, System.currentTimeMillis());
-
-        } else {
-
-            this.sendASDCNotification(NotificationType.DEPLOY, csarArtifact.getArtifactURL(),
-                    asdcConfig.getConsumerID(), resourceStructure.getNotification().getDistributionID(),
-                    DistributionStatusEnum.DEPLOY_ERROR, errorReason, System.currentTimeMillis());
-
-        }
     }
 
     protected void deployResourceStructure(ResourceStructure resourceStructure,
@@ -659,7 +703,7 @@
         String msoConfigPath = getMsoConfigPath();
         boolean hasVFResource = false;
         ToscaResourceStructure toscaResourceStructure = new ToscaResourceStructure(msoConfigPath);
-        boolean deploySuccessful = true;
+        DistributionStatusEnum deployStatus = DistributionStatusEnum.DEPLOY_OK;
         String errorMessage = null;
         boolean serviceDeployed = false;
 
@@ -671,6 +715,10 @@
             File csarFile = new File(filePath);
 
 
+            if (isCsarAlreadyDeployed(iNotif, toscaResourceStructure)) {
+                return;
+            }
+
             for (IResourceInstance resource : iNotif.getResources()) {
 
                 String resourceType = resource.getResourceType();
@@ -678,7 +726,8 @@
 
                 logger.info("Processing Resource Type: {}, Model UUID: {}", resourceType, resource.getResourceUUID());
 
-                if ("VF".equals(resourceType)) {
+                if ("VF".equals(resourceType) && resource.getArtifacts() != null
+                        && !resource.getArtifacts().isEmpty()) {
                     resourceStructure = new VfResourceStructure(iNotif, resource);
                 } else if ("PNF".equals(resourceType)) {
                     resourceStructure = new PnfResourceStructure(iNotif, resource);
@@ -696,7 +745,8 @@
                         logger.debug("Processing Resource Type: " + resourceType + " and Model UUID: "
                                 + resourceStructure.getResourceInstance().getResourceUUID());
 
-                        if ("VF".equals(resourceType)) {
+                        if ("VF".equals(resourceType) && resource.getArtifacts() != null
+                                && !resource.getArtifacts().isEmpty()) {
                             hasVFResource = true;
                             for (IArtifactInfo artifact : resource.getArtifacts()) {
                                 IDistributionClientDownloadResult resultArtifact =
@@ -732,7 +782,7 @@
                     }
 
                 } catch (ArtifactInstallerException e) {
-                    deploySuccessful = false;
+                    deployStatus = DistributionStatusEnum.DEPLOY_ERROR;
                     errorMessage = e.getMessage();
                     logger.error("Exception occurred", e);
                 }
@@ -745,12 +795,12 @@
                     try {
                         this.deployResourceStructure(resourceStructure, toscaResourceStructure);
                     } catch (ArtifactInstallerException e) {
-                        deploySuccessful = false;
+                        deployStatus = DistributionStatusEnum.DEPLOY_ERROR;
                         errorMessage = e.getMessage();
                         logger.error("Exception occurred", e);
                     }
                 }
-                this.sendCsarDeployNotification(iNotif, resourceStructure, toscaResourceStructure, deploySuccessful,
+                this.sendCsarDeployNotification(iNotif, resourceStructure, toscaResourceStructure, deployStatus,
                         errorMessage);
             }
 
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 ddf1f3d..b374158 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
@@ -113,6 +113,8 @@
 import org.onap.so.db.catalog.data.repository.ConfigurationResourceRepository;
 import org.onap.so.db.catalog.data.repository.CvnfcCustomizationRepository;
 import org.onap.so.db.catalog.data.repository.ExternalServiceToInternalServiceRepository;
+import org.onap.so.db.catalog.data.repository.HeatEnvironmentRepository;
+import org.onap.so.db.catalog.data.repository.HeatFilesRepository;
 import org.onap.so.db.catalog.data.repository.HeatTemplateRepository;
 import org.onap.so.db.catalog.data.repository.InstanceGroupRepository;
 import org.onap.so.db.catalog.data.repository.NetworkResourceCustomizationRepository;
@@ -122,6 +124,7 @@
 import org.onap.so.db.catalog.data.repository.ServiceProxyResourceCustomizationRepository;
 import org.onap.so.db.catalog.data.repository.ServiceRepository;
 import org.onap.so.db.catalog.data.repository.TempNetworkHeatTemplateRepository;
+import org.onap.so.db.catalog.data.repository.ToscaCsarRepository;
 import org.onap.so.db.catalog.data.repository.VFModuleCustomizationRepository;
 import org.onap.so.db.catalog.data.repository.VFModuleRepository;
 import org.onap.so.db.catalog.data.repository.VnfResourceRepository;
@@ -228,6 +231,12 @@
     protected HeatTemplateRepository heatRepo;
 
     @Autowired
+    protected HeatEnvironmentRepository heatEnvRepo;
+
+    @Autowired
+    protected HeatFilesRepository heatFilesRepo;
+
+    @Autowired
     protected NetworkResourceCustomizationRepository networkCustomizationRepo;
 
     @Autowired
@@ -244,6 +253,9 @@
     protected ExternalServiceToInternalServiceRepository externalServiceToInternalServiceRepository;
 
     @Autowired
+    protected ToscaCsarRepository toscaCsarRepo;
+
+    @Autowired
     protected PnfResourceRepository pnfResourceRepository;
 
     @Autowired
@@ -254,6 +266,31 @@
 
     protected static final Logger logger = LoggerFactory.getLogger(ToscaResourceInstaller.class);
 
+    public boolean isCsarAlreadyDeployed(ToscaResourceStructure toscaResourceStructure)
+            throws ArtifactInstallerException {
+        boolean deployed = false;
+        if (toscaResourceStructure == null) {
+            return deployed;
+        }
+
+        IArtifactInfo inputToscaCsar = toscaResourceStructure.getToscaArtifact();
+        String checkSum = inputToscaCsar.getArtifactChecksum();
+        String artifactUuid = inputToscaCsar.getArtifactUUID();
+
+        Optional<ToscaCsar> toscaCsarObj = toscaCsarRepo.findById(artifactUuid);
+        if (toscaCsarObj.isPresent()) {
+            ToscaCsar toscaCsar = toscaCsarObj.get();
+            if (!toscaCsar.getArtifactChecksum().equalsIgnoreCase(checkSum)) {
+                String errorMessage =
+                        String.format("Csar with UUID: %s already exists.Their checksums don't match", artifactUuid);
+                throw new ArtifactInstallerException(errorMessage);
+            } else if (toscaCsar.getArtifactChecksum().equalsIgnoreCase(checkSum)) {
+                deployed = true;
+            }
+        }
+        return deployed;
+    }
+
     public boolean isResourceAlreadyDeployed(ResourceStructure vfResourceStruct, boolean serviceDeployed)
             throws ArtifactInstallerException {
         boolean status = false;
@@ -1196,77 +1233,95 @@
 
     protected void createHeatTemplateFromArtifact(VfResourceStructure vfResourceStructure,
             ToscaResourceStructure toscaResourceStruct, VfModuleArtifact vfModuleArtifact) {
-        HeatTemplate heatTemplate = new HeatTemplate();
-        List<String> typeList = new ArrayList<>();
-        typeList.add(ASDCConfiguration.HEAT_NESTED);
-        typeList.add(ASDCConfiguration.HEAT_ARTIFACT);
 
-        heatTemplate.setTemplateBody(
-                verifyTheFilePrefixInArtifacts(vfModuleArtifact.getResult(), vfResourceStructure, typeList));
-        heatTemplate.setTemplateName(vfModuleArtifact.getArtifactInfo().getArtifactName());
+        HeatTemplate existingHeatTemplate =
+                heatRepo.findByArtifactUuid(vfModuleArtifact.getArtifactInfo().getArtifactUUID());
 
-        if (vfModuleArtifact.getArtifactInfo().getArtifactTimeout() != null) {
-            heatTemplate.setTimeoutMinutes(vfModuleArtifact.getArtifactInfo().getArtifactTimeout());
-        } else {
-            heatTemplate.setTimeoutMinutes(240);
+        if (existingHeatTemplate == null) {
+            HeatTemplate heatTemplate = new HeatTemplate();
+            List<String> typeList = new ArrayList<>();
+            typeList.add(ASDCConfiguration.HEAT_NESTED);
+            typeList.add(ASDCConfiguration.HEAT_ARTIFACT);
+
+            heatTemplate.setTemplateBody(
+                    verifyTheFilePrefixInArtifacts(vfModuleArtifact.getResult(), vfResourceStructure, typeList));
+            heatTemplate.setTemplateName(vfModuleArtifact.getArtifactInfo().getArtifactName());
+
+            if (vfModuleArtifact.getArtifactInfo().getArtifactTimeout() != null) {
+                heatTemplate.setTimeoutMinutes(vfModuleArtifact.getArtifactInfo().getArtifactTimeout());
+            } else {
+                heatTemplate.setTimeoutMinutes(240);
+            }
+
+            heatTemplate.setDescription(vfModuleArtifact.getArtifactInfo().getArtifactDescription());
+            heatTemplate.setVersion(BigDecimalVersion
+                    .castAndCheckNotificationVersionToString(vfModuleArtifact.getArtifactInfo().getArtifactVersion()));
+            heatTemplate.setArtifactUuid(vfModuleArtifact.getArtifactInfo().getArtifactUUID());
+
+            if (vfModuleArtifact.getArtifactInfo().getArtifactChecksum() != null) {
+                heatTemplate.setArtifactChecksum(vfModuleArtifact.getArtifactInfo().getArtifactChecksum());
+            } else {
+                heatTemplate.setArtifactChecksum(MANUAL_RECORD);
+            }
+
+            Set<HeatTemplateParam> heatParam = extractHeatTemplateParameters(vfModuleArtifact.getResult(),
+                    vfModuleArtifact.getArtifactInfo().getArtifactUUID());
+            heatTemplate.setParameters(heatParam);
+            vfModuleArtifact.setHeatTemplate(heatTemplate);
         }
-
-        heatTemplate.setDescription(vfModuleArtifact.getArtifactInfo().getArtifactDescription());
-        heatTemplate.setVersion(BigDecimalVersion
-                .castAndCheckNotificationVersionToString(vfModuleArtifact.getArtifactInfo().getArtifactVersion()));
-        heatTemplate.setArtifactUuid(vfModuleArtifact.getArtifactInfo().getArtifactUUID());
-
-        if (vfModuleArtifact.getArtifactInfo().getArtifactChecksum() != null) {
-            heatTemplate.setArtifactChecksum(vfModuleArtifact.getArtifactInfo().getArtifactChecksum());
-        } else {
-            heatTemplate.setArtifactChecksum(MANUAL_RECORD);
-        }
-
-        Set<HeatTemplateParam> heatParam = extractHeatTemplateParameters(vfModuleArtifact.getResult(),
-                vfModuleArtifact.getArtifactInfo().getArtifactUUID());
-        heatTemplate.setParameters(heatParam);
-        vfModuleArtifact.setHeatTemplate(heatTemplate);
     }
 
     protected void createHeatEnvFromArtifact(VfResourceStructure vfResourceStructure,
             VfModuleArtifact vfModuleArtifact) {
-        HeatEnvironment heatEnvironment = new HeatEnvironment();
-        heatEnvironment.setName(vfModuleArtifact.getArtifactInfo().getArtifactName());
-        List<String> typeList = new ArrayList<>();
-        typeList.add(ASDCConfiguration.HEAT);
-        typeList.add(ASDCConfiguration.HEAT_VOL);
-        heatEnvironment.setEnvironment(
-                verifyTheFilePrefixInArtifacts(vfModuleArtifact.getResult(), vfResourceStructure, typeList));
-        heatEnvironment.setDescription(vfModuleArtifact.getArtifactInfo().getArtifactDescription());
-        heatEnvironment.setVersion(BigDecimalVersion
-                .castAndCheckNotificationVersionToString(vfModuleArtifact.getArtifactInfo().getArtifactVersion()));
-        heatEnvironment.setArtifactUuid(vfModuleArtifact.getArtifactInfo().getArtifactUUID());
 
-        if (vfModuleArtifact.getArtifactInfo().getArtifactChecksum() != null) {
-            heatEnvironment.setArtifactChecksum(vfModuleArtifact.getArtifactInfo().getArtifactChecksum());
-        } else {
-            heatEnvironment.setArtifactChecksum(MANUAL_RECORD);
+        HeatEnvironment existingHeatEnvironment =
+                heatEnvRepo.findByArtifactUuid(vfModuleArtifact.getArtifactInfo().getArtifactUUID());
+
+        if (existingHeatEnvironment == null) {
+            HeatEnvironment heatEnvironment = new HeatEnvironment();
+            heatEnvironment.setName(vfModuleArtifact.getArtifactInfo().getArtifactName());
+            List<String> typeList = new ArrayList<>();
+            typeList.add(ASDCConfiguration.HEAT);
+            typeList.add(ASDCConfiguration.HEAT_VOL);
+            heatEnvironment.setEnvironment(
+                    verifyTheFilePrefixInArtifacts(vfModuleArtifact.getResult(), vfResourceStructure, typeList));
+            heatEnvironment.setDescription(vfModuleArtifact.getArtifactInfo().getArtifactDescription());
+            heatEnvironment.setVersion(BigDecimalVersion
+                    .castAndCheckNotificationVersionToString(vfModuleArtifact.getArtifactInfo().getArtifactVersion()));
+            heatEnvironment.setArtifactUuid(vfModuleArtifact.getArtifactInfo().getArtifactUUID());
+
+            if (vfModuleArtifact.getArtifactInfo().getArtifactChecksum() != null) {
+                heatEnvironment.setArtifactChecksum(vfModuleArtifact.getArtifactInfo().getArtifactChecksum());
+            } else {
+                heatEnvironment.setArtifactChecksum(MANUAL_RECORD);
+            }
+            vfModuleArtifact.setHeatEnvironment(heatEnvironment);
         }
-        vfModuleArtifact.setHeatEnvironment(heatEnvironment);
     }
 
     protected void createHeatFileFromArtifact(VfResourceStructure vfResourceStructure,
             VfModuleArtifact vfModuleArtifact, ToscaResourceStructure toscaResourceStruct) {
 
-        HeatFiles heatFile = new HeatFiles();
-        heatFile.setAsdcUuid(vfModuleArtifact.getArtifactInfo().getArtifactUUID());
-        heatFile.setDescription(vfModuleArtifact.getArtifactInfo().getArtifactDescription());
-        heatFile.setFileBody(vfModuleArtifact.getResult());
-        heatFile.setFileName(vfModuleArtifact.getArtifactInfo().getArtifactName());
-        heatFile.setVersion(BigDecimalVersion
-                .castAndCheckNotificationVersionToString(vfModuleArtifact.getArtifactInfo().getArtifactVersion()));
-        toscaResourceStruct.setHeatFilesUUID(vfModuleArtifact.getArtifactInfo().getArtifactUUID());
-        if (vfModuleArtifact.getArtifactInfo().getArtifactChecksum() != null) {
-            heatFile.setArtifactChecksum(vfModuleArtifact.getArtifactInfo().getArtifactChecksum());
-        } else {
-            heatFile.setArtifactChecksum(MANUAL_RECORD);
+        HeatFiles existingHeatFiles =
+                heatFilesRepo.findByArtifactUuid(vfModuleArtifact.getArtifactInfo().getArtifactUUID());
+
+        if (existingHeatFiles == null) {
+            HeatFiles heatFile = new HeatFiles();
+            heatFile.setAsdcUuid(vfModuleArtifact.getArtifactInfo().getArtifactUUID());
+            heatFile.setDescription(vfModuleArtifact.getArtifactInfo().getArtifactDescription());
+            heatFile.setFileBody(vfModuleArtifact.getResult());
+            heatFile.setFileName(vfModuleArtifact.getArtifactInfo().getArtifactName());
+            heatFile.setVersion(BigDecimalVersion
+                    .castAndCheckNotificationVersionToString(vfModuleArtifact.getArtifactInfo().getArtifactVersion()));
+            toscaResourceStruct.setHeatFilesUUID(vfModuleArtifact.getArtifactInfo().getArtifactUUID());
+            if (vfModuleArtifact.getArtifactInfo().getArtifactChecksum() != null) {
+                heatFile.setArtifactChecksum(vfModuleArtifact.getArtifactInfo().getArtifactChecksum());
+            } else {
+                heatFile.setArtifactChecksum(MANUAL_RECORD);
+            }
+            vfModuleArtifact.setHeatFiles(heatFile);
+
         }
-        vfModuleArtifact.setHeatFiles(heatFile);
     }
 
     protected Service createService(ToscaResourceStructure toscaResourceStructure,
@@ -2237,10 +2292,12 @@
             vfModuleCustomization.setVolumeHeatEnv(volVfModuleArtifact.getHeatEnvironment());
             vfModuleArtifact.incrementDeployedInDB();
         } else if (vfModuleArtifact.getArtifactInfo().getArtifactType().equals(ASDCConfiguration.HEAT_ENV)) {
-            if (vfModuleArtifact.getHeatEnvironment().getName().contains("volume")) {
-                vfModuleCustomization.setVolumeHeatEnv(vfModuleArtifact.getHeatEnvironment());
-            } else {
-                vfModuleCustomization.setHeatEnvironment(vfModuleArtifact.getHeatEnvironment());
+            if (vfModuleArtifact.getHeatEnvironment() != null) {
+                if (vfModuleArtifact.getHeatEnvironment().getName().contains("volume")) {
+                    vfModuleCustomization.setVolumeHeatEnv(vfModuleArtifact.getHeatEnvironment());
+                } else {
+                    vfModuleCustomization.setHeatEnvironment(vfModuleArtifact.getHeatEnvironment());
+                }
             }
             vfModuleArtifact.incrementDeployedInDB();
         } else if (vfModuleArtifact.getArtifactInfo().getArtifactType().equals(ASDCConfiguration.HEAT_ARTIFACT)) {
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 ce70a25..dd107f7 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
@@ -24,12 +24,14 @@
 import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.doThrow;
 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.util.ArrayList;
 import java.util.List;
 import org.hibernate.exception.LockAcquisitionException;
@@ -39,6 +41,7 @@
 import org.junit.rules.ExpectedException;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
+import org.onap.sdc.api.notification.IArtifactInfo;
 import org.onap.sdc.api.notification.IResourceInstance;
 import org.onap.sdc.tosca.parser.api.ISdcCsarHelper;
 import org.onap.sdc.tosca.parser.impl.SdcCsarHelperImpl;
@@ -58,15 +61,17 @@
 import org.onap.so.db.catalog.beans.ConfigurationResourceCustomization;
 import org.onap.so.db.catalog.beans.Service;
 import org.onap.so.db.catalog.beans.ServiceProxyResourceCustomization;
+import org.onap.so.db.catalog.beans.ToscaCsar;
 import org.onap.so.db.catalog.data.repository.AllottedResourceCustomizationRepository;
 import org.onap.so.db.catalog.data.repository.AllottedResourceRepository;
 import org.onap.so.db.catalog.data.repository.ConfigurationResourceCustomizationRepository;
 import org.onap.so.db.catalog.data.repository.ServiceRepository;
+import org.onap.so.db.catalog.data.repository.ToscaCsarRepository;
 import org.onap.so.db.request.beans.WatchdogComponentDistributionStatus;
 import org.onap.so.db.request.data.repository.WatchdogComponentDistributionStatusRepository;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.util.ReflectionTestUtils;
-
+import java.util.Optional;
 
 public class ToscaResourceInstallerTest extends BaseTest {
     @Autowired
@@ -117,6 +122,37 @@
     }
 
     @Test
+    public void isCsarAlreadyDeployedTest() throws ArtifactInstallerException {
+        IArtifactInfo inputCsar = mock(IArtifactInfo.class);
+        String artifactUuid = "0122c05e-e13a-4c63-b5d2-475ccf13aa74";
+        String checkSum = "MGUzNjJjMzk3OTBkYzExYzQ0MDg2ZDc2M2E2ZjZiZmY=";
+
+        doReturn(checkSum).when(inputCsar).getArtifactChecksum();
+        doReturn(artifactUuid).when(inputCsar).getArtifactUUID();
+
+        doReturn(inputCsar).when(toscaResourceStructure).getToscaArtifact();
+
+        ToscaCsar toscaCsar = mock(ToscaCsar.class);
+
+        Optional<ToscaCsar> returnValue = Optional.of(toscaCsar);
+
+        ToscaCsarRepository toscaCsarRepo = spy(ToscaCsarRepository.class);
+
+
+        doReturn(artifactUuid).when(toscaCsar).getArtifactUUID();
+        doReturn(checkSum).when(toscaCsar).getArtifactChecksum();
+        doReturn(returnValue).when(toscaCsarRepo).findById(artifactUuid);
+
+        ReflectionTestUtils.setField(toscaInstaller, "toscaCsarRepo", toscaCsarRepo);
+
+        boolean isCsarDeployed = toscaInstaller.isCsarAlreadyDeployed(toscaResourceStructure);
+        assertTrue(isCsarDeployed);
+        verify(toscaCsarRepo, times(1)).findById(artifactUuid);
+        verify(toscaResourceStructure, times(1)).getToscaArtifact();
+        verify(toscaCsar, times(2)).getArtifactChecksum();
+    }
+
+    @Test
     public void isResourceAlreadyDeployedTest() throws Exception {
         notificationData.setServiceName("serviceName");
         notificationData.setServiceVersion("123456");
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/HeatFilesRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/HeatFilesRepository.java
new file mode 100644
index 0000000..acefb75
--- /dev/null
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/HeatFilesRepository.java
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 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.db.catalog.data.repository;
+
+import org.onap.so.db.catalog.beans.HeatFiles;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.rest.core.annotation.RepositoryRestResource;
+
+@RepositoryRestResource(collectionResourceRel = "heatFiles", path = "heatFiles")
+public interface HeatFilesRepository extends JpaRepository<HeatFiles, String> {
+    HeatFiles findByArtifactUuid(String artifactUUID);
+}
