diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/authentication/KeystoneV3Authentication.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/authentication/KeystoneV3Authentication.java
index f717144..35c928c 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/authentication/KeystoneV3Authentication.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/authentication/KeystoneV3Authentication.java
@@ -72,9 +72,7 @@
 
         OpenStackRequest<Token> v3Request = keystoneTenantClient.tokens().authenticate(v3Credentials);
 
-        KeystoneAuthHolder holder = makeRequest(v3Request, type, region);
-
-        return holder;
+        return makeRequest(v3Request, type, region);
     }
 
     protected KeystoneAuthHolder makeRequest(OpenStackRequest<Token> v3Request, String type, String region) {
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/beans/DeploymentInfoBuilder.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/beans/DeploymentInfoBuilder.java
index 02ace56..072bf40 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/beans/DeploymentInfoBuilder.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/beans/DeploymentInfoBuilder.java
@@ -72,22 +72,22 @@
             this.errorMessage = execution.getError();
 
             // Compute the status based on the last workflow
-            if (lastAction.equals("install")) {
-                if (actionStatus.equals("terminated")) {
+            if (("install").equals(lastAction)) {
+                if (("terminated").equals(actionStatus)) {
                     this.deploymentStatus = DeploymentStatus.INSTALLED;
-                } else if (actionStatus.equals("failed")) {
+                } else if (("failed").equals(actionStatus)) {
                     this.deploymentStatus = DeploymentStatus.FAILED;
-                } else if (actionStatus.equals("started") || actionStatus.equals("pending")) {
+                } else if (("started").equals(actionStatus) || ("pending").equals(actionStatus)) {
                     this.deploymentStatus = DeploymentStatus.INSTALLING;
                 } else {
                     this.deploymentStatus = DeploymentStatus.UNKNOWN;
                 }
-            } else if (lastAction.equals("uninstall")) {
-                if (actionStatus.equals("terminated")) {
+            } else if (("uninstall").equals(lastAction)) {
+                if (("terminated").equals(actionStatus)) {
                     this.deploymentStatus = DeploymentStatus.CREATED;
-                } else if (actionStatus.equals("failed")) {
+                } else if (("failed").equals(actionStatus)) {
                     this.deploymentStatus = DeploymentStatus.FAILED;
-                } else if (actionStatus.equals("started") || actionStatus.equals("pending")) {
+                } else if (("started").equals(actionStatus) || ("pending").equals(actionStatus)) {
                     this.deploymentStatus = DeploymentStatus.UNINSTALLING;
                 } else {
                     this.deploymentStatus = DeploymentStatus.UNKNOWN;
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/exceptions/MsoCloudifyWorkflowException.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/exceptions/MsoCloudifyWorkflowException.java
index 5c2348d..2251575 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/exceptions/MsoCloudifyWorkflowException.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/exceptions/MsoCloudifyWorkflowException.java
@@ -38,8 +38,8 @@
         super(0, "Workflow Exception",
                 "Workflow " + workflowId + " failed on deployment " + deploymentId + ": " + message);
         this.workflowStatus = workflowStatus;
-        if (workflowStatus.equals("pending") || workflowStatus.equals("started") || workflowStatus.equals("cancelling")
-                || workflowStatus.equals("force_cancelling")) {
+        if (("pending").equals(workflowStatus) || ("started").equals(workflowStatus)
+                || ("cancelling").equals(workflowStatus) || ("force_cancelling").equals(workflowStatus)) {
             workflowStillRunning = true;
         }
     }
diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/QueryAllottedResourceCustomization.java b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/QueryAllottedResourceCustomization.java
index e550394..c1acc31 100644
--- a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/QueryAllottedResourceCustomization.java
+++ b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/QueryAllottedResourceCustomization.java
@@ -104,7 +104,7 @@
 
                 first = false;
 
-                boolean arNull = o.getAllottedResource() == null ? true : false;
+                boolean arNull = o.getAllottedResource() == null;
 
                 put(valueMap, "MODEL_NAME", arNull ? null : o.getAllottedResource().getModelName());
                 put(valueMap, "MODEL_UUID", arNull ? null : o.getAllottedResource().getModelUUID());
diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/QueryServiceNetworks.java b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/QueryServiceNetworks.java
index 96ea797..5573b23 100644
--- a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/QueryServiceNetworks.java
+++ b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/QueryServiceNetworks.java
@@ -104,7 +104,7 @@
             if (first)
                 sb.append("\n");
             first = false;
-            boolean nrNull = o.getNetworkResource() == null ? true : false;
+            boolean nrNull = o.getNetworkResource() == null;
             put(valueMap, "MODEL_NAME", nrNull ? null : o.getNetworkResource().getModelName());
             put(valueMap, "MODEL_UUID", nrNull ? null : o.getNetworkResource().getModelUUID());
             put(valueMap, "MODEL_INVARIANT_ID", nrNull ? null : o.getNetworkResource().getModelInvariantUUID());
diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/QueryServiceVnfs.java b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/QueryServiceVnfs.java
index b1bdeda..f786f25 100644
--- a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/QueryServiceVnfs.java
+++ b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/QueryServiceVnfs.java
@@ -101,7 +101,7 @@
                 sb.append("\n");
             first = false;
 
-            boolean vrNull = o.getVnfResources() == null ? true : false;
+            boolean vrNull = o.getVnfResources() == null;
 
             put(valueMap, "MODEL_NAME", vrNull ? null : o.getVnfResources().getModelName());
             put(valueMap, "MODEL_UUID", vrNull ? null : o.getVnfResources().getModelUUID());
diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/QueryVfModule.java b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/QueryVfModule.java
index 1dec9ce..1604e99 100644
--- a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/QueryVfModule.java
+++ b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/catalogrest/QueryVfModule.java
@@ -97,7 +97,7 @@
                 sb.append("\n");
             first = false;
 
-            boolean vfNull = o.getVfModule() == null ? true : false;
+            boolean vfNull = o.getVfModule() == null;
             boolean hasVolumeGroup = false;
             HeatEnvironment envt = o.getVolumeHeatEnv();
             if (envt != null) {
@@ -109,10 +109,10 @@
             put(valueMap, "MODEL_INVARIANT_ID", vfNull ? null : o.getVfModule().getModelInvariantUUID());
             put(valueMap, "MODEL_VERSION", vfNull ? null : o.getVfModule().getModelVersion());
             put(valueMap, "MODEL_CUSTOMIZATION_UUID", o.getModelCustomizationUUID());
-            put(valueMap, "IS_BASE", vfNull ? false : o.getVfModule().getIsBase() ? true : false);
+            put(valueMap, "IS_BASE", !vfNull && (o.getVfModule().getIsBase()));
             put(valueMap, "VF_MODULE_LABEL", o.getLabel());
             put(valueMap, "INITIAL_COUNT", o.getInitialCount());
-            put(valueMap, "HAS_VOLUME_GROUP", new Boolean(hasVolumeGroup));
+            put(valueMap, "HAS_VOLUME_GROUP", hasVolumeGroup);
 
             sb.append(sep).append(this.setTemplate(TEMPLATE, valueMap));
             sep = ",\n";
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
index b59a1fa..bac41a1 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
@@ -6,6 +6,7 @@
  * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
  * ================================================================================
  * Modifications Copyright (c) 2019 Samsung
+ * Modifications Copyright (c) 2019 IBM
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -66,7 +67,6 @@
 import org.onap.so.logger.ErrorCode;
 import org.onap.so.heatbridge.HeatBridgeApi;
 import org.onap.so.heatbridge.HeatBridgeImpl;
-import org.onap.so.heatbridge.openstack.api.OpenstackClient;
 import org.onap.so.logger.MessageEnum;
 import org.onap.so.openstack.beans.HeatStatus;
 import org.onap.so.openstack.beans.StackInfo;
@@ -189,7 +189,7 @@
         String vfModuleId = "";
         // Create a hook here to catch shortcut createVf requests:
         if (requestType != null && requestType.startsWith("VFMOD")) {
-            logger.debug("Calling createVfModule from createVnf -- requestType=" + requestType);
+            logger.debug("Calling createVfModule from createVnf -- requestType={}", requestType);
             String newRequestType = requestType.substring(5);
             String vfVolGroupHeatStackId = "";
             String vfBaseHeatStackId = "";
@@ -251,13 +251,11 @@
             Holder<Boolean> vnfExists, Holder<String> vnfId, Holder<VnfStatus> status,
             Holder<Map<String, String>> outputs) throws VnfException {
 
-        logger.debug("Querying VNF {} in {}", vnfName, cloudSiteId + "/" + tenantId);
+        logger.debug("Querying VNF {} in {}/{}", vnfName, cloudSiteId, tenantId);
 
         // Will capture execution time for metrics
-        long startTime = System.currentTimeMillis();
 
-        StackInfo heatStack = null;
-        long subStartTime = System.currentTimeMillis();
+        StackInfo heatStack;
         try {
             heatStack = heat.queryStack(cloudSiteId, cloudOwner, tenantId, vnfName);
         } catch (MsoException me) {
@@ -310,14 +308,7 @@
             throws VnfException {
 
         logger.debug("Deleting VNF {} in {}", vnfName, cloudSiteId + "/" + tenantId);
-        // Will capture execution time for metrics
-        long startTime = System.currentTimeMillis();
 
-        // Use the MsoHeatUtils to delete the stack. Set the polling flag to true.
-        // The possible outcomes of deleteStack are a StackInfo object with status
-        // of NOTFOUND (on success) or FAILED (on error). Also, MsoOpenstackException
-        // could be thrown.
-        long subStartTime = System.currentTimeMillis();
         try {
             heat.deleteStack(tenantId, cloudOwner, cloudSiteId, vnfName, true);
         } catch (MsoException me) {
@@ -344,7 +335,6 @@
      */
     @Override
     public void rollbackVnf(VnfRollback rollback) throws VnfException {
-        long startTime = System.currentTimeMillis();
         // rollback may be null (e.g. if stack already existed when Create was called)
         if (rollback == null) {
             logger.info(MessageEnum.RA_ROLLBACK_NULL.toString(), OPENSTACK, "rollbackVnf");
@@ -437,13 +427,13 @@
             logger.debug(" HeatBridgeMain.py returned {} with code {}", wait, p.exitValue());
             return wait && p.exitValue() == 0;
         } catch (IOException e) {
-            logger.debug(" HeatBridgeMain.py failed with IO Exception! " + e);
+            logger.debug(" HeatBridgeMain.py failed with IO Exception! {}", e);
             return false;
         } catch (RuntimeException e) {
-            logger.debug(" HeatBridgeMain.py failed during runtime!" + e);
+            logger.debug(" HeatBridgeMain.py failed during runtime! {}", e);
             return false;
         } catch (Exception e) {
-            logger.debug(" HeatBridgeMain.py failed for unknown reasons! " + e);
+            logger.debug(" HeatBridgeMain.py failed for unknown reasons! {}", e);
             return false;
         }
     }
@@ -461,7 +451,6 @@
             HeatBridgeApi heatBridgeClient =
                     new HeatBridgeImpl(new AAIResourcesClient(), cloudIdentity, cloudOwner, cloudSiteId, tenantId);
 
-            OpenstackClient openstackClient = heatBridgeClient.authenticate();
             List<Resource> stackResources = heatBridgeClient.queryNestedHeatStackResources(heatStackId);
 
             List<Server> osServers = heatBridgeClient.getAllOpenstackServers(stackResources);
@@ -590,7 +579,7 @@
                 useMCUuid = false;
                 mcu = "";
             } else {
-                logger.debug("Found modelCustomizationUuid! Will use that: " + mcu);
+                logger.debug("Found modelCustomizationUuid! Will use that: {}", mcu);
                 useMCUuid = true;
             }
         }
@@ -1277,7 +1266,6 @@
             logger.debug("VF Module {} successfully created", vfModuleName);
             // call heatbridge
             heatbridge(heatStack, cloudOwner, cloudSiteId, tenantId, genericVnfName, vfModuleId);
-            return;
         } catch (Exception e) {
             logger.debug("unhandled exception in create VF", e);
             throw new VnfException("Exception during create VF " + e.getMessage());
@@ -1290,7 +1278,6 @@
 
         logger.debug("Deleting VF {} in ", vnfName, cloudOwner + "/" + cloudSiteId + "/" + tenantId);
         // Will capture execution time for metrics
-        long startTime = System.currentTimeMillis();
 
         // 1702 capture the output parameters on a delete
         // so we'll need to query first
@@ -1323,11 +1310,6 @@
                     msoRequest, failRequestOnValetFailure);
         }
 
-        // Use the MsoHeatUtils to delete the stack. Set the polling flag to true.
-        // The possible outcomes of deleteStack are a StackInfo object with status
-        // of NOTFOUND (on success) or FAILED (on error). Also, MsoOpenstackException
-        // could be thrown.
-        long subStartTime = System.currentTimeMillis();
         try {
             heat.deleteStack(tenantId, cloudOwner, cloudSiteId, vnfName, true);
         } catch (MsoException me) {
@@ -2033,7 +2015,6 @@
 
         outputs.value = copyStringOutputs(heatStack.getOutputs());
         rollback.value = vfRollback;
-        return;
     }
 
     private String getVfModuleNameFromModuleStackId(String vfModuleStackId) {
@@ -2199,13 +2180,13 @@
                         Map<String, Object> newInputs = vur.getParameters();
                         if (newInputs != null) {
                             Map<String, Object> oldGold = goldenInputs;
-                            logger.debug("parameters before being modified by valet:{}", oldGold.toString());
-                            goldenInputs = new HashMap<String, Object>();
+                            logger.debug("parameters before being modified by valet:{}", oldGold);
+                            goldenInputs = new HashMap<>();
                             for (String key : newInputs.keySet()) {
                                 goldenInputs.put(key, newInputs.get(key));
                             }
                             valetModifiedParamsHolder.value = goldenInputs;
-                            logger.debug("parameters after being modified by valet:{}", goldenInputs.toString());
+                            logger.debug("parameters after being modified by valet:{}", goldenInputs);
                             valetSucceeded = true;
                         }
                     } else {
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java
index 21ce06e..7d412b7 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java
@@ -5,7 +5,7 @@
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
  * ================================================================================
- * Modifications Copyright (C) 2018 IBM.
+ * Modifications Copyright (C) 2019 IBM.
  * Modifications Copyright (c) 2019 Samsung
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -77,13 +77,12 @@
     private static Logger logger = LoggerFactory.getLogger(SDNCRestClient.class);
 
     private static final String EXCEPTION_MSG = "Exception while evaluate xpath";
-    private static final String MSO_INTERNAL_ERROR = "MsoInternalError";
     private static final String CAMUNDA = "Camunda";
 
     @Async
     public void executeRequest(SDNCAdapterRequest bpelRequest) {
 
-        logger.debug("BPEL Request:" + bpelRequest.toString());
+        logger.debug("BPEL Request: {}", bpelRequest);
 
         // Added delay to allow completion of create request to SDNC
         // before executing activate of create request.
@@ -96,8 +95,6 @@
             Thread.currentThread().interrupt();
         }
 
-        String action = bpelRequest.getRequestHeader().getSvcAction();
-        String operation = bpelRequest.getRequestHeader().getSvcOperation();
         String bpelReqId = bpelRequest.getRequestHeader().getRequestId();
         String callbackUrl = bpelRequest.getRequestHeader().getCallbackUrl();
 
@@ -118,12 +115,9 @@
             Document reqDoc = node.getOwnerDocument();
             sdncReqBody = Utils.genSdncPutReq(reqDoc, rt);
         }
-        long sdncStartTime = System.currentTimeMillis();
         SDNCResponse sdncResp = getSdncResp(sdncReqBody, rt);
         logger.debug("Got the SDNC Response: {}", sdncResp.getSdncRespXml());
-        long bpelStartTime = System.currentTimeMillis();
         sendRespToBpel(callbackUrl, sdncResp);
-        return;
     }
 
     public SDNCResponse getSdncResp(String sdncReqBody, RequestTunables rt) {
@@ -288,7 +282,6 @@
             try {
                 wsdlUrl = new URL(bpelUrl);
             } catch (MalformedURLException e1) {
-                error = "Caught exception initializing Callback wsdl " + e1.getMessage();
                 logger.error("{} {} {} {}", MessageEnum.RA_INIT_CALLBACK_WSDL_ERR.toString(), CAMUNDA,
                         ErrorCode.DataError.getValue(), "Exception initializing Callback wsdl", e1);
 
@@ -317,7 +310,6 @@
                 reqCtx.put(MessageContext.HTTP_REQUEST_HEADERS, headers);
                 headers.put("Authorization", Collections.singletonList(basicAuth));
             } catch (Exception e2) {
-                error = "Unable to set authorization in callback request " + e2.getMessage();
                 logger.error("{} {} {} {}", MessageEnum.RA_SET_CALLBACK_AUTH_EXC.toString(), CAMUNDA,
                         ErrorCode.BusinessProcesssError.getValue(),
                         "Exception - Unable to set authorization in callback request", e2);
@@ -333,6 +325,5 @@
                     MessageEnum.RA_CALLBACK_BPEL_EXC.toString(), error, e);
         }
         logger.info(MessageEnum.RA_CALLBACK_BPEL_COMPLETE.name(), CAMUNDA);
-        return;
     }
 }
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExtractPojosForBB.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExtractPojosForBB.java
index 4332a6c..86bbead 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExtractPojosForBB.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExtractPojosForBB.java
@@ -47,7 +47,7 @@
         return extractByKey(execution, key, execution.getLookupMap().get(key));
     }
 
-    public <T> T extractByKey(BuildingBlockExecution execution, ResourceKey key, String value)
+    protected <T> T extractByKey(BuildingBlockExecution execution, ResourceKey key, String value)
             throws BBObjectNotFoundException {
 
         Optional<T> result = Optional.empty();
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/HomingV2.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/HomingV2.java
index 513ff74..4e74e5d 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/HomingV2.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/HomingV2.java
@@ -55,7 +55,7 @@
     private boolean isOof(BuildingBlockExecution execution) {
         for (Map<String, Object> params : execution.getGeneralBuildingBlock().getRequestContext().getRequestParameters()
                 .getUserParams()) {
-            if (params.containsKey(HOMINGSOLUTION) && params.get(HOMINGSOLUTION).equals("oof")) {
+            if (params.containsKey(HOMINGSOLUTION) && ("oof").equals(params.get(HOMINGSOLUTION))) {
                 return true;
             }
         }
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/OofHomingV2.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/OofHomingV2.java
index 2696313..d5a085a 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/OofHomingV2.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/OofHomingV2.java
@@ -81,6 +81,7 @@
 @Component("OofHoming")
 public class OofHomingV2 {
 
+    public static final String ERROR_WHILE_PREPARING_OOF_REQUEST = " Error - while preparing oof request: ";
     private static final Logger logger = LoggerFactory.getLogger(OofHomingV2.class);
     private JsonUtils jsonUtils = new JsonUtils();
     @Autowired
@@ -91,13 +92,9 @@
     private OofValidator oofValidator;
     @Autowired
     private ExceptionBuilder exceptionUtil;
-    private static final String MODEL_NAME = "modelName";
     private static final String MODEL_INVARIANT_ID = "modelInvariantId";
     private static final String MODEL_VERSION_ID = "modelVersionId";
-    private static final String MODEL_VERSION = "modelVersion";
     private static final String SERVICE_RESOURCE_ID = "serviceResourceId";
-    private static final String RESOURCE_MODULE_NAME = "resourceModuleName";
-    private static final String RESOURCE_MODEL_INFO = "resourceModelInfo";
     private static final String IDENTIFIER_TYPE = "identifierType";
     private static final String SOLUTIONS = "solutions";
     private static final String RESOURCE_MISSING_DATA = "Resource does not contain: ";
@@ -128,7 +125,7 @@
 
             OofRequest oofRequest = new OofRequest();
 
-            RequestInfo requestInfo = (RequestInfo) buildRequestInfo(requestId, timeout);
+            RequestInfo requestInfo = buildRequestInfo(requestId, timeout);
             oofRequest.setRequestInformation(requestInfo);
 
             ServiceInfo serviceInfo = buildServiceInfo(serviceInstance);
@@ -157,13 +154,13 @@
 
             logger.trace("Completed Oof Homing Call Oof");
         } catch (BpmnError e) {
-            logger.debug(" Error - while preparing oof request: " + e.getStackTrace());
+            logger.debug(ERROR_WHILE_PREPARING_OOF_REQUEST + e.getStackTrace());
             exceptionUtil.buildAndThrowWorkflowException(execution, Integer.parseInt(e.getErrorCode()), e.getMessage());
         } catch (BadResponseException e) {
-            logger.debug(" Error - while preparing oof request: " + e.getStackTrace());
+            logger.debug(ERROR_WHILE_PREPARING_OOF_REQUEST + e.getStackTrace());
             exceptionUtil.buildAndThrowWorkflowException(execution, 400, e.getMessage());
         } catch (Exception e) {
-            logger.debug(" Error - while preparing oof request: " + e.getStackTrace());
+            logger.debug(ERROR_WHILE_PREPARING_OOF_REQUEST + e.getStackTrace());
             exceptionUtil.buildAndThrowWorkflowException(execution, INTERNAL, "Internal Error - occurred while "
                     + "preparing oof request: " + e + "   Stack:" + ExceptionUtils.getFullStackTrace(e));
         }
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java
index 3304d1b..01bdc09 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java
@@ -481,6 +481,16 @@
         }
     }
 
+    public void updateOrchestrationStatusAssignFabricConfiguration(BuildingBlockExecution execution) {
+        try {
+            Configuration configuration = extractPojosForBB.extractByKey(execution, ResourceKey.CONFIGURATION_ID);
+            aaiConfigurationResources.updateOrchestrationStatusConfiguration(configuration,
+                    OrchestrationStatus.ASSIGNED);
+        } catch (Exception ex) {
+            exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
+        }
+    }
+
     public void updateOrchestrationStatusActivateFabricConfiguration(BuildingBlockExecution execution) {
         try {
             Configuration configuration = extractPojosForBB.extractByKey(execution, ResourceKey.CONFIGURATION_ID);
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java
index 05d4f56..a37f437 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java
@@ -85,7 +85,7 @@
 
             Map<String, Object> variables = new HashMap<>();
             variables.put("buildingBlock", executeBuildingBlock);
-            variables.put("mso-request-id", requestId);
+            variables.put(G_REQUEST_ID, requestId);
             variables.put("retryCount", 1);
             variables.put("aLaCarte", true);
 
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/network/tasks/NetworkAdapterUpdateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/network/tasks/NetworkAdapterUpdateTasks.java
index 77898dd..428f5e7 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/network/tasks/NetworkAdapterUpdateTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/network/tasks/NetworkAdapterUpdateTasks.java
@@ -32,7 +32,6 @@
 import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB;
 import org.onap.so.client.adapter.network.mapper.NetworkAdapterObjectMapper;
 import org.onap.so.client.exception.ExceptionBuilder;
-import org.onap.so.client.orchestration.NetworkAdapterResources;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -40,7 +39,6 @@
 
 @Component
 public class NetworkAdapterUpdateTasks {
-    private static final Logger logger = LoggerFactory.getLogger(NetworkAdapterUpdateTasks.class);
 
     @Autowired
     private ExtractPojosForBB extractPojosForBB;
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasks.java
index 849465e..b257e91 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterCreateTasks.java
@@ -47,7 +47,7 @@
 
 @Component
 public class VnfAdapterCreateTasks {
-    private static final Logger logger = LoggerFactory.getLogger(VnfAdapterCreateTasks.class);
+    public static final String SDNCQUERY_RESPONSE = "SDNCQueryResponse_";
     private static final String VNFREST_REQUEST = "VNFREST_Request";
 
     @Autowired
@@ -73,7 +73,7 @@
             try {
                 vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID);
                 if (vfModule.getSelflink() != null && !vfModule.getSelflink().isEmpty()) {
-                    sdncVfModuleQueryResponse = execution.getVariable("SDNCQueryResponse_" + vfModule.getVfModuleId());
+                    sdncVfModuleQueryResponse = execution.getVariable(SDNCQUERY_RESPONSE + vfModule.getVfModuleId());
                 } else {
                     throw new Exception("Vf Module " + vfModule.getVfModuleId()
                             + " exists in gBuildingBlock but does not have a selflink value");
@@ -109,8 +109,8 @@
             CloudRegion cloudRegion = gBBInput.getCloudRegion();
             RequestContext requestContext = gBBInput.getRequestContext();
             OrchestrationContext orchestrationContext = gBBInput.getOrchContext();
-            String sdncVfModuleQueryResponse = execution.getVariable("SDNCQueryResponse_" + vfModule.getVfModuleId());
-            String sdncVnfQueryResponse = execution.getVariable("SDNCQueryResponse_" + genericVnf.getVnfId());
+            String sdncVfModuleQueryResponse = execution.getVariable(SDNCQUERY_RESPONSE + vfModule.getVfModuleId());
+            String sdncVnfQueryResponse = execution.getVariable(SDNCQUERY_RESPONSE + genericVnf.getVnfId());
 
             CreateVfModuleRequest createVfModuleRequest = vnfAdapterVfModuleResources.createVfModuleRequest(
                     requestContext, cloudRegion, orchestrationContext, serviceInstance, genericVnf, vfModule,
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterDeleteTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterDeleteTasks.java
index 116dc30..5fe80b7 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterDeleteTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterDeleteTasks.java
@@ -42,7 +42,7 @@
 
 @Component
 public class VnfAdapterDeleteTasks {
-    private static final Logger logger = LoggerFactory.getLogger(VnfAdapterDeleteTasks.class);
+
     private static final String VNFREST_REQUEST = "VNFREST_Request";
 
     @Autowired
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImpl.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImpl.java
index bfa76c5..48426fa 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImpl.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImpl.java
@@ -63,6 +63,7 @@
     private static final String OAM_MANAGEMENT_V4_ADDRESS = "oamManagementV4Address";
     private static final String OAM_MANAGEMENT_V6_ADDRESS = "oamManagementV6Address";
     private static final String CONTRAIL_NETWORK_POLICY_FQDN_LIST = "contrailNetworkPolicyFqdnList";
+    public static final String HEAT_STACK_ID = "heatStackId";
 
     @Autowired
     private ExtractPojosForBB extractPojosForBB;
@@ -77,7 +78,7 @@
                     extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID);
             execution.setVariable("mso-request-id", gBBInput.getRequestContext().getMsoRequestId());
             execution.setVariable("mso-service-instance-id", serviceInstance.getServiceInstanceId());
-            execution.setVariable("heatStackId", null);
+            execution.setVariable(HEAT_STACK_ID, null);
             execution.setVariable(CONTRAIL_SERVICE_INSTANCE_FQDN, null);
             execution.setVariable(OAM_MANAGEMENT_V4_ADDRESS, null);
             execution.setVariable(OAM_MANAGEMENT_V6_ADDRESS, null);
@@ -97,7 +98,7 @@
                     String heatStackId = ((CreateVfModuleResponse) vnfRestResponse).getVfModuleStackId();
                     if (!StringUtils.isEmpty(heatStackId)) {
                         vfModule.setHeatStackId(heatStackId);
-                        execution.setVariable("heatStackId", heatStackId);
+                        execution.setVariable(HEAT_STACK_ID, heatStackId);
                     }
                     Map<String, String> vfModuleOutputs =
                             ((CreateVfModuleResponse) vnfRestResponse).getVfModuleOutputs();
@@ -110,7 +111,7 @@
                     Boolean vfModuleDelete = ((DeleteVfModuleResponse) vnfRestResponse).getVfModuleDeleted();
                     if (null != vfModuleDelete && vfModuleDelete) {
                         vfModule.setHeatStackId(null);
-                        execution.setVariable("heatStackId", null);
+                        execution.setVariable(HEAT_STACK_ID, null);
                         Map<String, String> vfModuleOutputs =
                                 ((DeleteVfModuleResponse) vnfRestResponse).getVfModuleOutputs();
                         if (vfModuleOutputs != null) {
@@ -134,7 +135,7 @@
                     String heatStackId = ((CreateVolumeGroupResponse) vnfRestResponse).getVolumeGroupStackId();
                     if (!StringUtils.isEmpty(heatStackId)) {
                         volumeGroup.setHeatStackId(heatStackId);
-                        execution.setVariable("heatStackId", heatStackId);
+                        execution.setVariable(HEAT_STACK_ID, heatStackId);
                     } else {
                         exceptionUtil.buildAndThrowWorkflowException(execution, 7000,
                                 "HeatStackId is missing from create VolumeGroup Vnf Adapter response.");
@@ -144,7 +145,7 @@
                     Boolean volumeGroupDelete = ((DeleteVolumeGroupResponse) vnfRestResponse).getVolumeGroupDeleted();
                     if (null != volumeGroupDelete && volumeGroupDelete) {
                         volumeGroup.setHeatStackId(null);
-                        execution.setVariable("heatStackId", null);
+                        execution.setVariable(HEAT_STACK_ID, null);
                     }
                 }
             }
@@ -184,7 +185,7 @@
         try {
             VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID);
             GenericVnf genericVnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID);
-            List<String> contrailNetworkPolicyFqdnList = new ArrayList<String>();
+            List<String> contrailNetworkPolicyFqdnList = new ArrayList<>();
             Iterator<String> keys = vfModuleOutputs.keySet().iterator();
             while (keys.hasNext()) {
                 String key = keys.next();
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/VnfmAdapterServiceProviderImpl.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/VnfmAdapterServiceProviderImpl.java
index f193967..e0176eb 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/VnfmAdapterServiceProviderImpl.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/VnfmAdapterServiceProviderImpl.java
@@ -42,6 +42,7 @@
 public class VnfmAdapterServiceProviderImpl implements VnfmAdapterServiceProvider {
 
     private static final Logger LOGGER = LoggerFactory.getLogger(VnfmAdapterServiceProviderImpl.class);
+    public static final String RECEIVED_RESPONSE_WITHOUT_BODY = "Received response without body: {}";
 
     private final VnfmAdapterUrlProvider urlProvider;
     private final HttpRestServiceProvider httpServiceProvider;
@@ -69,7 +70,7 @@
             }
 
             if (!response.hasBody()) {
-                LOGGER.error("Received response without body: {}", response);
+                LOGGER.error(RECEIVED_RESPONSE_WITHOUT_BODY, response);
                 return Optional.absent();
             }
 
@@ -107,7 +108,7 @@
             }
 
             if (!response.hasBody()) {
-                LOGGER.error("Received response without body: {}", response);
+                LOGGER.error(RECEIVED_RESPONSE_WITHOUT_BODY, response);
                 return Optional.absent();
             }
             final DeleteVnfResponse deleteVnfResponse = response.getBody();
@@ -139,7 +140,7 @@
             }
 
             if (!response.hasBody()) {
-                LOGGER.error("Received response without body: {}", response);
+                LOGGER.error(RECEIVED_RESPONSE_WITHOUT_BODY, response);
                 return Optional.absent();
             }
             return Optional.of(response.getBody());
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasks.java
index ef882b4..f9bd8c5 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasks.java
@@ -47,6 +47,9 @@
 @Component
 public class AppcRunTasks {
     private static final Logger logger = LoggerFactory.getLogger(AppcRunTasks.class);
+    public static final String ROLLBACK_VNF_STOP = "rollbackVnfStop";
+    public static final String ROLLBACK_VNF_LOCK = "rollbackVnfLock";
+    public static final String ROLLBACK_QUIESCE_TRAFFIC = "rollbackQuiesceTraffic";
     @Autowired
     private ExceptionBuilder exceptionUtil;
     @Autowired
@@ -71,9 +74,9 @@
         execution.setVariable("actionHealthCheck", Action.HealthCheck);
         execution.setVariable("actionDistributeTraffic", Action.DistributeTraffic);
         execution.setVariable("actionDistributeTrafficCheck", Action.DistributeTrafficCheck);
-        execution.setVariable("rollbackVnfStop", false);
-        execution.setVariable("rollbackVnfLock", false);
-        execution.setVariable("rollbackQuiesceTraffic", false);
+        execution.setVariable(ROLLBACK_VNF_STOP, false);
+        execution.setVariable(ROLLBACK_VNF_LOCK, false);
+        execution.setVariable(ROLLBACK_QUIESCE_TRAFFIC, false);
     }
 
     public void runAppcCommand(BuildingBlockExecution execution, Action action) {
@@ -153,17 +156,17 @@
     protected void mapRollbackVariables(BuildingBlockExecution execution, Action action, String appcCode) {
         if (appcCode.equals("0") && action != null) {
             if (action.equals(Action.Lock)) {
-                execution.setVariable("rollbackVnfLock", true);
+                execution.setVariable(ROLLBACK_VNF_LOCK, true);
             } else if (action.equals(Action.Unlock)) {
-                execution.setVariable("rollbackVnfLock", false);
+                execution.setVariable(ROLLBACK_VNF_LOCK, false);
             } else if (action.equals(Action.Start)) {
-                execution.setVariable("rollbackVnfStop", false);
+                execution.setVariable(ROLLBACK_VNF_STOP, false);
             } else if (action.equals(Action.Stop)) {
-                execution.setVariable("rollbackVnfStop", true);
+                execution.setVariable(ROLLBACK_VNF_STOP, true);
             } else if (action.equals(Action.QuiesceTraffic)) {
-                execution.setVariable("rollbackQuiesceTraffic", true);
+                execution.setVariable(ROLLBACK_QUIESCE_TRAFFIC, true);
             } else if (action.equals(Action.ResumeTraffic)) {
-                execution.setVariable("rollbackQuiesceTraffic", false);
+                execution.setVariable(ROLLBACK_QUIESCE_TRAFFIC, false);
             }
         }
     }
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetworkBBUtils.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetworkBBUtils.java
index ab8818f..4b88f74 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetworkBBUtils.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/AssignNetworkBBUtils.java
@@ -54,9 +54,9 @@
      * @return
      */
     public boolean networkFoundByName(BuildingBlockExecution execution) throws Exception {
-        boolean found = false;
+
         // TODO - populate logic after iTrack MSO-2143 implemented
-        return found;
+        return false;
     }
 
     /**
@@ -71,7 +71,7 @@
             CloudRegion cloudRegion = gBBInput.getCloudRegion();
             String cloudRegionSdnc;
             String cloudRegionPo = cloudRegion.getLcpCloudRegionId();
-            if (cloudRegion.getCloudRegionVersion().equalsIgnoreCase("2.5")) {
+            if ("2.5".equalsIgnoreCase(cloudRegion.getCloudRegionVersion())) {
                 cloudRegionSdnc = "AAIAIC25";
             } else {
                 cloudRegionSdnc = cloudRegionPo;
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigDeployVnf.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigDeployVnf.java
index 359f192..4ec8b93 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigDeployVnf.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigDeployVnf.java
@@ -40,9 +40,9 @@
 @Component
 public class ConfigDeployVnf {
     private static final Logger logger = LoggerFactory.getLogger(ConfigDeployVnf.class);
-    private final static String ORIGINATOR_ID = "SO";
-    private final static String ACTION_NAME = "config-deploy";
-    private final static String MODE = "async";
+    private static final String ORIGINATOR_ID = "SO";
+    private static final String ACTION_NAME = "config-deploy";
+    private static final String MODE = "async";
 
     @Autowired
     private ExceptionBuilder exceptionUtil;
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOut.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOut.java
index 1925d8b..0ad88d0 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOut.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOut.java
@@ -160,7 +160,7 @@
         logger.error("Error Message: " + appcMessage);
         logger.error("ERROR CODE: " + appcCode);
         logger.trace("End of runAppCommand ");
-        if (appcCode != null && !appcCode.equals("0")) {
+        if (appcCode != null && !("0").equals(appcCode)) {
             exceptionUtil.buildAndThrowWorkflowException(execution, Integer.parseInt(appcCode), appcMessage);
         }
     }
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/CreateNetwork.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/CreateNetwork.java
index c2d9c6e..b7ddc11 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/CreateNetwork.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/CreateNetwork.java
@@ -39,7 +39,7 @@
 @Component
 public class CreateNetwork {
 
-    private static final Logger logger = LoggerFactory.getLogger(CreateNetwork.class);
+
     @Autowired
     private ExceptionBuilder exceptionUtil;
     @Autowired
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/CreateNetworkCollection.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/CreateNetworkCollection.java
index 4eaec38..36eab8f 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/CreateNetworkCollection.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/CreateNetworkCollection.java
@@ -36,7 +36,7 @@
 
 @Component
 public class CreateNetworkCollection {
-    private static final Logger logger = LoggerFactory.getLogger(CreateNetworkCollection.class);
+
     @Autowired
     private ExceptionBuilder exceptionUtil;
     @Autowired
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java
index 98b602e..8f0c809 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java
@@ -45,6 +45,9 @@
 public class GenericVnfHealthCheck {
 
     private static final Logger logger = LoggerFactory.getLogger(GenericVnfHealthCheck.class);
+    public static final String VNF_NAME = "vnfName";
+    public static final String OAM_IP_ADDRESS = "oamIpAddress";
+    public static final String VNF_HOST_IP_ADDRESS = "vnfHostIpAddress";
     @Autowired
     private ExceptionBuilder exceptionUtil;
     @Autowired
@@ -71,9 +74,9 @@
             String controllerName = controllerSelectionReference.getControllerName();
 
             execution.setVariable("vnfId", vnfId);
-            execution.setVariable("vnfName", vnfName);
-            execution.setVariable("oamIpAddress", oamIpAddress);
-            execution.setVariable("vnfHostIpAddress", oamIpAddress);
+            execution.setVariable(VNF_NAME, vnfName);
+            execution.setVariable(OAM_IP_ADDRESS, oamIpAddress);
+            execution.setVariable(VNF_HOST_IP_ADDRESS, oamIpAddress);
             execution.setVariable("msoRequestId", gBBInput.getRequestContext().getMsoRequestId());
             execution.setVariable("action", actionCategory);
             execution.setVariable("controllerType", controllerName);
@@ -98,11 +101,11 @@
                 payload = Optional.of(pay);
             }
             String controllerType = execution.getVariable("controllerType");
-            HashMap<String, String> payloadInfo = new HashMap<String, String>();
-            payloadInfo.put("vnfName", execution.getVariable("vnfName"));
+            HashMap<String, String> payloadInfo = new HashMap<>();
+            payloadInfo.put(VNF_NAME, execution.getVariable(VNF_NAME));
             payloadInfo.put("vfModuleId", execution.getVariable("vfModuleId"));
-            payloadInfo.put("oamIpAddress", execution.getVariable("oamIpAddress"));
-            payloadInfo.put("vnfHostIpAddress", execution.getVariable("vnfHostIpAddress"));
+            payloadInfo.put(OAM_IP_ADDRESS, execution.getVariable(OAM_IP_ADDRESS));
+            payloadInfo.put(VNF_HOST_IP_ADDRESS, execution.getVariable(VNF_HOST_IP_ADDRESS));
 
             logger.debug("Running APP-C action: {}", action.toString());
             logger.debug("VNFID: {}", vnfId);
@@ -133,7 +136,7 @@
         logger.error("Error Message: " + appcMessage);
         logger.error("ERROR CODE: " + appcCode);
         logger.trace("End of runAppCommand ");
-        if (appcCode != null && !appcCode.equals("0")) {
+        if (appcCode != null && !("0").equals(appcCode)) {
             exceptionUtil.buildAndThrowWorkflowException(execution, Integer.parseInt(appcCode), appcMessage);
         }
     }
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignNetworkBB.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignNetworkBB.java
index 2741519..7466df5 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignNetworkBB.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/UnassignNetworkBB.java
@@ -38,11 +38,10 @@
 @Component
 public class UnassignNetworkBB {
 
-    private static final Logger logger = LoggerFactory.getLogger(UnassignNetworkBB.class);
 
-    private static String MESSAGE_CANNOT_PERFORM_UNASSIGN =
+    private static String messageCannotPerformUnassign =
             "Cannot perform Unassign Network. Network is still related to ";
-    private static String MESSAGE_ERROR_ROLLBACK = " Rollback is not possible. Please restore data manually.";
+    private static String messageErrorRollback = " Rollback is not possible. Please restore data manually.";
 
     @Autowired
     private ExceptionBuilder exceptionUtil;
@@ -72,7 +71,7 @@
             Optional<org.onap.aai.domain.yang.L3Network> network =
                     aaiResultWrapper.asBean(org.onap.aai.domain.yang.L3Network.class);
             if (networkBBUtils.isRelationshipRelatedToExists(network, relatedToValue)) {
-                String msg = MESSAGE_CANNOT_PERFORM_UNASSIGN + relatedToValue;
+                String msg = messageCannotPerformUnassign + relatedToValue;
                 execution.setVariable("ErrorUnassignNetworkBB", msg);
                 exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg);
             }
@@ -109,7 +108,7 @@
         boolean isRollbackNeeded =
                 execution.getVariable("isRollbackNeeded") != null ? execution.getVariable("isRollbackNeeded") : false;
         if (isRollbackNeeded == true) {
-            msg = execution.getVariable("ErrorUnassignNetworkBB") + MESSAGE_ERROR_ROLLBACK;
+            msg = execution.getVariable("ErrorUnassignNetworkBB") + messageErrorRollback;
         } else {
             msg = execution.getVariable("ErrorUnassignNetworkBB");
         }
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/manualhandling/tasks/ManualHandlingTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/manualhandling/tasks/ManualHandlingTasks.java
index b906b8a..61fc8ff 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/manualhandling/tasks/ManualHandlingTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/manualhandling/tasks/ManualHandlingTasks.java
@@ -23,6 +23,14 @@
 
     private static final String TASK_TYPE_PAUSE = "pause";
     private static final String TASK_TYPE_FALLOUT = "fallout";
+    public static final String VNF_TYPE = "vnfType";
+    public static final String SERVICE_TYPE = "serviceType";
+    public static final String MSO_REQUEST_ID = "msoRequestId";
+    public static final String REQUESTOR_ID = "requestorId";
+    public static final String ERROR_CODE = "errorCode";
+    public static final String VALID_RESPONSES = "validResponses";
+    public static final String DESCRIPTION = "description";
+    public static final String BPMN_EXCEPTION = "BPMN exception: ";
 
     @Autowired
     private ExceptionBuilder exceptionUtil;
@@ -37,39 +45,39 @@
             String taskId = task.getId();
             logger.debug("taskId is: " + taskId);
             String type = TASK_TYPE_FALLOUT;
-            String nfRole = (String) execution.getVariable("vnfType");
-            String subscriptionServiceType = (String) execution.getVariable("serviceType");
-            String originalRequestId = (String) execution.getVariable("msoRequestId");
-            String originalRequestorId = (String) execution.getVariable("requestorId");
+            String nfRole = (String) execution.getVariable(VNF_TYPE);
+            String subscriptionServiceType = (String) execution.getVariable(SERVICE_TYPE);
+            String originalRequestId = (String) execution.getVariable(MSO_REQUEST_ID);
+            String originalRequestorId = (String) execution.getVariable(REQUESTOR_ID);
             String description = "";
             String timeout = "";
             String errorSource = (String) execution.getVariable("failedActivity");
-            String errorCode = (String) execution.getVariable("errorCode");
+            String errorCode = (String) execution.getVariable(ERROR_CODE);
             String errorMessage = (String) execution.getVariable("errorText");
             String buildingBlockName = (String) execution.getVariable("currentActivity");
             String buildingBlockStep = (String) execution.getVariable("workStep");
-            String validResponses = (String) execution.getVariable("validResponses");
+            String validResponses = (String) execution.getVariable(VALID_RESPONSES);
 
-            Map<String, String> taskVariables = new HashMap<String, String>();
+            Map<String, String> taskVariables = new HashMap<>();
             taskVariables.put("type", type);
             taskVariables.put("nfRole", nfRole);
             taskVariables.put("subscriptionServiceType", subscriptionServiceType);
             taskVariables.put("originalRequestId", originalRequestId);
             taskVariables.put("originalRequestorId", originalRequestorId);
             taskVariables.put("errorSource", errorSource);
-            taskVariables.put("errorCode", errorCode);
+            taskVariables.put(ERROR_CODE, errorCode);
             taskVariables.put("errorMessage", errorMessage);
             taskVariables.put("buildingBlockName", buildingBlockName);
             taskVariables.put("buildingBlockStep", buildingBlockStep);
-            taskVariables.put("validResponses", validResponses);
+            taskVariables.put(VALID_RESPONSES, validResponses);
             taskVariables.put("tmeout", timeout);
-            taskVariables.put("description", description);
+            taskVariables.put(DESCRIPTION, description);
             TaskService taskService = execution.getProcessEngineServices().getTaskService();
 
             taskService.setVariables(taskId, taskVariables);
             logger.debug("successfully created fallout task: " + taskId);
         } catch (BpmnError e) {
-            logger.debug("BPMN exception: " + e.getMessage());
+            logger.debug(BPMN_EXCEPTION + e.getMessage());
             throw e;
         } catch (Exception ex) {
             String msg = "Exception in setFalloutTaskVariables " + ex.getMessage();
@@ -86,39 +94,39 @@
             String taskId = task.getId();
             logger.debug("taskId is: " + taskId);
             String type = TASK_TYPE_PAUSE;
-            String nfRole = (String) execution.getVariable("vnfType");
-            String subscriptionServiceType = (String) execution.getVariable("serviceType");
-            String originalRequestId = (String) execution.getVariable("msoRequestId");
-            String originalRequestorId = (String) execution.getVariable("requestorId");
-            String description = (String) execution.getVariable("description");
+            String nfRole = (String) execution.getVariable(VNF_TYPE);
+            String subscriptionServiceType = (String) execution.getVariable(SERVICE_TYPE);
+            String originalRequestId = (String) execution.getVariable(MSO_REQUEST_ID);
+            String originalRequestorId = (String) execution.getVariable(REQUESTOR_ID);
+            String description = (String) execution.getVariable(DESCRIPTION);
             String timeout = (String) execution.getVariable("taskTimeout");
             String errorSource = "";
             String errorCode = "";
             String errorMessage = "";
             String buildingBlockName = "";
             String buildingBlockStep = "";
-            String validResponses = (String) execution.getVariable("validResponses");
+            String validResponses = (String) execution.getVariable(VALID_RESPONSES);
 
-            Map<String, String> taskVariables = new HashMap<String, String>();
+            Map<String, String> taskVariables = new HashMap<>();
             taskVariables.put("type", type);
             taskVariables.put("nfRole", nfRole);
-            taskVariables.put("description", description);
+            taskVariables.put(DESCRIPTION, description);
             taskVariables.put("timeout", timeout);
             taskVariables.put("subscriptionServiceType", subscriptionServiceType);
             taskVariables.put("originalRequestId", originalRequestId);
             taskVariables.put("originalRequestorId", originalRequestorId);
             taskVariables.put("errorSource", errorSource);
-            taskVariables.put("errorCode", errorCode);
+            taskVariables.put(ERROR_CODE, errorCode);
             taskVariables.put("errorMessage", errorMessage);
             taskVariables.put("buildingBlockName", buildingBlockName);
             taskVariables.put("buildingBlockStep", buildingBlockStep);
-            taskVariables.put("validResponses", validResponses);
+            taskVariables.put(VALID_RESPONSES, validResponses);
             TaskService taskService = execution.getProcessEngineServices().getTaskService();
 
             taskService.setVariables(taskId, taskVariables);
             logger.debug("successfully created pause task: " + taskId);
         } catch (BpmnError e) {
-            logger.debug("BPMN exception: " + e.getMessage());
+            logger.debug(BPMN_EXCEPTION + e.getMessage());
             throw e;
         } catch (Exception ex) {
             String msg = "Exception in setPauseTaskVariables " + ex.getMessage();
@@ -149,7 +157,7 @@
             execution.setVariable("responseValueTask", responseValueUppercaseStart);
 
         } catch (BpmnError e) {
-            logger.debug("BPMN exception: " + e.getMessage());
+            logger.debug(BPMN_EXCEPTION + e.getMessage());
             throw e;
         } catch (Exception ex) {
             String msg = "Exception in completeManualTask " + ex.getMessage();
@@ -164,15 +172,15 @@
         try {
             ExternalTicket ticket = new ExternalTicket();
 
-            ticket.setRequestId((String) execution.getVariable("msoRequestId"));
+            ticket.setRequestId((String) execution.getVariable(MSO_REQUEST_ID));
             ticket.setCurrentActivity((String) execution.getVariable("currentActivity"));
-            ticket.setNfRole((String) execution.getVariable("vnfType"));
-            ticket.setDescription((String) execution.getVariable("description"));
-            ticket.setSubscriptionServiceType((String) execution.getVariable("serviceType"));
-            ticket.setRequestorId((String) execution.getVariable("requestorId"));
+            ticket.setNfRole((String) execution.getVariable(VNF_TYPE));
+            ticket.setDescription((String) execution.getVariable(DESCRIPTION));
+            ticket.setSubscriptionServiceType((String) execution.getVariable(SERVICE_TYPE));
+            ticket.setRequestorId((String) execution.getVariable(REQUESTOR_ID));
             ticket.setTimeout((String) execution.getVariable("taskTimeout"));
             ticket.setErrorSource((String) execution.getVariable("failedActivity"));
-            ticket.setErrorCode((String) execution.getVariable("errorCode"));
+            ticket.setErrorCode((String) execution.getVariable(ERROR_CODE));
             ticket.setErrorMessage((String) execution.getVariable("errorText"));
             ticket.setWorkStep((String) execution.getVariable("workStep"));
 
@@ -191,7 +199,7 @@
 
     public void updateRequestDbStatus(DelegateExecution execution, String status) {
         try {
-            String requestId = (String) execution.getVariable("msoRequestId");
+            String requestId = (String) execution.getVariable(MSO_REQUEST_ID);
             InfraActiveRequests request = requestDbclient.getInfraActiveRequestbyRequestId(requestId);
 
             request.setRequestStatus(status);
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCActivateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCActivateTasks.java
index 7a0008d..3227689 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCActivateTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCActivateTasks.java
@@ -50,7 +50,8 @@
 
 @Component
 public class SDNCActivateTasks {
-    private static final Logger logger = LoggerFactory.getLogger(SDNCActivateTasks.class);
+
+    public static final String SDNC_REQUEST = "SDNCRequest";
     @Autowired
     private SDNCVnfResources sdncVnfResources;
     @Autowired
@@ -77,7 +78,7 @@
             SDNCRequest sdncRequest = new SDNCRequest();
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.VNF);
-            execution.setVariable("SDNCRequest", sdncRequest);
+            execution.setVariable(SDNC_REQUEST, sdncRequest);
         } catch (Exception ex) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
         }
@@ -103,7 +104,7 @@
             SDNCRequest sdncRequest = new SDNCRequest();
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.NETWORK);
-            execution.setVariable("SDNCRequest", sdncRequest);
+            execution.setVariable(SDNC_REQUEST, sdncRequest);
         } catch (Exception ex) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
         }
@@ -126,7 +127,7 @@
             SDNCRequest sdncRequest = new SDNCRequest();
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.VFMODULE);
-            execution.setVariable("SDNCRequest", sdncRequest);
+            execution.setVariable(SDNC_REQUEST, sdncRequest);
         } catch (Exception ex) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
         }
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java
index d3878f0..111f008 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCAssignTasks.java
@@ -54,6 +54,7 @@
 @Component
 public class SDNCAssignTasks {
     private static final Logger logger = LoggerFactory.getLogger(SDNCAssignTasks.class);
+    public static final String SDNC_REQUEST = "SDNCRequest";
     @Autowired
     private SDNCServiceInstanceResources sdncSIResources;
     @Autowired
@@ -79,7 +80,7 @@
             SDNCRequest sdncRequest = new SDNCRequest();
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.SERVICE);
-            execution.setVariable("SDNCRequest", sdncRequest);
+            execution.setVariable(SDNC_REQUEST, sdncRequest);
         } catch (Exception ex) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
         }
@@ -99,7 +100,7 @@
             SDNCRequest sdncRequest = new SDNCRequest();
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.VNF);
-            execution.setVariable("SDNCRequest", sdncRequest);
+            execution.setVariable(SDNC_REQUEST, sdncRequest);
         } catch (Exception ex) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
         }
@@ -126,7 +127,7 @@
             SDNCRequest sdncRequest = new SDNCRequest();
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.VFMODULE);
-            execution.setVariable("SDNCRequest", sdncRequest);
+            execution.setVariable(SDNC_REQUEST, sdncRequest);
         } catch (Exception ex) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
         }
@@ -152,7 +153,7 @@
             SDNCRequest sdncRequest = new SDNCRequest();
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.NETWORK);
-            execution.setVariable("SDNCRequest", sdncRequest);
+            execution.setVariable(SDNC_REQUEST, sdncRequest);
         } catch (Exception ex) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
         }
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCChangeAssignTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCChangeAssignTasks.java
index 50cf0fb..4ffb397 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCChangeAssignTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCChangeAssignTasks.java
@@ -47,6 +47,7 @@
 
 @Component
 public class SDNCChangeAssignTasks {
+    public static final String SDNC_REQUEST = "SDNCRequest";
     @Autowired
     private SDNCNetworkResources sdncNetworkResources;
     @Autowired
@@ -70,7 +71,7 @@
             SDNCRequest sdncRequest = new SDNCRequest();
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.SERVICE);
-            execution.setVariable("SDNCRequest", sdncRequest);
+            execution.setVariable(SDNC_REQUEST, sdncRequest);
         } catch (Exception ex) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
         }
@@ -87,7 +88,7 @@
             SDNCRequest sdncRequest = new SDNCRequest();
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.VNF);
-            execution.setVariable("SDNCRequest", sdncRequest);
+            execution.setVariable(SDNC_REQUEST, sdncRequest);
         } catch (Exception ex) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
         }
@@ -104,7 +105,7 @@
             SDNCRequest sdncRequest = new SDNCRequest();
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.NETWORK);
-            execution.setVariable("SDNCRequest", sdncRequest);
+            execution.setVariable(SDNC_REQUEST, sdncRequest);
         } catch (Exception ex) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
         }
@@ -125,7 +126,7 @@
             SDNCRequest sdncRequest = new SDNCRequest();
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.VFMODULE);
-            execution.setVariable("SDNCRequest", sdncRequest);
+            execution.setVariable(SDNC_REQUEST, sdncRequest);
         } catch (Exception ex) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
         }
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCDeactivateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCDeactivateTasks.java
index 3a15289..e587830 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCDeactivateTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCDeactivateTasks.java
@@ -51,7 +51,8 @@
 
 @Component
 public class SDNCDeactivateTasks {
-    private static final Logger logger = LoggerFactory.getLogger(SDNCDeactivateTasks.class);
+
+    public static final String SDNC_REQUEST = "SDNCRequest";
     @Autowired
     private SDNCNetworkResources sdncNetworkResources;
     @Autowired
@@ -80,7 +81,7 @@
             SDNCRequest sdncRequest = new SDNCRequest();
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.VFMODULE);
-            execution.setVariable("SDNCRequest", sdncRequest);
+            execution.setVariable(SDNC_REQUEST, sdncRequest);
         } catch (Exception ex) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
         }
@@ -107,7 +108,7 @@
             SDNCRequest sdncRequest = new SDNCRequest();
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.VNF);
-            execution.setVariable("SDNCRequest", sdncRequest);
+            execution.setVariable(SDNC_REQUEST, sdncRequest);
         } catch (Exception ex) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
         }
@@ -132,7 +133,7 @@
             SDNCRequest sdncRequest = new SDNCRequest();
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.SERVICE);
-            execution.setVariable("SDNCRequest", sdncRequest);
+            execution.setVariable(SDNC_REQUEST, sdncRequest);
         } catch (Exception ex) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
         }
@@ -157,7 +158,7 @@
             SDNCRequest sdncRequest = new SDNCRequest();
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.NETWORK);
-            execution.setVariable("SDNCRequest", sdncRequest);
+            execution.setVariable(SDNC_REQUEST, sdncRequest);
         } catch (Exception ex) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
         }
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCQueryTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCQueryTasks.java
index 7ae6117..fcc67d0 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCQueryTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCQueryTasks.java
@@ -39,7 +39,8 @@
 
 @Component
 public class SDNCQueryTasks {
-    private static final Logger logger = LoggerFactory.getLogger(SDNCQueryTasks.class);
+
+    public static final String SDNCQUERY_RESPONSE = "SDNCQueryResponse_";
     @Autowired
     private SDNCVnfResources sdncVnfResources;
     @Autowired
@@ -61,7 +62,7 @@
                 genericVnf.setSelflink(selfLink);
             }
             String response = sdncVnfResources.queryVnf(genericVnf);
-            execution.setVariable("SDNCQueryResponse_" + genericVnf.getVnfId(), response);
+            execution.setVariable(SDNCQUERY_RESPONSE + genericVnf.getVnfId(), response);
         } catch (Exception ex) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
         }
@@ -82,7 +83,7 @@
             }
             if (vfModule.getSelflink() != null && !vfModule.getSelflink().isEmpty()) {
                 String response = sdncVfModuleResources.queryVfModule(vfModule);
-                execution.setVariable("SDNCQueryResponse_" + vfModule.getVfModuleId(), response);
+                execution.setVariable(SDNCQUERY_RESPONSE + vfModule.getVfModuleId(), response);
             } else {
                 throw new Exception("Vf Module " + vfModule.getVfModuleId()
                         + " exists in gBuildingBlock but does not have a selflink value");
@@ -97,7 +98,7 @@
             VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID);
             if (vfModule.getSelflink() != null && !vfModule.getSelflink().isEmpty()) {
                 String response = sdncVfModuleResources.queryVfModule(vfModule);
-                execution.setVariable("SDNCQueryResponse_" + vfModule.getVfModuleId(), response);
+                execution.setVariable(SDNCQUERY_RESPONSE + vfModule.getVfModuleId(), response);
             } else {
                 throw new Exception("Vf Module " + vfModule.getVfModuleId()
                         + " exists in gBuildingBlock but does not have a selflink value");
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasks.java
index e9848d1..fba189f 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasks.java
@@ -51,7 +51,8 @@
 
 @Component
 public class SDNCUnassignTasks {
-    private static final Logger logger = LoggerFactory.getLogger(SDNCUnassignTasks.class);
+
+    public static final String SDNC_REQUEST = "SDNCRequest";
     @Autowired
     private SDNCServiceInstanceResources sdncSIResources;
     @Autowired
@@ -77,7 +78,7 @@
             SDNCRequest sdncRequest = new SDNCRequest();
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.SERVICE);
-            execution.setVariable("SDNCRequest", sdncRequest);
+            execution.setVariable(SDNC_REQUEST, sdncRequest);
         } catch (Exception ex) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
         }
@@ -94,7 +95,7 @@
             SDNCRequest sdncRequest = new SDNCRequest();
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.VFMODULE);
-            execution.setVariable("SDNCRequest", sdncRequest);
+            execution.setVariable(SDNC_REQUEST, sdncRequest);
         } catch (Exception ex) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
         }
@@ -114,7 +115,7 @@
             SDNCRequest sdncRequest = new SDNCRequest();
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.VNF);
-            execution.setVariable("SDNCRequest", sdncRequest);
+            execution.setVariable(SDNC_REQUEST, sdncRequest);
         } catch (Exception ex) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
         }
@@ -136,7 +137,7 @@
             SDNCRequest sdncRequest = new SDNCRequest();
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.NETWORK);
-            execution.setVariable("SDNCRequest", sdncRequest);
+            execution.setVariable(SDNC_REQUEST, sdncRequest);
         } catch (Exception ex) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
         }
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIConfigurationResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIConfigurationResources.java
index 746f136..1453e40 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIConfigurationResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIConfigurationResources.java
@@ -49,7 +49,7 @@
     public void createConfiguration(Configuration configuration) {
         AAIResourceUri configurationURI =
                 AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, configuration.getConfigurationId());
-        configuration.setOrchestrationStatus(OrchestrationStatus.ASSIGNED);
+        configuration.setOrchestrationStatus(OrchestrationStatus.INVENTORIED);
         org.onap.aai.domain.yang.Configuration aaiConfiguration = aaiObjectMapper.mapConfiguration(configuration);
         injectionHelper.getAaiClient().create(configurationURI, aaiConfiguration);
     }
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java
index 7109ac8..905f244 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasksTest.java
@@ -666,6 +666,18 @@
     }
 
     @Test
+    public void updateOrchestrationStatusAssignedFabricConfigurationTest() throws Exception {
+        gBBInput = execution.getGeneralBuildingBlock();
+        doNothing().when(aaiConfigurationResources).updateOrchestrationStatusConfiguration(configuration,
+                OrchestrationStatus.ASSIGNED);
+
+        aaiUpdateTasks.updateOrchestrationStatusAssignFabricConfiguration(execution);
+
+        verify(aaiConfigurationResources, times(1)).updateOrchestrationStatusConfiguration(configuration,
+                OrchestrationStatus.ASSIGNED);
+    }
+
+    @Test
     public void updateContrailServiceInstanceFqdnVfModuleTest() throws Exception {
         execution.setVariable("contrailServiceInstanceFqdn", "newContrailServiceInstanceFqdn");
         doNothing().when(aaiVfModuleResources).updateContrailServiceInstanceFqdnVfModule(vfModule, genericVnf);
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIConfigurationResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIConfigurationResourcesTest.java
index 2e1a40d..be58ccb 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIConfigurationResourcesTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIConfigurationResourcesTest.java
@@ -98,7 +98,7 @@
 
         aaiConfigurationResources.createConfiguration(configuration);
 
-        assertEquals(OrchestrationStatus.ASSIGNED, configuration.getOrchestrationStatus());
+        assertEquals(OrchestrationStatus.INVENTORIED, configuration.getOrchestrationStatus());
         verify(MOCK_aaiResourcesClient, times(1)).create(any(AAIResourceUri.class),
                 isA(org.onap.aai.domain.yang.Configuration.class));
     }
diff --git a/cloudify-client/src/main/java/org/onap/so/cloudify/base/client/CloudifyRequest.java b/cloudify-client/src/main/java/org/onap/so/cloudify/base/client/CloudifyRequest.java
index 0f9ad2d..df63bd1 100644
--- a/cloudify-client/src/main/java/org/onap/so/cloudify/base/client/CloudifyRequest.java
+++ b/cloudify-client/src/main/java/org/onap/so/cloudify/base/client/CloudifyRequest.java
@@ -7,9 +7,9 @@
  * 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.
@@ -31,20 +31,6 @@
 
     private CloudifyClient client;
 
-    public CloudifyRequest() {
-
-    }
-
-    public CloudifyRequest(CloudifyClient client, HttpMethod method, CharSequence path, Entity<?> entity,
-            Class<R> returnType) {
-        this.client = client;
-        this.method = method;
-        this.path = new StringBuilder(path);
-        this.entity = entity;
-        this.returnType = returnType;
-        header("Accept", "application/json");
-    }
-
     private String endpoint;
 
     private HttpMethod method;
@@ -61,6 +47,20 @@
     private String user = null;
     private String password = null;
 
+    public CloudifyRequest() {
+
+    }
+
+    public CloudifyRequest(CloudifyClient client, HttpMethod method, CharSequence path, Entity<?> entity,
+            Class<R> returnType) {
+        this.client = client;
+        this.method = method;
+        this.path = new StringBuilder(path);
+        this.entity = entity;
+        this.returnType = returnType;
+        header("Accept", "application/json");
+    }
+
     public CloudifyRequest<R> endpoint(String endpoint) {
         this.endpoint = endpoint;
         return this;
@@ -151,7 +151,7 @@
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see java.lang.Object#toString()
      */
     @Override
diff --git a/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/BlueprintsResource.java b/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/BlueprintsResource.java
index 3eae02b..9877eb9 100644
--- a/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/BlueprintsResource.java
+++ b/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/BlueprintsResource.java
@@ -31,6 +31,7 @@
 public class BlueprintsResource {
 
     private final CloudifyClient client;
+    private static final String BLUEPRINTS_PATH = "/api/v3/blueprints/";
 
     public BlueprintsResource(CloudifyClient client) {
         this.client = client;
@@ -72,7 +73,7 @@
             // If a URL is provided, add it to the query string
             // If a Stream is provided, set it as the Entity body
             super(client, HttpMethod.PUT,
-                    "/api/v3/blueprints/" + blueprintId + "?application_file_name=" + mainFileName
+                    BLUEPRINTS_PATH + blueprintId + "?application_file_name=" + mainFileName
                             + ((blueprintUrl != null) ? "&blueprint_archive=" + blueprintUrl : ""),
                     ((blueprint != null) ? Entity.stream(blueprint) : null), Blueprint.class);
         }
@@ -80,13 +81,13 @@
 
     public class DeleteBlueprint extends CloudifyRequest<Blueprint> {
         public DeleteBlueprint(String blueprintId) {
-            super(client, HttpMethod.DELETE, "/api/v3/blueprints/" + blueprintId, null, Blueprint.class);
+            super(client, HttpMethod.DELETE, BLUEPRINTS_PATH + blueprintId, null, Blueprint.class);
         }
     }
 
     public class GetBlueprint extends CloudifyRequest<Blueprint> {
         public GetBlueprint(String id, String queryArgs) {
-            super(client, HttpMethod.GET, "/api/v3/blueprints/" + id + queryArgs, null, Blueprint.class);
+            super(client, HttpMethod.GET, BLUEPRINTS_PATH + id + queryArgs, null, Blueprint.class);
         }
     }
 
diff --git a/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/DeploymentsResource.java b/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/DeploymentsResource.java
index 262045a..335f6b1 100644
--- a/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/DeploymentsResource.java
+++ b/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/DeploymentsResource.java
@@ -32,6 +32,7 @@
 public class DeploymentsResource {
 
     private final CloudifyClient client;
+    private static final String DEPLOYMENT_PATH = "/api/v3/deployments/";
 
     public DeploymentsResource(CloudifyClient client) {
         this.client = client;
@@ -59,25 +60,25 @@
 
     public class CreateDeployment extends CloudifyRequest<Deployment> {
         public CreateDeployment(String deploymentId, CreateDeploymentParams body) {
-            super(client, HttpMethod.PUT, "/api/v3/deployments/" + deploymentId, Entity.json(body), Deployment.class);
+            super(client, HttpMethod.PUT, DEPLOYMENT_PATH + deploymentId, Entity.json(body), Deployment.class);
         }
     }
 
     public class DeleteDeployment extends CloudifyRequest<Deployment> {
         public DeleteDeployment(String deploymentId) {
-            super(client, HttpMethod.DELETE, "/api/v3/deployments/" + deploymentId, null, Deployment.class);
+            super(client, HttpMethod.DELETE, DEPLOYMENT_PATH + deploymentId, null, Deployment.class);
         }
     }
 
     public class GetDeployment extends CloudifyRequest<Deployment> {
         public GetDeployment(String id) {
-            super(client, HttpMethod.GET, "/api/v3/deployments/" + id, null, Deployment.class);
+            super(client, HttpMethod.GET, DEPLOYMENT_PATH + id, null, Deployment.class);
         }
     }
 
     public class GetDeploymentOutputs extends CloudifyRequest<DeploymentOutputs> {
         public GetDeploymentOutputs(String id) {
-            super(client, HttpMethod.GET, "/api/v3/deployments/" + id + "/outputs", null, DeploymentOutputs.class);
+            super(client, HttpMethod.GET, DEPLOYMENT_PATH + id + "/outputs", null, DeploymentOutputs.class);
         }
     }
 
diff --git a/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/ExecutionsResource.java b/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/ExecutionsResource.java
index 51aaea9..34251bf 100644
--- a/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/ExecutionsResource.java
+++ b/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/ExecutionsResource.java
@@ -33,6 +33,7 @@
 public class ExecutionsResource {
 
     private final CloudifyClient client;
+    private static final String EXECUTIONS_PATH = "/api/v3/executions/";
 
     public ExecutionsResource(CloudifyClient client) {
         this.client = client;
@@ -76,7 +77,7 @@
 
     public class GetExecution extends CloudifyRequest<Execution> {
         public GetExecution(String id) {
-            super(client, HttpMethod.GET, "/api/v3/executions/" + id, null, Execution.class);
+            super(client, HttpMethod.GET, EXECUTIONS_PATH + id, null, Execution.class);
         }
     }
 
@@ -95,13 +96,13 @@
 
     public class UpdateExecution extends CloudifyRequest<Execution> {
         public UpdateExecution(String executionId, UpdateExecutionParams body) {
-            super(client, HttpMethod.PATCH, "/api/v3/executions/" + executionId, Entity.json(body), Execution.class);
+            super(client, HttpMethod.PATCH, EXECUTIONS_PATH + executionId, Entity.json(body), Execution.class);
         }
     }
 
     public class CancelExecution extends CloudifyRequest<Execution> {
         public CancelExecution(String executionId, CancelExecutionParams body) {
-            super(client, HttpMethod.POST, "/api/v3/executions/" + executionId, Entity.json(body), Execution.class);
+            super(client, HttpMethod.POST, EXECUTIONS_PATH + executionId, Entity.json(body), Execution.class);
         }
     }
 
diff --git a/cloudify-client/src/main/java/org/onap/so/cloudify/v3/model/CancelExecutionParams.java b/cloudify-client/src/main/java/org/onap/so/cloudify/v3/model/CancelExecutionParams.java
index 0fbe1fc..7f96b8f 100644
--- a/cloudify-client/src/main/java/org/onap/so/cloudify/v3/model/CancelExecutionParams.java
+++ b/cloudify-client/src/main/java/org/onap/so/cloudify/v3/model/CancelExecutionParams.java
@@ -30,8 +30,8 @@
     @JsonProperty("action")
     private String action;
 
-    public final static String CANCEL_ACTION = "cancel";
-    public final static String FORCE_CANCEL_ACTION = "force-cancel";
+    public static final String CANCEL_ACTION = "cancel";
+    public static final String FORCE_CANCEL_ACTION = "force-cancel";
 
     public String getAction() {
         return action;
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java
index d11f170..e6e8167 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java
@@ -49,6 +49,9 @@
 public class CamundaClient extends RequestClient {
     private static Logger logger = LoggerFactory.getLogger(CamundaClient.class);
     private static final String CAMUNDA_URL_MESAGE = "Camunda url is: ";
+    private static final String CAMUNDA_RESPONSE = "Response is: {}";
+    private static final String AUTHORIZATION = "Authorization";
+    private static final String BASIC = "Basic ";
 
     public CamundaClient() {
         super(CommonConstants.CAMUNDA);
@@ -71,7 +74,7 @@
         setupHeaders(post);
 
         HttpResponse response = client.execute(post);
-        logger.debug("Response is: {}", response);
+        logger.debug(CAMUNDA_RESPONSE, response);
 
         return response;
     }
@@ -88,8 +91,8 @@
                 String userCredentials = getEncryptedPropValue(encryptedCredentials, CommonConstants.DEFAULT_BPEL_AUTH,
                         props.getProperty(CommonConstants.ENCRYPTION_KEY_PROP));
                 if (userCredentials != null) {
-                    post.addHeader("Authorization",
-                            "Basic " + new String(DatatypeConverter.printBase64Binary(userCredentials.getBytes())));
+                    post.addHeader(AUTHORIZATION,
+                            BASIC + new String(DatatypeConverter.printBase64Binary(userCredentials.getBytes())));
                 }
             }
         }
@@ -111,8 +114,8 @@
                 String userCredentials = getEncryptedPropValue(encryptedCredentials, CommonConstants.DEFAULT_BPEL_AUTH,
                         props.getProperty(CommonConstants.ENCRYPTION_KEY_PROP));
                 if (userCredentials != null) {
-                    post.addHeader("Authorization",
-                            "Basic " + new String(DatatypeConverter.printBase64Binary(userCredentials.getBytes())));
+                    post.addHeader(AUTHORIZATION,
+                            BASIC + new String(DatatypeConverter.printBase64Binary(userCredentials.getBytes())));
                 }
             }
         }
@@ -120,7 +123,7 @@
 
         post.setEntity(input);
         HttpResponse response = client.execute(post);
-        logger.debug("Response is: {}", response);
+        logger.debug(CAMUNDA_RESPONSE, response);
 
         return response;
     }
@@ -151,15 +154,15 @@
                 String userCredentials = getEncryptedPropValue(encryptedCredentials, CommonConstants.DEFAULT_BPEL_AUTH,
                         props.getProperty(CommonConstants.ENCRYPTION_KEY_PROP));
                 if (userCredentials != null) {
-                    post.addHeader("Authorization",
-                            "Basic " + new String(DatatypeConverter.printBase64Binary(userCredentials.getBytes())));
+                    post.addHeader(AUTHORIZATION,
+                            BASIC + new String(DatatypeConverter.printBase64Binary(userCredentials.getBytes())));
                 }
             }
         }
 
         post.setEntity(input);
         HttpResponse response = client.execute(post);
-        logger.debug("Response is: {}", response);
+        logger.debug(CAMUNDA_RESPONSE, response);
 
         return response;
     }
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/RequestClient.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/RequestClient.java
index 0aac35d..9b78017 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/RequestClient.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/RequestClient.java
@@ -79,8 +79,7 @@
 
     protected String decryptPropValue(String prop, String defaultValue, String encryptionKey) {
         try {
-            String result = CryptoUtils.decrypt(prop, encryptionKey);
-            return result;
+            return CryptoUtils.decrypt(prop, encryptionKey);
         } catch (GeneralSecurityException e) {
             logger.debug("Security exception", e);
         }
@@ -89,14 +88,10 @@
 
     protected String getEncryptedPropValue(String prop, String defaultValue, String encryptionKey) {
         try {
-            String result = CryptoUtils.decrypt(prop, encryptionKey);
-            return result;
+            return CryptoUtils.decrypt(prop, encryptionKey);
         } catch (GeneralSecurityException e) {
             logger.debug("Security exception", e);
         }
         return defaultValue;
     }
-
-
-
 }
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/ResponseHandler.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/ResponseHandler.java
index fff4c1d..095182f 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/ResponseHandler.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/ResponseHandler.java
@@ -80,12 +80,8 @@
                     new ErrorLoggerInfo.Builder(MessageEnum.APIH_VALIDATION_ERROR, ErrorCode.SchemaError)
                             .errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build();
 
-
-            ValidateException validateException =
-                    new ValidateException.Builder("IOException getting Camunda response body",
-                            HttpStatus.SC_BAD_REQUEST, ErrorNumbers.SVC_BAD_PARAMETER).cause(e)
-                                    .errorInfo(errorLoggerInfo).build();
-            throw validateException;
+            throw new ValidateException.Builder("IOException getting Camunda response body", HttpStatus.SC_BAD_REQUEST,
+                    ErrorNumbers.SVC_BAD_PARAMETER).cause(e).errorInfo(errorLoggerInfo).build();
         }
 
         ObjectMapper mapper = new ObjectMapper();
@@ -96,11 +92,8 @@
                     new ErrorLoggerInfo.Builder(MessageEnum.APIH_REQUEST_VALIDATION_ERROR, ErrorCode.SchemaError)
                             .errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build();
 
-
-            ValidateException validateException =
-                    new ValidateException.Builder("Cannot parse Camunda Response", HttpStatus.SC_BAD_REQUEST,
-                            ErrorNumbers.SVC_BAD_PARAMETER).cause(e).errorInfo(errorLoggerInfo).build();
-            throw validateException;
+            throw new ValidateException.Builder("Cannot parse Camunda Response", HttpStatus.SC_BAD_REQUEST,
+                    ErrorNumbers.SVC_BAD_PARAMETER).cause(e).errorInfo(errorLoggerInfo).build();
         }
         if (response != null) {
             responseBody = response.getResponse();
@@ -125,22 +118,16 @@
         } catch (IOException e) {
             ErrorLoggerInfo errorLoggerInfo =
                     new ErrorLoggerInfo.Builder(MessageEnum.APIH_GENERAL_EXCEPTION, ErrorCode.DataError).build();
-            ValidateException validateException =
-                    new ValidateException.Builder("Could not convert BPEL response to string",
-                            HttpStatus.SC_BAD_REQUEST, ErrorNumbers.SVC_BAD_PARAMETER).cause(e)
-                                    .errorInfo(errorLoggerInfo).build();
-            throw validateException;
+
+            throw new ValidateException.Builder("Could not convert BPEL response to string", HttpStatus.SC_BAD_REQUEST,
+                    ErrorNumbers.SVC_BAD_PARAMETER).cause(e).errorInfo(errorLoggerInfo).build();
         }
         if (status != HttpStatus.SC_ACCEPTED) {
             ErrorLoggerInfo errorLoggerInfo = new ErrorLoggerInfo.Builder(MessageEnum.APIH_ERROR_FROM_BPEL_SERVER,
                     ErrorCode.BusinessProcesssError).targetEntity("BPEL").targetServiceName("parseBpel").build();
 
-
-            BPMNFailureException bpmnFailureException =
-                    new BPMNFailureException.Builder(String.valueOf(status), status, ErrorNumbers.ERROR_FROM_BPEL)
-                            .errorInfo(errorLoggerInfo).build();
-
-            throw bpmnFailureException;
+            throw new BPMNFailureException.Builder(String.valueOf(status), status, ErrorNumbers.ERROR_FROM_BPEL)
+                    .errorInfo(errorLoggerInfo).build();
         }
 
     }
@@ -157,24 +144,17 @@
             ErrorLoggerInfo errorLoggerInfo =
                     new ErrorLoggerInfo.Builder(MessageEnum.APIH_GENERAL_EXCEPTION, ErrorCode.DataError).build();
 
-
-            ValidateException validateException =
-                    new ValidateException.Builder("Could not convert CamundaTask response to string",
-                            HttpStatus.SC_BAD_REQUEST, ErrorNumbers.SVC_BAD_PARAMETER).cause(e)
-                                    .errorInfo(errorLoggerInfo).build();
-            throw validateException;
+            throw new ValidateException.Builder("Could not convert CamundaTask response to string",
+                    HttpStatus.SC_BAD_REQUEST, ErrorNumbers.SVC_BAD_PARAMETER).cause(e).errorInfo(errorLoggerInfo)
+                            .build();
         }
         if (status != HttpStatus.SC_NO_CONTENT && status != HttpStatus.SC_ACCEPTED) {
             ErrorLoggerInfo errorLoggerInfo = new ErrorLoggerInfo.Builder(MessageEnum.APIH_ERROR_FROM_BPEL_SERVER,
                     ErrorCode.BusinessProcesssError).targetEntity("CAMUNDATASK").targetServiceName("parseCamundaTask")
                             .build();
 
-
-            BPMNFailureException bpmnFailureException =
-                    new BPMNFailureException.Builder(String.valueOf(status), status, ErrorNumbers.ERROR_FROM_BPEL)
-                            .errorInfo(errorLoggerInfo).build();
-
-            throw bpmnFailureException;
+            throw new BPMNFailureException.Builder(String.valueOf(status), status, ErrorNumbers.ERROR_FROM_BPEL)
+                    .errorInfo(errorLoggerInfo).build();
         }
 
     }
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/Constants.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/Constants.java
index 7cf2046..ec58364 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/Constants.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/Constants.java
@@ -41,12 +41,12 @@
 
     public static final String A_LA_CARTE = "aLaCarte";
 
-    public final static String MSO_PROP_APIHANDLER_INFRA = "MSO_PROP_APIHANDLER_INFRA";
+    public static final String MSO_PROP_APIHANDLER_INFRA = "MSO_PROP_APIHANDLER_INFRA";
 
-    public final static String VNF_REQUEST_SCOPE = "vnf";
-    public final static String SERVICE_INSTANCE_PATH = "/serviceInstances";
-    public final static String SERVICE_INSTANTIATION_PATH = "/serviceInstantiation";
-    public final static String ORCHESTRATION_REQUESTS_PATH = "/orchestrationRequests";
+    public static final String VNF_REQUEST_SCOPE = "vnf";
+    public static final String SERVICE_INSTANCE_PATH = "/serviceInstances";
+    public static final String SERVICE_INSTANTIATION_PATH = "/serviceInstantiation";
+    public static final String ORCHESTRATION_REQUESTS_PATH = "/orchestrationRequests";
 
     private Constants() {}
 
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/AAIClientHelper.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/AAIClientHelper.java
index 8b3b91a..d9db571 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/AAIClientHelper.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/AAIClientHelper.java
@@ -42,7 +42,7 @@
 @Component
 public class AAIClientHelper {
 
-    private static Logger logger = LoggerFactory.getLogger(AAIClientHelper.class);
+
 
     /**
      * Get managing ECOMP Environment Info from A&AI
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpec.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpec.java
index 00eff8f..9a95640 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpec.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpec.java
@@ -1,7 +1,6 @@
 package org.onap.so.db.catalog.beans;
 
 import java.io.Serializable;
-import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 import javax.persistence.Column;
@@ -10,9 +9,6 @@
 import javax.persistence.GeneratedValue;
 import javax.persistence.GenerationType;
 import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.Lob;
-import javax.persistence.ManyToOne;
 import javax.persistence.OneToMany;
 import javax.persistence.PrePersist;
 import javax.persistence.Table;
@@ -22,8 +18,6 @@
 import org.apache.commons.lang3.builder.HashCodeBuilder;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import com.openpojo.business.annotation.BusinessKey;
-import org.hibernate.annotations.NotFound;
-import org.hibernate.annotations.NotFoundAction;
 import uk.co.blackpepper.bowman.annotation.LinkedResource;
 
 @Entity
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecCategories.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecCategories.java
index 3518805..f1ee006 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecCategories.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecCategories.java
@@ -21,7 +21,6 @@
 package org.onap.so.db.catalog.beans;
 
 import java.io.Serializable;
-import java.util.Date;
 import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
@@ -32,15 +31,11 @@
 import javax.persistence.IdClass;
 import javax.persistence.JoinColumn;
 import javax.persistence.ManyToOne;
-import javax.persistence.PrePersist;
 import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
 import org.apache.commons.lang3.builder.EqualsBuilder;
 import org.apache.commons.lang3.builder.HashCodeBuilder;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import com.openpojo.business.annotation.BusinessKey;
-import uk.co.blackpepper.bowman.annotation.LinkedResource;
 
 @Entity
 @IdClass(ActivitySpecActivitySpecCategoriesId.class)
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecParameters.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecParameters.java
index f0c9bd9..49c5d98 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecParameters.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecParameters.java
@@ -21,7 +21,6 @@
 package org.onap.so.db.catalog.beans;
 
 import java.io.Serializable;
-import java.util.Date;
 import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
@@ -32,15 +31,11 @@
 import javax.persistence.IdClass;
 import javax.persistence.JoinColumn;
 import javax.persistence.ManyToOne;
-import javax.persistence.PrePersist;
 import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
 import org.apache.commons.lang3.builder.EqualsBuilder;
 import org.apache.commons.lang3.builder.HashCodeBuilder;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import com.openpojo.business.annotation.BusinessKey;
-import uk.co.blackpepper.bowman.annotation.LinkedResource;
 
 @Entity
 @IdClass(ActivitySpecActivitySpecParametersId.class)
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecCategories.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecCategories.java
index a42a73a..56aecc4 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecCategories.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecCategories.java
@@ -1,8 +1,6 @@
 package org.onap.so.db.catalog.beans;
 
 import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Date;
 import java.util.List;
 import javax.persistence.Column;
 import javax.persistence.Entity;
@@ -10,20 +8,12 @@
 import javax.persistence.GeneratedValue;
 import javax.persistence.GenerationType;
 import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.Lob;
-import javax.persistence.ManyToOne;
 import javax.persistence.OneToMany;
-import javax.persistence.PrePersist;
 import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
 import org.apache.commons.lang3.builder.EqualsBuilder;
 import org.apache.commons.lang3.builder.HashCodeBuilder;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import com.openpojo.business.annotation.BusinessKey;
-import org.hibernate.annotations.NotFound;
-import org.hibernate.annotations.NotFoundAction;
 import uk.co.blackpepper.bowman.annotation.LinkedResource;
 
 @Entity
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecUserParameters.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecUserParameters.java
index be32da3..6a7b5ba 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecUserParameters.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecUserParameters.java
@@ -21,7 +21,6 @@
 package org.onap.so.db.catalog.beans;
 
 import java.io.Serializable;
-import java.util.Date;
 import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
@@ -32,15 +31,11 @@
 import javax.persistence.IdClass;
 import javax.persistence.JoinColumn;
 import javax.persistence.ManyToOne;
-import javax.persistence.PrePersist;
 import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
 import org.apache.commons.lang3.builder.EqualsBuilder;
 import org.apache.commons.lang3.builder.HashCodeBuilder;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import com.openpojo.business.annotation.BusinessKey;
-import uk.co.blackpepper.bowman.annotation.LinkedResource;
 
 @Entity
 @IdClass(ActivitySpecUserParametersId.class)
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/BuildingBlockDetail.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/BuildingBlockDetail.java
index 54e2144..f94b815 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/BuildingBlockDetail.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/BuildingBlockDetail.java
@@ -21,22 +21,17 @@
 package org.onap.so.db.catalog.beans;
 
 import java.io.Serializable;
-import java.util.List;
-import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.EnumType;
 import javax.persistence.Enumerated;
-import javax.persistence.FetchType;
 import javax.persistence.GeneratedValue;
 import javax.persistence.GenerationType;
 import javax.persistence.Id;
-import javax.persistence.OneToMany;
 import javax.persistence.Table;
 import org.apache.commons.lang3.builder.EqualsBuilder;
 import org.apache.commons.lang3.builder.HashCodeBuilder;
 import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.onap.so.db.catalog.beans.macro.OrchestrationFlow;
 import com.openpojo.business.annotation.BusinessKey;
 
 @Entity
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ConfigurationResourceCustomization.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ConfigurationResourceCustomization.java
index 1117648..4599c97 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ConfigurationResourceCustomization.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ConfigurationResourceCustomization.java
@@ -22,7 +22,6 @@
 
 import java.io.Serializable;
 import java.util.Date;
-import java.util.List;
 import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
@@ -32,8 +31,6 @@
 import javax.persistence.Id;
 import javax.persistence.JoinColumn;
 import javax.persistence.ManyToOne;
-import javax.persistence.MapsId;
-import javax.persistence.OneToMany;
 import javax.persistence.OneToOne;
 import javax.persistence.PrePersist;
 import javax.persistence.Table;
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/NetworkResourceCustomization.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/NetworkResourceCustomization.java
index 9287fbc..21b1550 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/NetworkResourceCustomization.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/NetworkResourceCustomization.java
@@ -44,33 +44,6 @@
 public class NetworkResourceCustomization implements Serializable {
     public static final long serialVersionUID = -1322322139926390329L;
 
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this).append("modelCustomizationUUID", modelCustomizationUUID)
-                .append("modelInstanceName", modelInstanceName).append("created", created)
-                .append("networkTechnology", networkTechnology).append("networkType", networkType)
-                .append("networkScope", networkScope).append("networkRole", networkRole)
-                .append("networkResource", networkResource).toString();
-    }
-
-    @Override
-    public boolean equals(final Object other) {
-        if (!(other instanceof NetworkResourceCustomization)) {
-            return false;
-        }
-        NetworkResourceCustomization castOther = (NetworkResourceCustomization) other;
-        return new EqualsBuilder().append(modelCustomizationUUID, castOther.modelCustomizationUUID).isEquals();
-    }
-
-    @Override
-    public int hashCode() {
-        return new HashCodeBuilder().append(modelCustomizationUUID).toHashCode();
-    }
-
-    public NetworkResourceCustomization() {
-        super();
-    }
-
     @BusinessKey
     @Id
     @Column(name = "MODEL_CUSTOMIZATION_UUID")
@@ -102,6 +75,10 @@
     @JoinColumn(name = "NETWORK_RESOURCE_MODEL_UUID")
     private NetworkResource networkResource = null;
 
+    public NetworkResourceCustomization() {
+        super();
+    }
+
     @PrePersist
     protected void onCreate() {
         this.created = new Date();
@@ -175,4 +152,27 @@
     public void setResourceInput(String resourceInput) {
         this.resourceInput = resourceInput;
     }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this).append("modelCustomizationUUID", modelCustomizationUUID)
+                .append("modelInstanceName", modelInstanceName).append("created", created)
+                .append("networkTechnology", networkTechnology).append("networkType", networkType)
+                .append("networkScope", networkScope).append("networkRole", networkRole)
+                .append("networkResource", networkResource).toString();
+    }
+
+    @Override
+    public boolean equals(final Object other) {
+        if (!(other instanceof NetworkResourceCustomization)) {
+            return false;
+        }
+        NetworkResourceCustomization castOther = (NetworkResourceCustomization) other;
+        return new EqualsBuilder().append(modelCustomizationUUID, castOther.modelCustomizationUUID).isEquals();
+    }
+
+    @Override
+    public int hashCode() {
+        return new HashCodeBuilder().append(modelCustomizationUUID).toHashCode();
+    }
 }
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/utils/MavenLikeVersioning.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/utils/MavenLikeVersioning.java
index a7610fe..98db12c 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/utils/MavenLikeVersioning.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/utils/MavenLikeVersioning.java
@@ -90,8 +90,8 @@
     public boolean isTheSameVersion(String versionToCompare) {
         if (versionToCompare == null && this.version == null) {
             return true;
-        } else if (versionToCompare == null || versionToCompare.trim().equals("") || this.version == null
-                || this.version.trim().equals("")) {
+        } else if (versionToCompare == null || "".equals(versionToCompare.trim()) || this.version == null
+                || "".equals(this.version.trim())) {
             return false;
         }
         String[] currentVersionArray = this.version.split("\\.");
