diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatEnvironmentEntry.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatEnvironmentEntry.java
index 8cacf85..468b771 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatEnvironmentEntry.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatEnvironmentEntry.java
@@ -132,14 +132,14 @@
     }
 
     public boolean hasResources() {
-        if (this.resources != null && this.resources.size() > 0) {
+        if (this.resources != null && !this.resources.isEmpty()) {
             return true;
         }
         return false;
     }
 
     public boolean hasParameters() {
-        if (this.parameters != null && this.parameters.size() > 0) {
+        if (this.parameters != null && !this.parameters.isEmpty()) {
             return true;
         }
         return false;
@@ -147,7 +147,7 @@
 
     public boolean containsParameter(String paramName) {
         boolean contains = false;
-        if (this.parameters == null || this.parameters.size() < 1) {
+        if (this.parameters == null || this.parameters.isEmpty()) {
             return false;
         }
         if (this.parameters.contains(new MsoHeatEnvironmentParameter(paramName))) {
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoNeutronUtils.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoNeutronUtils.java
index 069c6c7..44fc620 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoNeutronUtils.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoNeutronUtils.java
@@ -130,13 +130,13 @@
         network.setAdminStateUp(true);
 
         if (type == NetworkType.PROVIDER) {
-            if (provider != null && vlans != null && vlans.size() > 0) {
+            if (provider != null && vlans != null && !vlans.isEmpty()) {
                 network.setProviderPhysicalNetwork(provider);
                 network.setProviderNetworkType("vlan");
                 network.setProviderSegmentationId(vlans.get(0));
             }
         } else if (type == NetworkType.MULTI_PROVIDER) {
-            if (provider != null && vlans != null && vlans.size() > 0) {
+            if (provider != null && vlans != null && !vlans.isEmpty()) {
                 List<Segment> segments = new ArrayList<>(vlans.size());
                 for (int vlan : vlans) {
                     Segment segment = new Segment();
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/WebSecurityConfigImpl.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/WebSecurityConfigImpl.java
index f45d5a0..7920023 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/WebSecurityConfigImpl.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/WebSecurityConfigImpl.java
@@ -40,7 +40,7 @@
 
     @Override
     protected void configure(final HttpSecurity http) throws Exception {
-        if (clientAuth.equalsIgnoreCase("need")) {
+        if (("need").equalsIgnoreCase(clientAuth)) {
             http.csrf().disable().authorizeRequests().anyRequest().permitAll();
         } else {
             http.csrf().disable().authorizeRequests().antMatchers("/manage/health", "/manage/info").permitAll()
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/activity/DeployActivitySpecs.java b/asdc-controller/src/main/java/org/onap/so/asdc/activity/DeployActivitySpecs.java
index e048d4c..0fc94c8 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/activity/DeployActivitySpecs.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/activity/DeployActivitySpecs.java
@@ -97,10 +97,8 @@
         }
         List<String> categoryList = new ArrayList<>();
         for (ActivitySpecActivitySpecCategories activitySpecCat : activitySpecActivitySpecCategories) {
-            if (activitySpecCat != null) {
-                if (activitySpecCat.getActivitySpecCategories() != null) {
-                    categoryList.add(activitySpecCat.getActivitySpecCategories().getName());
-                }
+            if (activitySpecCat != null && activitySpecCat.getActivitySpecCategories() != null) {
+                categoryList.add(activitySpecCat.getActivitySpecCategories().getName());
             }
         }
         activitySpec.setCategoryList(categoryList);
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtil.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtil.groovy
index 64567a3..5525c26 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtil.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtil.groovy
@@ -6,7 +6,7 @@
  * ================================================================================
  * Modifications Copyright (c) 2019 Samsung
  * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
  *
@@ -40,11 +40,11 @@
 
 	String Prefix="EXTAPI_"
 
-    private static final Logger logger = LoggerFactory.getLogger( ExternalAPIUtil.class);
+    private static final Logger logger = LoggerFactory.getLogger( ExternalAPIUtil.class)
 
-	private final HttpClientFactory httpClientFactory;
-	private final MsoUtils utils;
-	private final ExceptionUtil exceptionUtil;
+	private final HttpClientFactory httpClientFactory
+	private final MsoUtils utils
+	private final ExceptionUtil exceptionUtil
 
 	public static final String PostServiceOrderRequestsTemplate =
 	"{\n" +
@@ -107,22 +107,22 @@
 //	}
 
 	public String setTemplate(String template, Map<String, String> valueMap) {
-		logger.debug("ExternalAPIUtil setTemplate", true);
-		StringBuffer result = new StringBuffer();
+		logger.debug("ExternalAPIUtil setTemplate", true)
+		StringBuffer result = new StringBuffer()
 
-		String pattern = "<.*>";
-		Pattern r = Pattern.compile(pattern);
-		Matcher m = r.matcher(template);
+		String pattern = "<.*>"
+		Pattern r = Pattern.compile(pattern)
+		Matcher m = r.matcher(template)
 
-		logger.debug("ExternalAPIUtil template:" + template, true);
+		logger.debug("ExternalAPIUtil template:" + template, true)
 		while (m.find()) {
-			String key = template.substring(m.start() + 1, m.end() - 1);
-			logger.debug("ExternalAPIUtil key:" + key + " contains key? " + valueMap.containsKey(key), true);
-			m.appendReplacement(result, valueMap.getOrDefault(key, "\"TBD\""));
+			String key = template.substring(m.start() + 1, m.end() - 1)
+			logger.debug("ExternalAPIUtil key:" + key + " contains key? " + valueMap.containsKey(key), true)
+			m.appendReplacement(result, valueMap.getOrDefault(key, "\"TBD\""))
 		}
-		m.appendTail(result);
-		logger.debug("ExternalAPIUtil return:" + result.toString(), true);
-		return result.toString();
+		m.appendTail(result)
+		logger.debug("ExternalAPIUtil return:" + result.toString(), true)
+		return result.toString()
 	}
 
 	/**
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtilFactory.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtilFactory.groovy
index e7f4646..549267e 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtilFactory.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtilFactory.groovy
@@ -4,7 +4,7 @@
  * ================================================================================
  * Copyright (C) 2018 Nokia.
  * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
  *
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapter.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapter.groovy
index f013fa8..db39358 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapter.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapter.groovy
@@ -6,7 +6,7 @@
  * ================================================================================
  * Modifications Copyright (c) 2019 Samsung
  * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
  *
@@ -22,9 +22,9 @@
 
 package org.onap.so.bpmn.common.scripts
 
-import org.onap.so.logger.LoggingAnchor;
+import org.onap.so.logger.LoggingAnchor
 import org.onap.so.bpmn.core.UrnPropertiesReader
-import org.onap.so.logger.ErrorCode;
+import org.onap.so.logger.ErrorCode
 
 import java.text.SimpleDateFormat
 
@@ -39,7 +39,7 @@
 
 // SDNC Adapter Request/Response processing
 public class SDNCAdapter extends AbstractServiceTaskProcessor {
-    private static final Logger logger = LoggerFactory.getLogger( SDNCAdapter.class);
+    private static final Logger logger = LoggerFactory.getLogger( SDNCAdapter.class)
 
 
 	def Prefix="SDNCA_"
@@ -77,7 +77,7 @@
 			} catch (IOException ex) {
 				logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
 						"Unable to encode username password string", "BPMN",
-						ErrorCode.UnknownError.getValue());
+						ErrorCode.UnknownError.getValue())
 			}
 
 			// TODO Use variables instead of passing xml request - Huh?
@@ -238,9 +238,9 @@
 		def sdnccallbackreq=execution.getVariable("sdncAdapterCallbackRequest")
 		logger.debug("sdncAdapterCallbackRequest :" + sdnccallbackreq)
 		if (sdnccallbackreq==null){
-			execution.setVariable("callbackResponseReceived",false);
+			execution.setVariable("callbackResponseReceived",false)
 		}else{
-			execution.setVariable("callbackResponseReceived",true);
+			execution.setVariable("callbackResponseReceived",true)
 		}
 	}
 
@@ -303,10 +303,10 @@
 	}
 
 	public String generateCurrentTimeInUtc(){
-		final  SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
-		sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
-		final String utcTime = sdf.format(new Date());
-		return utcTime;
+		final  SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
+		sdf.setTimeZone(TimeZone.getTimeZone("UTC"))
+		final String utcTime = sdf.format(new Date())
+		return utcTime
 	}
 
 	public void toggleSuccessIndicator(DelegateExecution execution){
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV1.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV1.groovy
index 449f4e3..c30d807 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV1.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV1.groovy
@@ -6,7 +6,7 @@
  * ================================================================================
  * Modifications Copyright (c) 2019 Samsung
  * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
  *
@@ -53,7 +53,7 @@
 
 
 class SDNCAdapterRestV1 extends AbstractServiceTaskProcessor {
-    private static final Logger logger = LoggerFactory.getLogger( SDNCAdapterRestV1.class);
+    private static final Logger logger = LoggerFactory.getLogger( SDNCAdapterRestV1.class)
 
 
 	ExceptionUtil exceptionUtil = new ExceptionUtil()
@@ -88,7 +88,7 @@
 				String msg = getProcessKey(execution) + ': mso:adapters:sdnc:rest:endpoint URN mapping is not defined'
 				logger.debug(msg)
 				logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
-						ErrorCode.UnknownError.getValue());
+						ErrorCode.UnknownError.getValue())
 				exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
 			}
 
@@ -109,7 +109,7 @@
 					String msg = getProcessKey(execution) + ': no sdncRequestId in ' + requestType
 					logger.debug(msg)
 					logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
-							ErrorCode.UnknownError.getValue());
+							ErrorCode.UnknownError.getValue())
 					exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
 				}
 
@@ -124,7 +124,7 @@
 					String msg = getProcessKey(execution) + ': no bpNotificationUrl in ' + requestType
 					logger.debug(msg)
 					logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
-							ErrorCode.UnknownError.getValue());
+							ErrorCode.UnknownError.getValue())
 					exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
 				}
 
@@ -141,7 +141,7 @@
 				String msg = getProcessKey(execution) + ': Unsupported request type: ' + requestType
 				logger.debug(msg)
 				logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
-						ErrorCode.UnknownError.getValue());
+						ErrorCode.UnknownError.getValue())
 				exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
 			}
 
@@ -157,7 +157,7 @@
 				logger.debug(getProcessKey(execution) + ": mso:adapters:po:auth URN mapping is not defined")
 				logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
 						getProcessKey(execution) + ": mso:adapters:po:auth URN mapping is not defined", "BPMN",
-						ErrorCode.UnknownError.getValue());
+						ErrorCode.UnknownError.getValue())
 			} else {
 				try {
 					def encodedString = utils.getBasicAuth(basicAuthValue, UrnPropertiesReader.getVariable("mso.msoKey", execution))
@@ -166,7 +166,7 @@
 					logger.debug(getProcessKey(execution) + ": Unable to encode BasicAuth credentials for SDNCAdapter")
 					logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
 							getProcessKey(execution) + ": Unable to encode BasicAuth credentials for SDNCAdapter",
-							"BPMN", ErrorCode.UnknownError.getValue(), ex);
+							"BPMN", ErrorCode.UnknownError.getValue(), ex)
 				}
 			}
 
@@ -176,7 +176,7 @@
 			String timeout = jsonUtil.getJsonValue(request, requestType + ".bpTimeout")
 
 			// in addition to null/empty, also need to verify that the timer value is a valid duration "P[n]T[n]H|M|S"
-			String timerRegex = "PT[0-9]+[HMS]";
+			String timerRegex = "PT[0-9]+[HMS]"
 			if (timeout == null || timeout.isEmpty() || !timeout.matches(timerRegex)) {
 				logger.debug(getProcessKey(execution) + ': preProcessRequest(): null/empty/invalid bpTimeout value. Using "mso.adapters.sdnc.timeout"')
 				timeout = UrnPropertiesReader.getVariable("mso.adapters.sdnc.timeout", execution)
@@ -197,7 +197,7 @@
 			String msg = 'Caught exception in ' + method + ": " + e
 			logger.debug(msg)
 			logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
-					ErrorCode.UnknownError.getValue());
+					ErrorCode.UnknownError.getValue())
 			exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
 		}
 	}
@@ -221,7 +221,7 @@
 			String sdncAdapterRequest = execution.getVariable(prefix + 'sdncAdapterRequest')
 			logger.debug("SDNC Rest Request is: " + sdncAdapterRequest)
 
-			URL url = new URL(sdncAdapterUrl);
+			URL url = new URL(sdncAdapterUrl)
 
 			HttpClient httpClient = new HttpClientFactory().newJsonClient(url, TargetEntity.SDNC_ADAPTER)
 			httpClient.addAdditionalHeader("X-ONAP-RequestID", execution.getVariable("mso-request-id"))
@@ -245,7 +245,7 @@
 				String msg = 'Unsupported HTTP method "' + sdncAdapterMethod + '" in ' + method + ": " + e
 				logger.debug(msg)
 				logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
-						ErrorCode.UnknownError.getValue());
+						ErrorCode.UnknownError.getValue())
 				exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
 			}
 
@@ -259,7 +259,7 @@
 			String msg = 'Caught exception in ' + method + ": " + e
 			logger.debug(msg, e)
 			logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
-					ErrorCode.UnknownError.getValue());
+					ErrorCode.UnknownError.getValue())
 			exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
 		}
 	}
@@ -330,7 +330,7 @@
 			}
 
 			// Note: the mapping function handles a null or empty responseCode
-			int mappedResponseCode = Integer.parseInt(exceptionUtil.MapSDNCResponseCodeToErrorCode(responseCode));
+			int mappedResponseCode = Integer.parseInt(exceptionUtil.MapSDNCResponseCodeToErrorCode(responseCode))
 			exceptionUtil.buildWorkflowException(execution, mappedResponseCode, "Received " + responseType +
 				" from SDNCAdapter:" + info)
 		} catch (Exception e) {
@@ -370,7 +370,7 @@
 			String msg = 'Caught exception in ' + method + ": " + e
 			logger.debug(msg)
 			logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
-					ErrorCode.UnknownError.getValue());
+					ErrorCode.UnknownError.getValue())
 			exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
 		}
 	}
@@ -396,12 +396,12 @@
 			String msg = 'Caught exception in ' + method + ": " + e
 			logger.debug(msg)
 			logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
-					ErrorCode.UnknownError.getValue());
+					ErrorCode.UnknownError.getValue())
 			exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
 		}
 	}
 	
 	public Logger getLogger() {
-		return logger;
+		return logger
 	}
 }
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV2.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV2.groovy
index 62c7bb5..ba5145d 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV2.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV2.groovy
@@ -6,7 +6,7 @@
  * ================================================================================
  * Modifications Copyright (c) 2019 Samsung
  * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
  *
@@ -51,7 +51,7 @@
  * any non-final response received from SDNC.
  */
 class SDNCAdapterRestV2 extends SDNCAdapterRestV1 {
-    private static final Logger logger = LoggerFactory.getLogger( SDNCAdapterRestV2.class);
+    private static final Logger logger = LoggerFactory.getLogger( SDNCAdapterRestV2.class)
 
 
 	ExceptionUtil exceptionUtil = new ExceptionUtil()
@@ -87,7 +87,7 @@
 				String msg = getProcessKey(execution) + ': mso:adapters:sdnc:rest:endpoint URN mapping is not defined'
 				logger.debug(msg)
 				logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
-						ErrorCode.UnknownError.getValue());
+						ErrorCode.UnknownError.getValue())
 				exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
 			}
 
@@ -108,7 +108,7 @@
 					String msg = getProcessKey(execution) + ': no sdncRequestId in ' + requestType
 					logger.debug(msg)
 					logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
-							ErrorCode.UnknownError.getValue());
+							ErrorCode.UnknownError.getValue())
 					exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
 				}
 
@@ -123,7 +123,7 @@
 					String msg = getProcessKey(execution) + ': no bpNotificationUrl in ' + requestType
 					logger.debug(msg)
 					logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
-							ErrorCode.UnknownError.getValue());
+							ErrorCode.UnknownError.getValue())
 					exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
 				}
 
@@ -134,7 +134,7 @@
 				String msg = getProcessKey(execution) + ': Unsupported request type: ' + requestType
 				logger.debug(msg)
 				logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
-						ErrorCode.UnknownError.getValue());
+						ErrorCode.UnknownError.getValue())
 				exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
 			}
 
@@ -153,7 +153,7 @@
 				logger.debug(getProcessKey(execution) + ": mso:adapters:po:auth URN mapping is not defined")
 				logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
 						getProcessKey(execution) + ": mso:adapters:po:auth URN mapping is not defined", "BPMN",
-						ErrorCode.UnknownError.getValue());
+						ErrorCode.UnknownError.getValue())
 			} else {
 				try {
 					def encodedString = utils.getBasicAuth(basicAuthValue, UrnPropertiesReader.getVariable("mso.msoKey", execution))
@@ -162,7 +162,7 @@
 					logger.debug(getProcessKey(execution) + ": Unable to encode BasicAuth credentials for SDNCAdapter")
 					logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
 							getProcessKey(execution) + ": Unable to encode BasicAuth credentials for SDNCAdapter",
-							"BPMN", ErrorCode.UnknownError.getValue(), ex);
+							"BPMN", ErrorCode.UnknownError.getValue(), ex)
 				}
 			}
 
@@ -172,7 +172,7 @@
 			String timeout = jsonUtil.getJsonValue(request, requestType + ".bpTimeout")
 
 			// in addition to null/empty, also need to verify that the timer value is a valid duration "P[n]T[n]H|M|S"
-			String timerRegex = "PT[0-9]+[HMS]";
+			String timerRegex = "PT[0-9]+[HMS]"
 			if (timeout == null || timeout.isEmpty() || !timeout.matches(timerRegex)) {
 				logger.debug(getProcessKey(execution) + ': preProcessRequest(): null/empty/invalid bpTimeout value. Using "mso.adapters.sdnc.timeout"')
 				timeout = UrnPropertiesReader.getVariable("mso.adapters.sdnc.timeout", execution)
@@ -193,7 +193,7 @@
 			String msg = 'Caught exception in ' + method + ": " + e
 			logger.debug(msg)
 			logger.error(LoggingAnchor.FOUR, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
-					ErrorCode.UnknownError.getValue());
+					ErrorCode.UnknownError.getValue())
 			exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
 		}
 	}
@@ -297,6 +297,6 @@
 	}
 	
 	public Logger getLogger() {
-		return logger;
+		return logger
 	}
 }
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/InstanceResourceList.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/InstanceResourceList.java
index b1173bb..cc3ec52 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/InstanceResourceList.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/resource/InstanceResourceList.java
@@ -108,6 +108,11 @@
             sequencedResourceList.add(vnfResource);
         }
 
+        // check if the resource contains vf-module
+        if (vnfResource != null && vnfResource.getVfModules() != null) {
+            sequencedResourceList.addAll(vnfResource.getVfModules());
+        }
+
         return sequencedResourceList;
     }
 
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy
index 573cd0a..b855e93 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ActivateSDNCNetworkResource.groovy
@@ -6,7 +6,7 @@
  * ================================================================================
  * Modifications Copyright (c) 2019 Samsung
  * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
  *
@@ -45,7 +45,7 @@
  * flow for SDNC Network Resource Activate
  */
 public class ActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
-    private static final Logger logger = LoggerFactory.getLogger( ActivateSDNCNetworkResource.class);
+    private static final Logger logger = LoggerFactory.getLogger( ActivateSDNCNetworkResource.class)
 
     String Prefix = "ACTSDNCRES_"
 
@@ -135,7 +135,7 @@
                                <statusDescription>${msoUtils.xmlEscape(statusDescription)}</statusDescription>
                     </ns:updateResourceOperationStatus>
                 </soapenv:Body>
-                </soapenv:Envelope>""";
+                </soapenv:Envelope>"""
 
         setProgressUpdateVariables(execution, body)
     }
@@ -148,12 +148,12 @@
 
     String customizeResourceParam(String networkInputParametersJson) {
         List<Map<String, Object>> paramList = new ArrayList()
-        JSONObject jsonObject = new JSONObject(networkInputParametersJson);
+        JSONObject jsonObject = new JSONObject(networkInputParametersJson)
         Iterator iterator = jsonObject.keys()
         while (iterator.hasNext()) {
             String key = iterator.next()
             HashMap<String, String> hashMap = new HashMap()
-            hashMap.put("name", key);
+            hashMap.put("name", key)
             hashMap.put("value", jsonObject.get(key))
             paramList.add(hashMap)
         }
@@ -186,7 +186,7 @@
             String serviceModelVersion = resourceInputObj.getServiceModelInfo().getModelVersion()
             String serviceModelName = resourceInputObj.getServiceModelInfo().getModelName()
             String globalCustomerId = resourceInputObj.getGlobalSubscriberId()
-            String modelInvariantUuid = resourceInputObj.getResourceModelInfo().getModelInvariantUuid();
+            String modelInvariantUuid = resourceInputObj.getResourceModelInfo().getModelInvariantUuid()
             String modelCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid()
             String modelUuid = resourceInputObj.getResourceModelInfo().getModelUuid()
             String modelName = resourceInputObj.getResourceModelInfo().getModelName()
@@ -478,4 +478,4 @@
         }
         logger.info("exited send sync Resp")
     }
-}
\ No newline at end of file
+}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CompareModelofE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CompareModelofE2EServiceInstance.groovy
index 608bf66..df11549 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CompareModelofE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CompareModelofE2EServiceInstance.groovy
@@ -6,7 +6,7 @@
  * ================================================================================
  * Modifications Copyright (c) 2019 Samsung
  * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
  * 
@@ -19,9 +19,9 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-package org.onap.so.bpmn.infrastructure.scripts;
+package org.onap.so.bpmn.infrastructure.scripts
 
-import static org.apache.commons.lang3.StringUtils.*;
+import static org.apache.commons.lang3.StringUtils.*
 
 import org.apache.commons.lang3.*
 import org.camunda.bpm.engine.delegate.BpmnError
@@ -55,7 +55,7 @@
  * @param - WorkflowException
  */
 public class CompareModelofE2EServiceInstance extends AbstractServiceTaskProcessor {
-    private static final Logger logger = LoggerFactory.getLogger( CompareModelofE2EServiceInstance.class);
+    private static final Logger logger = LoggerFactory.getLogger( CompareModelofE2EServiceInstance.class)
 
 	String Prefix="CMPMDSI_"
 	private static final String DebugFlag = "isDebugEnabled"
@@ -64,7 +64,7 @@
 	JsonUtils jsonUtil = new JsonUtils()
 	VidUtils vidUtils = new VidUtils()
 
-	public void preProcessRequest (DelegateExecution execution) {
+	 void preProcessRequest (DelegateExecution execution) {
 		execution.setVariable("prefix",Prefix)
 		String msg = ""
 		
@@ -128,7 +128,7 @@
 			execution.setVariable("operationType", "CompareModel") 
 	
 		} catch (BpmnError e) {
-			throw e;
+			throw e
 		} catch (Exception ex){
 			msg = "Exception in preProcessRequest " + ex.getMessage()
 			logger.info(msg)
@@ -137,7 +137,7 @@
 		logger.trace("Exit preProcessRequest ")
 	}
 
-	public void sendSyncResponse (DelegateExecution execution) {
+	 void sendSyncResponse (DelegateExecution execution) {
 		logger.trace("sendSyncResponse  ")
 
 		try {
@@ -155,7 +155,7 @@
 		logger.trace("Exit sendSyncResopnse ")
 	}
 	
-	public void sendSyncError (DelegateExecution execution) {
+	 void sendSyncError (DelegateExecution execution) {
 		logger.trace("sendSyncError ")
 
 		try {
@@ -182,7 +182,7 @@
 
 	}
 	
-	public void prepareCompletionRequest (DelegateExecution execution) {
+	 void prepareCompletionRequest (DelegateExecution execution) {
 		logger.trace("prepareCompletion ")
 
 		try {
@@ -214,7 +214,7 @@
 		logger.trace("Exit prepareCompletionRequest ")
 	}
 	
-	public void prepareFalloutRequest(DelegateExecution execution){
+	 void prepareFalloutRequest(DelegateExecution execution){
 		logger.trace("prepareFalloutRequest ")
 
 		try {
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy
index 8bb48a2..ced1b92 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy
@@ -6,7 +6,7 @@
  * ================================================================================
  * Modifications Copyright (c) 2019 Samsung
  * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
  *
@@ -72,7 +72,7 @@
 
 	JsonUtils jsonUtil = new JsonUtils()
 
-    private static final Logger logger = LoggerFactory.getLogger( Create3rdONAPE2EServiceInstance.class);
+    private static final Logger logger = LoggerFactory.getLogger( Create3rdONAPE2EServiceInstance.class)
 
 	public void checkSPPartnerInfo (DelegateExecution execution) {
 		logger.info(" ***** Started checkSPPartnerInfo *****")
@@ -312,7 +312,7 @@
 			// Put TP Link info into serviceParameters
 			JSONObject inputParameters = new JSONObject(execution.getVariable(Prefix + "ServiceParameters"))
 			if(inputParameters.has("remote-access-provider-id")) {
-				Map<String, Object> crossTPs = new HashMap<String, Object>();
+				Map<String, Object> crossTPs = new HashMap<String, Object>()
 				crossTPs.put("local-access-provider-id", inputParameters.get("remote-access-provider-id"))
 				crossTPs.put("local-access-client-id", inputParameters.get("remote-access-client-id"))
 				crossTPs.put("local-access-topology-id", inputParameters.get("remote-access-topology-id"))
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy
index 2abee7c..cae629f 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy
@@ -7,7 +7,7 @@
  * ================================================================================
  * Modifications Copyright (c) 2019 Samsung
  * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
  * 
@@ -39,7 +39,7 @@
 import org.onap.so.client.aai.AAIResourcesClient
 import org.onap.so.client.aai.entities.uri.AAIResourceUri
 import org.onap.so.client.aai.entities.uri.AAIUriFactory
-import org.onap.so.logger.ErrorCode;
+import org.onap.so.logger.ErrorCode
 import org.onap.so.logger.LoggingAnchor
 import org.onap.so.logger.MessageEnum
 import org.slf4j.Logger
@@ -56,7 +56,7 @@
 	String Prefix="CRESI_"
 	ExceptionUtil exceptionUtil = new ExceptionUtil()
 	JsonUtils jsonUtil = new JsonUtils()
-    private static final Logger logger = LoggerFactory.getLogger( CreateCustomE2EServiceInstance.class);
+    private static final Logger logger = LoggerFactory.getLogger( CreateCustomE2EServiceInstance.class)
 	
 
 	public void preProcessRequest (DelegateExecution execution) {
@@ -154,7 +154,7 @@
 			//execution.setVariable("serviceInputParams", jsonUtil.getJsonValue(siRequest, "requestDetails.requestParameters.userParams"))
 			//execution.setVariable("failExists", true)
 		} catch (BpmnError e) {
-			throw e;
+			throw e
 		} catch (Exception ex){
 			msg = "Exception in preProcessRequest " + ex.getMessage()
 			logger.debug(msg)
@@ -332,7 +332,7 @@
         }catch(Exception e){
 			logger.error(LoggingAnchor.FIVE, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
 					"Exception Occured Processing prepareInitServiceOperationStatus.", "BPMN",
-					ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+					ErrorCode.UnknownError.getValue(), "Exception is:\n" + e)
             execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during prepareInitServiceOperationStatus Method:\n" + e.getMessage())
         }
 		logger.trace("finished prepareInitServiceOperationStatus")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
index bcd3353..4b3c1aa 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
@@ -6,7 +6,7 @@
  * ================================================================================
  * Modifications Copyright (c) 2019 Samsung
  * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
  *
@@ -55,7 +55,7 @@
  */
 public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
 
-    private static final Logger logger = LoggerFactory.getLogger( CreateSDNCNetworkResource.class);
+    private static final Logger logger = LoggerFactory.getLogger( CreateSDNCNetworkResource.class)
     String Prefix="CRESDNCRES_"
 
     ExceptionUtil exceptionUtil = new ExceptionUtil()
@@ -120,20 +120,20 @@
     }
 
     String customizeResourceParam(String networkInputParametersJson) {
-        List<Map<String, Object>> paramList = new ArrayList();
-        JSONObject jsonObject = new JSONObject(networkInputParametersJson);
-        Iterator iterator = jsonObject.keys();
+        List<Map<String, Object>> paramList = new ArrayList()
+        JSONObject jsonObject = new JSONObject(networkInputParametersJson)
+        Iterator iterator = jsonObject.keys()
         while (iterator.hasNext()) {
-            String key = iterator.next();
-            HashMap<String, String> hashMap = new HashMap();
-            hashMap.put("name", key);
+            String key = iterator.next()
+            HashMap<String, String> hashMap = new HashMap()
+            hashMap.put("name", key)
             hashMap.put("value", jsonObject.get(key))
             paramList.add(hashMap)
         }
-        Map<String, List<Map<String, Object>>> paramMap = new HashMap();
-        paramMap.put("param", paramList);
+        Map<String, List<Map<String, Object>>> paramMap = new HashMap()
+        paramMap.put("param", paramList)
 
-        return  new JSONObject(paramMap).toString();
+        return  new JSONObject(paramMap).toString()
     }
 
     private List<Metadatum> getMetaDatum(String customerId,
@@ -347,7 +347,7 @@
             String serviceModelVersion = resourceInputObj.getServiceModelInfo().getModelVersion()
             String serviceModelName = resourceInputObj.getServiceModelInfo().getModelName()
             String globalCustomerId = resourceInputObj.getGlobalSubscriberId()
-            String modelInvariantUuid = resourceInputObj.getResourceModelInfo().getModelInvariantUuid();
+            String modelInvariantUuid = resourceInputObj.getResourceModelInfo().getModelInvariantUuid()
             String modelCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid()
             String modelUuid = resourceInputObj.getResourceModelInfo().getModelUuid()
             String modelName = resourceInputObj.getResourceModelInfo().getModelName()
@@ -357,7 +357,7 @@
             //here convert json string to xml string
             String netowrkInputParameters = XML.toString(new JSONObject(customizeResourceParam(networkInputParametersJson)))
             // 1. prepare assign topology via SDNC Adapter SUBFLOW call
-            String sdncTopologyCreateRequest = "";
+            String sdncTopologyCreateRequest = ""
 
             String modelType = resourceInputObj.getResourceModelInfo().getModelType()
 
@@ -641,7 +641,7 @@
                                <statusDescription>${msoUtils.xmlEscape(statusDescription)}</statusDescription>
                     </ns:updateResourceOperationStatus>
                 </soapenv:Body>
-                </soapenv:Envelope>""";
+                </soapenv:Envelope>"""
 
         setProgressUpdateVariables(execution, body)
 
@@ -674,7 +674,7 @@
                                <statusDescription>${msoUtils.xmlEscape(statusDescription)}</statusDescription>
                     </ns:updateResourceOperationStatus>
                 </soapenv:Body>
-                </soapenv:Envelope>""";
+                </soapenv:Envelope>"""
 
         setProgressUpdateVariables(execution, body)
     }
@@ -724,7 +724,7 @@
         try {
             String operationStatus = "finished"
             // RESTResponse for main flow
-            String vnfid=execution.getVariable("resourceInstanceId");
+            String vnfid=execution.getVariable("resourceInstanceId")
             String resourceOperationResp = """{"operationStatus":"${operationStatus}","vnf-id":"${vnfid}"}""".trim()
             logger.debug(" sendSyncResponse to APIH:" + "\n" + resourceOperationResp)
             sendWorkflowResponse(execution, 202, resourceOperationResp)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy
index 433a8d0..901964f 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVFCNSResource.groovy
@@ -6,7 +6,7 @@
  * ================================================================================
  * Modifications Copyright (c) 2019 Samsung
  * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
  *
@@ -25,7 +25,7 @@
 import org.onap.so.client.HttpClientFactory
 import org.onap.so.client.aai.AAIObjectType
 import org.onap.so.client.aai.entities.uri.AAIResourceUri
-import org.onap.so.client.aai.entities.uri.AAIUriFactory;
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
 import org.camunda.bpm.engine.delegate.BpmnError
 import org.camunda.bpm.engine.delegate.DelegateExecution
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
@@ -44,7 +44,7 @@
  * flow for VFC Network Service Create
  */
 public class CreateVFCNSResource extends AbstractServiceTaskProcessor {
-    private static final Logger logger = LoggerFactory.getLogger( CreateVFCNSResource.class);
+    private static final Logger logger = LoggerFactory.getLogger( CreateVFCNSResource.class)
 
     ExceptionUtil exceptionUtil = new ExceptionUtil()
 
@@ -77,7 +77,7 @@
            String globalSubscriberId = jsonUtil.getJsonValue(resourceInput, "globalSubscriberId")
            logger.info("globalSubscriberId:" + globalSubscriberId)
            //set local globalSubscriberId variable
-           execution.setVariable("globalSubscriberId", globalSubscriberId);
+           execution.setVariable("globalSubscriberId", globalSubscriberId)
            String serviceType = execution.getVariable("serviceType")
            logger.info("serviceType:" + serviceType)
 
@@ -110,9 +110,9 @@
                    "operationId":"${operationId}",
                    "nodeTemplateUUID":"${nodeTemplateUUID}"
                     }"""
-           execution.setVariable("nsOperationKey", nsOperationKey);
+           execution.setVariable("nsOperationKey", nsOperationKey)
            execution.setVariable("nsParameters", nsParameters)
-           execution.setVariable("nsServiceModelUUID", nsServiceModelUUID);
+           execution.setVariable("nsServiceModelUUID", nsServiceModelUUID)
 
            String vfcAdapterUrl = UrnPropertiesReader.getVariable("mso.adapters.vfc.rest.endpoint", execution)
 		   
@@ -128,7 +128,7 @@
            execution.setVariable("vfcAdapterUrl", vfcAdapterUrl)
 
        } catch (BpmnError e) {
-           throw e;
+           throw e
        } catch (Exception ex){
            msg = "Exception in preProcessRequest " + ex.getMessage()
            logger.info(msg)
@@ -143,9 +143,9 @@
     public void createNetworkService(DelegateExecution execution) {
         logger.trace("createNetworkService ")
         String vfcAdapterUrl = execution.getVariable("vfcAdapterUrl")
-        String nsOperationKey = execution.getVariable("nsOperationKey");
-        String nsServiceModelUUID = execution.getVariable("nsServiceModelUUID");
-        String nsParameters = execution.getVariable("nsParameters");
+        String nsOperationKey = execution.getVariable("nsOperationKey")
+        String nsServiceModelUUID = execution.getVariable("nsServiceModelUUID")
+        String nsParameters = execution.getVariable("nsParameters")
         String nsServiceName = execution.getVariable("nsServiceName")
         String nsServiceDescription = execution.getVariable("nsServiceDescription")
         String locationConstraints = jsonUtil.getJsonValue(nsParameters, "locationConstraints")
@@ -163,7 +163,7 @@
         Response apiResponse = postRequest(execution, vfcAdapterUrl + "/ns", reqBody)
         String returnCode = apiResponse.getStatus ()
         String aaiResponseAsString = apiResponse.readEntity(String.class)
-        String nsInstanceId = "";
+        String nsInstanceId = ""
         if(returnCode== "200" || returnCode == "201"){
             nsInstanceId =  jsonUtil.getJsonValue(aaiResponseAsString, "nsInstanceId")
         }
@@ -177,8 +177,8 @@
     public void instantiateNetworkService(DelegateExecution execution) {
         logger.trace("instantiateNetworkService ")
         String vfcAdapterUrl = execution.getVariable("vfcAdapterUrl")
-        String nsOperationKey = execution.getVariable("nsOperationKey");
-        String nsParameters = execution.getVariable("nsParameters");
+        String nsOperationKey = execution.getVariable("nsOperationKey")
+        String nsParameters = execution.getVariable("nsParameters")
         String nsServiceName = execution.getVariable("nsServiceName")
         String nsServiceDescription = execution.getVariable("nsServiceDescription")
         String reqBody ="""{
@@ -192,7 +192,7 @@
         Response apiResponse = postRequest(execution, url, reqBody)
         String returnCode = apiResponse.getStatus()
         String aaiResponseAsString = apiResponse.readEntity(String.class)
-        String jobId = "";
+        String jobId = ""
         if(returnCode== "200"|| returnCode == "201"){
             jobId =  jsonUtil.getJsonValue(aaiResponseAsString, "jobId")
         }
@@ -207,7 +207,7 @@
         logger.trace("queryNSProgress ")
         String vfcAdapterUrl = execution.getVariable("vfcAdapterUrl")
         String jobId = execution.getVariable("jobId")
-        String nsOperationKey = execution.getVariable("nsOperationKey");
+        String nsOperationKey = execution.getVariable("nsOperationKey")
         String url = vfcAdapterUrl + "/jobs/" + jobId
         Response apiResponse = postRequest(execution, url, nsOperationKey)
         String returnCode = apiResponse.getStatus()
@@ -225,9 +225,9 @@
      */
     public void timeDelay(DelegateExecution execution) {
         try {
-            Thread.sleep(5000);
+            Thread.sleep(5000)
         } catch(InterruptedException e) {
-            logger.error("Time Delay exception" + e.getMessage());
+            logger.error("Time Delay exception" + e.getMessage())
         }
     }
 
@@ -252,7 +252,7 @@
             getAAIClient().connect(nsUri,relatedServiceUri)
             logger.info("NS relationship to Service added successfully")
         }catch(Exception e){
-            logger.error("Exception occured while Creating NS relationship."+ e.getMessage());
+            logger.error("Exception occured while Creating NS relationship."+ e.getMessage())
             throw new BpmnError("MSOWorkflowException")
         }
     }
@@ -268,7 +268,7 @@
         Response apiResponse = null
         try{
 
-            URL url = new URL(urlString);
+            URL url = new URL(urlString)
             
             // Get the Basic Auth credentials for the VFCAdapter, username is 'bpel', auth is '07a7159d3bf51a0e53be7a8f89699be7'
             // user 'bepl' authHeader is the same with mso.db.auth
@@ -282,7 +282,7 @@
             logger.debug("response code:"+ apiResponse.getStatus() +"\nresponse body:"+ apiResponse.readEntity(String.class))
 
         }catch(Exception e){
-            logger.error("VFC Aatpter Post Call Exception:" + e.getMessage());
+            logger.error("VFC Aatpter Post Call Exception:" + e.getMessage())
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "VFC Aatpter Post Call Exception")
         }		
 		
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy
index 097a1be..8e560cc 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeActivateSDNCNetworkResource.groovy
@@ -6,7 +6,7 @@
  * ================================================================================
  * Modifications Copyright (c) 2019 Samsung
  * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * Licensed under the Apache License, Version 2.0 (the "License")
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
@@ -42,7 +42,7 @@
  * flow for SDNC Network Resource Activate
  */
 public class DeActivateSDNCNetworkResource extends AbstractServiceTaskProcessor {
-    private static final Logger logger = LoggerFactory.getLogger( DeActivateSDNCNetworkResource.class);
+    private static final Logger logger = LoggerFactory.getLogger( DeActivateSDNCNetworkResource.class)
     String Prefix = "DEACTSDNCRES_"
 
     ExceptionUtil exceptionUtil = new ExceptionUtil()
@@ -96,7 +96,7 @@
             execution.setVariable("mso-request-id", requestId)
             execution.setVariable("mso-service-instance-id", resourceInputObj.getServiceInstanceId())
         } catch (BpmnError e) {
-            throw e;
+            throw e
         } catch (Exception ex){
             msg = "Exception in preProcessRequest " + ex.getMessage()
             logger.debug(msg)
@@ -127,7 +127,7 @@
             String serviceModelVersion = resourceInputObj.getServiceModelInfo().getModelVersion()
             String serviceModelName = resourceInputObj.getServiceModelInfo().getModelName()
             String globalCustomerId = resourceInputObj.getGlobalSubscriberId()
-            String modelInvariantUuid = resourceInputObj.getResourceModelInfo().getModelInvariantUuid();
+            String modelInvariantUuid = resourceInputObj.getResourceModelInfo().getModelInvariantUuid()
             String modelCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid()
             String modelUuid = resourceInputObj.getResourceModelInfo().getModelUuid()
             String modelName = resourceInputObj.getResourceModelInfo().getModelName()
@@ -418,7 +418,7 @@
                                <statusDescription>${msoUtils.xmlEscape(statusDescription)}</statusDescription>
                     </ns:updateResourceOperationStatus>
                 </soapenv:Body>
-                </soapenv:Envelope>""";
+                </soapenv:Envelope>"""
 
         setProgressUpdateVariables(execution, body)
     }
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Delete3rdONAPE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Delete3rdONAPE2EServiceInstance.groovy
index 64ae3df..da486bb 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Delete3rdONAPE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Delete3rdONAPE2EServiceInstance.groovy
@@ -6,7 +6,7 @@
  * ================================================================================
  * Modifications Copyright (c) 2019 Samsung
  * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
  *
@@ -60,7 +60,7 @@
 
 	JsonUtils jsonUtil = new JsonUtils()
 
-    private static final Logger logger = LoggerFactory.getLogger( Delete3rdONAPE2EServiceInstance.class);
+    private static final Logger logger = LoggerFactory.getLogger( Delete3rdONAPE2EServiceInstance.class)
 
 	public void checkSPPartnerInfoFromAAI (DelegateExecution execution) {
 		logger.info(" ***** Started checkSPPartnerInfo *****")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy
index a9b1fda..2a65ae9 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy
@@ -8,7 +8,7 @@
  * ================================================================================
  * Modifications Copyright (c) 2019 Samsung
  * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
  * 
@@ -22,9 +22,9 @@
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.so.bpmn.infrastructure.scripts;
+package org.onap.so.bpmn.infrastructure.scripts
 
-import static org.apache.commons.lang3.StringUtils.*;
+import static org.apache.commons.lang3.StringUtils.*
 
 import org.apache.commons.lang3.*
 import org.camunda.bpm.engine.delegate.BpmnError
@@ -38,7 +38,7 @@
 import org.onap.so.bpmn.core.UrnPropertiesReader
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
-import org.springframework.web.util.UriUtils;
+import org.springframework.web.util.UriUtils
 
 import groovy.json.*
 
@@ -52,7 +52,7 @@
 	ExceptionUtil exceptionUtil = new ExceptionUtil()
 	JsonUtils jsonUtil = new JsonUtils()
 	VidUtils vidUtils = new VidUtils()
-    private static final Logger logger = LoggerFactory.getLogger( DeleteCustomE2EServiceInstance.class);
+    private static final Logger logger = LoggerFactory.getLogger( DeleteCustomE2EServiceInstance.class)
 	
 	public void preProcessRequest (DelegateExecution execution) {
 		execution.setVariable("prefix",Prefix)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy
index 7c8b7eb..61b1250 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy
@@ -67,7 +67,7 @@
 
     MsoUtils msoUtils = new MsoUtils()
 
-    public void preProcessRequest(DelegateExecution execution){
+    void preProcessRequest(DelegateExecution execution){
         logger.info(" ***** Started preProcessRequest *****")
         try {
 
@@ -184,7 +184,7 @@
      * generate the nsOperationKey
      * generate the nsParameters
      */
-    public void prepareSDNCRequest (DelegateExecution execution) {
+     void prepareSDNCRequest (DelegateExecution execution) {
         logger.info(" ***** Started prepareSDNCRequest *****")
 
         try {
@@ -475,7 +475,7 @@
         execution.setVariable("CVFMI_updateResOperStatusRequest", body)
     }
 
-    public void prepareUpdateBeforeDeleteSDNCResource(DelegateExecution execution) {
+    void prepareUpdateBeforeDeleteSDNCResource(DelegateExecution execution) {
         logger.debug(" *** prepareUpdateBeforeDeleteSDNCResource *** ")
         String resourceInput = execution.getVariable(Prefix + "resourceInput");
         ResourceInput resourceInputObj = ResourceRequestBuilder.getJsonObject(resourceInput, ResourceInput.class)
@@ -511,7 +511,7 @@
 
     }
 
-    public void prepareUpdateAfterDeleteSDNCResource(DelegateExecution execution) {
+    void prepareUpdateAfterDeleteSDNCResource(DelegateExecution execution) {
         logger.debug(" *** prepareUpdateAfterDeleteSDNCResource *** ")
         String resourceInput = execution.getVariable(Prefix + "resourceInput");
         ResourceInput resourceInputObj = ResourceRequestBuilder.getJsonObject(resourceInput, ResourceInput.class)
@@ -546,7 +546,7 @@
         logger.debug(" ***** Exit prepareUpdateAfterDeleteSDNCResource *****")
     }
 
-    public void postDeleteSDNCCall(DelegateExecution execution){
+    void postDeleteSDNCCall(DelegateExecution execution){
         logger.info(" ***** Started postDeleteSDNCCall *****")
         String responseCode = execution.getVariable(Prefix + "sdncDeleteReturnCode")
         String responseObj = execution.getVariable(Prefix + "SuccessIndicator")
@@ -555,7 +555,7 @@
         logger.info(" ***** Exit postDeleteSDNCCall *****")
     }
 
-    public void sendSyncResponse (DelegateExecution execution) {
+    void sendSyncResponse (DelegateExecution execution) {
         logger.debug( " *** sendSyncResponse *** ")
 
         try {
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelVersions.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelVersions.groovy
index fff2503..324e6b4 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelVersions.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCompareModelVersions.groovy
@@ -6,7 +6,7 @@
  * ================================================================================
  * Modifications Copyright (c) 2019 Samsung
  * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
  *
@@ -19,9 +19,9 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-package org.onap.so.bpmn.infrastructure.scripts;
+package org.onap.so.bpmn.infrastructure.scripts
 
-import static org.apache.commons.lang3.StringUtils.*;
+import static org.apache.commons.lang3.StringUtils.*
 
 import org.onap.so.bpmn.core.domain.ServiceDecomposition
 import org.onap.so.bpmn.core.domain.Resource
@@ -52,7 +52,7 @@
 	String Prefix="DCMPMDV_"
 	ExceptionUtil exceptionUtil = new ExceptionUtil()
 	JsonUtils jsonUtil = new JsonUtils()
-    private static final Logger logger = LoggerFactory.getLogger( DoCompareModelVersions.class);
+    private static final Logger logger = LoggerFactory.getLogger( DoCompareModelVersions.class)
 
 	public void preProcessRequest (DelegateExecution execution) {
 		def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
@@ -196,8 +196,8 @@
         ServiceDecomposition serviceDecomposition_Target = execution.getVariable("serviceDecomposition_Target")
         ServiceDecomposition serviceDecomposition_Original = execution.getVariable("serviceDecomposition_Original")
 
-        List<Resource> allSR_target = serviceDecomposition_Target.getServiceResources();
-        List<Resource> allSR_original = serviceDecomposition_Original.getServiceResources();
+        List<Resource> allSR_target = serviceDecomposition_Target.getServiceResources()
+        List<Resource> allSR_original = serviceDecomposition_Original.getServiceResources()
 
         List<Resource> addResourceList = new ArrayList<String>()
         List<Resource> delResourceList = new ArrayList<String>()
@@ -214,8 +214,8 @@
                 if(rc_o.getModelInfo().getModelUuid() == muuid
                 && rc_o.getModelInfo().getModelInvariantUuid() == mIuuid
                 && rc_o.getModelInfo().getModelCustomizationUuid() == mCuuid) {
-                    addResourceList.remove(rc_t);
-                    delResourceList.remove(rc_o);
+                    addResourceList.remove(rc_t)
+                    delResourceList.remove(rc_o)
                 }
             }
         }
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
index 0191439..9d8b953 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
@@ -7,7 +7,7 @@
  * ================================================================================
  * Modifications Copyright (c) 2019 Samsung
  * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
  *
@@ -26,9 +26,9 @@
 import com.fasterxml.jackson.databind.SerializationFeature
 
 import org.onap.so.logger.LoggingAnchor
-import org.onap.so.logger.ErrorCode;
+import org.onap.so.logger.ErrorCode
 
-import static org.apache.commons.lang3.StringUtils.*;
+import static org.apache.commons.lang3.StringUtils.*
 
 import javax.ws.rs.NotFoundException
 
@@ -83,7 +83,7 @@
  *
  */
 public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
-    private static final Logger logger = LoggerFactory.getLogger( DoCreateE2EServiceInstance.class);
+    private static final Logger logger = LoggerFactory.getLogger( DoCreateE2EServiceInstance.class)
 
 
 	String Prefix="DCRESI_"
@@ -165,7 +165,7 @@
 			execution.setVariable("serviceInstanceData", si)
 
 		} catch (BpmnError e) {
-			throw e;
+			throw e
 		} catch (Exception ex){
 			msg = "Exception in preProcessRequest " + ex.getMessage()
 			logger.info(msg)
@@ -210,7 +210,7 @@
        //we need a service plugin platform here.
     	ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
     	String uuiRequest = execution.getVariable("uuiRequest")
-    	String newUuiRequest = ServicePluginFactory.getInstance().preProcessService(serviceDecomposition, uuiRequest);
+    	String newUuiRequest = ServicePluginFactory.getInstance().preProcessService(serviceDecomposition, uuiRequest)
     	execution.setVariable("uuiRequest", newUuiRequest)
     }
 
@@ -218,7 +218,7 @@
     	//we need a service plugin platform here.
     	ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
     	String uuiRequest = execution.getVariable("uuiRequest")
-    	String newUuiRequest = ServicePluginFactory.getInstance().doServiceHoming(serviceDecomposition, uuiRequest);
+    	String newUuiRequest = ServicePluginFactory.getInstance().doServiceHoming(serviceDecomposition, uuiRequest)
     	execution.setVariable("uuiRequest", newUuiRequest)
     }
 
@@ -254,7 +254,7 @@
 				}
 			}
 		} catch (BpmnError e) {
-			throw e;
+			throw e
 		} catch (Exception ex) {
 			msg = "Exception in DoCreateServiceInstance.postProcessAAIGET. " + ex.getMessage()
 			logger.info(msg)
@@ -276,7 +276,7 @@
 			client.create(uri, si)
 
 		} catch (BpmnError e) {
-			throw e;
+			throw e
 		} catch (Exception ex) {
 			//start rollback set up
 			RollbackData rollbackData = new RollbackData()
@@ -310,11 +310,11 @@
 				AAIResultWrapper aaiResult = client.get(uri,NotFoundException.class)
 				Map<String, Object> result = aaiResult.asMap()
 				List<Object> resources =
-						(List<Object>) result.getOrDefault("result-data", Collections.emptyList());
+						(List<Object>) result.getOrDefault("result-data", Collections.emptyList())
 				if(resources.size()>0) {
 					String relationshipUrl = ((Map<String, Object>) resources.get(0)).get("resource-link")
 
-					final Relationship body = new Relationship();
+					final Relationship body = new Relationship()
 					body.setRelatedLink(relationshipUrl)
 
 					createRelationShipInAAI(execution, body)
@@ -329,7 +329,7 @@
 
 
 		} catch (BpmnError e) {
-			throw e;
+			throw e
 		} catch (Exception ex) {
 
 			msg = "Exception in DoCreateE2EServiceInstance.createCustomRelationship. " + ex.getMessage()
@@ -349,7 +349,7 @@
 			client.create(uri, relationship)
 
 		} catch (BpmnError e) {
-			throw e;
+			throw e
 		} catch (Exception ex) {
 
 			msg = "Exception in DoCreateE2EServiceInstance.createRelationShipInAAI. " + ex.getMessage()
@@ -362,9 +362,9 @@
 
 	private String isNeedProcessCustomRelationship(String uuiRequest) {
 		String requestInput = jsonUtil.getJsonValue(uuiRequest, "service.parameters.requestInputs")
-		Map<String, String> requestInputObject = getJsonObject(requestInput, Map.class);
+		Map<String, String> requestInputObject = getJsonObject(requestInput, Map.class)
 		if (requestInputObject == null) {
-			return null;
+			return null
 		}
 
 		Optional<Map.Entry> firstKey =
@@ -380,15 +380,15 @@
 	}
 
 	private static <T> T getJsonObject(String jsonstr, Class<T> type) {
-		ObjectMapper mapper = new ObjectMapper();
-		mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);
+		ObjectMapper mapper = new ObjectMapper()
+		mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true)
 		try {
-			return mapper.readValue(jsonstr, type);
+			return mapper.readValue(jsonstr, type)
 		} catch (IOException e) {
 			logger.error("{} {} fail to unMarshal json", MessageEnum.RA_NS_EXC.toString(),
-					ErrorCode.BusinessProcesssError.getValue(), e);
+					ErrorCode.BusinessProcesssError.getValue(), e)
 		}
-		return null;
+		return null
 	}
 
 
@@ -409,7 +409,7 @@
 			execution.setVariable("serviceInstanceName", si.get().getServiceInstanceName())
 
 		}catch(BpmnError e) {
-			throw e;
+			throw e
 		}catch(Exception ex) {
 			String msg = "Internal Error in getServiceInstance: " + ex.getMessage()
 			exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
@@ -449,7 +449,7 @@
 				}
 			}
 		} catch (BpmnError e) {
-			throw e;
+			throw e
 		} catch (Exception ex) {
 			msg = "Exception in DoCreateServiceInstance.postProcessAAIGET2 " + ex.getMessage()
 			logger.info(msg)
@@ -462,12 +462,12 @@
 		logger.trace("preProcessRollback ")
 		try {
 
-			Object workflowException = execution.getVariable("WorkflowException");
+			Object workflowException = execution.getVariable("WorkflowException")
 
 			if (workflowException instanceof WorkflowException) {
 				logger.info("Prev workflowException: " + workflowException.getErrorMessage())
-				execution.setVariable("prevWorkflowException", workflowException);
-				//execution.setVariable("WorkflowException", null);
+				execution.setVariable("prevWorkflowException", workflowException)
+				//execution.setVariable("WorkflowException", null)
 			}
 		} catch (BpmnError e) {
 			logger.info("BPMN Error during preProcessRollback")
@@ -482,15 +482,15 @@
 		logger.trace("postProcessRollback ")
 		String msg = ""
 		try {
-			Object workflowException = execution.getVariable("prevWorkflowException");
+			Object workflowException = execution.getVariable("prevWorkflowException")
 			if (workflowException instanceof WorkflowException) {
 				logger.info("Setting prevException to WorkflowException: ")
-				execution.setVariable("WorkflowException", workflowException);
+				execution.setVariable("WorkflowException", workflowException)
 			}
 			execution.setVariable("rollbackData", null)
 		} catch (BpmnError b) {
 			logger.info("BPMN Error during postProcessRollback")
-			throw b;
+			throw b
 		} catch(Exception ex) {
 			msg = "Exception in postProcessRollback. " + ex.getMessage()
 			logger.info(msg)
@@ -547,19 +547,19 @@
         }catch(Exception e){
             logger.error(LoggingAnchor.FIVE, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
 					"Exception Occured Processing preInitResourcesOperStatus.", "BPMN",
-					ErrorCode.UnknownError.getValue(), e);
+					ErrorCode.UnknownError.getValue(), e)
             execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during preInitResourcesOperStatus Method:\n" + e.getMessage())
         }
         logger.trace("COMPLETED preInitResourcesOperStatus Process ")
 	}
 
-	// if site location is in local Operator, create all resources in local ONAP;
+	// if site location is in local Operator, create all resources in local ONAP
 	// if site location is in 3rd Operator, only process sp-partner to create all resources in 3rd ONAP
 	public void doProcessSiteLocation(DelegateExecution execution){
 		logger.trace("======== Start doProcessSiteLocation Process ======== ")
 		ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
 		String uuiRequest = execution.getVariable("uuiRequest")
-		uuiRequest = ServicePluginFactory.getInstance().doProcessSiteLocation(serviceDecomposition, uuiRequest);
+		uuiRequest = ServicePluginFactory.getInstance().doProcessSiteLocation(serviceDecomposition, uuiRequest)
 		execution.setVariable("uuiRequest", uuiRequest)
 		execution.setVariable("serviceDecomposition", serviceDecomposition)
 
@@ -571,7 +571,7 @@
 		logger.trace("======== Start doTPResourcesAllocation Process ======== ")
 		ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
 		String uuiRequest = execution.getVariable("uuiRequest")
-		uuiRequest = ServicePluginFactory.getInstance().doTPResourcesAllocation(execution, uuiRequest);
+		uuiRequest = ServicePluginFactory.getInstance().doTPResourcesAllocation(execution, uuiRequest)
 		execution.setVariable("uuiRequest", uuiRequest)
 		logger.trace("======== COMPLETED doTPResourcesAllocation Process ======== ")
 	}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy
index b1356b9..bc26aa1 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy
@@ -6,7 +6,7 @@
  * ================================================================================
  * Modifications Copyright (c) 2019 Samsung
  * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
  *
@@ -72,13 +72,13 @@
  * @param - WorkflowException
  */
 public class DoCreateResources extends AbstractServiceTaskProcessor{
-    private static final Logger logger = LoggerFactory.getLogger( DoCreateResources.class);
+    private static final Logger logger = LoggerFactory.getLogger( DoCreateResources.class)
 
     ExceptionUtil exceptionUtil = new ExceptionUtil()
     JsonUtils jsonUtil = new JsonUtils()
     CatalogDbUtils catalogDbUtils = new CatalogDbUtilsFactory().create()
 
-    public void preProcessRequest(DelegateExecution execution) {
+     void preProcessRequest(DelegateExecution execution) {
         logger.trace("preProcessRequest ")
         String msg = ""
 
@@ -95,7 +95,7 @@
         logger.trace("Exit preProcessRequest ")
     }
 
-    public void sequenceResoure(DelegateExecution execution) {
+     void sequenceResoure(DelegateExecution execution) {
         logger.trace("Start sequenceResoure Process ")
 
         String incomingRequest = execution.getVariable("uuiRequest")
@@ -170,7 +170,7 @@
         String isContainsWanResource = networkResourceList.isEmpty() ? "false" : "true"
         //if no networkResource, get SDNC config from properties file
         if( "false".equals(isContainsWanResource)) {
-            String serviceNeedSDNC = "mso.workflow.custom." + serviceModelName + ".sdnc.need";
+            String serviceNeedSDNC = "mso.workflow.custom." + serviceModelName + ".sdnc.need"
             isContainsWanResource = BPMNProperties.getProperty(serviceNeedSDNC, isContainsWanResource)
         }
 
@@ -181,7 +181,7 @@
         logger.trace("COMPLETED sequenceResoure Process ")
     }
 
-    public prepareServiceTopologyRequest(DelegateExecution execution) {
+     void prepareServiceTopologyRequest(DelegateExecution execution) {
 
         logger.trace("======== Start prepareServiceTopologyRequest Process ======== ")
 
@@ -201,7 +201,7 @@
         logger.trace("======== End prepareServiceTopologyRequest Process ======== ")
     }
 
-    public void getCurrentResoure(DelegateExecution execution){
+     void getCurrentResoure(DelegateExecution execution){
         logger.trace("Start getCurrentResoure Process ")
         def currentIndex = execution.getVariable("currentResourceIndex")
         List<Resource> sequencedResourceList = execution.getVariable("sequencedResourceList")
@@ -211,7 +211,7 @@
         logger.trace("COMPLETED getCurrentResource Process ")
     }
 
-    public void parseNextResource(DelegateExecution execution){
+     void parseNextResource(DelegateExecution execution){
         logger.trace("Start parseNextResource Process ")
         def currentIndex = execution.getVariable("currentResourceIndex")
         def nextIndex =  currentIndex + 1
@@ -225,7 +225,7 @@
         logger.trace("COMPLETED parseNextResource Process ")
     }
 
-    public void prepareResourceRecipeRequest(DelegateExecution execution){
+     void prepareResourceRecipeRequest(DelegateExecution execution){
         logger.trace("Start prepareResourceRecipeRequest Process ")
         ResourceInput resourceInput = new ResourceInput()
         String serviceInstanceName = execution.getVariable("serviceInstanceName")
@@ -242,7 +242,7 @@
         resourceInput.setServiceType(serviceType)
         resourceInput.setServiceInstanceId(serviceInstanceId)
         resourceInput.setOperationId(operationId)
-        resourceInput.setOperationType(operationType);
+        resourceInput.setOperationType(operationType)
         def currentIndex = execution.getVariable("currentResourceIndex")
         List<Resource> sequencedResourceList = execution.getVariable("sequencedResourceList")
         Resource currentResource = sequencedResourceList.get(currentIndex)
@@ -284,7 +284,7 @@
         logger.trace("COMPLETED prepareResourceRecipeRequest Process ")
     }
 
-    public void executeResourceRecipe(DelegateExecution execution){
+     void executeResourceRecipe(DelegateExecution execution){
         logger.trace("Start executeResourceRecipe Process ")
 
         try {
@@ -338,7 +338,7 @@
         }
     }
 
-    public void postConfigRequest(DelegateExecution execution){
+     void postConfigRequest(DelegateExecution execution){
         //now do noting
         ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
         for (VnfResource resource : serviceDecomposition.vnfResources) {
@@ -346,4 +346,4 @@
         }
         execution.setVariable("serviceDecomposition", serviceDecomposition)
     }
-}
\ No newline at end of file
+}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy
index cf3a0ef..a88beca 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy
@@ -7,7 +7,7 @@
  * ================================================================================
  * Modifications Copyright (c) 2019 Samsung
  * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
  *
@@ -25,7 +25,7 @@
 import org.onap.so.logger.LoggingAnchor
 import org.onap.so.logger.ErrorCode
 
-import static org.apache.commons.lang3.StringUtils.*;
+import static org.apache.commons.lang3.StringUtils.*
 
 import javax.xml.parsers.DocumentBuilder
 import javax.xml.parsers.DocumentBuilderFactory
@@ -33,8 +33,8 @@
 import org.apache.commons.lang3.*
 import org.camunda.bpm.engine.delegate.BpmnError
 import org.camunda.bpm.engine.delegate.DelegateExecution
-import org.json.JSONArray;
-import org.json.JSONObject;
+import org.json.JSONArray
+import org.json.JSONObject
 import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
 import org.onap.so.bpmn.common.scripts.ExceptionUtil
 import org.onap.so.bpmn.common.scripts.MsoUtils
@@ -44,7 +44,7 @@
 import org.onap.so.logger.MessageEnum
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
-import org.springframework.web.util.UriUtils;
+import org.springframework.web.util.UriUtils
 import org.w3c.dom.Document
 import org.w3c.dom.Element
 import org.w3c.dom.Node
@@ -79,7 +79,7 @@
  * Rollback - Deferred
  */
 public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcessor {
-    private static final Logger logger = LoggerFactory.getLogger( DoCustomDeleteE2EServiceInstance.class);
+    private static final Logger logger = LoggerFactory.getLogger( DoCustomDeleteE2EServiceInstance.class)
 
 
 	String Prefix="DDELSI_"
@@ -151,7 +151,7 @@
 			execution.setVariable("siParamsXml", siParamsXml)
 
 		} catch (BpmnError e) {
-			throw e;
+			throw e
 		} catch (Exception ex){
 			msg = "Exception in preProcessRequest " + ex.getMessage()
 			logger.info(msg)
@@ -271,7 +271,7 @@
 			logger.info("sdncDelete:\n" + sdncDelete)
 
 		} catch (BpmnError e) {
-			throw e;
+			throw e
 		} catch(Exception ex) {
 			msg = "Exception in preProcessSDNCDelete. " + ex.getMessage()
 			logger.info(msg)
@@ -302,7 +302,7 @@
 				exceptionUtil.buildAndThrowWorkflowException(execution, 3500, msg)
 			}
 		} catch (BpmnError e) {
-			throw e;
+			throw e
 		} catch(Exception ex) {
 			msg = "Exception in postProcessSDNC " + method + " Exception:" + ex.getMessage()
 			logger.info(msg)
@@ -337,8 +337,8 @@
 					//Confirm there are no related service instances (vnf/network or volume)
 					if (utils.nodeExists(siData, "relationship-list")) {
 						logger.info("SI Data relationship-list exists:")
-						InputSource source = new InputSource(new StringReader(siData));
-						DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+						InputSource source = new InputSource(new StringReader(siData))
+						DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance()
 						DocumentBuilder docBuilder = docFactory.newDocumentBuilder()
 						Document serviceXml = docBuilder.parse(source)
 						serviceXml.getDocumentElement().normalize()
@@ -433,7 +433,7 @@
 				logger.info("Service-instance NOT found in AAI. Silent Success")
 			}
 		}catch (BpmnError e) {
-			throw e;
+			throw e
 		} catch (Exception ex) {
 			msg = "Exception in DoDeleteE2EServiceInstance.postProcessAAIGET. " + ex.getMessage()
 			logger.info(msg)
@@ -452,7 +452,7 @@
 			String serviceType = execution.getVariable("serviceType")
 			String serviceInstanceId = execution.getVariable("serviceInstanceId")
 
-			AAIResourcesClient resourceClient = new AAIResourcesClient();
+			AAIResourcesClient resourceClient = new AAIResourcesClient()
 			AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalCustId, serviceType, serviceInstanceId)
 			resourceClient.delete(serviceInstanceUri)
 
@@ -535,7 +535,7 @@
         }catch(Exception e){
 			logger.error(LoggingAnchor.FIVE, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
 					"Exception Occured Processing preInitResourcesOperStatus.", "BPMN",
-					ErrorCode.UnknownError.getValue(), e);
+					ErrorCode.UnknownError.getValue(), e)
             execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during preInitResourcesOperStatus Method:\n" + e.getMessage())
         }
         logger.trace("COMPLETED preInitResourcesOperStatus Process ")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy
index 481a79a..34ea20b 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy
@@ -6,7 +6,7 @@
  * ================================================================================
  * Modifications Copyright (c) 2019 Samsung
  * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
  *
@@ -90,7 +90,7 @@
 	String Prefix="DDEESI_"
     ExceptionUtil exceptionUtil = new ExceptionUtil()
     JsonUtils jsonUtil = new JsonUtils()
-    private static final Logger logger = LoggerFactory.getLogger( DoDeleteE2EServiceInstance.class);
+    private static final Logger logger = LoggerFactory.getLogger( DoDeleteE2EServiceInstance.class)
 
 
     public void preProcessRequest (DelegateExecution execution) {
@@ -158,7 +158,7 @@
             execution.setVariable("siParamsXml", siParamsXml)
 
         } catch (BpmnError e) {
-            throw e;
+            throw e
         } catch (Exception ex){
             msg = "Exception in preProcessRequest " + ex.getMessage()
             logger.error(msg)
@@ -243,7 +243,7 @@
             // for sp-partner and others
             else if (eKey.endsWith("-id")) {
                 jObj.put("resourceInstanceId", eValue)
-                String resourceName = rt + eValue;
+                String resourceName = rt + eValue
                 jObj.put("resourceType", resourceName)
             }
             jObj.put("resourceLinkUrl", rl)
@@ -520,12 +520,12 @@
         if (StringUtils.containsIgnoreCase(obj.get("resourceType"), modelName)) {
             resource.setResourceId(obj.get("resourceInstanceId"))
             //deleteRealResourceList.add(resource)
-            matches = true;
+            matches = true
         } else if (modelCustomizationUuid.equals(obj.get("modelCustomizationId")) || modelUuid.equals(obj.get("model-version-id")) ) {
             resource.setResourceId(obj.get("resourceInstanceId"))
             resource.setResourceInstanceName(obj.get("resourceType"))
             //deleteRealResourceList.add(resource)
-            matches = true;
+            matches = true
         }
         return matches
     }
@@ -646,7 +646,7 @@
             String serviceType = execution.getVariable("serviceType")
             String serviceInstanceId = execution.getVariable("serviceInstanceId")
 
-            AAIResourcesClient resourceClient = new AAIResourcesClient();
+            AAIResourcesClient resourceClient = new AAIResourcesClient()
             AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalCustId, serviceType, serviceInstanceId)
             resourceClient.delete(serviceInstanceUri)
 
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HandlePNF.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HandlePNF.groovy
index cbeb1d3..97eb3b3 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HandlePNF.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HandlePNF.groovy
@@ -4,7 +4,7 @@
  * ================================================================================
  * Copyright (C) 2017 - 2019 Huawei Intellectual Property. All rights reserved.
  * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
  *
@@ -34,7 +34,7 @@
 import org.slf4j.LoggerFactory
 
 public class HandlePNF extends AbstractServiceTaskProcessor{
-    private static final Logger logger = LoggerFactory.getLogger( HandlePNF.class);
+    private static final Logger logger = LoggerFactory.getLogger( HandlePNF.class)
 
     ExceptionUtil exceptionUtil = new ExceptionUtil()
     JsonUtils jsonUtil = new JsonUtils()
@@ -95,7 +95,7 @@
                                <statusDescription>${msoUtils.xmlEscape(statusDescription)}</statusDescription>
                     </ns:updateResourceOperationStatus>
                 </soapenv:Body>
-                </soapenv:Envelope>""";
+                </soapenv:Envelope>"""
         logger.debug("body: "+body)
         setProgressUpdateVariables(execution, body)
         logger.debug("exit postProcess for HandlePNF")
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java
index f23e5cd..5c69987 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java
@@ -33,6 +33,7 @@
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.Map.Entry;
 import java.util.Optional;
 import javax.annotation.PostConstruct;
 import org.apache.commons.lang3.StringUtils;
@@ -210,23 +211,25 @@
     protected void buildDirectivesParamFromMap(Map<String, Object> paramsMap, String directive,
             Map<String, Object> srcMap) throws MissingValueTagException {
         StringBuilder directives = new StringBuilder();
-        int no_directives_size = 0;
+        int noOfDirectivesSize = 0;
         if (directive.equals(MsoMulticloudUtils.USER_DIRECTIVES)
                 && srcMap.containsKey(MsoMulticloudUtils.OOF_DIRECTIVES)) {
-            no_directives_size = 1;
+            noOfDirectivesSize = 1;
         }
-        if (srcMap.size() > no_directives_size) {
+        if (srcMap.size() > noOfDirectivesSize) {
             directives.append("{ \"attributes\": [ ");
             int i = 0;
-            for (String attributeName : srcMap.keySet()) {
+            for (Map.Entry<String, Object> attributeEntry : srcMap.entrySet()) {
+                String attributeName = attributeEntry.getKey();
+                Object attributeValue = attributeEntry.getValue();
                 if (!(MsoMulticloudUtils.USER_DIRECTIVES.equals(directive)
                         && attributeName.equals(MsoMulticloudUtils.OOF_DIRECTIVES))) {
-                    if (srcMap.get(attributeName) == null) {
+                    if (attributeValue == null) {
                         logger.error("No value tag found for attribute: {}", attributeName);
                         throw new MissingValueTagException("No value tag found for " + attributeName);
                     }
-                    directives.append(new AttributeNameValue(attributeName, srcMap.get(attributeName).toString()));
-                    if (i < (srcMap.size() - 1 + no_directives_size))
+                    directives.append(new AttributeNameValue(attributeName, attributeValue.toString()));
+                    if (i < (srcMap.size() - 1 + noOfDirectivesSize))
                         directives.append(", ");
                     i++;
                 }
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/RequestHandlerUtils.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/RequestHandlerUtils.java
index 9ab95a2..b6f3f82 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/RequestHandlerUtils.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/RequestHandlerUtils.java
@@ -295,7 +295,7 @@
             String instanceName, String requestScope, InfraActiveRequests currentActiveReq) throws ApiException {
         InfraActiveRequests dup = null;
         try {
-            if (!(instanceName == null && requestScope.equals("service") && (action == Action.createInstance
+            if (!(instanceName == null && "service".equals(requestScope) && (action == Action.createInstance
                     || action == Action.activateInstance || action == Action.assignInstance))) {
                 dup = infraActiveRequestsClient.checkInstanceNameDuplicate(instanceIdMap, instanceName, requestScope);
             }
@@ -334,7 +334,7 @@
             updateStatus(duplicateRecord, Status.COMPLETE, "Request Completed");
         }
         for (HistoricProcessInstance instance : response.getBody()) {
-            if (instance.getState().equals("ACTIVE")) {
+            if (("ACTIVE").equals(instance.getState())) {
                 return true;
             } else {
                 updateStatus(duplicateRecord, Status.COMPLETE, "Request Completed");
