diff --git a/workflow/workflow-designer-be/src/main/java/org/onap/sdc/workflow/services/impl/WorkflowManagerImpl.java b/workflow/workflow-designer-be/src/main/java/org/onap/sdc/workflow/services/impl/WorkflowManagerImpl.java
index 2cb897f..97d8168 100644
--- a/workflow/workflow-designer-be/src/main/java/org/onap/sdc/workflow/services/impl/WorkflowManagerImpl.java
+++ b/workflow/workflow-designer-be/src/main/java/org/onap/sdc/workflow/services/impl/WorkflowManagerImpl.java
@@ -15,6 +15,8 @@
 import org.onap.sdc.workflow.services.WorkflowNameComparator;
 import org.onap.sdc.workflow.services.exceptions.EntityNotFoundException;
 import org.onap.sdc.workflow.services.impl.mappers.WorkflowMapper;
+import org.openecomp.sdc.logging.api.Logger;
+import org.openecomp.sdc.logging.api.LoggerFactory;
 import org.openecomp.sdc.versioning.ItemManager;
 import org.openecomp.sdc.versioning.types.Item;
 import org.openecomp.sdc.versioning.types.ItemStatus;
@@ -35,6 +37,7 @@
     private final ItemManager itemManager;
     private final UniqueValueService uniqueValueService;
     private final WorkflowMapper workflowMapper;
+    private static final Logger LOGGER = LoggerFactory.getLogger(WorkflowManagerImpl.class);
 
     @Autowired
     public WorkflowManagerImpl(ItemManager itemManager,
@@ -56,6 +59,7 @@
     public Workflow get(Workflow workflow) {
         Item retrievedItem = itemManager.get(workflow.getId());
         if (retrievedItem == null) {
+            LOGGER.error(String.format("Workflow with id %s was not found",workflow.getId()));
             throw new EntityNotFoundException(String.format(WORKFLOW_NOT_FOUND_ERROR_MSG, workflow.getId()));
         }
         return this.workflowMapper.itemToWorkflow(retrievedItem);
@@ -76,6 +80,7 @@
     public void update(Workflow workflow) {
         Item retrievedItem = itemManager.get(workflow.getId());
         if (retrievedItem == null) {
+            LOGGER.error(String.format("Workflow with id %s was not found",workflow.getId()));
             throw new EntityNotFoundException(String.format(WORKFLOW_NOT_FOUND_ERROR_MSG, workflow.getId()));
         }
 
diff --git a/workflow/workflow-designer-be/src/main/java/org/onap/sdc/workflow/services/impl/WorkflowVersionManagerImpl.java b/workflow/workflow-designer-be/src/main/java/org/onap/sdc/workflow/services/impl/WorkflowVersionManagerImpl.java
index 0f88d37..de9c8dd 100644
--- a/workflow/workflow-designer-be/src/main/java/org/onap/sdc/workflow/services/impl/WorkflowVersionManagerImpl.java
+++ b/workflow/workflow-designer-be/src/main/java/org/onap/sdc/workflow/services/impl/WorkflowVersionManagerImpl.java
@@ -31,6 +31,8 @@
 import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
 import org.springframework.web.multipart.MultipartFile;
+import org.openecomp.sdc.logging.api.Logger;
+import org.openecomp.sdc.logging.api.LoggerFactory;
 
 @Service("workflowVersionManager")
 public class WorkflowVersionManagerImpl implements WorkflowVersionManager {
@@ -41,7 +43,7 @@
     private final ParameterRepository parameterRepository;
     private final VersionMapper versionMapper;
     private final VersionStateMapper versionStateMapper;
-
+    private static final Logger LOGGER = LoggerFactory.getLogger(WorkflowVersionManagerImpl.class);
 
     @Autowired
     public WorkflowVersionManagerImpl(VersioningManager versioningManager, ArtifactRepository artifactRepository,
@@ -130,6 +132,9 @@
         WorkflowVersionState retrievedState =
             versionStateMapper.versionStatusToWorkflowVersionState(retrievedVersion.getStatus());
         if (WorkflowVersionState.CERTIFIED.equals(retrievedState) || retrievedState.equals(state)) {
+            LOGGER.error(String.format(
+                    "Workflow Version is certified and can not be edited.Workflow id %s and version id %s", workflowId,
+                    versionId));
             throw new VersionStateModificationException(workflowId, versionId, retrievedState, state);
         }
 
@@ -144,6 +149,8 @@
         Version retrievedVersion = getVersion(workflowId, versionId);
         if (WorkflowVersionState.CERTIFIED
             .equals(versionStateMapper.versionStatusToWorkflowVersionState(retrievedVersion.getStatus()))) {
+            LOGGER.error(String.format("Workflow Version Artifact was not found for workflow id %s and version id %s",
+                    workflowId, versionId));
             throw new VersionModificationException(workflowId, versionId);
         }
 
@@ -154,6 +161,8 @@
             versioningManager.publish(workflowId, new Version(versionId), "Update Artifact");
 
         } catch (IOException e) {
+            LOGGER.error(String.format("Upload Artifact failed for workflow id %s and version id %s",
+                    workflowId, versionId),e);
             throw new InvalidArtifactException(e.getMessage());
         }
     }
@@ -163,8 +172,10 @@
         getVersion(workflowId, versionId);
         Optional<ArtifactEntity> artifactOptional = artifactRepository.get(workflowId, versionId);
         if (!artifactOptional.isPresent()) {
+            LOGGER.error(String.format("Workflow Version Artifact was not found for workflow id %s and version id %s",
+                    workflowId, versionId));
             throw new EntityNotFoundException(
-                String.format("Artifact for workflow id %S version id %S was not found", workflowId, versionId));
+                    String.format("Artifact for workflow id %S version id %S was not found", workflowId, versionId));
         }
         return artifactOptional.get();
     }
@@ -173,6 +184,9 @@
     public void deleteArtifact(String workflowId, String versionId) {
         WorkflowVersion retrievedVersion = get(workflowId, versionId);
         if (WorkflowVersionState.CERTIFIED.equals(retrievedVersion.getState())) {
+            LOGGER.error(String.format(
+                    "Workflow Version is certified and can not be edited.Workflow id %s and version id %s", workflowId,
+                    versionId));
             throw new VersionModificationException(workflowId, versionId);
         }
 
@@ -198,6 +212,9 @@
             }
             return version;
         } catch (Exception e) {
+            LOGGER.error(String.format(
+                    "Workflow Version was not found.Workflow id %s and version id %s", workflowId,
+                    versionId),e);
             throw new EntityNotFoundException(String.format(VERSION_NOT_EXIST_MSG, versionId, workflowId));
         }
     }
