summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN
diff options
context:
space:
mode:
authorr.bogacki <r.bogacki@samsung.com>2019-03-14 15:24:57 +0100
committerr.bogacki <r.bogacki@samsung.com>2019-03-18 11:02:58 +0100
commitfaa0b29e3b7b1fa23a1444a5d9ac020b3c60dedc (patch)
tree4839f982eb10e66e587b55b757ffc00dd5f9d30f /bpmn/MSOCommonBPMN
parent4ca3abdffa40e7777a233151f66ee0b4131ed538 (diff)
Removed MsoLogger class
Bye bye MsoLogger class. Extracted constants to separated classes. Fixed imports. Change-Id: I7c8e0527e7dbd097d3ea93b9dab279354652da47 Issue-ID: LOG-631 Signed-off-by: Robert Bogacki <r.bogacki@samsung.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AaiUtil.groovy6
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AllottedResourceUtils.groovy4
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AppCClient.groovy6
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CatalogDbUtils.groovy21
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcess.groovy10
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupName.groovy6
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupTenant.groovy8
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModule.groovy6
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/DeleteAAIVfModule.groovy8
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExceptionUtil.groovy7
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/FalloutHandler.groovy18
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenerateVfModuleName.groovy4
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ManualHandling.groovy11
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/MsoUtils.groovy9
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/PrepareUpdateAAIVfModule.groovy1
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ReceiveWorkflowMessage.groovy10
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapter.groovy6
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV1.groovy24
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV2.groovy17
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtils.groovy16
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/TrinityExceptionUtil.groovy6
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIGenericVnf.groovy4
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIVfModule.groovy1
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VfModuleBase.groovy11
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VnfAdapterRestV1.groovy42
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VnfAdapterUtils.groovy4
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/BpmnRestClient.java5
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/workflow/context/WorkflowContextHolder.java5
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java6
29 files changed, 141 insertions, 141 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AaiUtil.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AaiUtil.groovy
index 4e7c549323..b98e395228 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AaiUtil.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AaiUtil.groovy
@@ -23,6 +23,7 @@
package org.onap.so.bpmn.common.scripts
import org.onap.so.client.HttpClientFactory
+import org.onap.so.logger.ErrorCode
import java.util.regex.Matcher
import java.util.regex.Pattern
@@ -39,7 +40,6 @@ import org.onap.so.client.HttpClient
import org.onap.so.client.aai.AAIVersion
import org.onap.so.client.aai.entities.uri.AAIUri
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import org.onap.so.openpojo.rules.HasToStringRule
@@ -136,13 +136,13 @@ class AaiUtil {
}else{
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Call AAI Cloud Region is NOT Successful.", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
throw new BpmnError("MSOWorkflowException")
}
}catch(Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception occured while getting the Cloud Reqion.", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), e.getMessage());
+ ErrorCode.UnknownError.getValue(), e.getMessage());
(new ExceptionUtil()).buildAndThrowWorkflowException(execution, 9999, e.getMessage())
}
return regionId
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AllottedResourceUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AllottedResourceUtils.groovy
index dec69dfb71..e0e85e9629 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AllottedResourceUtils.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AllottedResourceUtils.groovy
@@ -23,6 +23,7 @@
package org.onap.so.bpmn.common.scripts
import org.onap.so.client.aai.entities.AAIResultWrapper
+import org.onap.so.logger.ErrorCode
import static org.apache.commons.lang3.StringUtils.isBlank;
@@ -40,7 +41,6 @@ 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.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
@@ -196,7 +196,7 @@ class AllottedResourceUtils {
getAAIClient().update(uri,allottedResource)
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- "Exception in updateAR.", "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(), e.getMessage());
+ "Exception in updateAR.", "BPMN", ErrorCode.UnknownError.getValue(), e.getMessage());
exceptionUtil.buildAndThrowWorkflowException(execution, 500, 'Internal Error in updateAROrchStatus.' + e.getMessage())
}
logger.trace("Exit updateAROrchStatus ")
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AppCClient.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AppCClient.groovy
index 3545361811..4a59b9789a 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AppCClient.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AppCClient.groovy
@@ -26,9 +26,9 @@ import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution
import org.onap.so.bpmn.core.json.JsonUtils
import org.onap.appc.client.lcm.model.Action
-import org.onap.so.client.appc.ApplicationControllerAction;
+import org.onap.so.client.appc.ApplicationControllerAction
+import org.onap.so.logger.ErrorCode;
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
@@ -122,7 +122,7 @@ public class AppCClient extends AbstractServiceTaskProcessor{
catch (BpmnError e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
'Caught exception in ' + method, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
appcMessage = e.getMessage()
}
execution.setVariable("errorCode", appcCode)
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CatalogDbUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CatalogDbUtils.groovy
index 11c2bb265d..0d9b3c5b94 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CatalogDbUtils.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CatalogDbUtils.groovy
@@ -31,8 +31,9 @@ import org.onap.so.bpmn.core.UrnPropertiesReader
import org.onap.so.bpmn.core.json.JsonUtils
import org.onap.so.client.HttpClient
import org.onap.so.client.HttpClientFactory
+import org.onap.so.logger.ErrorCode
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
+
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import org.onap.so.utils.TargetEntity
@@ -81,7 +82,7 @@ class CatalogDbUtils {
catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception in Querying Catalog DB", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), e.message);
+ ErrorCode.UnknownError.getValue(), e.message);
throw e
}
@@ -119,7 +120,7 @@ class CatalogDbUtils {
catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception in Querying Catalog DB", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), e.message);
+ ErrorCode.UnknownError.getValue(), e.message);
throw e
}
}
@@ -143,7 +144,7 @@ class CatalogDbUtils {
catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception in Querying Catalog DB", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), e.message);
+ ErrorCode.UnknownError.getValue(), e.message);
throw e
}
@@ -169,7 +170,7 @@ class CatalogDbUtils {
catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception in Querying Catalog DB", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), e.message);
+ ErrorCode.UnknownError.getValue(), e.message);
throw e
}
@@ -219,7 +220,7 @@ class CatalogDbUtils {
} catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception in parsing Catalog DB Response", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), e.message);
+ ErrorCode.UnknownError.getValue(), e.message);
}
return modelInfos
@@ -298,7 +299,7 @@ class CatalogDbUtils {
} catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception in parsing Catalog DB Response", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), e.message);
+ ErrorCode.UnknownError.getValue(), e.message);
}
return modelInfos
@@ -352,7 +353,7 @@ class CatalogDbUtils {
} catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception in parsing Catalog DB Response", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), e.message);
+ ErrorCode.UnknownError.getValue(), e.message);
}
return modelInfos
@@ -381,7 +382,7 @@ class CatalogDbUtils {
} catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception in parsing Catalog DB Response", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), e.message);
+ ErrorCode.UnknownError.getValue(), e.message);
}
return serviceResourcesObject
@@ -429,7 +430,7 @@ class CatalogDbUtils {
catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception while parsing model information", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), e.message);
+ ErrorCode.UnknownError.getValue(), e.message);
}
return modelInfo
}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcess.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcess.groovy
index 1c2862e00d..a9e01c7191 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcess.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcess.groovy
@@ -24,8 +24,8 @@ package org.onap.so.bpmn.common.scripts
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.onap.so.logger.ErrorCode
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
@@ -75,7 +75,7 @@ public class CompleteMsoProcess extends AbstractServiceTaskProcessor {
throw e;
} catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), 'Caught exception in' +
- ' ' + method, "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ' ' + method, "BPMN", ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
}
@@ -238,7 +238,7 @@ public class CompleteMsoProcess extends AbstractServiceTaskProcessor {
} catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
'Caught exception in ' + method, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
}
logger.trace('Exited ' + method)
@@ -271,7 +271,7 @@ public class CompleteMsoProcess extends AbstractServiceTaskProcessor {
} catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
'Caught exception in ' + method, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
}
@@ -309,7 +309,7 @@ public class CompleteMsoProcess extends AbstractServiceTaskProcessor {
} catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
'Caught exception in ' + method, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
}
}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupName.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupName.groovy
index dfe0772cab..6a82512d88 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupName.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupName.groovy
@@ -26,6 +26,7 @@ package org.onap.so.bpmn.common.scripts
import joptsimple.internal.Strings
import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.logger.ErrorCode
import org.springframework.http.HttpStatus
import javax.ws.rs.core.UriBuilder
@@ -37,7 +38,6 @@ import org.onap.so.client.aai.entities.uri.AAIResourceUri
import org.onap.so.client.aai.entities.uri.AAIUriFactory
import org.onap.so.constants.Defaults
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
@@ -132,7 +132,7 @@ public class ConfirmVolumeGroupName extends AbstractServiceTaskProcessor{
public void handleAAIQueryFailure(DelegateExecution execution) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Error occurred attempting to query AAI, Response Code " + execution.getVariable("CVGN_queryVolumeGroupResponseCode"),
- "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(),
+ "BPMN", ErrorCode.UnknownError.getValue(),
"ErrorResponse is:\n" + execution.getVariable("CVGN_queryVolumeGroupResponse"));
}
@@ -141,7 +141,7 @@ public class ConfirmVolumeGroupName extends AbstractServiceTaskProcessor{
def errorNotAssociated = "Error occurred - volume group id ${execution.getVariable('CVGN_volumeGroupId')} " +
"is not associated with ${execution.getVariable('CVGN_volumeGroupName')}"
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), errorNotAssociated, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, errorNotAssociated)
}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupTenant.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupTenant.groovy
index f2d5a61542..7c1c0a0490 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupTenant.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ConfirmVolumeGroupTenant.groovy
@@ -31,8 +31,8 @@ import org.onap.so.client.aai.entities.Relationships
import org.onap.so.client.aai.entities.uri.AAIResourceUri
import org.onap.so.client.aai.entities.uri.AAIUriFactory
import org.onap.so.constants.Defaults
+import org.onap.so.logger.ErrorCode
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
@@ -107,7 +107,7 @@ class ConfirmVolumeGroupTenant extends AbstractServiceTaskProcessor{
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occured Processing queryAAIForVolumeGroup.", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), e.getMessage());
+ ErrorCode.UnknownError.getValue(), e.getMessage());
exceptionUtil.buildAndThrowWorkflowException(execution, 5000, "Internal Error - Occured in preProcessRequest.")
}
logger.trace("COMPLETED queryAAIForVolumeGroup Process ")
@@ -129,7 +129,7 @@ class ConfirmVolumeGroupTenant extends AbstractServiceTaskProcessor{
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occured Processing assignVolumeHeatId.", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), e);
+ ErrorCode.UnknownError.getValue(), e);
exceptionUtil.buildAndThrowWorkflowException(execution, 5000, "Internal Error - Occured in assignVolumeHeatId.")
}
logger.trace("COMPLETED assignVolumeHeatId Process ")
@@ -149,7 +149,7 @@ class ConfirmVolumeGroupTenant extends AbstractServiceTaskProcessor{
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occured Processing assignWorkflowException.", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), e);
+ ErrorCode.UnknownError.getValue(), e);
}
logger.trace("COMPLETED Assign Workflow Exception =")
}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModule.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModule.groovy
index 8bc97f7f40..c1f9f5b0b3 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModule.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CreateAAIVfModule.groovy
@@ -32,8 +32,8 @@ import org.onap.so.client.aai.entities.uri.AAIResourceUri
import org.onap.so.client.aai.entities.uri.AAIUriFactory
import org.onap.so.client.graphinventory.entities.uri.Depth
import org.onap.so.db.catalog.beans.OrchestrationStatus
+import org.onap.so.logger.ErrorCode
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
@@ -426,7 +426,7 @@ public class CreateAAIVfModule extends AbstractServiceTaskProcessor{
public void handleAAIQueryFailure(DelegateExecution execution) {
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Error occurred attempting to query AAI, Response Code " + execution.getVariable("CAAIVfMod_queryGenericVnfResponseCode") + ", Error Response " + execution.getVariable("CAAIVfMod_queryGenericVnfResponse"),
- "BPMN", MsoLogger.ErrorCode.UnknownError.getValue());
+ "BPMN", ErrorCode.UnknownError.getValue());
int code = execution.getVariable("CAAIVfMod_queryGenericVnfResponseCode")
exceptionUtil.buildAndThrowWorkflowException(execution, code, "Error occurred attempting to query AAI")
@@ -478,7 +478,7 @@ public class CreateAAIVfModule extends AbstractServiceTaskProcessor{
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Error occurred during CreateAAIVfModule flow", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), errorResponse);
+ ErrorCode.UnknownError.getValue(), errorResponse);
exceptionUtil.buildAndThrowWorkflowException(execution, errorCode, errorResponse)
logger.debug("Workflow exception occurred in CreateAAIVfModule: " + errorResponse)
}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/DeleteAAIVfModule.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/DeleteAAIVfModule.groovy
index e6beac6742..83f31450b8 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/DeleteAAIVfModule.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/DeleteAAIVfModule.groovy
@@ -27,8 +27,8 @@ 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.graphinventory.entities.uri.Depth
+import org.onap.so.logger.ErrorCode
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
@@ -208,7 +208,7 @@ public class DeleteAAIVfModule extends AbstractServiceTaskProcessor{
public void handleAAIQueryFailure(DelegateExecution execution) {
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Error occurred attempting to query AAI, Response Code " + execution.getVariable("DAAIVfMod_queryGenericVnfResponseCode") + ", Error Response " + execution.getVariable("DAAIVfMod_queryGenericVnfResponse"),
- "BPMN", MsoLogger.ErrorCode.UnknownError.getValue());
+ "BPMN", ErrorCode.UnknownError.getValue());
def errorCode = 5000
// set the errorCode to distinguish between a A&AI failure
// and the Generic Vnf Id not found
@@ -255,7 +255,7 @@ public class DeleteAAIVfModule extends AbstractServiceTaskProcessor{
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Error occurred during DeleteAAIVfModule flow", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), errorResponse);
+ ErrorCode.UnknownError.getValue(), errorResponse);
exceptionUtil.buildAndThrowWorkflowException(execution, errorCode, errorResponse)
}
@@ -265,7 +265,7 @@ public class DeleteAAIVfModule extends AbstractServiceTaskProcessor{
public void handleDeleteGenericVnfFailure(DelegateExecution execution) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"AAI error occurred deleting the Generic Vnf", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(),
+ ErrorCode.UnknownError.getValue(),
execution.getVariable("DAAIVfMod_deleteGenericVnfResponse"));
exceptionUtil.buildAndThrowWorkflowException(execution, 5000, execution.getVariable("DAAIVfMod_deleteGenericVnfResponse"))
}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExceptionUtil.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExceptionUtil.groovy
index b062974c98..30dbeb09d5 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExceptionUtil.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExceptionUtil.groovy
@@ -22,6 +22,8 @@
package org.onap.so.bpmn.common.scripts
+import org.onap.so.logger.ErrorCode
+
import static org.apache.commons.lang3.StringUtils.*
import com.google.common.xml.XmlEscapers
@@ -31,7 +33,6 @@ import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution
import org.onap.so.bpmn.core.WorkflowException
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
@@ -91,7 +92,7 @@ class ExceptionUtil extends AbstractServiceTaskProcessor {
wfex = execution.getVariable("WorkflowException")
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), "Fault", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), wfex.errorMessage);
+ ErrorCode.UnknownError.getValue(), wfex.errorMessage);
return wfex
} else {
try {
@@ -104,7 +105,7 @@ class ExceptionUtil extends AbstractServiceTaskProcessor {
logger.debug("mappedErrorMessage " + mappedErrorMessage)
wfex = execution.getVariable("WorkflowException")
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), "Fault", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), wfex.errorMessage);
+ ErrorCode.UnknownError.getValue(), wfex.errorMessage);
return wfex
} catch(Exception ex) {
logger.debug("error mapping error, return null: " + ex)
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/FalloutHandler.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/FalloutHandler.groovy
index d4c5d2f7bb..2ceec3cb44 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/FalloutHandler.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/FalloutHandler.groovy
@@ -23,13 +23,13 @@
package org.onap.so.bpmn.common.scripts
import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.logger.ErrorCode
import java.text.SimpleDateFormat
import org.apache.commons.lang3.*
import org.camunda.bpm.engine.delegate.DelegateExecution
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
@@ -99,7 +99,7 @@ public class FalloutHandler extends AbstractServiceTaskProcessor {
} catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
'Caught exception in ' + method, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
// exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
}
}
@@ -212,7 +212,7 @@ public class FalloutHandler extends AbstractServiceTaskProcessor {
} catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
'Caught exception in ' + method, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
// exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
}
@@ -246,7 +246,7 @@ public class FalloutHandler extends AbstractServiceTaskProcessor {
} catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
'Caught exception in ' + method, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
// exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
}
}
@@ -277,7 +277,7 @@ public class FalloutHandler extends AbstractServiceTaskProcessor {
} catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
'Caught exception in ' + method, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
// exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
}
}
@@ -308,7 +308,7 @@ public class FalloutHandler extends AbstractServiceTaskProcessor {
} catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
'Caught exception in ' + method, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
// exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
}
}
@@ -337,7 +337,7 @@ public class FalloutHandler extends AbstractServiceTaskProcessor {
} catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
'Caught exception in ' + method, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
// exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
}
}
@@ -357,7 +357,7 @@ public class FalloutHandler extends AbstractServiceTaskProcessor {
} catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
'Caught exception in ' + method, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
// exceptionUtil.buildWorkflowException(execution, 2000, "Internal Error - Occured in " + method)
}
}
@@ -392,7 +392,7 @@ public class FalloutHandler extends AbstractServiceTaskProcessor {
// Do NOT throw WorkflowException!
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
'Caught exception in ' + method, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
}
}
}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenerateVfModuleName.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenerateVfModuleName.groovy
index 0d39ea15f8..740d9f70b6 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenerateVfModuleName.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenerateVfModuleName.groovy
@@ -24,6 +24,7 @@ package org.onap.so.bpmn.common.scripts
import org.onap.so.bpmn.core.UrnPropertiesReader
import org.onap.so.client.HttpClientFactory
+import org.onap.so.logger.ErrorCode
import java.io.Serializable;
@@ -42,7 +43,6 @@ import org.onap.so.client.aai.entities.uri.AAIUriFactory
import org.onap.so.client.graphinventory.entities.uri.Depth
import org.onap.so.utils.TargetEntity
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
@@ -161,7 +161,7 @@ public class GenerateVfModuleName extends AbstractServiceTaskProcessor{
} catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
'Caught exception in ' + method, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in queryAAI(): ' + e.getMessage())
}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ManualHandling.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ManualHandling.groovy
index 8c67a42b6d..d5e88a8868 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ManualHandling.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ManualHandling.groovy
@@ -20,7 +20,9 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.so.bpmn.common.scripts;
+package org.onap.so.bpmn.common.scripts
+
+import org.onap.so.logger.ErrorCode;
import static org.apache.commons.lang3.StringUtils.*;
@@ -44,7 +46,6 @@ import org.onap.so.bpmn.core.domain.ServiceDecomposition
import org.onap.so.bpmn.core.json.JsonUtils
import org.onap.so.client.ruby.*
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
@@ -286,7 +287,7 @@ public class ManualHandling extends AbstractServiceTaskProcessor {
} catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
'Caught exception in ' + method, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in" + method)
}
@@ -337,11 +338,11 @@ public class ManualHandling extends AbstractServiceTaskProcessor {
} catch (BpmnError e) {
msg = "BPMN error in createAOTSTicket " + ex.getMessage()
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
} catch (Exception ex){
msg = "Exception in createAOTSTicket " + ex.getMessage()
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
}
logger.trace("Exit createAOTSTicket of ManualHandling ")
}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/MsoUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/MsoUtils.groovy
index 10d02686cc..324cc63649 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/MsoUtils.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/MsoUtils.groovy
@@ -22,6 +22,8 @@
package org.onap.so.bpmn.common.scripts
+import org.onap.so.logger.ErrorCode
+
import java.text.SimpleDateFormat
import org.apache.commons.codec.binary.Base64
@@ -29,7 +31,6 @@ import org.apache.commons.lang3.StringEscapeUtils
import org.onap.so.bpmn.core.BPMNLogger
import org.onap.so.bpmn.core.xml.XmlTool
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import org.onap.so.utils.CryptoUtils
@@ -296,13 +297,11 @@ class MsoUtils {
if ("INFO"==logmode) {
logger.info(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, logtxt, "BPMN");
} else if ("WARN"==logmode) {
- // to see the warning text displayed in the log entry, the text must also be passed as arg0 (2nd argument) to invoke the correct MsoLogger warn() method
logger.warn ("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_WARNING.toString(), logtxt, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), logtxt);
+ ErrorCode.UnknownError.getValue(), logtxt);
} else if ("ERROR"==logmode) {
- // to see the error text displayed in the log entry, the text must also be passed as arg0 (2nd argument) to invoke the correct MsoLogger error() method
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), logtxt, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), logtxt);
+ ErrorCode.UnknownError.getValue(), logtxt);
} else {
BPMNLogger.debug(isDebugLogEnabled, logtxt);
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/PrepareUpdateAAIVfModule.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/PrepareUpdateAAIVfModule.groovy
index 259808feb6..50c4e56547 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/PrepareUpdateAAIVfModule.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/PrepareUpdateAAIVfModule.groovy
@@ -38,7 +38,6 @@ import org.onap.so.client.aai.entities.uri.AAIUriFactory
import org.onap.so.client.graphinventory.entities.uri.Depth
import org.springframework.web.util.UriUtils
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ReceiveWorkflowMessage.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ReceiveWorkflowMessage.groovy
index 3a93d48da3..a0da6870ae 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ReceiveWorkflowMessage.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ReceiveWorkflowMessage.groovy
@@ -29,8 +29,8 @@ import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution
import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.logger.ErrorCode
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
@@ -67,7 +67,7 @@ public void preProcessRequest (DelegateExecution execution) {
String msg = getProcessKey(execution) + ': Missing or empty input variable \'RCVWFMSG_timeout\''
logger.debug(msg)
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
@@ -78,7 +78,7 @@ public void preProcessRequest (DelegateExecution execution) {
String msg = getProcessKey(execution) + ': Missing or empty input variable \'RCVWFMSG_messageType\''
logger.debug(msg)
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
@@ -89,7 +89,7 @@ public void preProcessRequest (DelegateExecution execution) {
String msg = getProcessKey(execution) + ': Missing or empty input variable \'RCVWFMSG_correlator\''
logger.debug(msg)
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
execution.setVariable(messageType + '_CORRELATOR', correlator)
@@ -101,7 +101,7 @@ public void preProcessRequest (DelegateExecution execution) {
String msg = 'Caught exception in ' + method + ": " + e
logger.debug(msg)
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
}
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 cf0e35a59f..d909a77cc2 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
@@ -21,14 +21,14 @@
*/
package org.onap.so.bpmn.common.scripts;
-import org.onap.so.bpmn.core.UrnPropertiesReader;
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.logger.ErrorCode;
import java.text.SimpleDateFormat
import org.camunda.bpm.engine.delegate.DelegateExecution
import org.onap.so.bpmn.core.WorkflowException
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
@@ -75,7 +75,7 @@ public class SDNCAdapter extends AbstractServiceTaskProcessor {
} catch (IOException ex) {
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Unable to encode username password string", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
}
// TODO Use variables instead of passing xml request - Huh?
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 fd5dbaea90..8b04803050 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
@@ -23,6 +23,7 @@
package org.onap.so.bpmn.common.scripts
import org.onap.so.client.HttpClientFactory
+import org.onap.so.logger.ErrorCode
import java.text.SimpleDateFormat
import javax.ws.rs.core.Response
@@ -43,7 +44,6 @@ import org.onap.so.bpmn.core.domain.RollbackData
import org.onap.so.bpmn.core.json.JsonUtils
import org.onap.so.client.HttpClient
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import org.onap.so.utils.TargetEntity
@@ -87,7 +87,7 @@ class SDNCAdapterRestV1 extends AbstractServiceTaskProcessor {
String msg = getProcessKey(execution) + ': mso:adapters:sdnc:rest:endpoint URN mapping is not defined'
logger.debug(msg)
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
@@ -108,7 +108,7 @@ class SDNCAdapterRestV1 extends AbstractServiceTaskProcessor {
String msg = getProcessKey(execution) + ': no sdncRequestId in ' + requestType
logger.debug(msg)
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
@@ -123,7 +123,7 @@ class SDNCAdapterRestV1 extends AbstractServiceTaskProcessor {
String msg = getProcessKey(execution) + ': no bpNotificationUrl in ' + requestType
logger.debug(msg)
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
@@ -140,7 +140,7 @@ class SDNCAdapterRestV1 extends AbstractServiceTaskProcessor {
String msg = getProcessKey(execution) + ': Unsupported request type: ' + requestType
logger.debug(msg)
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
@@ -156,7 +156,7 @@ class SDNCAdapterRestV1 extends AbstractServiceTaskProcessor {
logger.debug(getProcessKey(execution) + ": mso:adapters:po:auth URN mapping is not defined")
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
getProcessKey(execution) + ": mso:adapters:po:auth URN mapping is not defined", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
} else {
try {
def encodedString = utils.getBasicAuth(basicAuthValue, UrnPropertiesReader.getVariable("mso.msoKey", execution))
@@ -165,7 +165,7 @@ class SDNCAdapterRestV1 extends AbstractServiceTaskProcessor {
logger.debug(getProcessKey(execution) + ": Unable to encode BasicAuth credentials for SDNCAdapter")
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
getProcessKey(execution) + ": Unable to encode BasicAuth credentials for SDNCAdapter",
- "BPMN", MsoLogger.ErrorCode.UnknownError.getValue());
+ "BPMN", ErrorCode.UnknownError.getValue());
}
}
@@ -196,7 +196,7 @@ class SDNCAdapterRestV1 extends AbstractServiceTaskProcessor {
String msg = 'Caught exception in ' + method + ": " + e
logger.debug(msg)
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
}
@@ -244,7 +244,7 @@ class SDNCAdapterRestV1 extends AbstractServiceTaskProcessor {
String msg = 'Unsupported HTTP method "' + sdncAdapterMethod + '" in ' + method + ": " + e
logger.debug(msg)
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
@@ -258,7 +258,7 @@ class SDNCAdapterRestV1 extends AbstractServiceTaskProcessor {
String msg = 'Caught exception in ' + method + ": " + e
logger.debug(msg, e)
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
}
@@ -372,7 +372,7 @@ class SDNCAdapterRestV1 extends AbstractServiceTaskProcessor {
String msg = 'Caught exception in ' + method + ": " + e
logger.debug(msg)
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
}
@@ -398,7 +398,7 @@ class SDNCAdapterRestV1 extends AbstractServiceTaskProcessor {
String msg = 'Caught exception in ' + method + ": " + e
logger.debug(msg)
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
}
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 cd86120860..c1d68c5f7c 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
@@ -22,6 +22,8 @@
package org.onap.so.bpmn.common.scripts
+import org.onap.so.logger.ErrorCode
+
import java.text.SimpleDateFormat
import java.net.URLEncoder
@@ -38,7 +40,6 @@ import org.onap.so.bpmn.core.WorkflowException
import org.onap.so.bpmn.core.json.JsonUtils
import org.onap.so.bpmn.core.UrnPropertiesReader
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
@@ -85,7 +86,7 @@ class SDNCAdapterRestV2 extends SDNCAdapterRestV1 {
String msg = getProcessKey(execution) + ': mso:adapters:sdnc:rest:endpoint URN mapping is not defined'
logger.debug(msg)
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
@@ -106,7 +107,7 @@ class SDNCAdapterRestV2 extends SDNCAdapterRestV1 {
String msg = getProcessKey(execution) + ': no sdncRequestId in ' + requestType
logger.debug(msg)
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
@@ -121,7 +122,7 @@ class SDNCAdapterRestV2 extends SDNCAdapterRestV1 {
String msg = getProcessKey(execution) + ': no bpNotificationUrl in ' + requestType
logger.debug(msg)
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
@@ -132,7 +133,7 @@ class SDNCAdapterRestV2 extends SDNCAdapterRestV1 {
String msg = getProcessKey(execution) + ': Unsupported request type: ' + requestType
logger.debug(msg)
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
@@ -151,7 +152,7 @@ class SDNCAdapterRestV2 extends SDNCAdapterRestV1 {
logger.debug(getProcessKey(execution) + ": mso:adapters:po:auth URN mapping is not defined")
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
getProcessKey(execution) + ": mso:adapters:po:auth URN mapping is not defined", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
} else {
try {
def encodedString = utils.getBasicAuth(basicAuthValue, UrnPropertiesReader.getVariable("mso.msoKey", execution))
@@ -160,7 +161,7 @@ class SDNCAdapterRestV2 extends SDNCAdapterRestV1 {
logger.debug(getProcessKey(execution) + ": Unable to encode BasicAuth credentials for SDNCAdapter")
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
getProcessKey(execution) + ": Unable to encode BasicAuth credentials for SDNCAdapter",
- "BPMN", MsoLogger.ErrorCode.UnknownError.getValue());
+ "BPMN", ErrorCode.UnknownError.getValue());
}
}
@@ -191,7 +192,7 @@ class SDNCAdapterRestV2 extends SDNCAdapterRestV1 {
String msg = 'Caught exception in ' + method + ": " + e
logger.debug(msg)
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtils.groovy
index 085e82ca24..e6d54b8681 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtils.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterUtils.groovy
@@ -26,11 +26,11 @@ import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution
import org.onap.aai.domain.yang.L3Network
import org.onap.so.bpmn.core.WorkflowException
-import org.onap.so.bpmn.core.json.JsonUtils;
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.logger.ErrorCode;
import org.springframework.web.util.UriUtils
import org.onap.so.bpmn.core.UrnPropertiesReader
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
@@ -265,7 +265,7 @@ class SDNCAdapterUtils {
if (callbackUrl == null || callbackUrl.trim() == "") {
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
'mso:workflow:sdncadapter:callback URN is not set', "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
workflowException(execution, 'Internal Error', 9999) // TODO: what message and error code?
}
@@ -403,7 +403,7 @@ class SDNCAdapterUtils {
if (callbackUrl == null || callbackUrl.trim() == "") {
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
'mso:workflow:sdncadapter:callback URN is not set', "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Internal Error - During PreProcess Request")
}
@@ -476,7 +476,7 @@ class SDNCAdapterUtils {
} catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
'Caught exception in ' + method, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 5000, "Internal Error")
}
}
@@ -983,7 +983,7 @@ class SDNCAdapterUtils {
}else {
logger.warn("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_WARNING,
'sdncAdapter did not complete successfully, sdncAdapter Success Indicator was false ',
- "BPMN", MsoLogger.ErrorCode.UnknownError,
+ "BPMN", ErrorCode.UnknownError,
'sdncAdapter did not complete successfully, sdncAdapter Success Indicator was false ')
execution.setVariable("L3HLAB_rollback", true)
def msg = trinityExceptionUtil.intDataResponseCode(response, execution)
@@ -993,7 +993,7 @@ class SDNCAdapterUtils {
if (response == null || response.trim().equals("")) {
logger.warn("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_WARNING,
'sdncAdapter workflow response is empty', "BPMN",
- MsoLogger.ErrorCode.UnknownError, 'sdncAdapter workflow response is empty')
+ ErrorCode.UnknownError, 'sdncAdapter workflow response is empty')
execution.setVariable("L3HLAB_rollback", true)
def msg = trinityExceptionUtil.buildException("Exception occurred while validating SDNC response " , execution)
exceptionUtil.buildAndThrowWorkflowException(execution, intResponseCode, msg)
@@ -1005,7 +1005,7 @@ class SDNCAdapterUtils {
throw e;
} catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), 'Caught ' +
- 'exception in ' + method, "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ 'exception in ' + method, "BPMN", ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
execution.setVariable(prefix+"ResponseCode",400)
execution.setVariable("L3HLAB_rollback", true)
def msg = trinityExceptionUtil.buildException("Exception occurred while validating SDNC response: " + e.getMessage(), execution)
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/TrinityExceptionUtil.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/TrinityExceptionUtil.groovy
index c489778d36..615c977a1e 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/TrinityExceptionUtil.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/TrinityExceptionUtil.groovy
@@ -24,8 +24,8 @@ package org.onap.so.bpmn.common.scripts
import org.camunda.bpm.engine.delegate.DelegateExecution
import org.apache.commons.lang3.*
+import org.onap.so.logger.ErrorCode
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
@@ -216,7 +216,7 @@ class TrinityExceptionUtil {
if(message != null) {
execution.setVariable(prefix+"ErrorResponse",message)
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), "Fault", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(),
+ ErrorCode.UnknownError.getValue(),
execution.getVariable(prefix+"ErrorResponse"));
return message
} else {
@@ -312,7 +312,7 @@ class TrinityExceptionUtil {
execution.setVariable(prefix+"errTxt", messageTxt)
execution.setVariable(prefix+"errVariables", msgVars)
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), "Fault", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(),
+ ErrorCode.UnknownError.getValue(),
execution.getVariable(prefix+"ErrorResponse"));
return message
}catch(Exception ex) {
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIGenericVnf.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIGenericVnf.groovy
index fd45cb5a03..796ee43cf4 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIGenericVnf.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIGenericVnf.groovy
@@ -30,8 +30,8 @@ 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.graphinventory.entities.uri.Depth
+import org.onap.so.logger.ErrorCode
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
@@ -183,7 +183,7 @@ public class UpdateAAIGenericVnf extends AbstractServiceTaskProcessor {
if (newPersonaModelId != genericVnf.getModelInvariantId()) {
def msg = 'Can\'t update Generic VNF ' + vnfId + ' since there is \'persona-model-id\' mismatch between the current and new values'
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue())
+ ErrorCode.UnknownError.getValue())
throw new Exception(msg)
}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIVfModule.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIVfModule.groovy
index 92a043e65a..9b12413177 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIVfModule.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/UpdateAAIVfModule.groovy
@@ -30,7 +30,6 @@ import org.onap.so.bpmn.core.WorkflowException
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.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VfModuleBase.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VfModuleBase.groovy
index 536d9062c0..c4ef165f63 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VfModuleBase.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VfModuleBase.groovy
@@ -20,7 +20,9 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.so.bpmn.common.scripts;
+package org.onap.so.bpmn.common.scripts
+
+import org.onap.so.logger.ErrorCode;
import javax.xml.parsers.DocumentBuilder
import javax.xml.parsers.DocumentBuilderFactory
@@ -31,7 +33,6 @@ import org.w3c.dom.Node
import org.w3c.dom.NodeList
import org.xml.sax.InputSource
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
@@ -111,7 +112,7 @@ public abstract class VfModuleBase extends AbstractServiceTaskProcessor {
} catch (Exception e) {
logger.warn("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_WARNING.toString(),
'Exception transforming network params to vnfNetworks', "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), 'Exception is: \n' + e);
+ ErrorCode.UnknownError.getValue(), 'Exception is: \n' + e);
}
return vnfNetworks
}
@@ -150,7 +151,7 @@ public abstract class VfModuleBase extends AbstractServiceTaskProcessor {
} catch (Exception e) {
logger.warn("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_WARNING.toString(),
'Exception transforming params to entries', "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), 'Exception transforming params to entries' + e);
+ ErrorCode.UnknownError.getValue(), 'Exception transforming params to entries' + e);
}
return entries
}
@@ -191,7 +192,7 @@ public abstract class VfModuleBase extends AbstractServiceTaskProcessor {
} catch (Exception e) {
logger.warn("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_WARNING.toString(),
'Exception transforming params to entries', "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), 'Exception transforming params to entries' + e);
+ ErrorCode.UnknownError.getValue(), 'Exception transforming params to entries' + e);
}
return entries
}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VnfAdapterRestV1.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VnfAdapterRestV1.groovy
index d8b2c4f5c0..ac67d949a5 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VnfAdapterRestV1.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VnfAdapterRestV1.groovy
@@ -23,6 +23,7 @@
package org.onap.so.bpmn.common.scripts
import org.onap.so.client.HttpClientFactory
+import org.onap.so.logger.ErrorCode
import javax.ws.rs.core.Response
import org.apache.commons.lang3.*
@@ -31,7 +32,6 @@ import org.camunda.bpm.engine.delegate.DelegateExecution
import org.onap.so.bpmn.core.UrnPropertiesReader
import org.onap.so.client.HttpClient
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import org.onap.so.utils.TargetEntity
@@ -79,7 +79,7 @@ class VnfAdapterRestV1 extends AbstractServiceTaskProcessor {
if (messageId == null || messageId.isEmpty()) {
String msg = getProcessKey(execution) + ': no messageId in ' + requestType
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
@@ -93,7 +93,7 @@ class VnfAdapterRestV1 extends AbstractServiceTaskProcessor {
if (notificationUrl == null || notificationUrl.isEmpty()) {
String msg = getProcessKey(execution) + ': no notificationUrl in ' + requestType
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
@@ -107,7 +107,7 @@ class VnfAdapterRestV1 extends AbstractServiceTaskProcessor {
if (vnfAdapterEndpoint == null || vnfAdapterEndpoint.isEmpty()) {
String msg = getProcessKey(execution) + ': mso:adapters:vnf:rest:endpoint URN mapping is not defined'
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
@@ -125,7 +125,7 @@ class VnfAdapterRestV1 extends AbstractServiceTaskProcessor {
if (vnfId == null || vnfId.isEmpty()) {
String msg = getProcessKey(execution) + ': no vnfId in ' + requestType
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
@@ -138,7 +138,7 @@ class VnfAdapterRestV1 extends AbstractServiceTaskProcessor {
if (vnfId == null || vnfId.isEmpty()) {
String msg = getProcessKey(execution) + ': no vnfId in ' + requestType
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
@@ -147,7 +147,7 @@ class VnfAdapterRestV1 extends AbstractServiceTaskProcessor {
if (vfModuleId == null || vfModuleId.isEmpty()) {
String msg = getProcessKey(execution) + ': no vfModuleId in ' + requestType
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
@@ -161,7 +161,7 @@ class VnfAdapterRestV1 extends AbstractServiceTaskProcessor {
if (vnfId == null || vnfId.isEmpty()) {
String msg = getProcessKey(execution) + ': no vnfId in ' + requestType
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
@@ -170,7 +170,7 @@ class VnfAdapterRestV1 extends AbstractServiceTaskProcessor {
if (vfModuleId == null || vfModuleId.isEmpty()) {
String msg = getProcessKey(execution) + ': no vfModuleId in ' + requestType
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
@@ -184,7 +184,7 @@ class VnfAdapterRestV1 extends AbstractServiceTaskProcessor {
if (vfModuleRollbackNode == null) {
String msg = getProcessKey(execution) + ': no vfModuleRollback in ' + requestType
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
@@ -193,7 +193,7 @@ class VnfAdapterRestV1 extends AbstractServiceTaskProcessor {
if (vnfId == null || vnfId.isEmpty()) {
String msg = getProcessKey(execution) + ': no vnfId in ' + requestType
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
@@ -202,7 +202,7 @@ class VnfAdapterRestV1 extends AbstractServiceTaskProcessor {
if (vfModuleId == null || vfModuleId.isEmpty()) {
String msg = getProcessKey(execution) + ': no vfModuleId in ' + requestType
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
@@ -223,7 +223,7 @@ class VnfAdapterRestV1 extends AbstractServiceTaskProcessor {
if (volumeGroupId == null || volumeGroupId.isEmpty()) {
String msg = getProcessKey(execution) + ': no volumeGroupId in ' + requestType
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
@@ -239,7 +239,7 @@ class VnfAdapterRestV1 extends AbstractServiceTaskProcessor {
if (volumeGroupId == null || volumeGroupId.isEmpty()) {
String msg = getProcessKey(execution) + ': no volumeGroupId in ' + requestType
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
@@ -255,7 +255,7 @@ class VnfAdapterRestV1 extends AbstractServiceTaskProcessor {
if (volumeGroupId == null || volumeGroupId.isEmpty()) {
String msg = getProcessKey(execution) + ': no volumeGroupId in ' + requestType
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
@@ -268,7 +268,7 @@ class VnfAdapterRestV1 extends AbstractServiceTaskProcessor {
} else {
String msg = getProcessKey(execution) + ': Unsupported request type: ' + requestType
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
@@ -286,7 +286,7 @@ class VnfAdapterRestV1 extends AbstractServiceTaskProcessor {
if (basicAuthValue == null || basicAuthValue.isEmpty()) {
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
getProcessKey(execution) + ": mso:adapters:po:auth URN mapping is not defined", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
} else {
try {
def encodedString = utils.getBasicAuth(basicAuthValue, UrnPropertiesReader.getVariable("mso.msoKey", execution))
@@ -294,7 +294,7 @@ class VnfAdapterRestV1 extends AbstractServiceTaskProcessor {
} catch (IOException ex) {
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
getProcessKey(execution) + ": Unable to encode BasicAuth credentials for VnfAdapter",
- "BPMN", MsoLogger.ErrorCode.UnknownError.getValue());
+ "BPMN", ErrorCode.UnknownError.getValue());
}
}
@@ -304,7 +304,7 @@ class VnfAdapterRestV1 extends AbstractServiceTaskProcessor {
} catch (Exception e) {
String msg = 'Caught exception in ' + method + ": " + e
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
logger.debug(msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
@@ -356,7 +356,7 @@ class VnfAdapterRestV1 extends AbstractServiceTaskProcessor {
} else {
String msg = 'Unsupported HTTP method "' + vnfAdapterMethod + '" in ' + method + ": " + e
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
@@ -369,7 +369,7 @@ class VnfAdapterRestV1 extends AbstractServiceTaskProcessor {
} catch (Exception e) {
String msg = 'Caught exception in ' + method + ": " + e
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
}
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VnfAdapterUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VnfAdapterUtils.groovy
index 4d74ac374e..c947bf2e65 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VnfAdapterUtils.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VnfAdapterUtils.groovy
@@ -25,8 +25,8 @@ package org.onap.so.bpmn.common.scripts
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.logger.ErrorCode
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
@@ -88,7 +88,7 @@ class VnfAdapterUtils {
} catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
'Caught exception in ' + method, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 5000, 'Internal Error- Unable to validate VNF Response ' + e.getMessage())
}
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/BpmnRestClient.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/BpmnRestClient.java
index 2dbf2feaf7..526f5d5288 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/BpmnRestClient.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/recipe/BpmnRestClient.java
@@ -35,13 +35,12 @@ import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.HttpClientBuilder;
import org.onap.so.bpmn.core.UrnPropertiesReader;
+import org.onap.so.logger.ErrorCode;
import org.onap.so.logger.MessageEnum;
-import org.onap.so.logger.MsoLogger;
import org.onap.so.utils.CryptoUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
/**
@@ -185,7 +184,7 @@ public class BpmnRestClient {
logger.trace("request body is {}", jsonReq);
} catch(Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.APIH_WARP_REQUEST.toString(), "Camunda", "wrapVIDRequest",
- MsoLogger.ErrorCode.BusinessProcesssError.getValue(), "Error in APIH Warp request", e);
+ ErrorCode.BusinessProcesssError.getValue(), "Error in APIH Warp request", e);
}
return jsonReq;
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/workflow/context/WorkflowContextHolder.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/workflow/context/WorkflowContextHolder.java
index 61f92313f7..0de3414381 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/workflow/context/WorkflowContextHolder.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/common/workflow/context/WorkflowContextHolder.java
@@ -26,8 +26,8 @@ package org.onap.so.bpmn.common.workflow.context;
import java.util.concurrent.DelayQueue;
import java.util.concurrent.TimeUnit;
+import org.onap.so.logger.ErrorCode;
import org.onap.so.logger.MessageEnum;
-import org.onap.so.logger.MsoLogger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
@@ -121,7 +121,6 @@ public class WorkflowContextHolder {
while (!isInterrupted()) {
try {
WorkflowContext requestObject = responseQueue.take();
- MsoLogger.setLogContext(requestObject.getRequestId(), null);
logger.debug("Time remaining for request id: {}:{}", requestObject.getRequestId(), requestObject
.getDelay
(TimeUnit.MILLISECONDS));
@@ -132,7 +131,7 @@ public class WorkflowContextHolder {
} catch (Exception e) {
logger.debug("WorkflowContextHolder timeout thread caught exception: ", e);
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION.toString(), "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Error in WorkflowContextHolder timeout thread");
+ ErrorCode.UnknownError.getValue(), "Error in WorkflowContextHolder timeout thread");
}
}
logger.debug("WorkflowContextHolder timeout thread interrupted, quitting");
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java
index 916d24e8dc..cb65f4d420 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java
@@ -27,8 +27,8 @@ import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.onap.so.bpmn.common.BuildingBlockExecution;
import org.onap.so.bpmn.common.DelegateExecutionImpl;
import org.onap.so.bpmn.core.WorkflowException;
+import org.onap.so.logger.ErrorCode;
import org.onap.so.logger.MessageEnum;
-import org.onap.so.logger.MsoLogger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
@@ -55,7 +55,7 @@ public class ExceptionBuilder {
}
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), msg.toString());
+ ErrorCode.UnknownError.getValue(), msg.toString());
execution.setVariable(errorVariable, exception.getMessage());
} catch (Exception ex){
//log trace, allow process to complete gracefully
@@ -84,7 +84,7 @@ public class ExceptionBuilder {
}
}
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), msg.toString());
+ ErrorCode.UnknownError.getValue(), msg.toString());
execution.setVariable(errorVariable, exception.getMessage());
} catch (Exception ex){
//log trace, allow process to complete gracefully