diff --git a/so-cnfm-lcm/so-cnfm-lcm-bpmn-flows/src/main/java/org/onap/so/cnfm/lcm/bpmn/flows/extclients/sdc/DeploymentItem.java b/so-cnfm-lcm/so-cnfm-lcm-bpmn-flows/src/main/java/org/onap/so/cnfm/lcm/bpmn/flows/extclients/sdc/DeploymentItem.java
index e0795c4..609a3fb 100644
--- a/so-cnfm-lcm/so-cnfm-lcm-bpmn-flows/src/main/java/org/onap/so/cnfm/lcm/bpmn/flows/extclients/sdc/DeploymentItem.java
+++ b/so-cnfm-lcm/so-cnfm-lcm-bpmn-flows/src/main/java/org/onap/so/cnfm/lcm/bpmn/flows/extclients/sdc/DeploymentItem.java
@@ -21,6 +21,7 @@
 
 import static org.onap.so.cnfm.lcm.database.beans.utils.Utils.toIndentedString;
 import java.io.Serializable;
+import java.util.List;
 import java.util.Objects;
 
 /**
@@ -36,6 +37,9 @@
     private String itemId;
     private String deploymentOrder;
 
+    private List<String> lifecycleParameters;
+
+
     public String getName() {
         return name;
     }
@@ -90,9 +94,23 @@
         return this;
     }
 
+
+    public List<String> getLifecycleParameters() {
+        return lifecycleParameters;
+    }
+
+    public void setLifecycleParameters(final List<String> lifecycleParameters) {
+        this.lifecycleParameters = lifecycleParameters;
+    }
+
+    public DeploymentItem lifecycleParameters(final List<String> lifecycleParameters) {
+        this.lifecycleParameters = lifecycleParameters;
+        return this;
+    }
+
     @Override
     public int hashCode() {
-        return Objects.hash(name, file, itemId, deploymentOrder);
+        return Objects.hash(name, file, itemId, deploymentOrder, lifecycleParameters);
     }
 
     @Override
@@ -104,7 +122,8 @@
         if (obj instanceof DeploymentItem) {
             final DeploymentItem other = (DeploymentItem) obj;
             return Objects.equals(name, other.name) && Objects.equals(file, other.file)
-                    && Objects.equals(itemId, other.itemId) && Objects.equals(deploymentOrder, other.deploymentOrder);
+                    && Objects.equals(itemId, other.itemId) && Objects.equals(deploymentOrder, other.deploymentOrder)
+                    && Objects.equals(lifecycleParameters, other.lifecycleParameters);
         }
         return false;
     }
@@ -117,6 +136,7 @@
         sb.append("    file: ").append(toIndentedString(file)).append("\n");
         sb.append("    itemId: ").append(toIndentedString(itemId)).append("\n");
         sb.append("    deploymentOrder: ").append(toIndentedString(deploymentOrder)).append("\n");
+        sb.append("    lifecycleParameters: ").append(toIndentedString(lifecycleParameters)).append("\n");
         sb.append("}");
         return sb.toString();
     }
diff --git a/so-cnfm-lcm/so-cnfm-lcm-bpmn-flows/src/main/java/org/onap/so/cnfm/lcm/bpmn/flows/extclients/sdc/SdcCsarPackageParser.java b/so-cnfm-lcm/so-cnfm-lcm-bpmn-flows/src/main/java/org/onap/so/cnfm/lcm/bpmn/flows/extclients/sdc/SdcCsarPackageParser.java
index ca14651..206226a 100644
--- a/so-cnfm-lcm/so-cnfm-lcm-bpmn-flows/src/main/java/org/onap/so/cnfm/lcm/bpmn/flows/extclients/sdc/SdcCsarPackageParser.java
+++ b/so-cnfm-lcm/so-cnfm-lcm-bpmn-flows/src/main/java/org/onap/so/cnfm/lcm/bpmn/flows/extclients/sdc/SdcCsarPackageParser.java
@@ -35,12 +35,15 @@
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.NoSuchElementException;
 import java.util.Set;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipInputStream;
+
+import com.google.gson.JsonArray;
 import org.onap.so.cnfm.lcm.bpmn.flows.exceptions.FileNotFoundInCsarException;
 import org.onap.so.cnfm.lcm.bpmn.flows.exceptions.PropertyNotFoundException;
 import org.slf4j.Logger;
@@ -120,13 +123,26 @@
         artifacts.keySet().forEach(key -> {
             final JsonObject element = artifacts.getAsJsonObject(key);
             final JsonObject artifactsProperties = child(element, "properties");
+            List<String> lcp = getLifecycleParameters(artifactsProperties);
             items.add(new DeploymentItem().name(key).itemId(getStringValue(artifactsProperties, "itemId"))
                     .file(getStringValue(element, "file"))
-                    .deploymentOrder(getStringValue(artifactsProperties, "deployment_order")));
+                    .deploymentOrder(getStringValue(artifactsProperties, "deployment_order")).lifecycleParameters(lcp));
         });
         return items;
     }
 
+    private List<String> getLifecycleParameters(JsonObject artifactsProperties) {
+        final JsonArray lcParameters = childElement(artifactsProperties, "lifecycle_parameters").getAsJsonArray();
+        final List<String> lifecycleParameters = new ArrayList<>();
+        if(lcParameters != null) {
+            final Iterator<JsonElement> it = lcParameters.iterator();
+            while(it.hasNext()){
+                lifecycleParameters.add(it.next().getAsString());
+            }
+        }
+        return lifecycleParameters;
+    }
+
     private String getAsdLocation(final ZipInputStream zipInputStream) throws IOException {
 
         try (final ByteArrayOutputStream fileContent = getFileInZip(zipInputStream, TOCSA_METADATA_FILE_PATH);) {
diff --git a/so-cnfm-lcm/so-cnfm-lcm-bpmn-flows/src/main/java/org/onap/so/cnfm/lcm/bpmn/flows/tasks/CreateAsTask.java b/so-cnfm-lcm/so-cnfm-lcm-bpmn-flows/src/main/java/org/onap/so/cnfm/lcm/bpmn/flows/tasks/CreateAsTask.java
index f19703d..b24965e 100644
--- a/so-cnfm-lcm/so-cnfm-lcm-bpmn-flows/src/main/java/org/onap/so/cnfm/lcm/bpmn/flows/tasks/CreateAsTask.java
+++ b/so-cnfm-lcm/so-cnfm-lcm-bpmn-flows/src/main/java/org/onap/so/cnfm/lcm/bpmn/flows/tasks/CreateAsTask.java
@@ -36,11 +36,13 @@
 import static org.onap.so.cnfm.lcm.model.utils.AdditionalParamsConstants.SERVICE_INSTANCE_NAME_PARAM_KEY;
 import static org.onap.so.cnfm.lcm.model.utils.AdditionalParamsConstants.TENANT_ID_PARAM_KEY;
 import java.util.Arrays;
+import java.util.ArrayList;
 import java.util.List;
-import java.time.LocalDateTime;
 import java.util.Map;
 import java.util.Optional;
 import java.util.UUID;
+import java.time.LocalDateTime;
+
 import org.camunda.bpm.engine.delegate.DelegateExecution;
 import org.onap.aai.domain.yang.GenericVnf;
 import org.onap.so.cnfm.lcm.bpmn.flows.extclients.aai.AaiServiceProvider;
@@ -51,6 +53,7 @@
 import org.onap.so.cnfm.lcm.database.beans.AsInst;
 import org.onap.so.cnfm.lcm.database.beans.JobStatusEnum;
 import org.onap.so.cnfm.lcm.database.beans.State;
+import org.onap.so.cnfm.lcm.database.beans.AsLifecycleParam;
 import org.onap.so.cnfm.lcm.database.service.DatabaseServiceProvider;
 import org.onap.so.cnfm.lcm.model.AsInstance;
 import org.onap.so.cnfm.lcm.model.AsInstance.InstantiationStateEnum;
@@ -219,6 +222,8 @@
                                     .artifactFilePath(item.getFile()).status(State.NOT_INSTANTIATED)
                                     .createTime(LocalDateTime.now()).lastUpdateTime(LocalDateTime.now())
                                     .releaseName(generateReleaseName(asInst, item));
+                    List<AsLifecycleParam> lifecycleParams = getLifeCycleParams(asDeploymentItem, item);
+                    asDeploymentItem.setAsLifecycleParams(lifecycleParams);
                     asInst.asdeploymentItems(asDeploymentItem);
                 });
             }
@@ -232,6 +237,18 @@
 
     }
 
+    private List<AsLifecycleParam> getLifeCycleParams(AsDeploymentItem asDeploymentItem, DeploymentItem deploymentItem) {
+        List<AsLifecycleParam> asLifecycleParams = new ArrayList<>();
+        if (deploymentItem.getLifecycleParameters()!= null){
+            for(String lifecycleParam: deploymentItem.getLifecycleParameters()){
+                asLifecycleParams.add(new AsLifecycleParam().asDeploymentItemInst(asDeploymentItem).asLifecycleParam(lifecycleParam));
+            }
+
+
+        }
+        return asLifecycleParams;
+    }
+
     private String generateReleaseName(AsInst asInst, DeploymentItem item) {
         return String.join("-", Arrays.asList(asInst.getName(), item.getName(), item.getItemId()))
                 .toLowerCase().replaceAll("[\\s\\_]", "-");
diff --git a/so-cnfm-lcm/so-cnfm-lcm-bpmn-flows/src/main/java/org/onap/so/cnfm/lcm/bpmn/flows/tasks/InstantiateAsTask.java b/so-cnfm-lcm/so-cnfm-lcm-bpmn-flows/src/main/java/org/onap/so/cnfm/lcm/bpmn/flows/tasks/InstantiateAsTask.java
index 4800a5a..743c52c 100644
--- a/so-cnfm-lcm/so-cnfm-lcm-bpmn-flows/src/main/java/org/onap/so/cnfm/lcm/bpmn/flows/tasks/InstantiateAsTask.java
+++ b/so-cnfm-lcm/so-cnfm-lcm-bpmn-flows/src/main/java/org/onap/so/cnfm/lcm/bpmn/flows/tasks/InstantiateAsTask.java
@@ -37,6 +37,7 @@
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.HashMap;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.NoSuchElementException;
@@ -55,6 +56,7 @@
 import org.onap.so.cnfm.lcm.bpmn.flows.service.KubConfigProvider;
 import org.onap.so.cnfm.lcm.database.beans.AsDeploymentItem;
 import org.onap.so.cnfm.lcm.database.beans.AsInst;
+import org.onap.so.cnfm.lcm.database.beans.AsLifecycleParam;
 import org.onap.so.cnfm.lcm.database.beans.State;
 import org.onap.so.cnfm.lcm.database.service.DatabaseServiceProvider;
 import org.onap.so.cnfm.lcm.model.AsInfoModificationRequestDeploymentItems;
@@ -229,7 +231,6 @@
         final Map<String, Object> lifeCycleParamMap = instantiateAsRequest.getDeploymentItems().stream()
                 .collect(Collectors.toMap(AsInfoModificationRequestDeploymentItems::getDeploymentItemsId,
                         AsInfoModificationRequestDeploymentItems::getLifecycleParameterKeyValues));
-
         asDeploymentItems.forEach(asDeploymentItem -> {
 
             final String asDeploymentItemInstId = asDeploymentItem.getAsDeploymentItemInstId();
@@ -242,10 +243,14 @@
                 abortOperation(execution, message);
             }
 
+
             @SuppressWarnings("unchecked")
             final Map<String, String> lifeCycleParams =
                     (Map<String, String>) lifeCycleParamMap.get(asDeploymentItem.getItemId());
 
+            final List<AsLifecycleParam> requiredParams = asDeploymentItem.getAsLifecycleParams();
+
+            checkForLifecycleParametersAbort(execution, lifeCycleParams, requiredParams);
             requests.add(new InstantiateDeploymentItemRequest().asInstId(asInstId)
                     .asDeploymentItemInstId(asDeploymentItemInstId).asDeploymentItemName(asDeploymentItem.getName())
                     .helmArtifactFilePath(artifactFilePath).deploymentOrder(asDeploymentItem.getDeploymentOrder())
@@ -259,6 +264,25 @@
 
     }
 
+    private void checkForLifecycleParametersAbort(final DelegateExecution execution, Map<String, String> lifeCycleParams, List<AsLifecycleParam> requiredParams){
+        if (!requiredParams.isEmpty()){
+                if (isNullOrEmptyMap(lifeCycleParams)){
+                    abortOnLifecycleParams(execution, "no lifecycle parameters in request");
+                }
+                final Iterator<AsLifecycleParam> it = requiredParams.iterator();
+                while (it.hasNext()) {
+                    final String next = it.next().getLifecycleParam();
+                    if (!lifeCycleParams.containsKey(next)) {
+                        abortOnLifecycleParams(execution, "parameter missing: " + next);
+                    }
+                }
+            }
+    }
+    private void abortOnLifecycleParams(final DelegateExecution execution, String reason) {
+        final String message =
+                                "Lifecycle parameter error, " + reason;
+                        abortOperation(execution, message);
+    }
     public void checkIfDeploymentItemsInstantiationWasSuccessful(final DelegateExecution execution) {
         logger.info("Executing checkIfDeploymentItemsInstantiationWasSuccessful");
 
@@ -375,4 +399,8 @@
         }
         return dir;
     }
+
+    public static boolean isNullOrEmptyMap(Map <? , ?> map) {
+    return (map == null || map.isEmpty());
+}
 }
diff --git a/so-cnfm-lcm/so-cnfm-lcm-bpmn-flows/src/test/java/org/onap/so/cnfm/lcm/bpmn/flows/tasks/InstantiateAsTaskTest.java b/so-cnfm-lcm/so-cnfm-lcm-bpmn-flows/src/test/java/org/onap/so/cnfm/lcm/bpmn/flows/tasks/InstantiateAsTaskTest.java
index 74327a7..411465a 100644
--- a/so-cnfm-lcm/so-cnfm-lcm-bpmn-flows/src/test/java/org/onap/so/cnfm/lcm/bpmn/flows/tasks/InstantiateAsTaskTest.java
+++ b/so-cnfm-lcm/so-cnfm-lcm-bpmn-flows/src/test/java/org/onap/so/cnfm/lcm/bpmn/flows/tasks/InstantiateAsTaskTest.java
@@ -20,48 +20,6 @@
 
 package org.onap.so.cnfm.lcm.bpmn.flows.tasks;
 
-import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
-import static com.github.tomakehurst.wiremock.client.WireMock.get;
-import static com.github.tomakehurst.wiremock.client.WireMock.notFound;
-import static com.github.tomakehurst.wiremock.client.WireMock.ok;
-import static com.github.tomakehurst.wiremock.client.WireMock.put;
-import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThrows;
-import static org.junit.Assert.assertTrue;
-import static org.onap.aaiclient.client.aai.AAIVersion.V19;
-import static org.springframework.http.HttpHeaders.ACCEPT;
-import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE;
-import static org.springframework.http.MediaType.APPLICATION_OCTET_STREAM_VALUE;
-import java.io.File;
-import java.io.IOException;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.time.LocalDateTime;
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
-import java.util.UUID;
-import org.camunda.bpm.engine.history.HistoricProcessInstance;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.onap.so.cnfm.lcm.bpmn.flows.BaseTest;
-import org.onap.so.cnfm.lcm.bpmn.flows.GsonProvider;
-import org.onap.so.cnfm.lcm.bpmn.flows.exceptions.AsRequestProcessingException;
-import org.onap.so.cnfm.lcm.bpmn.flows.service.JobExecutorService;
-import org.onap.so.cnfm.lcm.database.beans.AsDeploymentItem;
-import org.onap.so.cnfm.lcm.database.beans.AsInst;
-import org.onap.so.cnfm.lcm.database.beans.AsLcmOpOcc;
-import org.onap.so.cnfm.lcm.database.beans.Job;
-import org.onap.so.cnfm.lcm.database.beans.JobStatusEnum;
-import org.onap.so.cnfm.lcm.database.beans.OperationStateEnum;
-import org.onap.so.cnfm.lcm.database.beans.State;
-import org.onap.so.cnfm.lcm.model.InstantiateAsRequest;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.google.gson.Gson;
 import io.kubernetes.client.custom.IntOrString;
@@ -97,16 +55,66 @@
 import io.kubernetes.client.openapi.models.V1StatefulSetStatus;
 import io.kubernetes.client.openapi.models.V1StatefulSetUpdateStrategy;
 import io.kubernetes.client.util.Watch;
+import org.camunda.bpm.engine.history.HistoricProcessInstance;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.so.cnfm.lcm.bpmn.flows.BaseTest;
+import org.onap.so.cnfm.lcm.bpmn.flows.GsonProvider;
+import org.onap.so.cnfm.lcm.bpmn.flows.exceptions.AsRequestProcessingException;
+import org.onap.so.cnfm.lcm.bpmn.flows.service.JobExecutorService;
+import org.onap.so.cnfm.lcm.database.beans.AsDeploymentItem;
+import org.onap.so.cnfm.lcm.database.beans.AsInst;
+import org.onap.so.cnfm.lcm.database.beans.AsLcmOpOcc;
+import org.onap.so.cnfm.lcm.database.beans.AsLifecycleParam;
+import org.onap.so.cnfm.lcm.database.beans.Job;
+import org.onap.so.cnfm.lcm.database.beans.JobStatusEnum;
+import org.onap.so.cnfm.lcm.database.beans.OperationStateEnum;
+import org.onap.so.cnfm.lcm.database.beans.State;
+import org.onap.so.cnfm.lcm.model.InstantiateAsRequest;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.time.LocalDateTime;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.UUID;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.get;
+import static com.github.tomakehurst.wiremock.client.WireMock.notFound;
+import static com.github.tomakehurst.wiremock.client.WireMock.ok;
+import static com.github.tomakehurst.wiremock.client.WireMock.put;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertThrows;
+import static org.junit.Assert.assertTrue;
+import static org.onap.aaiclient.client.aai.AAIVersion.V19;
+import static org.springframework.http.HttpHeaders.ACCEPT;
+import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE;
+import static org.springframework.http.MediaType.APPLICATION_OCTET_STREAM_VALUE;
 
 /**
- *
  * @author Waqas Ikram (waqas.ikram@est.tech)
- *
  */
 public class InstantiateAsTaskTest extends BaseTest {
     private static final String RANDOM_UUID = UUID.randomUUID().toString();
     private static final String SERVICE_INSTANCE_ID = UUID.randomUUID().toString();
     private static final String AS_INST_ID = SERVICE_INSTANCE_ID;
+
+    private static final String SERVICE_INSTANCE_ID2 = UUID.randomUUID().toString();
+    private static final String AS_INST_ID2 = SERVICE_INSTANCE_ID2;
     private static final String ASD_NAME = "InstantiateCnfService";
     private static final String AS_INST_NAME = ASD_NAME + "-" + System.currentTimeMillis();
     private static final String ASD_ID = AS_INST_ID;
@@ -118,6 +126,8 @@
 
     private static final String AS_DEPLOYMENT_ITEM_1_INST_ID = UUID.randomUUID().toString();
     private static final String AS_DEPLOYMENT_ITEM_2_INST_ID = UUID.randomUUID().toString();
+    private static final String AS_DEPLOYMENT_ITEM_1_INST_ID2 = UUID.randomUUID().toString();
+    private static final String AS_DEPLOYMENT_ITEM_2_INST_ID2 = UUID.randomUUID().toString();
 
     @Value("${cnfm.csar.dir}")
     private String dir;
@@ -176,27 +186,7 @@
                 .willReturn(aResponse().withBody(getFileContent(getAbsolutePath(RESOURCE_ASD_PACKAGE_CSAR_PATH)))
                         .withHeader(ACCEPT, APPLICATION_OCTET_STREAM_VALUE)));
 
-        final AsInst asInst = new AsInst().asInstId(AS_INST_ID).name(AS_INST_NAME).asdId(ASD_ID)
-                .asdInvariantId(AS_INST_ID).status(State.NOT_INSTANTIATED).statusUpdatedTime(LocalDateTime.now())
-                .asApplicationName("asApplicationName").asApplicationVersion("asApplicationVersion")
-                .asProvider("asProvider").serviceInstanceId(SERVICE_INSTANCE_ID)
-                .serviceInstanceName("serviceInstanceName").cloudOwner("cloudOwner").cloudRegion("cloudRegion")
-                .tenantId("tenantId");
-
-        final String helmFile1 = "Artifacts/Deployment/HELM/sampleapp-db-operator-helm.tgz";
-        final AsDeploymentItem item1 = new AsDeploymentItem().asDeploymentItemInstId(AS_DEPLOYMENT_ITEM_1_INST_ID)
-                .asInst(asInst).status(State.NOT_INSTANTIATED).name("sampleapp-db").itemId("1").deploymentOrder(1)
-                .artifactFilePath(helmFile1).createTime(LocalDateTime.now()).lastUpdateTime(LocalDateTime.now())
-                .releaseName("testOne");
-
-        final String helmFile2 = "Artifacts/Deployment/HELM/sampleapp-services-helm.tgz";
-        final AsDeploymentItem item2 = new AsDeploymentItem().asDeploymentItemInstId(AS_DEPLOYMENT_ITEM_2_INST_ID)
-                .asInst(asInst).status(State.NOT_INSTANTIATED).name("sampleapp-services").itemId("2").deploymentOrder(2)
-                .artifactFilePath(helmFile2).createTime(LocalDateTime.now()).lastUpdateTime(LocalDateTime.now())
-                .releaseName("testTwo");
-
-        asInst.asdeploymentItems(item1);
-        asInst.asdeploymentItems(item2);
+        AsInst asInst = createAsInst(AS_INST_ID, AS_DEPLOYMENT_ITEM_1_INST_ID, AS_DEPLOYMENT_ITEM_2_INST_ID);
 
         databaseServiceProvider.saveAsInst(asInst);
 
@@ -215,11 +205,6 @@
         assertNotNull(historicProcessInstance);
         assertEquals(HistoricProcessInstance.STATE_COMPLETED, historicProcessInstance.getState());
 
-        assertTrue(Files.exists(Paths.get(dir, AS_INST_ID, item1.getAsDeploymentItemInstId())
-                .resolve(Paths.get(helmFile1).getFileName())));
-        assertTrue(Files.exists(Paths.get(dir, AS_INST_ID, item2.getAsDeploymentItemInstId())
-                .resolve(Paths.get(helmFile2).getFileName())));
-
         final Optional<AsInst> asInstOptional = databaseServiceProvider.getAsInst(asInst.getAsInstId());
         final AsInst actualAsInst = asInstOptional.get();
         assertEquals(State.INSTANTIATED, actualAsInst.getStatus());
@@ -238,12 +223,31 @@
 
         final Map<String, Integer> counter = mockedHelmClient.getCounter();
         assertEquals(2, counter.size());
-        assertEquals(Integer.valueOf(3), counter.get(item1.getReleaseName()));
-        assertEquals(Integer.valueOf(3), counter.get(item2.getReleaseName()));
+        assertEquals(Integer.valueOf(3), counter.get(asInst.getAsdeploymentItems().get(0).getReleaseName()));
+        assertEquals(Integer.valueOf(3), counter.get(asInst.getAsdeploymentItems().get(1).getReleaseName()));
 
 
     }
 
+    @Test(expected = AsRequestProcessingException.class)
+    public void testInstantiateAsWorkflow_LifecycleParametersMissing_Fail() throws InterruptedException, IOException {
+
+        wireMockServer.stubFor(get(SDC_GET_RESOURCE_URL)
+                .willReturn(aResponse().withBody(getFileContent(getAbsolutePath(RESOURCE_ASD_PACKAGE_CSAR_PATH)))
+                        .withHeader(ACCEPT, APPLICATION_OCTET_STREAM_VALUE)));
+
+        AsLifecycleParam lcp3 = new AsLifecycleParam().asLifecycleParam(".Values.extra.missing");
+        AsInst asInst1 = createAsInst(AS_INST_ID2, AS_DEPLOYMENT_ITEM_1_INST_ID2, AS_DEPLOYMENT_ITEM_2_INST_ID2);
+        asInst1.getAsdeploymentItems().get(0).asLifecycleParams(lcp3);
+
+        databaseServiceProvider.saveAsInst(asInst1);
+
+        createKubeConfigFile(asInst1);
+
+        objUnderTest.runInstantiateAsJob(asInst1.getAsInstId(), getInstantiateAsRequest());
+
+    }
+
     @Test
     public void testInstantiateAsWorkflow_UpdateAsInstState_ExceptionCase() {
 
@@ -268,6 +272,7 @@
         assertEquals(State.FAILED, asInstOptional.get().getStatus());
     }
 
+
     private void mockKubernetesClientEndpoint() {
         wireMockServer.stubFor(get(urlMatching("/apis/batch/v1/jobs\\?labelSelector.*&watch=true"))
                 .willReturn(aResponse().withBody(getJobResponse()).withHeader(ACCEPT, APPLICATION_JSON_VALUE)));
@@ -455,9 +460,40 @@
 
     }
 
+    private AsInst createAsInst(String as_inst_id, String as_deployment_item_1_id, String as_deployment_item_2_id) {
+        final AsInst asInst = new AsInst().asInstId(as_inst_id).name(AS_INST_NAME).asdId(ASD_ID)
+                .asdInvariantId(as_inst_id).status(State.NOT_INSTANTIATED).statusUpdatedTime(LocalDateTime.now())
+                .asApplicationName("asApplicationName").asApplicationVersion("asApplicationVersion")
+                .asProvider("asProvider").serviceInstanceId(as_inst_id)
+                .serviceInstanceName("serviceInstanceName").cloudOwner("cloudOwner").cloudRegion("cloudRegion")
+                .tenantId("tenantId");
 
-    private InstantiateAsRequest getInstantiateAsRequest() {
-        return new InstantiateAsRequest();
+        final String helmFile1 = "Artifacts/Deployment/HELM/sampleapp-db-operator-helm.tgz";
+        List<AsLifecycleParam> asLifecycleParams = new ArrayList<>();
+        AsLifecycleParam lcp1 = new AsLifecycleParam().asLifecycleParam(".Values.primary.service.ports.mysql");
+        AsLifecycleParam lcp2 = new AsLifecycleParam().asLifecycleParam(".Values.primary.service.nodePorts.mysql");
+        asLifecycleParams.add(lcp1);
+        asLifecycleParams.add(lcp2);
+        final AsDeploymentItem item1 = new AsDeploymentItem().asDeploymentItemInstId(as_deployment_item_1_id)
+                .asInst(asInst).status(State.NOT_INSTANTIATED).name("sampleapp-db").itemId("1").deploymentOrder(1)
+                .artifactFilePath(helmFile1).createTime(LocalDateTime.now()).lastUpdateTime(LocalDateTime.now())
+                .releaseName("testOne").asLifecycleParams(lcp1).asLifecycleParams(lcp2);
+
+        final String helmFile2 = "Artifacts/Deployment/HELM/sampleapp-services-helm.tgz";
+        final AsDeploymentItem item2 = new AsDeploymentItem().asDeploymentItemInstId(as_deployment_item_2_id)
+                .asInst(asInst).status(State.NOT_INSTANTIATED).name("sampleapp-services").itemId("2").deploymentOrder(2)
+                .artifactFilePath(helmFile2).createTime(LocalDateTime.now()).lastUpdateTime(LocalDateTime.now())
+                .releaseName("testTwo");
+
+        asInst.asdeploymentItems(item1);
+        asInst.asdeploymentItems(item2);
+        return asInst;
+    }
+
+    private InstantiateAsRequest getInstantiateAsRequest() throws FileNotFoundException {
+        BufferedReader br = new BufferedReader(new FileReader("src/test/resources/request.json"));
+        InstantiateAsRequest request = new Gson().fromJson(br, InstantiateAsRequest.class);
+        return request;
     }
 
     private Path getAbsolutePath(final String path) {
diff --git a/so-cnfm-lcm/so-cnfm-lcm-bpmn-flows/src/test/resources/request.json b/so-cnfm-lcm/so-cnfm-lcm-bpmn-flows/src/test/resources/request.json
new file mode 100644
index 0000000..042247f
--- /dev/null
+++ b/so-cnfm-lcm/so-cnfm-lcm-bpmn-flows/src/test/resources/request.json
@@ -0,0 +1,25 @@
+{
+    "deploymentItems": [
+        {
+            "deploymentItemsId": "1",
+            "lifecycleParameterKeyValues": {
+                ".Values.primary.service.ports.mysql": "dummy",
+                ".Values.primary.service.nodePorts.mysql": "dummy"
+            }
+        },
+        {
+            "deploymentItemsId": "2",
+            "lifecycleParameterKeyValues": {
+
+            }
+        }
+    ],
+    "asdExtCpdInputParams": {
+        "extCpdId": null,
+        "loadbalanceIP": null,
+        "externalIPs": [],
+        "nadNames": [],
+        "nadNamespace": null
+    },
+    "additionalParams": {}
+}
\ No newline at end of file
diff --git a/so-cnfm-lcm/so-cnfm-lcm-database-service/src/main/java/org/onap/so/cnfm/lcm/database/beans/AsDeploymentItem.java b/so-cnfm-lcm/so-cnfm-lcm-database-service/src/main/java/org/onap/so/cnfm/lcm/database/beans/AsDeploymentItem.java
index 58fae21..ef310da 100644
--- a/so-cnfm-lcm/so-cnfm-lcm-database-service/src/main/java/org/onap/so/cnfm/lcm/database/beans/AsDeploymentItem.java
+++ b/so-cnfm-lcm/so-cnfm-lcm-database-service/src/main/java/org/onap/so/cnfm/lcm/database/beans/AsDeploymentItem.java
@@ -21,8 +21,11 @@
 
 import static org.onap.so.cnfm.lcm.database.beans.utils.Utils.toIndentedString;
 import java.time.LocalDateTime;
+import java.util.ArrayList;
+import java.util.List;
 import java.util.Objects;
 import java.util.UUID;
+import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.EnumType;
@@ -31,8 +34,10 @@
 import javax.persistence.Id;
 import javax.persistence.JoinColumn;
 import javax.persistence.ManyToOne;
+import javax.persistence.OneToMany;
 import javax.persistence.Table;
 
+
 /**
  *
  * @author Waqas Ikram (waqas.ikram@est.tech)
@@ -75,6 +80,9 @@
     @Column(name = "RELEASE_NAME", nullable = false)
     private String releaseName;
 
+    @OneToMany(mappedBy = "asDeploymentItemInst", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
+    private List<AsLifecycleParam> asLifecycleParams = new ArrayList<>();
+
     public AsDeploymentItem() {
         this.asDeploymentItemInstId = UUID.randomUUID().toString();
     }
@@ -209,26 +217,39 @@
         this.releaseName = releaseName;
         return this;
     }
-    @Override
-    public int hashCode() {
-        return Objects.hash(asDeploymentItemInstId, name, itemId, deploymentOrder, artifactFilePath,
-                asInst != null ? asInst.getAsInstId() : 0, status, createTime, lastUpdateTime, releaseName);
+
+    public List<AsLifecycleParam> getAsLifecycleParams() {
+        return asLifecycleParams;
+    }
+
+    public void setAsLifecycleParams(List<AsLifecycleParam> asLifecycleParams) {
+        this.asLifecycleParams = asLifecycleParams;
+    }
+
+    public AsDeploymentItem asLifecycleParams(final AsLifecycleParam asLifecycleParam){
+        asLifecycleParam.asDeploymentItemInst(this);
+        this.asLifecycleParams.add(asLifecycleParam);
+        return this;
     }
 
     @Override
-    public boolean equals(final Object object) {
-        if (this == object)
-            return true;
-        if (object == null || getClass() != object.getClass())
-            return false;
-        final AsDeploymentItem that = (AsDeploymentItem) object;
+    public boolean equals(final Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        final AsDeploymentItem that = (AsDeploymentItem) o;
         return Objects.equals(asDeploymentItemInstId, that.asDeploymentItemInstId) && Objects.equals(name, that.name)
                 && Objects.equals(itemId, that.itemId) && Objects.equals(deploymentOrder, that.deploymentOrder)
                 && Objects.equals(artifactFilePath, that.artifactFilePath)
                 && (asInst == null ? that.asInst == null : that.asInst != null && Objects.equals(asInst, that.asInst))
                 && Objects.equals(status, that.status) && Objects.equals(createTime, that.createTime)
                 && Objects.equals(lastUpdateTime, that.lastUpdateTime)
-                && Objects.equals(releaseName, that.releaseName);
+                && Objects.equals(releaseName, that.releaseName)
+                && Objects.equals(asLifecycleParams, that.asLifecycleParams);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(asDeploymentItemInstId, name, itemId, deploymentOrder, artifactFilePath, status, asInst, createTime, lastUpdateTime, releaseName, asLifecycleParams);
     }
 
     @Override
@@ -245,7 +266,7 @@
         sb.append("    createTime: ").append(toIndentedString(createTime)).append("\n");
         sb.append("    lastUpdateTime: ").append(toIndentedString(lastUpdateTime)).append("\n");
         sb.append("    releaseName: ").append(toIndentedString(releaseName)).append("\n");
-
+        sb.append("    asLifecycleParams").append(toIndentedString(asLifecycleParams)).append("\n");
         sb.append("}");
         return sb.toString();
     }
diff --git a/so-cnfm-lcm/so-cnfm-lcm-database-service/src/main/java/org/onap/so/cnfm/lcm/database/beans/AsLifecycleParam.java b/so-cnfm-lcm/so-cnfm-lcm-database-service/src/main/java/org/onap/so/cnfm/lcm/database/beans/AsLifecycleParam.java
new file mode 100644
index 0000000..89193d1
--- /dev/null
+++ b/so-cnfm-lcm/so-cnfm-lcm-database-service/src/main/java/org/onap/so/cnfm/lcm/database/beans/AsLifecycleParam.java
@@ -0,0 +1,125 @@
+/*-
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2022 Nordix Foundation.
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.cnfm.lcm.database.beans;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+import java.util.Objects;
+import static org.onap.so.cnfm.lcm.database.beans.utils.Utils.toIndentedString;
+/**
+ *
+ * @author Gerard Nugent (gerard.nugent@est.tech)
+ *
+ */
+@Entity
+@Table(name = "AS_LIFECYCLE_PARAM")
+public class AsLifecycleParam {
+
+    @Id
+    @Column(name = "AS_LCP_ID", nullable = false)
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    private Integer asLifecycleParamId;
+
+    @ManyToOne(fetch = FetchType.LAZY)
+    @JoinColumn(name = "AS_DEP_ITEM_INST_ID", nullable = false)
+    private AsDeploymentItem asDeploymentItemInst;
+
+    @Column(name = "LIFECYCLE_PARAM")
+    private String lifecycleParam;
+
+    public AsLifecycleParam() {
+
+    }
+
+    public void setAsLifecycleParamId(final Integer asLifecycleParamId) {
+        this.asLifecycleParamId = asLifecycleParamId;
+    }
+
+    public Integer getAsLifecycleParamId() {
+        return asLifecycleParamId;
+    }
+
+    public AsLifecycleParam asLifecycleParamId(final Integer asLifecycleParamId) {
+        this.asLifecycleParamId = asLifecycleParamId;
+        return this;
+    }
+
+    public AsDeploymentItem getAsDeploymentItemInst() {
+        return asDeploymentItemInst;
+    }
+
+    public void setAsDeploymentItemInst(final AsDeploymentItem asDeploymentItemInst) {
+        this.asDeploymentItemInst = asDeploymentItemInst;
+    }
+
+    public AsLifecycleParam asDeploymentItemInst(final AsDeploymentItem asDeploymentItemInst) {
+        this.asDeploymentItemInst = asDeploymentItemInst;
+        return this;
+    }
+
+    public String getLifecycleParam() {
+        return lifecycleParam;
+    }
+
+    public void setLifecycleParam(final String lifecycleParam) {
+        this.lifecycleParam = lifecycleParam;
+    }
+
+    public AsLifecycleParam asLifecycleParam(final String lifecycleParam) {
+        this.lifecycleParam = lifecycleParam;
+        return this;
+    }
+
+
+    @Override
+    public String toString() {
+        final StringBuilder sb = new StringBuilder();
+        sb.append("class AslifecycleParam {\n");
+        sb.append("    asLifecycleParamId: ").append(toIndentedString(asLifecycleParamId)).append("\n");
+        sb.append("    asDeploymentItemInstId: ").append(asDeploymentItemInst != null ? toIndentedString(asDeploymentItemInst.getAsDeploymentItemInstId()) : null).append("\n");
+        sb.append("    lifecycleParam:  ").append(toIndentedString(lifecycleParam)).append("\n");
+        sb.append("}");
+        return sb.toString();
+    }
+
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        AsLifecycleParam that = (AsLifecycleParam) o;
+        return Objects.equals(asLifecycleParamId, that.asLifecycleParamId) && Objects.equals(asDeploymentItemInst, that.asDeploymentItemInst) && Objects.equals(lifecycleParam, that.lifecycleParam);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(asLifecycleParamId, asDeploymentItemInst, lifecycleParam);
+    }
+
+
+}
diff --git a/so-cnfm-lcm/so-cnfm-lcm-database-service/src/main/java/org/onap/so/cnfm/lcm/database/repository/AsLifecycleParamRepository.java b/so-cnfm-lcm/so-cnfm-lcm-database-service/src/main/java/org/onap/so/cnfm/lcm/database/repository/AsLifecycleParamRepository.java
new file mode 100644
index 0000000..035c25e
--- /dev/null
+++ b/so-cnfm-lcm/so-cnfm-lcm-database-service/src/main/java/org/onap/so/cnfm/lcm/database/repository/AsLifecycleParamRepository.java
@@ -0,0 +1,14 @@
+package org.onap.so.cnfm.lcm.database.repository;
+
+import org.onap.so.cnfm.lcm.database.beans.AsLifecycleParam;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+import java.util.List;
+import java.util.Optional;
+
+public interface AsLifecycleParamRepository extends JpaRepository<AsLifecycleParam, Integer> {
+
+    List<AsLifecycleParam> findByAsDeploymentItemInstAsDeploymentItemInstId(final String asDeploymentItemId);
+
+    Optional<AsLifecycleParam> findByAsLifecycleParamId(Integer asLifecycleParamId);
+}
diff --git a/so-cnfm-lcm/so-cnfm-lcm-database-service/src/main/java/org/onap/so/cnfm/lcm/database/service/DatabaseServiceProvider.java b/so-cnfm-lcm/so-cnfm-lcm-database-service/src/main/java/org/onap/so/cnfm/lcm/database/service/DatabaseServiceProvider.java
index 850eaff..93d1527 100644
--- a/so-cnfm-lcm/so-cnfm-lcm-database-service/src/main/java/org/onap/so/cnfm/lcm/database/service/DatabaseServiceProvider.java
+++ b/so-cnfm-lcm/so-cnfm-lcm-database-service/src/main/java/org/onap/so/cnfm/lcm/database/service/DatabaseServiceProvider.java
@@ -19,17 +19,19 @@
  */
 package org.onap.so.cnfm.lcm.database.service;
 
-import java.util.List;
-import java.util.Optional;
+
+
 import org.onap.so.cnfm.lcm.database.beans.AsDeploymentItem;
 import org.onap.so.cnfm.lcm.database.beans.AsInst;
 import org.onap.so.cnfm.lcm.database.beans.AsLcmOpOcc;
+import org.onap.so.cnfm.lcm.database.beans.AsLifecycleParam;
 import org.onap.so.cnfm.lcm.database.beans.Job;
 import org.onap.so.cnfm.lcm.database.beans.OperationStateEnum;
 import org.onap.so.cnfm.lcm.database.beans.State;
 import org.onap.so.cnfm.lcm.database.repository.AsDeploymentItemRepository;
 import org.onap.so.cnfm.lcm.database.repository.AsInstRepository;
 import org.onap.so.cnfm.lcm.database.repository.AsLcmOpOccRepository;
+import org.onap.so.cnfm.lcm.database.repository.AsLifecycleParamRepository;
 import org.onap.so.cnfm.lcm.database.repository.JobRepository;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -39,6 +41,9 @@
 import org.springframework.transaction.annotation.Propagation;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.util.List;
+import java.util.Optional;
+
 /**
  * @author Waqas Ikram (waqas.ikram@est.tech)
  *
@@ -54,15 +59,18 @@
 
     private final AsDeploymentItemRepository asdeploymentItemRepository;
 
+    private final AsLifecycleParamRepository aslifecyleParamRepository;
+
     private final AsLcmOpOccRepository asLcmOpOccRepository;
 
     @Autowired
     public DatabaseServiceProvider(final JobRepository jobRepository, final AsInstRepository asInstRepository,
-            final AsDeploymentItemRepository asdeploymentItemRepository,
+            final AsDeploymentItemRepository asdeploymentItemRepository, final AsLifecycleParamRepository aslifecyleParamRepository,
             final AsLcmOpOccRepository asLcmOpOccRepository) {
         this.jobRepository = jobRepository;
         this.asInstRepository = asInstRepository;
         this.asdeploymentItemRepository = asdeploymentItemRepository;
+        this.aslifecyleParamRepository = aslifecyleParamRepository;
         this.asLcmOpOccRepository = asLcmOpOccRepository;
     }
 
@@ -160,6 +168,22 @@
         asdeploymentItemRepository.deleteAsDeploymentItemUsingAsInstId(asInstId);
     }
 
+    public boolean saveAsLifecycleParam(final AsLifecycleParam aslifecyleparam) {
+        logger.info("Saving AsLifecycleParam: {} to database", aslifecyleparam);
+        return aslifecyleParamRepository.saveAndFlush(aslifecyleparam) != null;
+    }
+
+    public List<AsLifecycleParam> getAsLifecycleParamByAsDeploymentItemId(final String asDeploymentItemId) {
+        logger.info("Querying database for Aslifecycleparam using asDeploymentItemId: {}", asDeploymentItemId);
+        //NEXT
+        return aslifecyleParamRepository.findByAsDeploymentItemInstAsDeploymentItemInstId(asDeploymentItemId);
+    }
+
+    public Optional<AsLifecycleParam> getAsLifecycleParam(final Integer asLifecycleParamId) {
+        logger.info("Querying database for Aslifecycleparam using AslifecycleParamId: {}", asLifecycleParamId);
+        return aslifecyleParamRepository.findByAsLifecycleParamId(asLifecycleParamId);
+    }
+
     public boolean addAsLcmOpOcc(final AsLcmOpOcc asLcmOpOcc) {
         logger.info("Adding AsLcmOpOcc: {} to database", asLcmOpOcc);
         return asLcmOpOccRepository.saveAndFlush(asLcmOpOcc) != null;
diff --git a/so-cnfm-lcm/so-cnfm-lcm-database-service/src/main/resources/db/migration/V1_1__create_cnfm_tables.sql b/so-cnfm-lcm/so-cnfm-lcm-database-service/src/main/resources/db/migration/V1_1__create_cnfm_tables.sql
index e6bf0a1..5e75171 100644
--- a/so-cnfm-lcm/so-cnfm-lcm-database-service/src/main/resources/db/migration/V1_1__create_cnfm_tables.sql
+++ b/so-cnfm-lcm/so-cnfm-lcm-database-service/src/main/resources/db/migration/V1_1__create_cnfm_tables.sql
@@ -62,6 +62,16 @@
 	  ON UPDATE CASCADE ON DELETE CASCADE
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
+CREATE TABLE IF NOT EXISTS `AS_LIFECYCLE_PARAM` (
+  `AS_LCP_ID` INT NOT NULL AUTO_INCREMENT,
+  `AS_DEP_ITEM_INST_ID` varchar(255) NOT NULL,
+  `LIFECYCLE_PARAM` varchar(255) DEFAULT NULL,
+  PRIMARY KEY (`AS_LCP_ID`),
+  FOREIGN KEY (AS_DEP_ITEM_INST_ID)
+      REFERENCES AS_DEPLOYMENT_ITEM(AS_DEP_ITEM_INST_ID)
+      ON UPDATE CASCADE ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
 CREATE TABLE IF NOT EXISTS `AS_LCM_OP_OCCS` (
   `ID` varchar(255) NOT NULL,
   `OPERATION_STATE` varchar(255) NOT NULL,
diff --git a/so-cnfm-lcm/so-cnfm-lcm-database-service/src/test/java/org/onap/so/cnfm/lcm/database/PojoClassesTests.java b/so-cnfm-lcm/so-cnfm-lcm-database-service/src/test/java/org/onap/so/cnfm/lcm/database/PojoClassesTests.java
index db05146..58130ee 100644
--- a/so-cnfm-lcm/so-cnfm-lcm-database-service/src/test/java/org/onap/so/cnfm/lcm/database/PojoClassesTests.java
+++ b/so-cnfm-lcm/so-cnfm-lcm-database-service/src/test/java/org/onap/so/cnfm/lcm/database/PojoClassesTests.java
@@ -21,14 +21,15 @@
 
 import javax.persistence.Entity;
 import javax.persistence.Id;
+
 import org.junit.Test;
+import nl.jqno.equalsverifier.EqualsVerifier;
+import nl.jqno.equalsverifier.Warning;
 import org.onap.so.cnfm.lcm.database.beans.AsDeploymentItem;
 import org.onap.so.cnfm.lcm.database.beans.AsInst;
 import org.onap.so.cnfm.lcm.database.beans.AsLcmOpOcc;
 import org.onap.so.cnfm.lcm.database.beans.Job;
 import org.onap.so.cnfm.lcm.database.beans.JobStatus;
-import nl.jqno.equalsverifier.EqualsVerifier;
-import nl.jqno.equalsverifier.Warning;
 
 /**
  * @author Waqas Ikram (waqas.ikram@est.tech)
@@ -65,6 +66,7 @@
         EqualsVerifier.forClass(AsDeploymentItem.class)
                 .suppress(Warning.STRICT_INHERITANCE, Warning.NONFINAL_FIELDS, Warning.INHERITED_DIRECTLY_FROM_OBJECT)
                 .withPrefabValues(AsInst.class, new AsInst(), new AsInst())
+                .withPrefabValues(AsDeploymentItem.class, new AsDeploymentItem(), new AsDeploymentItem())
                 .withIgnoredAnnotations(Entity.class, Id.class).verify();
     }
 
diff --git a/so-cnfm-lcm/so-cnfm-lcm-database-service/src/test/java/org/onap/so/cnfm/lcm/database/service/DatabaseServiceProviderTest.java b/so-cnfm-lcm/so-cnfm-lcm-database-service/src/test/java/org/onap/so/cnfm/lcm/database/service/DatabaseServiceProviderTest.java
index 067b0f1..d353ea6 100644
--- a/so-cnfm-lcm/so-cnfm-lcm-database-service/src/test/java/org/onap/so/cnfm/lcm/database/service/DatabaseServiceProviderTest.java
+++ b/so-cnfm-lcm/so-cnfm-lcm-database-service/src/test/java/org/onap/so/cnfm/lcm/database/service/DatabaseServiceProviderTest.java
@@ -34,6 +34,7 @@
 import org.onap.so.cnfm.lcm.database.beans.AsInst;
 import org.onap.so.cnfm.lcm.database.beans.AsLcmOpOcc;
 import org.onap.so.cnfm.lcm.database.beans.AsLcmOpType;
+import org.onap.so.cnfm.lcm.database.beans.AsLifecycleParam;
 import org.onap.so.cnfm.lcm.database.beans.Job;
 import org.onap.so.cnfm.lcm.database.beans.JobAction;
 import org.onap.so.cnfm.lcm.database.beans.JobStatus;
@@ -167,6 +168,22 @@
         assertFalse(asdeploymentItemList.isEmpty());
         assertEquals(asInst.getAsInstId(), asdeploymentItemList.get(0).getAsInst().getAsInstId());
         assertEquals(DUMMY_NAME, asdeploymentItemList.get(0).getName());
+
+        final AsLifecycleParam aslifecycleparam =
+                new AsLifecycleParam().asDeploymentItemInst(asdeploymentItem).asLifecycleParam("TEST");
+        databaseServiceProvider.saveAsLifecycleParam(aslifecycleparam);
+
+        final Optional<AsLifecycleParam> actualLP =
+                databaseServiceProvider.getAsLifecycleParam(aslifecycleparam.getAsLifecycleParamId());
+        final AsLifecycleParam actualLifecycleParam = actualLP.get();
+        assertEquals(aslifecycleparam.getLifecycleParam(), actualLifecycleParam.getLifecycleParam());
+        assertEquals(asdeploymentItem.getAsDeploymentItemInstId(), actualLifecycleParam.getAsDeploymentItemInst().getAsDeploymentItemInstId());
+        assertEquals(aslifecycleparam.getAsLifecycleParamId(), actualLifecycleParam.getAsLifecycleParamId());
+
+        List<AsLifecycleParam> aslifecycleParamsList =
+                databaseServiceProvider.getAsLifecycleParamByAsDeploymentItemId(asdeploymentItem.getAsDeploymentItemInstId());
+        assertFalse(aslifecycleParamsList.isEmpty());
+        assertEquals(asdeploymentItem.getAsDeploymentItemInstId(), aslifecycleParamsList.get(0).getAsDeploymentItemInst().getAsDeploymentItemInstId());
     }
 
     @Test
