diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/SDNCLcmClientBuilder.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/SDNCLcmClientBuilder.java
index 0f17c54..333bf80 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/SDNCLcmClientBuilder.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/SDNCLcmClientBuilder.java
@@ -48,8 +48,6 @@
         try {
             String path = sdncLcmProperties.getPath() + operation;
             pathUri = new URI(path);
-            logger.debug("SDNC host: " + sdncLcmProperties.getHost());
-            logger.debug("SDNC API path: " + pathUri.getPath());
         } catch (Exception e) {
             String msg = "Error API path syntax: ";
             logger.error(msg, e);
@@ -57,9 +55,7 @@
         }
 
         try {
-            SDNCLcmRestClient sdncLcmRestClient = new SDNCLcmRestClient(sdncLcmProperties, pathUri);
-            logger.debug("Create SDNCLcmRestClient success");
-            return sdncLcmRestClient;
+            return new SDNCLcmRestClient(sdncLcmProperties, pathUri);
         } catch (Exception e) {
             String msg = "Create SDNCLcmRestClient failure: ";
             logger.error(msg, e);
@@ -69,9 +65,7 @@
 
     public SDNCLcmDmaapClient newSDNCLcmDmaapClient() throws SDNCLcmClientBuilderException {
         try {
-            SDNCLcmDmaapClient sdncLcmDmaapClient = new SDNCLcmDmaapClient(sdncLcmProperties);
-            logger.debug("Create SDNCLcmDmaapClient success");
-            return sdncLcmDmaapClient;
+            return new SDNCLcmDmaapClient(sdncLcmProperties);
         } catch (Exception e) {
             String msg = "Create SDNCLcmDmaapClient failure: ";
             logger.error(msg, e);
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/SDNCLcmMessageBuilder.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/SDNCLcmMessageBuilder.java
index bf1229a..4ea6850 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/SDNCLcmMessageBuilder.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/SDNCLcmMessageBuilder.java
@@ -26,7 +26,7 @@
 
 public class SDNCLcmMessageBuilder {
 
-    public static LcmFlags getSDNCFlags() {
+    public static LcmFlags buildLcmFlags() {
         LcmFlags lcmFlags = new LcmFlags();
 
         lcmFlags.setMode(SDNCConstants.LCM_FLAGS_MODE_NORMAL);
@@ -43,7 +43,7 @@
         lcmCommonHeader.setOriginatorId(SDNCConstants.SYSTEM_NAME);
         lcmCommonHeader.setRequestId(requestId);
         lcmCommonHeader.setSubRequestId(subRequestId);
-        lcmCommonHeader.setFlags(getSDNCFlags());
+        lcmCommonHeader.setFlags(buildLcmFlags());
         lcmCommonHeader.setTimestamp(Instant.now().toString());
 
         return lcmCommonHeader;
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/beans/LcmFlags.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/beans/LcmFlags.java
index 36527ec..55e0ea3 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/beans/LcmFlags.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/beans/LcmFlags.java
@@ -35,7 +35,7 @@
     private String force;
 
     @JsonProperty("ttl")
-    private int ttl;
+    private Integer ttl;
 
     public String getMode() {
         return mode;
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/beans/LcmStatus.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/beans/LcmStatus.java
index 8a2a142..3bbafca 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/beans/LcmStatus.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/beans/LcmStatus.java
@@ -29,16 +29,16 @@
 public class LcmStatus {
 
     @JsonProperty(value = "code", required = true)
-    private int code;
+    private Integer code;
 
     @JsonProperty(value = "message", required = true)
     private String message;
 
-    public int getCode() {
+    public Integer getCode() {
         return code;
     }
 
-    public void setCode(int value) {
+    public void setCode(Integer value) {
         this.code = value;
     }
 
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/beans/payload/SwToBeDownloadedElement.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/beans/payload/SwToBeDownloadedElement.java
index 1a3529d..05de9b1 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/beans/payload/SwToBeDownloadedElement.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/sdnc/lcm/beans/payload/SwToBeDownloadedElement.java
@@ -32,7 +32,7 @@
     private String swLocation;
 
     @JsonProperty(value = "swFileSize")
-    private long swFileSize;
+    private Long swFileSize;
 
     @JsonProperty(value = "swFileCompression")
     private String swFileCompression;
@@ -48,11 +48,11 @@
         this.swLocation = value;
     }
 
-    public long getSwFileSize() {
+    public Long getSwFileSize() {
         return swFileSize;
     }
 
-    public void setSwFileSize(long value) {
+    public void setSwFileSize(Long value) {
         this.swFileSize = value;
     }
 
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/sdnc/lcm/beans/payload/DownloadNESwPayloadTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/sdnc/lcm/beans/payload/DownloadNESwPayloadTest.java
index f9fa679..b99d45a 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/sdnc/lcm/beans/payload/DownloadNESwPayloadTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/sdnc/lcm/beans/payload/DownloadNESwPayloadTest.java
@@ -37,7 +37,7 @@
         SwToBeDownloadedElement swToBeDownloadedElement = new SwToBeDownloadedElement();
 
         swToBeDownloadedElement.setSwLocation("http://192.168.1.20/test.zip");
-        swToBeDownloadedElement.setSwFileSize(123456);
+        swToBeDownloadedElement.setSwFileSize(123456L);
         swToBeDownloadedElement.setSwFileCompression("ZIP");
         swToBeDownloadedElement.setSwFileFormat("binary");
 
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/decisionpoint/impl/camunda/controller/sdnc/SdncControllerDE.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/decisionpoint/impl/camunda/controller/sdnc/SdncControllerDE.java
index ed865e0..8499b6f 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/decisionpoint/impl/camunda/controller/sdnc/SdncControllerDE.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/decisionpoint/impl/camunda/controller/sdnc/SdncControllerDE.java
@@ -26,7 +26,6 @@
 import com.fasterxml.jackson.databind.ObjectMapper;
 import org.springframework.stereotype.Component;
 import org.camunda.bpm.engine.delegate.DelegateExecution;
-import org.onap.so.bpmn.core.json.JsonUtils;
 import org.onap.so.bpmn.infrastructure.decisionpoint.api.ControllerContext;
 import org.onap.so.bpmn.infrastructure.decisionpoint.impl.camunda.controller.common.SoPropertyConstants;
 import org.onap.so.bpmn.infrastructure.decisionpoint.impl.camunda.controller.LcmControllerDE;
@@ -102,13 +101,14 @@
     }
 
     private LcmOutput selectLcmOutputFromDmaapResponses(List<LcmDmaapResponse> lcmDmaapResponses, LcmInput lcmInput) {
-        String expectedCorrelationId =
-                lcmInput.getCommonHeader().getRequestId() + "-" + lcmInput.getCommonHeader().getSubRequestId();
+        String requestId = lcmInput.getCommonHeader().getRequestId();
+        String subRequestId = lcmInput.getCommonHeader().getSubRequestId();
 
         for (LcmDmaapResponse lcmDmaapResponse : lcmDmaapResponses) {
-            String correlationId = lcmDmaapResponse.getCorrelationId();
-            if (expectedCorrelationId.equals(correlationId)) {
-                return lcmDmaapResponse.getBody().getOutput();
+            LcmOutput lcmOutput = lcmDmaapResponse.getBody().getOutput();
+            if (requestId.equals(lcmOutput.getCommonHeader().getRequestId())
+                    && subRequestId.equals(lcmOutput.getCommonHeader().getSubRequestId())) {
+                return lcmOutput;
             }
         }
 
@@ -204,15 +204,13 @@
                 return null;
         }
 
-        logger.debug("SDNC LCM payload for {}: {}", lcmAction, lcmPayload);
-
         String subRequestId = UUID.randomUUID().toString();
         LcmInput lcmInput =
                 SDNCLcmMessageBuilder.buildLcmInputForPnf(requestId, subRequestId, pnfName, lcmAction, lcmPayload);
 
         ObjectMapper mapper = new ObjectMapper();
         String lcmInputMsg = mapper.writeValueAsString(lcmInput);
-        logger.debug("SDNC input message:\n" + lcmInputMsg);
+        logger.debug("SDNC input message for {}: {}", lcmAction, lcmInputMsg);
 
         return lcmInput;
     }
@@ -224,27 +222,16 @@
         }
 
         LcmStatus lcmStatus = lcmOutput.getStatus();
+        String outputPayload = lcmOutput.getPayload();
+        logger.debug("SDNC LCM output payload of action {}: {}", lcmAction, outputPayload);
 
         if (lcmStatus.getCode() == SDNCConstants.LCM_OUTPUT_SUCCESS_CODE) {
-            logger.debug("Call SDNC LCM API success: " + lcmStatus.getMessage());
+            logger.debug("Call SDNC LCM API for {} success, message: {}", lcmAction, lcmStatus.getMessage());
+            return true;
         } else {
-            logger.error("Call SDNC LCM API failure: " + lcmStatus.getMessage());
+            logger.error("Call SDNC LCM API for {} failure, message: {}", lcmAction, lcmStatus.getMessage());
+            return false;
         }
-
-        String outputPayload = lcmOutput.getPayload();
-        logger.debug("SDNC LCM action: {}, result: {}", lcmAction, outputPayload);
-        if (outputPayload != null) {
-            String result = JsonUtils.getJsonValue(outputPayload, "result");
-            if ("Success".equals(result)) {
-                logger.debug("Run SDNC LCM action {} success", lcmAction);
-                return true;
-            } else {
-                String reason = JsonUtils.getJsonValue(outputPayload, "reason");
-                logger.error("Run SDNC LCM action {} failure, reason: {}", lcmAction, reason);
-            }
-        }
-
-        return false;
     }
 
     private boolean sendLcmRequest(DelegateExecution execution, LcmInput lcmInput) {
