diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/aai/groovyflows/AAICreateResources.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/aai/groovyflows/AAICreateResources.java
index 6062129..0c519ef 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/aai/groovyflows/AAICreateResources.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/aai/groovyflows/AAICreateResources.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -24,23 +26,19 @@
 import java.util.Map;
 import java.util.Optional;
 
-import javax.ws.rs.NotFoundException;
-
-import org.onap.aai.domain.yang.ServiceInstance;
-import org.onap.aai.domain.yang.ServiceInstances;
 import org.onap.aai.domain.yang.OwningEntities;
 import org.onap.aai.domain.yang.OwningEntity;
-import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetupUtils;
 import org.onap.so.client.aai.AAIObjectPlurals;
 import org.onap.so.client.aai.AAIObjectType;
 import org.onap.so.client.aai.AAIResourcesClient;
 import org.onap.so.client.aai.entities.uri.AAIResourceUri;
 import org.onap.so.client.aai.entities.uri.AAIUriFactory;
-import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class AAICreateResources {
 	
-	private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, AAICreateResources.class);
+	private static final Logger logger = LoggerFactory.getLogger(AAICreateResources.class);
 
 	public void createAAIProject (String projectName, String serviceInstance){
 		AAIResourceUri projectURI = AAIUriFactory.createResourceUri(AAIObjectType.PROJECT, projectName);
@@ -73,7 +71,7 @@
 						.createResourceUri(AAIObjectPlurals.OWNING_ENTITY)
 						.queryParam("owning-entity-name", owningEntityName))
 				.orElseGet(() -> {
-					msoLogger.debug("No Owning Entity matched by name");
+					logger.debug("No Owning Entity matched by name");
 					return null;
 				});
 		
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java
index 477dc34..1f837eb 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java
@@ -64,6 +64,8 @@
 import org.onap.so.client.aai.entities.uri.AAIUriFactory;
 import org.onap.so.logger.MessageEnum;
 import org.onap.so.logger.MsoLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.web.util.UriUtils;
 
 import com.fasterxml.jackson.core.JsonProcessingException;
@@ -83,7 +85,7 @@
 
 	static JsonUtils jsonUtil = new JsonUtils();
 
-	private static MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, ServicePluginFactory.class);
+	private static Logger logger = LoggerFactory.getLogger(ServicePluginFactory.class);
 
 	private static ServicePluginFactory instance;
 	
@@ -227,7 +229,7 @@
 		            break;
 		        }
 		    }
-			LOGGER.debug("Get Terminal TP from InventoryOSS");
+			logger.debug("Get Terminal TP from InventoryOSS");
 			return tpInfoMap;
 		}
 		
@@ -685,8 +687,8 @@
 		try {
 			return mapper.readValue(jsonstr, type);
 		} catch (IOException e) {
-			LOGGER.error(MessageEnum.RA_NS_EXC, "", "", MsoLogger.ErrorCode.BusinessProcesssError,
-					"fail to unMarshal json", e);
+			logger.error("{} {} fail to unMarshal json", MessageEnum.RA_NS_EXC.toString(),
+				MsoLogger.ErrorCode.BusinessProcesssError.getValue(), e);
 		}
 		return null;
 	}
@@ -698,7 +700,7 @@
 		try {
 			jsonStr = mapper.writeValueAsString(srcObj);
 		} catch (JsonProcessingException e) {
-			LOGGER.debug("SdcToscaParserException", e);
+			logger.debug("SdcToscaParserException", e);
 		}
 		return jsonStr;
 	}
@@ -745,9 +747,9 @@
 				try {
 					responseContent = EntityUtils.toString(httpResponse.getEntity(), "UTF-8");
 				} catch (ParseException e) {
-					LOGGER.debug("ParseException in sendrequest", e);
+					logger.debug("ParseException in sendrequest", e);
 				} catch (IOException e) {
-					LOGGER.debug("IOException in sendrequest", e);
+					logger.debug("IOException in sendrequest", e);
 				}
 			}
 			if (null != method) {
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java
index 3108ada..4f02fe2 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -58,8 +60,7 @@
 public abstract class AbstractSdncOperationTask extends BaseTask {
 
     private static final Logger logger = LoggerFactory.getLogger(AbstractSdncOperationTask.class);
-    protected static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA, AbstractSdncOperationTask.class);
-    
+
     @Autowired
     private Environment env;
     private static final String DEFAULT_MSB_IP = "127.0.0.1";
@@ -282,7 +283,9 @@
         } catch (Exception exception) {
             logger.info("exception: AbstractSdncOperationTask.updateProgress fail!");
             logger.error("exception: AbstractSdncOperationTask.updateProgress fail:", exception);
-            msoLogger.error(MessageEnum.GENERAL_EXCEPTION, " updateProgress catch exception: ", "", this.getTaskName(), MsoLogger.ErrorCode.UnknownError, exception.getClass().toString());
+            logger.error("{} {} {} {} {}", MessageEnum.GENERAL_EXCEPTION.toString(),
+                " updateProgress catch exception: ", this.getTaskName(),
+                MsoLogger.ErrorCode.UnknownError.getValue(), exception.getClass().toString());
         }
     }
 
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncNetworkTopologyOperationTask.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncNetworkTopologyOperationTask.java
index 3ef1410..a5c609d 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncNetworkTopologyOperationTask.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncNetworkTopologyOperationTask.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -41,7 +43,7 @@
 
 @Component
 public class SdncNetworkTopologyOperationTask extends AbstractSdncOperationTask {
-    private static final Logger sdncLogger = LoggerFactory.getLogger(SdncNetworkTopologyOperationTask.class);
+    private static final Logger logger = LoggerFactory.getLogger(SdncNetworkTopologyOperationTask.class);
 
 
     private static final String URL = "/restconf/operations/GENERIC-RESOURCE-API:network-topology-operation";
@@ -50,7 +52,7 @@
     public void sendRestrequestAndHandleResponse(DelegateExecution execution,
                                                  Map<String, String> inputs,
                                                  GenericResourceApi genericResourceApiClient) throws Exception {
-        sdncLogger.info("SdncNetworkTopologyOperationTask.sendRestrequestAndHandleResponse begin!");
+        logger.info("SdncNetworkTopologyOperationTask.sendRestrequestAndHandleResponse begin!");
         updateProgress(execution, RequestsDbConstant.Status.PROCESSING, null, "40", "sendRestrequestAndHandleResponse begin!");
         NetworkRpcInputEntityBuilder builder = new NetworkRpcInputEntityBuilder();
         RpcNetworkTopologyOperationInputEntity inputEntity = builder.build(execution, inputs);
@@ -65,25 +67,25 @@
             send2SdncDirectly(HeaderUtil.DefaulAuth, inputEntity);
         }
         updateProgress(execution, RequestsDbConstant.Status.FINISHED, null, RequestsDbConstant.Progress.ONE_HUNDRED, "execute finished!");
-        sdncLogger.info("SdncNetworkTopologyOperationTask.sendRestrequestAndHandleResponse end!");
+        logger.info("SdncNetworkTopologyOperationTask.sendRestrequestAndHandleResponse end!");
     }
 
     private void send2SdncDirectly(String defaulAuth,
                                    RpcNetworkTopologyOperationInputEntity inputEntity) throws RouteException {
-        sdncLogger.info("SdncNetworkTopologyOperationTask.send2SdncDirectly begin!");
+        logger.info("SdncNetworkTopologyOperationTask.send2SdncDirectly begin!");
         String url = "http://" + getSdncIp() + ":" + getSdncPort() + URL;
         HttpPost httpPost = new HttpPost(url);
         httpPost.addHeader("Authorization", defaulAuth);
         httpPost.addHeader("Content-type", "application/json");
         String postBody = getPostbody(inputEntity);
-        msoLogger.info(MessageEnum.RA_SEND_REQUEST_SDNC, postBody, "SDNC", "");
+        logger.info("{} {} {}", MessageEnum.RA_SEND_REQUEST_SDNC, postBody, "SDNC");
         httpPost.setEntity(new StringEntity(postBody, ContentType.APPLICATION_XML));
         httpPost(url, httpPost);
-        sdncLogger.info("SdncNetworkTopologyOperationTask.send2SdncDirectly end!");
+        logger.info("SdncNetworkTopologyOperationTask.send2SdncDirectly end!");
     }
 
     private void saveOutput(DelegateExecution execution, RpcNetworkTopologyOperationOutputEntity output) throws RouteException {
-        sdncLogger.info("SdncNetworkTopologyOperationTask.saveOutput begin!");
+        logger.info("SdncNetworkTopologyOperationTask.saveOutput begin!");
         String responseCode = output.getOutput().getResponseCode();
         if (!"200".equals(responseCode)) {
             String processKey = getProcessKey(execution);
@@ -92,11 +94,11 @@
             WorkflowException workflowException = new WorkflowException(processKey, errorCode, errorMessage);
             execution.setVariable("SDNCA_SuccessIndicator", workflowException);
             updateProgress(execution, RequestsDbConstant.Status.ERROR, String.valueOf(errorCode), "100", errorMessage);
-            sdncLogger.info("exception: SdncNetworkTopologyOperationTask.saveOutput fail!");
+            logger.info("exception: SdncNetworkTopologyOperationTask.saveOutput fail!");
             throw new RouteException();
         }
 
-        sdncLogger.info("SdncNetworkTopologyOperationTask.saveOutput end!");
+        logger.info("SdncNetworkTopologyOperationTask.saveOutput end!");
     }
 
 }
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java
index dc625d3..2fd550d 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -42,7 +44,7 @@
 
 @Component
 public class SdncServiceTopologyOperationTask extends AbstractSdncOperationTask {
-    private static final Logger sdncLogger = LoggerFactory.getLogger(SdncServiceTopologyOperationTask.class);
+    private static final Logger logger = LoggerFactory.getLogger(SdncServiceTopologyOperationTask.class);
 
 
     private static final String URL = "/restconf/operations/GENERIC-RESOURCE-API:service-topology-operation";
@@ -51,7 +53,7 @@
     public void sendRestrequestAndHandleResponse(DelegateExecution execution,
                                                  Map<String, String> inputs,
                                                  GenericResourceApi genericResourceApiClient) throws Exception {
-        sdncLogger.info("SdncServiceTopologyOperationTask.sendRestrequestAndHandleResponse begin!");
+        logger.info("SdncServiceTopologyOperationTask.sendRestrequestAndHandleResponse begin!");
         updateProgress(execution, null, null, "40", "sendRestrequestAndHandleResponse begin!");
         ServiceRpcInputEntityBuilder builder = new ServiceRpcInputEntityBuilder();
         RpcServiceTopologyOperationInputEntity inputEntity = builder.build(execution, inputs);
@@ -65,26 +67,26 @@
         } else {
             send2SdncDirectly(HeaderUtil.DefaulAuth, inputEntity);
         }
-        sdncLogger.info("SdncServiceTopologyOperationTask.sendRestrequestAndHandleResponse end!");
+        logger.info("SdncServiceTopologyOperationTask.sendRestrequestAndHandleResponse end!");
 
     }
 
     private void send2SdncDirectly(String defaulAuth,
                                    RpcServiceTopologyOperationInputEntity inputEntity) throws RouteException {
-        sdncLogger.info("SdncServiceTopologyOperationTask.send2SdncDirectly begin!");
+        logger.info("SdncServiceTopologyOperationTask.send2SdncDirectly begin!");
         String url = getSdncHost() + URL;
         HttpPost httpPost = new HttpPost(url);
         httpPost.addHeader("Authorization", defaulAuth);
         httpPost.addHeader("Content-type", "application/json");
         String postBody = getPostbody(inputEntity);
-        msoLogger.info(MessageEnum.RA_SEND_REQUEST_SDNC, postBody, "SDNC", "");
+        logger.info("{} {} {}", MessageEnum.RA_SEND_REQUEST_SDNC, postBody, "SDNC");
         httpPost.setEntity(new StringEntity(postBody, ContentType.APPLICATION_XML));
         httpPost(url, httpPost);
-        sdncLogger.info("SdncServiceTopologyOperationTask.send2SdncDirectly end!");
+        logger.info("SdncServiceTopologyOperationTask.send2SdncDirectly end!");
     }
 
     private void saveOutput(DelegateExecution execution, RpcServiceTopologyOperationOutputEntity output) throws Exception {
-        sdncLogger.info("SdncServiceTopologyOperationTask.saveOutput begin!");
+        logger.info("SdncServiceTopologyOperationTask.saveOutput begin!");
         String responseCode = output.getOutput().getResponseCode();
         if (!"200".equals(responseCode)) {
             String processKey = getProcessKey(execution);
@@ -93,9 +95,9 @@
             WorkflowException workflowException = new WorkflowException(processKey, errorCode, errorMessage);
             execution.setVariable("SDNCA_SuccessIndicator", workflowException);
             updateProgress(execution, RequestsDbConstant.Status.ERROR, String.valueOf(errorCode), null, errorMessage);
-            sdncLogger.info("exception: SdncServiceTopologyOperationTask.saveOutput fail!");
+            logger.info("exception: SdncServiceTopologyOperationTask.saveOutput fail!");
             throw new RouteException();
         }
-        sdncLogger.info("SdncServiceTopologyOperationTask.saveOutput end!");
+        logger.info("SdncServiceTopologyOperationTask.saveOutput end!");
     }
 }
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnOperationClient.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnOperationClient.java
index b13d7fc..f54d669 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnOperationClient.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnOperationClient.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -31,8 +33,9 @@
 import org.onap.so.bpmn.infrastructure.workflow.serviceTask.client.entity.RpcNetworkTopologyOperationInputEntity;
 import org.onap.so.db.request.beans.ResourceOperationStatus;
 import org.onap.so.db.request.beans.ResourceOperationStatusId;
-import org.onap.so.logger.MsoLogger;
 import org.onap.so.requestsdb.RequestsDbConstant;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Component;
 
 @Component
@@ -41,7 +44,7 @@
     private static final String DEFAULT_MSB_IP = "127.0.0.1";
     private static final int DEFAULT_MSB_PORT = 10081;
 
-    private static MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.GENERAL, SdncUnderlayVpnOperationClient.class);
+    private static Logger logger = LoggerFactory.getLogger(SdncUnderlayVpnOperationClient.class);
 
     public boolean excute(String msbIp,
                        int msbPort,
