aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn')
-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/bpmn/servicedecomposition/bbobjects/Vnfc.java4
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoConfiguration.java16
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java2
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java6
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/CallbackHandlerService.java18
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/SDNCAdapterCallbackServiceImpl.java3
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/VnfAdapterNotifyServiceImpl.java9
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowMessageResource.java7
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowResource.java10
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/LoggingAndURNMappingPlugin.java3
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIVfModuleIT.java1
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFCheckClosedLoopDisabledFlagActivity.bpmn50
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFCheckInMaintFlagActivity.bpmn50
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFCheckPserversLockedFlagActivity.bpmn50
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFSetClosedLoopDisabledFlagActivity.bpmn50
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFUnsetClosedLoopDisabledFlagActivity.bpmn47
-rw-r--r--bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFCheckClosedLoopDisabledFlagActivityTest.java55
-rw-r--r--bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFCheckInMaintFlagActivityTest.java56
-rw-r--r--bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFCheckPserversLockedFlagActivity.java55
-rw-r--r--bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFSetClosedLoopDisabledFlagActivityTest.java55
-rw-r--r--bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFUnsetClosedLoopDisabledFlagActivityTest.java54
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy10
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateNetworkInstance.groovy1
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy19
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1.groovy8
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVnfInfra.groovy18
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteNetworkInstance.groovy13
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleInfra.groovy18
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy13
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy7
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy4
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy36
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy14
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy18
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModules.groovy12
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModulesRollback.groovy16
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy5
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2.groovy7
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy10
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy11
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnf.groovy12
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy12
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleE2EServiceInstance.groovy5
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleVFCNetworkServiceInstance.groovy6
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy30
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModules.groovy8
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ReplaceVnfInfra.groovy20
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/RollbackVnf.groovy31
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstance.groovy5
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModule.groovy14
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleInfra.groovy16
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleInfraV2.groovy4
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy18
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1.groovy6
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVnfInfra.groovy14
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfCmBase.groovy28
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy16
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy22
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy9
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustService.groovy4
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy4
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollback.groovy4
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy4
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollback.groovy12
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRG.groovy4
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXC.groovy4
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/JsonUtilForPnfCorrelationId.java2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/properties/BPMNProperties.java1
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/vfcmodel/NSResourceInputParameter.java1
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java4
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java4
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/JsonUtilForPnfCorrelationIdTest.java8
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClientTest.java4
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java8
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIFlagTasks.java41
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java4
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/network/tasks/NetworkAdapterDeleteTasks.java1
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImpl.java6
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasks.java4
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOut.java4
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java8
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/NetworkBBUtils.java1
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/manualhandling/tasks/ManualHandlingTasks.java38
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java3
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java3
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java1
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClientResponseValidator.java16
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIConfigurationResources.java2
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVnfResources.java19
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/NetworkAdapterResources.java1
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SdnCommonTasks.java12
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java4
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/common/aai/tasks/AAIFlagTasksTest.java87
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java7
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVnfResourcesTest.java31
123 files changed, 1197 insertions, 557 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 cf7290a654..27fe33f5ea 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
@@ -290,7 +291,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)
}
@@ -341,11 +342,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/bpmn/servicedecomposition/bbobjects/Vnfc.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/Vnfc.java
index 68caeb244f..b432fe10b7 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/Vnfc.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/Vnfc.java
@@ -13,11 +13,11 @@ import com.fasterxml.jackson.annotation.JsonRootName;
@JsonRootName("vnfc")
public class Vnfc implements Serializable {
-
+
/**
*
*/
- private static final long serialVersionUID = 1L;
+ private static final long serialVersionUID = -9170269565756850796L;
@Id
@JsonProperty("vnfc-name")
private String vnfcName;
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoConfiguration.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoConfiguration.java
index 87168107e1..462664c612 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoConfiguration.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoConfiguration.java
@@ -34,9 +34,25 @@ public class ModelInfoConfiguration implements Serializable{
private String modelVersionId;
@JsonProperty("model-customization-id")
private String modelCustomizationId;
+ @JsonProperty("configuration-type")
+ private String configurationType;
+ @JsonProperty("configuration-role")
+ private String configurationRole;
@JsonProperty("policy-name")
private String policyName;
+ public String getConfigurationRole() {
+ return configurationRole;
+ }
+ public void setConfigurationRole(String configurationRole) {
+ this.configurationRole = configurationRole;
+ }
+ public String getConfigurationType() {
+ return configurationType;
+ }
+ public void setConfigurationType(String configurationType) {
+ this.configurationType = configurationType;
+ }
public String getModelInvariantId() {
return modelInvariantId;
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java
index 0a334cde6f..50a9c4e8b1 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java
@@ -505,6 +505,8 @@ public class BBInputSetupMapperLayer {
modelInfoConfiguration.setModelCustomizationId(vnfVfmoduleCvnfcConfigurationCustomization.getModelCustomizationUUID());
modelInfoConfiguration.setModelInvariantId(vnfVfmoduleCvnfcConfigurationCustomization.getConfigurationResource().getModelInvariantUUID());
modelInfoConfiguration.setPolicyName(vnfVfmoduleCvnfcConfigurationCustomization.getPolicyName());
+ modelInfoConfiguration.setConfigurationType(vnfVfmoduleCvnfcConfigurationCustomization.getConfigurationType());
+ modelInfoConfiguration.setConfigurationRole(vnfVfmoduleCvnfcConfigurationCustomization.getConfigurationRole());
return modelInfoConfiguration;
}
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
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/CallbackHandlerService.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/CallbackHandlerService.java
index 4ab22f4616..46a6fa3ef3 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/CallbackHandlerService.java
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/CallbackHandlerService.java
@@ -33,8 +33,8 @@ import org.camunda.bpm.engine.RuntimeService;
import org.camunda.bpm.engine.runtime.Execution;
import org.camunda.bpm.engine.runtime.MessageCorrelationResult;
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.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -221,7 +221,7 @@ public class CallbackHandlerService {
+ queryException;
logger.debug(msg);
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION.toString(), "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), msg, queryException);
+ ErrorCode.UnknownError.getValue(), msg, queryException);
}
return false;
@@ -264,7 +264,7 @@ public class CallbackHandlerService {
+ "': " + ole;
logger.debug(msg);
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION.toString(), "BPMN CORRELATION ERROR -",
- MsoLogger.ErrorCode.UnknownError.getValue(), msg, ole);
+ ErrorCode.UnknownError.getValue(), msg, ole);
//Retry for OptimisticLocking Exceptions
int retryCount = 0;
@@ -297,14 +297,14 @@ public class CallbackHandlerService {
String strMsg = "Received exception, OptimisticLockingException retry failed, retryCount:" + retryCount + " | exception returned: " + olex;
logger.debug(strMsg);
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION.toString(), "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), strMsg, olex);
+ ErrorCode.UnknownError.getValue(), strMsg, olex);
} catch (Exception excep) {
retryCount = 0;
//oleFlag = ex instanceof org.camunda.bpm.engine.OptimisticLockingException;
String strMsg = "Received exception, OptimisticLockingException retry failed, retryCount:" + retryCount + " | exception returned: " + excep;
logger.debug(strMsg);
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION.toString(), "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), strMsg, excep);
+ ErrorCode.UnknownError.getValue(), strMsg, excep);
}
}
@@ -318,7 +318,7 @@ public class CallbackHandlerService {
+ "': " + e;
logger.debug(msg);
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION.toString(), "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), msg, e);
+ ErrorCode.UnknownError.getValue(), msg, e);
}
} catch (Exception e) {
// This must be an exception from the flow itself. Log it, but don't
@@ -328,7 +328,7 @@ public class CallbackHandlerService {
+ "': " + e;
logger.debug(msg);
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION.toString(), "BPMN CORRELATION ERROR -",
- MsoLogger.ErrorCode.UnknownError.getValue(), msg, e);
+ ErrorCode.UnknownError.getValue(), msg, e);
}
return true;
@@ -364,10 +364,10 @@ public class CallbackHandlerService {
protected void logCallbackError(String method, long startTime, String msg, Exception e) {
if (e == null) {
logger.error("{} {} {} {}", MessageEnum.BPMN_CALLBACK_EXCEPTION.toString(), "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), msg);
+ ErrorCode.UnknownError.getValue(), msg);
} else {
logger.error("{} {} {} {}", MessageEnum.BPMN_CALLBACK_EXCEPTION.toString(), "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), msg, e);
+ ErrorCode.UnknownError.getValue(), msg, e);
}
}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/SDNCAdapterCallbackServiceImpl.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/SDNCAdapterCallbackServiceImpl.java
index 267e24fec4..a74bdfc649 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/SDNCAdapterCallbackServiceImpl.java
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/SDNCAdapterCallbackServiceImpl.java
@@ -34,7 +34,6 @@ import org.onap.so.bpmn.common.adapter.sdnc.SDNCAdapterResponse;
import org.onap.so.bpmn.common.adapter.sdnc.SDNCCallbackAdapterPortType;
import org.onap.so.bpmn.common.workflow.service.CallbackHandlerService.CallbackError;
import org.onap.so.bpmn.common.workflow.service.CallbackHandlerService.CallbackResult;
-import org.onap.so.logger.MsoLogger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -65,8 +64,6 @@ public class SDNCAdapterCallbackServiceImpl extends ProcessEngineAwareService im
String correlationVariable = "SDNCA_requestId";
String correlationValue = sdncAdapterCallbackRequest.getCallbackHeader().getRequestId();
- MsoLogger.setLogContext(correlationValue, "N/A");
-
CallbackResult result = callback.handleCallback(method, message, messageEventName,
messageVariable, correlationVariable, correlationValue, logMarker);
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/VnfAdapterNotifyServiceImpl.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/VnfAdapterNotifyServiceImpl.java
index 65cc70d5f4..ed524c115e 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/VnfAdapterNotifyServiceImpl.java
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/VnfAdapterNotifyServiceImpl.java
@@ -40,7 +40,6 @@ import org.onap.so.bpmn.common.adapter.vnf.UpdateVnfNotification;
import org.onap.so.bpmn.common.adapter.vnf.VnfAdapterNotify;
import org.onap.so.bpmn.common.adapter.vnf.VnfRollback;
import org.onap.so.bpmn.common.adapter.vnf.VnfStatus;
-import org.onap.so.logger.MsoLogger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -118,8 +117,6 @@ public class VnfAdapterNotifyServiceImpl extends ProcessEngineAwareService imple
String correlationVariable = "VNFQ_messageId";
String correlationValue = messageId;
- MsoLogger.setLogContext(correlationValue, "N/A");
-
QueryVnfNotification message = new QueryVnfNotification();
message.setMessageId(messageId);
@@ -161,8 +158,6 @@ public class VnfAdapterNotifyServiceImpl extends ProcessEngineAwareService imple
String correlationVariable = "VNFC_messageId";
String correlationValue = messageId;
- MsoLogger.setLogContext(correlationValue, "N/A");
-
CreateVnfNotification message = new CreateVnfNotification();
message.setMessageId(messageId);
@@ -201,8 +196,6 @@ public class VnfAdapterNotifyServiceImpl extends ProcessEngineAwareService imple
String correlationVariable = "VNFU_messageId";
String correlationValue = messageId;
- MsoLogger.setLogContext(correlationValue, "N/A");
-
UpdateVnfNotification message = new UpdateVnfNotification();
message.setMessageId(messageId);
@@ -236,8 +229,6 @@ public class VnfAdapterNotifyServiceImpl extends ProcessEngineAwareService imple
String correlationVariable = "VNFDEL_uuid";
String correlationValue = messageId;
- MsoLogger.setLogContext(correlationValue, "N/A");
-
DeleteVnfNotification message = new DeleteVnfNotification();
message.setMessageId(messageId);
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowMessageResource.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowMessageResource.java
index a5af553e1c..075102331c 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowMessageResource.java
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowMessageResource.java
@@ -36,8 +36,8 @@ import javax.ws.rs.core.Response;
import org.onap.so.bpmn.common.workflow.service.CallbackHandlerService.CallbackError;
import org.onap.so.bpmn.common.workflow.service.CallbackHandlerService.CallbackResult;
+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.beans.factory.annotation.Autowired;
@@ -79,7 +79,6 @@ public class WorkflowMessageResource{
String message) {
String method = "receiveWorkflowMessage";
- MsoLogger.setLogContext(correlator, "N/A");
logger.debug(LOGMARKER + " Received workflow message"
+ " type='" + messageType + "'"
@@ -91,7 +90,7 @@ public class WorkflowMessageResource{
String msg = "Missing message type";
logger.debug(LOGMARKER + " " + msg);
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION.toString(), "BPMN",
- MsoLogger.ErrorCode.DataError.getValue(), LOGMARKER + ":" + msg);
+ ErrorCode.DataError.getValue(), LOGMARKER + ":" + msg);
return Response.status(400).entity(msg).build();
}
@@ -99,7 +98,7 @@ public class WorkflowMessageResource{
String msg = "Missing correlator";
logger.debug(LOGMARKER + " " + msg);
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION.toString(), "BPMN",
- MsoLogger.ErrorCode.DataError.getValue(), LOGMARKER + ":" + msg);
+ ErrorCode.DataError.getValue(), LOGMARKER + ":" + msg);
return Response.status(400).entity(msg).build();
}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowResource.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowResource.java
index d10ecd1ce2..a5d479ae41 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowResource.java
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/workflow/service/WorkflowResource.java
@@ -50,8 +50,8 @@ import org.camunda.bpm.engine.variable.Variables.SerializationDataFormats;
import org.camunda.bpm.engine.variable.impl.VariableMapImpl;
import org.onap.so.bpmn.common.workflow.context.WorkflowResponse;
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.slf4j.MDC;
@@ -202,7 +202,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
if (processInstance != null) workflowResponse.setProcessInstanceID(processInstance.getId());
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), "BPMN", MDC.get(processKey),
- MsoLogger.ErrorCode.UnknownError.getValue(),
+ ErrorCode.UnknownError.getValue(),
LOGMARKER + workflowResponse.getMessage() + " for processKey: " + processKey + " with response: "
+ workflowResponse.getResponse());
@@ -237,10 +237,6 @@ public class WorkflowResource extends ProcessEngineAwareService {
}
private void setLogContext(String processKey, Map<String, Object> inputVariables) {
- if (inputVariables != null) {
- MsoLogger.setLogContext(getValueFromInputVariables(inputVariables, "mso-request-id"),
- getValueFromInputVariables(inputVariables, "mso-service-instance-id"));
- }
}
private String getValueFromInputVariables(Map<String,Object> inputVariables, String key) {
@@ -591,7 +587,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
response.setProcessInstanceID(processInstanceId);
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), "BPMN", MDC.get(processKey),
- MsoLogger.ErrorCode.UnknownError.getValue(),
+ ErrorCode.UnknownError.getValue(),
LOGMARKER + response.getMessage() + " for processKey: " + processKey + " with response: " + response
.getResponse());
logger.debug("Exception :",ex);
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/LoggingAndURNMappingPlugin.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/LoggingAndURNMappingPlugin.java
index 04059557ae..f795bcc40e 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/LoggingAndURNMappingPlugin.java
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/LoggingAndURNMappingPlugin.java
@@ -56,8 +56,6 @@ import org.camunda.bpm.model.bpmn.instance.StartEvent;
import org.onap.so.bpmn.core.BPMNLogger;
-import org.onap.so.logger.MessageEnum;
-import org.onap.so.logger.MsoLogger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -316,7 +314,6 @@ public class LoggingAndURNMappingPlugin extends AbstractProcessEnginePlugin {
String requestId = (String) execution.getVariable("mso-request-id");
String svcid = (String) execution.getVariable("mso-service-instance-id");
- MsoLogger.setLogContext(requestId, svcid);
}
} catch(Exception e) {
logger.error("Exception occurred", e);
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIVfModuleIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIVfModuleIT.java
index 3dd2ac957c..2ba5c7286e 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIVfModuleIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIVfModuleIT.java
@@ -40,7 +40,6 @@ import org.junit.Ignore;
import org.junit.Test;
import org.onap.so.BaseIntegrationTest;
import org.onap.so.bpmn.mock.FileUtil;
-import org.onap.so.logger.MsoLogger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFCheckClosedLoopDisabledFlagActivity.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFCheckClosedLoopDisabledFlagActivity.bpmn
new file mode 100644
index 0000000000..9ac0f38835
--- /dev/null
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFCheckClosedLoopDisabledFlagActivity.bpmn
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.9.0">
+ <bpmn:process id="VNFCheckClosedLoopDisabledFlagActivity" name="VNFCheckClosedLoopDisabledFlagActivity&#10;" isExecutable="true">
+ <bpmn:startEvent id="VNFCheckClosedLoopDisabledFlagActivity_Start">
+ <bpmn:outgoing>SequenceFlow_01c8z5u</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:endEvent id="VNFCheckClosedLoopDisabledFlagActivity_End">
+ <bpmn:incoming>SequenceFlow_12mzh2v</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:serviceTask id="TaskCheckClosedLoopDisabledFlagActivity" name="VNF Check Closed Loop Disabled Flag (AAI)" camunda:expression="${AAIFlagTasks.checkVnfClosedLoopDisabledFlag(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
+ <bpmn:incoming>SequenceFlow_01c8z5u</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_12mzh2v</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_01c8z5u" sourceRef="VNFCheckClosedLoopDisabledFlagActivity_Start" targetRef="TaskCheckClosedLoopDisabledFlagActivity" />
+ <bpmn:sequenceFlow id="SequenceFlow_12mzh2v" sourceRef="TaskCheckClosedLoopDisabledFlagActivity" targetRef="VNFCheckClosedLoopDisabledFlagActivity_End" />
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="VNFCheckClosedLoopDisabledFlagActivity">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="VNFCheckClosedLoopDisabledFlagActivity_Start">
+ <dc:Bounds x="104" y="76" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="122" y="112" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1h93h9d_di" bpmnElement="VNFCheckClosedLoopDisabledFlagActivity_End">
+ <dc:Bounds x="320" y="76" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="338" y="116" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_1r380lg_di" bpmnElement="TaskCheckClosedLoopDisabledFlagActivity">
+ <dc:Bounds x="192" y="54" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_01c8z5u_di" bpmnElement="SequenceFlow_01c8z5u">
+ <di:waypoint xsi:type="dc:Point" x="140" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="192" y="94" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="166" y="73" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_12mzh2v_di" bpmnElement="SequenceFlow_12mzh2v">
+ <di:waypoint xsi:type="dc:Point" x="292" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="320" y="94" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="306" y="73" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFCheckInMaintFlagActivity.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFCheckInMaintFlagActivity.bpmn
new file mode 100644
index 0000000000..8709f399a5
--- /dev/null
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFCheckInMaintFlagActivity.bpmn
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.9.0">
+ <bpmn:process id="VNFCheckInMaintFlagActivity" name="VNFCheckInMaintFlagActivity&#10;" isExecutable="true">
+ <bpmn:startEvent id="VNFCheckInMaintFlagActivity_Start">
+ <bpmn:outgoing>SequenceFlow_0h1gkvd</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:endEvent id="VNFCheckInMaintFlagActivity_End">
+ <bpmn:incoming>SequenceFlow_0xu6esl</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:serviceTask id="TaskCheckInMaintFlag" name="VNF Check InMaint Flag (AAI)" camunda:expression="${AAIFlagTasks.checkVnfInMaintFlag(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
+ <bpmn:incoming>SequenceFlow_0h1gkvd</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0xu6esl</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0h1gkvd" sourceRef="VNFCheckInMaintFlagActivity_Start" targetRef="TaskCheckInMaintFlag" />
+ <bpmn:sequenceFlow id="SequenceFlow_0xu6esl" sourceRef="TaskCheckInMaintFlag" targetRef="VNFCheckInMaintFlagActivity_End" />
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="VNFCheckInMaintFlagActivity">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="VNFCheckInMaintFlagActivity_Start">
+ <dc:Bounds x="104" y="76" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="122" y="112" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1h93h9d_di" bpmnElement="VNFCheckInMaintFlagActivity_End">
+ <dc:Bounds x="384" y="76" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="357" y="116" width="90" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_1r380lg_di" bpmnElement="TaskCheckInMaintFlag">
+ <dc:Bounds x="194" y="54" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0h1gkvd_di" bpmnElement="SequenceFlow_0h1gkvd">
+ <di:waypoint xsi:type="dc:Point" x="140" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="194" y="94" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="167" y="73" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xu6esl_di" bpmnElement="SequenceFlow_0xu6esl">
+ <di:waypoint xsi:type="dc:Point" x="294" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="384" y="94" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="339" y="73" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFCheckPserversLockedFlagActivity.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFCheckPserversLockedFlagActivity.bpmn
new file mode 100644
index 0000000000..9c327a4da9
--- /dev/null
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFCheckPserversLockedFlagActivity.bpmn
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.9.0">
+ <bpmn:process id="VNFCheckPserversLockedFlagActivity" name="VNFCheckInMaintFlagActivity&#10;" isExecutable="true">
+ <bpmn:startEvent id="VNFCheckPserversLockedFlagActivity_Start">
+ <bpmn:outgoing>SequenceFlow_0a56huh</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:endEvent id="VNFCheckPserversLockedFlagActivity_End">
+ <bpmn:incoming>SequenceFlow_1f2j7tx</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:serviceTask id="TaskCheckPserversLockedFlagActivity" name="VNF Check Pservers Locked Flag (AAI)" camunda:expression="${AAIFlagTasks.checkVnfPserversLockedFlag(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
+ <bpmn:incoming>SequenceFlow_0a56huh</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1f2j7tx</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0a56huh" sourceRef="VNFCheckPserversLockedFlagActivity_Start" targetRef="TaskCheckPserversLockedFlagActivity" />
+ <bpmn:sequenceFlow id="SequenceFlow_1f2j7tx" sourceRef="TaskCheckPserversLockedFlagActivity" targetRef="VNFCheckPserversLockedFlagActivity_End" />
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="VNFCheckPserversLockedFlagActivity">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="VNFCheckPserversLockedFlagActivity_Start">
+ <dc:Bounds x="104" y="76" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="122" y="112" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1h93h9d_di" bpmnElement="VNFCheckPserversLockedFlagActivity_End">
+ <dc:Bounds x="320" y="76" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="338" y="116" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_1r380lg_di" bpmnElement="TaskCheckPserversLockedFlagActivity">
+ <dc:Bounds x="192" y="54" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0a56huh_di" bpmnElement="SequenceFlow_0a56huh">
+ <di:waypoint xsi:type="dc:Point" x="140" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="192" y="94" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="166" y="73" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1f2j7tx_di" bpmnElement="SequenceFlow_1f2j7tx">
+ <di:waypoint xsi:type="dc:Point" x="292" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="320" y="94" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="306" y="73" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFSetClosedLoopDisabledFlagActivity.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFSetClosedLoopDisabledFlagActivity.bpmn
new file mode 100644
index 0000000000..f356634106
--- /dev/null
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFSetClosedLoopDisabledFlagActivity.bpmn
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.9.0">
+ <bpmn:process id="VNFSetClosedLoopDisabledFlagActivity" name="VNFSetClosedLoopDisabledFlagActivity&#10;" isExecutable="true">
+ <bpmn:startEvent id="VNFSetClosedLoopDisabledFlagActivity_Start">
+ <bpmn:outgoing>SequenceFlow_0pp6ze7</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:endEvent id="VNFSetClosedLoopDisabledFlagActivity_End">
+ <bpmn:incoming>SequenceFlow_0g0xfi3</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:serviceTask id="TaskSetClosedLoopDisabledFlagActivity" name="VNF Set Closed Loop Disabled Flag (AAI)" camunda:expression="${AAIFlagTasks.modifyVnfClosedLoopDisabledFlag(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)), true)}">
+ <bpmn:incoming>SequenceFlow_0pp6ze7</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0g0xfi3</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0pp6ze7" sourceRef="VNFSetClosedLoopDisabledFlagActivity_Start" targetRef="TaskSetClosedLoopDisabledFlagActivity" />
+ <bpmn:sequenceFlow id="SequenceFlow_0g0xfi3" sourceRef="TaskSetClosedLoopDisabledFlagActivity" targetRef="VNFSetClosedLoopDisabledFlagActivity_End" />
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="VNFSetClosedLoopDisabledFlagActivity">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="VNFSetClosedLoopDisabledFlagActivity_Start">
+ <dc:Bounds x="104" y="76" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="122" y="112" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1h93h9d_di" bpmnElement="VNFSetClosedLoopDisabledFlagActivity_End">
+ <dc:Bounds x="320" y="76" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="338" y="116" width="0" height="0" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_1r380lg_di" bpmnElement="TaskSetClosedLoopDisabledFlagActivity">
+ <dc:Bounds x="192" y="54" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0pp6ze7_di" bpmnElement="SequenceFlow_0pp6ze7">
+ <di:waypoint xsi:type="dc:Point" x="140" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="192" y="94" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="166" y="73" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0g0xfi3_di" bpmnElement="SequenceFlow_0g0xfi3">
+ <di:waypoint xsi:type="dc:Point" x="292" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="320" y="94" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="306" y="73" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFUnsetClosedLoopDisabledFlagActivity.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFUnsetClosedLoopDisabledFlagActivity.bpmn
new file mode 100644
index 0000000000..0dbe989cb2
--- /dev/null
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/Activity/VNFUnsetClosedLoopDisabledFlagActivity.bpmn
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.9.0">
+ <bpmn:process id="VNFUnsetInClosedLoopDisabledFlagActivity" name="VNFUnsetInClosedLoopDisabledFlagActivity" isExecutable="true">
+ <bpmn:startEvent id="VNFUnsetClosedLoopDisabledFlagActivity_Start">
+ <bpmn:outgoing>SequenceFlow_19it9ao</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:endEvent id="VNFUnsetClosedLoopDisabledFlagActivity_End">
+ <bpmn:incoming>SequenceFlow_1en9xbh</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:serviceTask id="TaskVNFUnsetClosedLoopDisabledFlagActivity" name="VNF Unset Closed Loop Disabled Flag (AAI)" camunda:expression="${AAIFlagTasks.modifyVnfClosedLoopDisabledFlag(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)), false)}">
+ <bpmn:incoming>SequenceFlow_19it9ao</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1en9xbh</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_19it9ao" sourceRef="VNFUnsetClosedLoopDisabledFlagActivity_Start" targetRef="TaskVNFUnsetClosedLoopDisabledFlagActivity" />
+ <bpmn:sequenceFlow id="SequenceFlow_1en9xbh" sourceRef="TaskVNFUnsetClosedLoopDisabledFlagActivity" targetRef="VNFUnsetClosedLoopDisabledFlagActivity_End" />
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="VNFUnsetInClosedLoopDisabledFlagActivity">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="VNFUnsetClosedLoopDisabledFlagActivity_Start">
+ <dc:Bounds x="173" y="102" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1phehn7_di" bpmnElement="VNFUnsetClosedLoopDisabledFlagActivity_End">
+ <dc:Bounds x="501" y="102" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="519" y="142" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_15fwoxi_di" bpmnElement="TaskVNFUnsetClosedLoopDisabledFlagActivity">
+ <dc:Bounds x="296" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_19it9ao_di" bpmnElement="SequenceFlow_19it9ao">
+ <di:waypoint xsi:type="dc:Point" x="209" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="296" y="120" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="252.5" y="99" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1en9xbh_di" bpmnElement="SequenceFlow_1en9xbh">
+ <di:waypoint xsi:type="dc:Point" x="396" y="120" />
+ <di:waypoint xsi:type="dc:Point" x="501" y="120" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="448.5" y="99" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFCheckClosedLoopDisabledFlagActivityTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFCheckClosedLoopDisabledFlagActivityTest.java
new file mode 100644
index 0000000000..ac4499bf89
--- /dev/null
+++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFCheckClosedLoopDisabledFlagActivityTest.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.bpmn.subprocess;
+import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat;
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.doThrow;
+
+import org.camunda.bpm.engine.delegate.BpmnError;
+import org.camunda.bpm.engine.runtime.ProcessInstance;
+import org.junit.Test;
+import org.onap.so.bpmn.common.BuildingBlockExecution;
+import org.onap.so.bpmn.BaseBPMNTest;
+
+public class VNFCheckClosedLoopDisabledFlagActivityTest extends BaseBPMNTest{
+ @Test
+ public void sunnyDayVNFCheckClosedLoopDisabledFlagActivity_Test() throws InterruptedException {
+ ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFCheckClosedLoopDisabledFlagActivity", variables);
+ assertThat(pi).isNotNull();
+ assertThat(pi).isStarted().hasPassedInOrder("VNFCheckClosedLoopDisabledFlagActivity_Start",
+ "TaskCheckClosedLoopDisabledFlagActivity",
+ "VNFCheckClosedLoopDisabledFlagActivity_End");
+ assertThat(pi).isEnded();
+ }
+
+ @Test
+ public void rainyDayVNFCheckClosedLoopDisabledFlagActivity_Test() throws Exception {
+ doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiFlagTasks)
+ .checkVnfClosedLoopDisabledFlag(any(BuildingBlockExecution.class));
+ ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFCheckClosedLoopDisabledFlagActivity", variables);
+ assertThat(pi).isNotNull();
+ assertThat(pi).isStarted().hasPassedInOrder("VNFCheckClosedLoopDisabledFlagActivity_Start",
+ "TaskCheckClosedLoopDisabledFlagActivity").hasNotPassed(
+ "VNFCheckClosedLoopDisabledFlagActivity_End");
+ assertThat(pi).isEnded();
+ }
+
+}
diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFCheckInMaintFlagActivityTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFCheckInMaintFlagActivityTest.java
new file mode 100644
index 0000000000..050d3124f6
--- /dev/null
+++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFCheckInMaintFlagActivityTest.java
@@ -0,0 +1,56 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.bpmn.subprocess;
+import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat;
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.doThrow;
+
+import org.camunda.bpm.engine.delegate.BpmnError;
+import org.camunda.bpm.engine.runtime.ProcessInstance;
+import org.junit.Test;
+import org.onap.so.bpmn.common.BuildingBlockExecution;
+import org.onap.so.bpmn.BaseBPMNTest;
+
+
+public class VNFCheckInMaintFlagActivityTest extends BaseBPMNTest{
+ @Test
+ public void sunnyDayVNFCheckInMaintFlagActivity_Test() throws InterruptedException {
+ ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFCheckInMaintFlagActivity", variables);
+ assertThat(pi).isNotNull();
+ assertThat(pi).isStarted().hasPassedInOrder("VNFCheckInMaintFlagActivity_Start",
+ "TaskCheckInMaintFlag",
+ "VNFCheckInMaintFlagActivity_End");
+ assertThat(pi).isEnded();
+ }
+
+ @Test
+ public void rainyDayVNFCheckInMaintFlagActivity_Test() throws Exception {
+ doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiFlagTasks)
+ .checkVnfInMaintFlag(any(BuildingBlockExecution.class));
+ ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFCheckInMaintFlagActivity", variables);
+ assertThat(pi).isNotNull();
+ assertThat(pi).isStarted().hasPassedInOrder("VNFCheckInMaintFlagActivity_Start",
+ "TaskCheckInMaintFlag").hasNotPassed(
+ "VNFCheckInMaintFlagActivity_End");
+ assertThat(pi).isEnded();
+ }
+
+}
diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFCheckPserversLockedFlagActivity.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFCheckPserversLockedFlagActivity.java
new file mode 100644
index 0000000000..e43f47fa6a
--- /dev/null
+++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFCheckPserversLockedFlagActivity.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.bpmn.subprocess;
+import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat;
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.doThrow;
+
+import org.camunda.bpm.engine.delegate.BpmnError;
+import org.camunda.bpm.engine.runtime.ProcessInstance;
+import org.junit.Test;
+import org.onap.so.bpmn.common.BuildingBlockExecution;
+import org.onap.so.bpmn.BaseBPMNTest;
+
+public class VNFCheckPserversLockedFlagActivity extends BaseBPMNTest{
+ @Test
+ public void sunnyDayVNFCheckInMaintFlagActivity_Test() throws InterruptedException {
+ ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFCheckPserversLockedFlagActivity", variables);
+ assertThat(pi).isNotNull();
+ assertThat(pi).isStarted().hasPassedInOrder("VNFCheckPserversLockedFlagActivity_Start",
+ "TaskCheckPserversLockedFlagActivity",
+ "VNFCheckPserversLockedFlagActivity_End");
+ assertThat(pi).isEnded();
+ }
+
+ @Test
+ public void rainyDayVNFCheckPserversLockedFlagActivity_Test() throws Exception {
+ doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiFlagTasks)
+ .checkVnfPserversLockedFlag(any(BuildingBlockExecution.class));
+ ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFCheckPserversLockedFlagActivity", variables);
+ assertThat(pi).isNotNull();
+ assertThat(pi).isStarted().hasPassedInOrder("VNFCheckPserversLockedFlagActivity_Start",
+ "TaskCheckPserversLockedFlagActivity").hasNotPassed(
+ "VNFCheckPserversLockedFlagActivity_End");
+ assertThat(pi).isEnded();
+ }
+
+}
diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFSetClosedLoopDisabledFlagActivityTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFSetClosedLoopDisabledFlagActivityTest.java
new file mode 100644
index 0000000000..8e56051f47
--- /dev/null
+++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFSetClosedLoopDisabledFlagActivityTest.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.bpmn.subprocess;
+import static org.camunda.bpm.engine.test.assertions.ProcessEngineTests.assertThat;
+import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat;
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.doThrow;
+
+import org.camunda.bpm.engine.delegate.BpmnError;
+import org.camunda.bpm.engine.runtime.ProcessInstance;
+import org.junit.Test;
+import org.onap.so.bpmn.common.BuildingBlockExecution;
+import org.onap.so.bpmn.BaseBPMNTest;
+
+public class VNFSetClosedLoopDisabledFlagActivityTest extends BaseBPMNTest{
+ @Test
+ public void sunnyDayVNFSetClosedLoopDisabledFlagActivity_Test() throws InterruptedException {
+ ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFSetClosedLoopDisabledFlagActivity", variables);
+ assertThat(pi).isNotNull();
+ assertThat(pi).isStarted().hasPassedInOrder("VNFSetClosedLoopDisabledFlagActivity_Start",
+ "TaskSetClosedLoopDisabledFlagActivity",
+ "VNFSetClosedLoopDisabledFlagActivity_End");
+ assertThat(pi).isEnded();
+ }
+
+ @Test
+ public void rainyDayVNFSetClosedLoopDisabledFlagActivity_Test() throws Exception {
+ doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiFlagTasks)
+ .modifyVnfClosedLoopDisabledFlag(any(BuildingBlockExecution.class), any(boolean.class));
+ ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFSetClosedLoopDisabledFlagActivity", variables);
+ assertThat(pi).isNotNull();
+ assertThat(pi).isStarted().hasPassedInOrder("VNFSetClosedLoopDisabledFlagActivity_Start",
+ "TaskSetClosedLoopDisabledFlagActivity").hasNotPassed(
+ "VNFSetInMaintFlagActivity_End");
+ assertThat(pi).isEnded();
+ }
+}
diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFUnsetClosedLoopDisabledFlagActivityTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFUnsetClosedLoopDisabledFlagActivityTest.java
new file mode 100644
index 0000000000..4c9b33c2c7
--- /dev/null
+++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/VNFUnsetClosedLoopDisabledFlagActivityTest.java
@@ -0,0 +1,54 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.bpmn.subprocess;
+import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareAssertions.assertThat;
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.doThrow;
+
+import org.camunda.bpm.engine.delegate.BpmnError;
+import org.camunda.bpm.engine.runtime.ProcessInstance;
+import org.junit.Test;
+import org.onap.so.bpmn.common.BuildingBlockExecution;
+import org.onap.so.bpmn.BaseBPMNTest;
+
+public class VNFUnsetClosedLoopDisabledFlagActivityTest extends BaseBPMNTest{
+ @Test
+ public void sunnyDayVNFUnsetClosedLoopDisabledFlagActivity_Test() throws InterruptedException {
+ ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFUnsetInClosedLoopDisabledFlagActivity", variables);
+ assertThat(pi).isNotNull();
+ assertThat(pi).isStarted().hasPassedInOrder("VNFUnsetClosedLoopDisabledFlagActivity_Start",
+ "TaskVNFUnsetClosedLoopDisabledFlagActivity",
+ "VNFUnsetClosedLoopDisabledFlagActivity_End");
+ assertThat(pi).isEnded();
+ }
+
+ @Test
+ public void rainyDayVNFUnsetClosedLoopFlag_Test() throws Exception {
+ doThrow(new BpmnError("7000", "TESTING ERRORS")).when(aaiFlagTasks)
+ .modifyVnfClosedLoopDisabledFlag(any(BuildingBlockExecution.class), any(boolean.class));
+ ProcessInstance pi = runtimeService.startProcessInstanceByKey("VNFUnsetInClosedLoopDisabledFlagActivity", variables);
+ assertThat(pi).isNotNull();
+ assertThat(pi).isStarted().hasPassedInOrder("VNFUnsetClosedLoopDisabledFlagActivity_Start",
+ "TaskVNFUnsetClosedLoopDisabledFlagActivity").hasNotPassed(
+ "VNFUnsetClosedLoopDisabledFlagActivity_End");
+ assertThat(pi).isEnded();
+ }
+}
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 21426c1d51..bd465eb9a8 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
@@ -21,11 +21,12 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.so.bpmn.infrastructure.scripts;
+package org.onap.so.bpmn.infrastructure.scripts
-import static org.apache.commons.lang3.StringUtils.*;
+import org.onap.so.logger.ErrorCode;
+
+import static org.apache.commons.lang3.StringUtils.*
-import org.apache.commons.lang3.*
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution
import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
@@ -35,7 +36,6 @@ import org.onap.so.bpmn.core.UrnPropertiesReader
import org.onap.so.bpmn.core.WorkflowException
import org.onap.so.bpmn.core.json.JsonUtils
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import org.springframework.web.util.UriUtils
@@ -327,7 +327,7 @@ public class CreateCustomE2EServiceInstance extends AbstractServiceTaskProcessor
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occured Processing prepareInitServiceOperationStatus.", "BPMN",
- MsoLogger.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/CreateNetworkInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateNetworkInstance.groovy
index 16f7d53087..19fe018e13 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateNetworkInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateNetworkInstance.groovy
@@ -30,7 +30,6 @@ import org.onap.so.bpmn.common.scripts.ExceptionUtil
import org.onap.so.bpmn.common.scripts.MsoUtils
import org.onap.so.bpmn.core.WorkflowException
import org.onap.so.bpmn.core.json.JsonUtils
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy
index 116328b05d..712512fdc9 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy
@@ -20,9 +20,8 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.so.bpmn.infrastructure.scripts;
+package org.onap.so.bpmn.infrastructure.scripts
-import org.apache.commons.lang3.*
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution
import org.onap.aai.domain.yang.v12.GenericVnf;
@@ -35,9 +34,9 @@ import org.onap.so.bpmn.core.RollbackData
import org.onap.so.bpmn.core.UrnPropertiesReader
import org.onap.so.bpmn.core.WorkflowException
import org.onap.so.bpmn.core.json.JsonUtils
-import org.onap.so.bpmn.infrastructure.aai.AAICreateResources;
+import org.onap.so.bpmn.infrastructure.aai.AAICreateResources
+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.w3c.dom.*
@@ -254,7 +253,7 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
//execution.setVariable("CVFMODVOL2_isDataOk", false)
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
" Exception Encountered - " + "\n" + restFaultMessage, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 400, "Internal Error - During PreProcessRequest")
}
@@ -304,7 +303,7 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
} catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Encountered ", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage())
}
}
@@ -405,7 +404,7 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occured Processing PostProcessResponse - " + "\n", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
execution.setVariable("CVFMI_ErrorResponse", "Error Occured during PostProcessResponse Method:\n" + e.getMessage())
}
logger.trace("COMPLETED PostProcessResponse Process")
@@ -482,7 +481,7 @@ public class CreateVfModuleInfra 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, "Invalid Message")
}
}
@@ -531,7 +530,7 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occured Processing prepareUpdateInfraRequest.", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during prepareUpdateInfraRequest Method:\n" + e.getMessage())
}
logger.trace("COMPLETED prepareUpdateInfraRequest Process")
@@ -587,7 +586,7 @@ public class CreateVfModuleInfra 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')
}
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1.groovy
index 26690ece48..5ba90eb989 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVfModuleVolumeInfraV1.groovy
@@ -22,21 +22,17 @@
package org.onap.so.bpmn.infrastructure.scripts
-import org.apache.commons.collections.CollectionUtils
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution
-import org.onap.aai.domain.yang.SearchResults
import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor;
import org.onap.so.bpmn.common.scripts.ExceptionUtil;
import org.onap.so.bpmn.common.scripts.MsoUtils
import org.onap.so.bpmn.core.WorkflowException
import org.onap.so.client.aai.AAIObjectType
-import org.onap.so.client.aai.AAIResourcesClient
-import org.onap.so.client.aai.entities.AAIResultWrapper
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.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
@@ -311,7 +307,7 @@ class CreateVfModuleVolumeInfraV1 extends AbstractServiceTaskProcessor {
execution.setVariable(prefix+'FalloutHandlerRequest', xmlHandlerRequest)
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), "Overall Error Response " +
- "going to FalloutHandler", "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(), "\n" + xmlHandlerRequest);
+ "going to FalloutHandler", "BPMN", ErrorCode.UnknownError.getValue(), "\n" + xmlHandlerRequest);
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVnfInfra.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVnfInfra.groovy
index 1c2975b06c..c0e8d5a6ba 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVnfInfra.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateVnfInfra.groovy
@@ -23,6 +23,7 @@
package org.onap.so.bpmn.infrastructure.scripts
import org.onap.so.bpmn.common.scripts.CatalogDbUtilsFactory
+import org.onap.so.logger.ErrorCode
import static org.apache.commons.lang3.StringUtils.*;
@@ -42,7 +43,6 @@ import org.onap.so.bpmn.core.domain.VnfResource
import org.onap.so.bpmn.core.json.JsonUtils;
import org.onap.so.bpmn.infrastructure.aai.groovyflows.AAICreateResources;
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
@@ -169,7 +169,7 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor {
if (sdncCallbackUrl == null || sdncCallbackUrl.trim().isEmpty()) {
def msg = 'Required variable \'mso.workflow.sdncadapter.callback\' is missing'
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
@@ -195,7 +195,7 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor {
throw b
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), " Error Occurred in " +
- "CreateVnfInfra PreProcessRequest method", "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e)
+ "CreateVnfInfra PreProcessRequest method", "BPMN", ErrorCode.UnknownError.getValue(), "Exception is:\n" + e)
exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occurred in CreateVnfInfra PreProcessRequest")
}
@@ -221,7 +221,7 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor {
} catch (Exception ex) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), " Error Occurred in CreateVnfInfra SendSyncResponse Process", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e)
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e)
exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in CreateVnfInfra SendSyncResponse Process")
}
@@ -247,7 +247,7 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor {
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), "Exception Occurred Processing preProcessSDNCAssignRequest", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e)
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e)
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during prepareProvision Method:\n" + e.getMessage())
}
logger.trace("COMPLETED preProcessSDNCAssignRequest")
@@ -271,7 +271,7 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor {
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), "Exception Occured " +
- "Processing preProcessSDNCActivateRequest", "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e)
+ "Processing preProcessSDNCActivateRequest", "BPMN", ErrorCode.UnknownError.getValue(), "Exception is:\n" + e)
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during preProcessSDNCActivateRequest Method:\n" + e.getMessage())
}
logger.trace("COMPLETED preProcessSDNCActivateRequest Process")
@@ -462,7 +462,7 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor {
if (vnfs == null) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), "No matching " +
- "VNFs in Catalog DB for vnfModelCustomizationUuid=" + vnfModelCustomizationUuid, "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(), "");
+ "VNFs in Catalog DB for vnfModelCustomizationUuid=" + vnfModelCustomizationUuid, "BPMN", ErrorCode.UnknownError.getValue(), "");
exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "No matching VNFs in Catalog DB for vnfModelCustomizationUuid=" + vnfModelCustomizationUuid)
}
@@ -471,7 +471,7 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor {
if (vnf == null) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), "No matching VNF" +
- " in Catalog DB for vnfModelCustomizationUuid=" + vnfModelCustomizationUuid, "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(), "");
+ " in Catalog DB for vnfModelCustomizationUuid=" + vnfModelCustomizationUuid, "BPMN", ErrorCode.UnknownError.getValue(), "");
exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "No matching VNF in Catalog DB for vnfModelCustomizationUuid=" + vnfModelCustomizationUuid)
}
@@ -544,7 +544,7 @@ class CreateVnfInfra extends AbstractServiceTaskProcessor {
}catch(Exception ex){
String msg = "Exception in LineOfBusiness. " + ex.getMessage();
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + ex)
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + ex)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteNetworkInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteNetworkInstance.groovy
index a19b7b7870..1e2f50148c 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteNetworkInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteNetworkInstance.groovy
@@ -20,9 +20,8 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.so.bpmn.infrastructure.scripts;
+package org.onap.so.bpmn.infrastructure.scripts
-import org.apache.commons.lang3.*
import org.camunda.bpm.engine.delegate.DelegateExecution
import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
import org.onap.so.bpmn.common.scripts.ExceptionUtil
@@ -30,14 +29,12 @@ import org.onap.so.bpmn.common.scripts.MsoUtils
import org.onap.so.bpmn.common.scripts.NetworkUtils
import org.onap.so.bpmn.common.scripts.VidUtils
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.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
-import groovy.json.*
-
public class DeleteNetworkInstance extends AbstractServiceTaskProcessor {
String Prefix="DELNI_"
String groovyClassName = "DeleteNetworkInstance"
@@ -359,7 +356,7 @@ public class DeleteNetworkInstance extends AbstractServiceTaskProcessor {
execution.setVariable(Prefix + "FalloutHandlerRequest", falloutHandlerRequest)
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue())
+ ErrorCode.UnknownError.getValue())
} catch (Exception ex) {
// caught exception
@@ -382,7 +379,7 @@ public class DeleteNetworkInstance extends AbstractServiceTaskProcessor {
execution.setVariable(Prefix + "FalloutHandlerRequest", falloutHandlerRequest)
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Overall Error Response going to FalloutHandler: " + "\n" + falloutHandlerRequest,"BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + ex)
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + ex)
}
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleInfra.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleInfra.groovy
index 234482f83c..3a1815cfe6 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleInfra.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleInfra.groovy
@@ -29,9 +29,9 @@ import org.onap.so.bpmn.common.scripts.ExceptionUtil;
import org.onap.so.bpmn.common.scripts.MsoUtils
import org.onap.so.bpmn.common.scripts.VidUtils;
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.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
@@ -127,7 +127,7 @@ public class DeleteVfModuleInfra extends AbstractServiceTaskProcessor {
catch(Exception e) {
String restFaultMessage = e.getMessage()
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), "Caught exception",
- "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(),
+ "BPMN", ErrorCode.UnknownError.getValue(),
"Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Internal Error - During PreProcess Request")
}
@@ -161,7 +161,7 @@ public class DeleteVfModuleInfra 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 preProcessRequest(): ' + e.getMessage())
}
}
@@ -204,7 +204,7 @@ public class DeleteVfModuleInfra 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 sendResponse(): ' + e.getMessage())
}
}
@@ -230,7 +230,7 @@ public class DeleteVfModuleInfra 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, 1002, 'Error in prepDoDeleteVfModule(): ' + e.getMessage())
}
}
@@ -279,7 +279,7 @@ public class DeleteVfModuleInfra 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 prepInfraRequest(): ' + e.getMessage())
}
}
@@ -324,7 +324,7 @@ public class DeleteVfModuleInfra 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')
}
}
@@ -377,7 +377,7 @@ public class DeleteVfModuleInfra 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')
}
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy
index c48527a64f..ccd9f9bd02 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy
@@ -20,9 +20,8 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.so.bpmn.infrastructure.scripts;
+package org.onap.so.bpmn.infrastructure.scripts
-import org.apache.commons.lang3.*
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution
import org.onap.aai.domain.yang.VolumeGroup
@@ -35,17 +34,13 @@ import org.onap.so.bpmn.core.UrnPropertiesReader
import org.onap.so.bpmn.core.WorkflowException
import org.onap.so.client.aai.AAIObjectType
import org.onap.so.client.aai.entities.AAIResultWrapper
-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
-import org.springframework.web.util.UriUtils
-
-
import groovy.json.JsonSlurper
import javax.ws.rs.NotFoundException
@@ -466,7 +461,7 @@ public class DeleteVfModuleVolumeInfraV1 extends AbstractServiceTaskProcessor {
execution.setVariable("DELVfModVol_FalloutHandlerRequest", xmlHandlerRequest)
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Overall Error Response going to FalloutHandler", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "\n" + xmlHandlerRequest);
+ ErrorCode.UnknownError.getValue(), "\n" + xmlHandlerRequest);
}
@@ -487,7 +482,7 @@ public class DeleteVfModuleVolumeInfraV1 extends AbstractServiceTaskProcessor {
' retrieved from AAI for Volume Group Id ' + volumeGroupId
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Error in DeleteVfModuleVolume: " + "\n" + errorMessage, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
ExceptionUtil exceptionUtil = new ExceptionUtil()
exceptionUtil.buildWorkflowException(execution, 5000, errorMessage)
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 e35268c45a..125c3e4504 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
@@ -20,7 +20,9 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.onap.so.bpmn.infrastructure.scripts;
+package org.onap.so.bpmn.infrastructure.scripts
+
+import org.onap.so.logger.ErrorCode;
import static org.apache.commons.lang3.StringUtils.*;
@@ -44,7 +46,6 @@ import org.onap.so.client.aai.entities.uri.AAIResourceUri
import org.onap.so.bpmn.infrastructure.workflow.service.ServicePluginFactory
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
@@ -444,7 +445,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occured Processing preInitResourcesOperStatus.", "BPMN",
- MsoLogger.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/DoCreateVFCNetworkServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy
index 418a1bdd9b..468f603ef6 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy
@@ -32,8 +32,8 @@ import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
import org.onap.so.bpmn.common.scripts.ExceptionUtil
import org.onap.so.bpmn.core.json.JsonUtils
import org.onap.so.client.HttpClient
+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.bpmn.core.UrnPropertiesReader
@@ -236,7 +236,7 @@ public class DoCreateVFCNetworkServiceInstance extends AbstractServiceTaskProces
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception occured while executing AAI Put Call", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
throw new BpmnError("MSOWorkflowException")
}
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy
index 80bc201ecd..c03f9f9c95 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy
@@ -24,6 +24,7 @@ package org.onap.so.bpmn.infrastructure.scripts
import org.onap.so.bpmn.common.scripts.CatalogDbUtilsFactory
import org.onap.so.client.HttpClientFactory
+import org.onap.so.logger.ErrorCode
import javax.ws.rs.core.MediaType
import javax.ws.rs.core.Response
@@ -62,7 +63,6 @@ import org.onap.so.client.graphinventory.entities.uri.Depth
import org.onap.so.constants.Defaults
import org.onap.so.db.catalog.beans.HomingInstance
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
@@ -569,7 +569,7 @@ public class DoCreateVfModule extends VfModuleBase {
if (sdncCallbackUrl == null || sdncCallbackUrl.trim().isEmpty()) {
def msg = 'Required variable \'mso.workflow.sdncadapter.callback\' is missing'
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), msg);
+ ErrorCode.UnknownError.getValue(), msg);
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
@@ -622,7 +622,7 @@ public class DoCreateVfModule extends VfModuleBase {
} 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, 'Internal Error')
}
@@ -751,7 +751,7 @@ public class DoCreateVfModule extends VfModuleBase {
} 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 queryAAIVfModule(): ' + e.getMessage())
}
}
@@ -832,7 +832,7 @@ public class DoCreateVfModule extends VfModuleBase {
} 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 queryAAIVfModuleForStatus(): ' + e.getMessage())
}
}
@@ -868,7 +868,7 @@ public class DoCreateVfModule extends VfModuleBase {
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occurred Processing preProcessSDNCAssignRequest", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during prepareProvision Method:\n" + e.getMessage())
}
logger.trace("COMPLETED preProcessSDNCAssignRequest")
@@ -962,7 +962,7 @@ public class DoCreateVfModule extends VfModuleBase {
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occurred Processing preProcessSDNCGetRequest", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during prepareProvision Method:\n" + e.getMessage())
}
logger.trace("COMPLETED preProcessSDNCGetRequest Process")
@@ -1167,7 +1167,7 @@ public class DoCreateVfModule extends VfModuleBase {
} 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, "Invalid Message")
}
}
@@ -1557,7 +1557,7 @@ public class DoCreateVfModule extends VfModuleBase {
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occured Processing preProcessUpdateAAIVfModuleRequestOrch", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during preProcessUpdateAAIVfModuleRequestOrch Method:\n" + e.getMessage())
}
logger.trace("COMPLETED preProcessUpdateAAIVfModuleRequestOrch")
@@ -1587,7 +1587,7 @@ public class DoCreateVfModule extends VfModuleBase {
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occured Processing preProcessUpdateAAIVfModuleStatus", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during preProcessUpdateAAIVfModuleStatus Method:\n" + e.getMessage())
}
logger.trace("COMPLETED preProcessUpdateAAIVfModuleStatus")
@@ -1617,7 +1617,7 @@ public class DoCreateVfModule extends VfModuleBase {
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occured Processing preProcessUpdateAAIVfModuleRequestGroup", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during preProcessUpdateAAIVfModuleRequestGroup Method:\n" + e.getMessage())
}
logger.trace("COMPLETED preProcessUpdateAAIVfModuleRequestGroup")
@@ -1697,7 +1697,7 @@ public class DoCreateVfModule extends VfModuleBase {
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occured Processing preProcessSDNCGetRequest", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during prepareProvision Method:\n" + e.getMessage())
}
logger.trace("COMPLETED preProcessSDNCGetRequest Process")
@@ -1819,14 +1819,14 @@ public class DoCreateVfModule extends VfModuleBase {
} catch(BpmnError b){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Rethrowing MSOWorkflowException", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + b.getMessage());
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + b.getMessage());
throw b
}catch (Exception ex) {
// try error
String errorMessage = "Bpmn error encountered in CreateVfModule flow. Unexpected Response from AAI - " + ex.getMessage()
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"AAI Query Cloud Region Failed " + errorMessage, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + ex);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + ex);
exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception occured during queryCloudRegion method")
}
}
@@ -1889,7 +1889,7 @@ public class DoCreateVfModule extends VfModuleBase {
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
'Exception Occured Processing prepareCreateAAIVfModuleVolumeGroupRequest', "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during prepareCreateAAIVfModuleVolumeGroupRequest Method:\n" + e.getMessage())
}
logger.trace("COMPLETED prepareCreateAAIVfModuleVolumeGroupRequest")
@@ -2022,7 +2022,7 @@ public class DoCreateVfModule extends VfModuleBase {
} catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Encountered in " + method, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepUpdateAAIGenericVnf(): ' + e.getMessage())
}
@@ -2067,7 +2067,7 @@ public class DoCreateVfModule extends VfModuleBase {
} 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 postProcessUpdateAAIGenericVnf(): ' + e.getMessage())
}
}
@@ -2120,7 +2120,7 @@ public class DoCreateVfModule extends VfModuleBase {
} catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
'Caught exception in queryCatalogDB', "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in queryCatalogDB(): ' + e.getMessage())
}
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy
index 6f6ed671fe..a6040ac290 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy
@@ -36,13 +36,11 @@ import org.onap.so.client.aai.AAIObjectPlurals
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.ErrorCode
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
-import org.springframework.web.util.UriUtils
-
import javax.ws.rs.NotFoundException
@@ -265,7 +263,7 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occured Processing preProcessSDNCDeactivateRequest.", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessSDNCDeactivateRequest Method:\n" + e.getMessage())
}
logger.trace("COMPLETED preProcessSDNCDeactivateRequest")
@@ -448,7 +446,7 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"AAI error occurred deleting the Generic Vnf" + execution.getVariable("DoDVfMod_deleteGenericVnfResponse"),
- "BPMN", MsoLogger.ErrorCode.UnknownError.getValue());
+ "BPMN", ErrorCode.UnknownError.getValue());
String processKey = getProcessKey(execution);
exceptionUtil.buildWorkflowException(execution, 5000, "Failure in DoDeleteVfModule")
@@ -609,7 +607,7 @@ public class DoCreateVfModuleRollback 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 preProcessUpdateAAIGenericVnf((): ' + e.getMessage())
}
}
@@ -627,7 +625,7 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occured Processing setSuccessfulRollbackStatus.", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during setSuccessfulRollbackStatus Method:\n" + e.getMessage())
}
logger.trace("COMPLETED setSuccessfulRollbackStatus")
@@ -647,7 +645,7 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occured Processing setFailedRollbackStatus.", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during setFailedRollbackStatus Method:\n" + e.getMessage())
}
logger.trace("COMPLETED setFailedRollbackStatus")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy
index 24528db473..5f160bb068 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy
@@ -23,13 +23,12 @@
package org.onap.so.bpmn.infrastructure.scripts
import org.onap.so.db.catalog.beans.HomingInstance
+import org.onap.so.logger.ErrorCode
import static org.apache.commons.lang3.StringUtils.*
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution
-import org.onap.aai.domain.yang.GenericVnf
-import org.onap.so.bpmn.common.scripts.AaiUtil
import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
import org.onap.so.bpmn.common.scripts.ExceptionUtil
import org.onap.so.bpmn.common.scripts.MsoUtils
@@ -42,17 +41,12 @@ import org.onap.so.bpmn.core.WorkflowException
import org.onap.so.bpmn.core.domain.VnfResource
import org.onap.so.bpmn.core.json.JsonUtils
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import org.onap.so.client.aai.AAIObjectType;
import org.onap.so.client.aai.AAIResourcesClient
-import org.onap.so.client.aai.entities.AAIResultWrapper
import org.onap.so.client.aai.entities.uri.AAIResourceUri
-import org.onap.so.client.aai.entities.uri.AAIUriFactory;
-import org.springframework.web.util.UriUtils
-import org.json.JSONObject
-
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
/**
* This class supports the DoCreateVnf building block subflow
@@ -222,7 +216,7 @@ class DoCreateVnf extends AbstractServiceTaskProcessor {
if (sdncCallbackUrl == null || sdncCallbackUrl.trim().isEmpty()) {
def msg = 'Required variable \'mso.workflow.sdncadapter.callback\' is missing'
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
execution.setVariable("DoCVNF_sdncCallbackUrl", sdncCallbackUrl)
@@ -414,7 +408,7 @@ class DoCreateVnf extends AbstractServiceTaskProcessor {
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occured Processing preProcessSDNCAssignRequest", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e)
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e)
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessSDNCAssignRequest Method:\n" + e.getMessage())
}
logger.trace("COMPLETED preProcessSDNCAssignRequest")
@@ -632,7 +626,7 @@ class DoCreateVnf extends AbstractServiceTaskProcessor {
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occurred Processing preProcessSDNCGetRequest. ", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during prepareProvision Method:\n" + e.getMessage())
}
logger.trace("COMPLETED preProcessSDNCGetRequest Process")
@@ -671,7 +665,7 @@ class DoCreateVnf 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 prepUpdateAAIGenericVnf(): ' + e.getMessage())
}
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModules.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModules.groovy
index f0680e227c..725a139b59 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModules.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModules.groovy
@@ -39,8 +39,8 @@ import org.onap.so.bpmn.core.json.DecomposeJsonUtil
import org.onap.so.bpmn.core.json.JsonUtils
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution;
-import org.onap.so.bpmn.infrastructure.aai.groovyflows.AAICreateResources;
-import org.onap.so.logger.MsoLogger
+import org.onap.so.bpmn.infrastructure.aai.groovyflows.AAICreateResources
+import org.onap.so.logger.ErrorCode
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import org.onap.so.logger.MessageEnum
@@ -310,7 +310,7 @@ class DoCreateVnfAndModules extends AbstractServiceTaskProcessor {
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occured Processing preProcessAddOnModule ", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessAddOnModule Method:\n" + e.getMessage())
}
logger.trace("COMPLETED preProcessAddOnModule")
@@ -328,7 +328,7 @@ class DoCreateVnfAndModules extends AbstractServiceTaskProcessor {
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occured Processing postProcessAddOnModule ", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during postProcessAddOnModule Method:\n" + e.getMessage())
}
logger.trace("COMPLETED postProcessAddOnModule")
@@ -358,7 +358,7 @@ class DoCreateVnfAndModules extends AbstractServiceTaskProcessor {
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occured Processing validateBaseModule ", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during validateBaseModule Method:\n" + e.getMessage())
}
logger.trace("COMPLETED validateBaseModule")
@@ -389,7 +389,7 @@ class DoCreateVnfAndModules extends AbstractServiceTaskProcessor {
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occured Processing preProcessAddOnModule ", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessAddOnModule Method:\n" + e.getMessage())
}
logger.trace("COMPLETED validateAddOnModule")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModulesRollback.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModulesRollback.groovy
index 6f4c030683..3209f52fef 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModulesRollback.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnfAndModulesRollback.groovy
@@ -22,8 +22,7 @@
package org.onap.so.bpmn.infrastructure.scripts
-import static org.apache.commons.lang3.StringUtils.*;
-
+import org.onap.so.logger.ErrorCode
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
@@ -34,7 +33,6 @@ import org.onap.so.bpmn.core.RollbackData
import org.onap.so.bpmn.core.WorkflowException
import org.onap.so.bpmn.core.json.JsonUtils
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
@@ -167,7 +165,7 @@ class DoCreateVnfAndModulesRollback extends AbstractServiceTaskProcessor {
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occured Processing preProcessCreateVfModuleRollback ", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessCreateVfModuleRollback Method:\n" + e.getMessage())
}
logger.trace("COMPLETED preProcessCreateVfModuleRollback")
@@ -187,14 +185,14 @@ class DoCreateVnfAndModulesRollback extends AbstractServiceTaskProcessor {
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occured Processing postProcessCreateVfModuleRollback ", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during postProcessCreateVfModuleRollback Method:\n" + e.getMessage())
}
if (rolledBack == false) {
logger.debug("Failure on DoCreateVfModuleRollback")
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Unsuccessful rollback of DoCreateVfModule ", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during rollback of DoCreateVfModule")
}
logger.trace("COMPLETED postProcessCreateVfModuleRollback")
@@ -220,7 +218,7 @@ class DoCreateVnfAndModulesRollback extends AbstractServiceTaskProcessor {
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occured Processing preProcessSDNCDeactivateRequest ", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessSDNCDeactivateRequest Method:\n" + e.getMessage())
}
logger.trace("COMPLETED preProcessSDNCDeactivateRequest")
@@ -342,7 +340,7 @@ class DoCreateVnfAndModulesRollback extends AbstractServiceTaskProcessor {
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), "Exception Occured " +
- "Processing setSuccessfulRollbackStatus ", "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ "Processing setSuccessfulRollbackStatus ", "BPMN", ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during setSuccessfulRollbackStatus Method:\n" + e.getMessage())
}
logger.trace("COMPLETED setSuccessfulRollbackStatus")
@@ -364,7 +362,7 @@ class DoCreateVnfAndModulesRollback extends AbstractServiceTaskProcessor {
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), "Exception Occured " +
- "Processing setFailedRollbackStatus. ", "BPMN",MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ "Processing setFailedRollbackStatus. ", "BPMN",ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during setFailedRollbackStatus Method:\n" + e.getMessage())
}
logger.trace("COMPLETED setFailedRollbackStatus")
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 0c14827f22..f1b7328bcc 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
@@ -22,6 +22,8 @@
*/
package org.onap.so.bpmn.infrastructure.scripts
+import org.onap.so.logger.ErrorCode
+
import static org.apache.commons.lang3.StringUtils.*;
import javax.xml.parsers.DocumentBuilder
@@ -39,7 +41,6 @@ import org.onap.so.bpmn.core.UrnPropertiesReader
import org.onap.so.bpmn.core.WorkflowException
import org.onap.so.bpmn.core.json.JsonUtils
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import org.springframework.web.util.UriUtils;
@@ -533,7 +534,7 @@ public class DoCustomDeleteE2EServiceInstance extends AbstractServiceTaskProcess
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occured Processing preInitResourcesOperStatus.", "BPMN",
- MsoLogger.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/DoCustomDeleteE2EServiceInstanceV2.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2.groovy
index f476b080b7..1912d65ce3 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstanceV2.groovy
@@ -23,6 +23,7 @@
package org.onap.so.bpmn.infrastructure.scripts
import org.onap.aai.domain.yang.AllottedResource
+import org.onap.so.logger.ErrorCode
import javax.ws.rs.core.UriBuilder
@@ -31,15 +32,13 @@ import static org.apache.commons.lang3.StringUtils.*;
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.onap.so.bpmn.common.scripts.AaiUtil
+import org.json.JSONArray
import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
import org.onap.so.bpmn.common.scripts.ExceptionUtil
import org.onap.so.bpmn.common.scripts.MsoUtils
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
@@ -947,7 +946,7 @@ public class DoCustomDeleteE2EServiceInstanceV2 extends AbstractServiceTaskProce
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occured Processing preUpdateServiceOperationStatus.", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), e);
+ ErrorCode.UnknownError.getValue(), e);
execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during preUpdateServiceOperationStatus Method:\n" + e.getMessage())
}
logger.trace("COMPLETED preUpdateServiceOperationStatus Process ")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy
index 9c04328d0d..a54d90b2bf 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy
@@ -44,8 +44,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.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
@@ -466,7 +466,7 @@ public class DoDeleteNetworkInstance extends AbstractServiceTaskProcessor {
// caught exception
String exceptionMessage = "Bpmn error encountered in DoDeleteNetworkInstance, sendRequestToVnfAdapter() - " + ex.getMessage()
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), exceptionMessage,
- "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(),
+ "BPMN", ErrorCode.UnknownError.getValue(),
"Exception is:\n" + ex);
logger.debug(exceptionMessage)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
@@ -518,7 +518,7 @@ public class DoDeleteNetworkInstance extends AbstractServiceTaskProcessor {
// caught exception
String exceptionMessage = "Bpmn error encountered in DoDeleteNetworkInstance, prepareSDNCRequest() - " + ex.getMessage()
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), exceptionMessage,
- "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(),
+ "BPMN", ErrorCode.UnknownError.getValue(),
"Exception is:\n" + ex);
logger.debug(exceptionMessage)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
@@ -559,7 +559,7 @@ public class DoDeleteNetworkInstance extends AbstractServiceTaskProcessor {
// caught exception
String exceptionMessage = "Bpmn error encountered in DoDeleteNetworkInstance, prepareSDNCRequest() - " + ex.getMessage()
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), exceptionMessage,
- "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(),
+ "BPMN", ErrorCode.UnknownError.getValue(),
"Exception is:\n" + ex);
logger.debug(exceptionMessage)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
@@ -999,7 +999,7 @@ public class DoDeleteNetworkInstance extends AbstractServiceTaskProcessor {
// caught exception
String exceptionMessage = "Bpmn error encountered in DoDeleteNetworkInstance, prepareSDNCRollback() - " + ex.getMessage()
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), exceptionMessage,
- "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(),
+ "BPMN", ErrorCode.UnknownError.getValue(),
"Exception is:\n" + ex);
logger.debug(exceptionMessage)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy
index e3e3990527..bedf5e0948 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy
@@ -24,18 +24,17 @@ package org.onap.so.bpmn.infrastructure.scripts
import org.onap.aai.domain.yang.NetworkPolicies
import org.onap.aai.domain.yang.NetworkPolicy
+import org.onap.so.logger.ErrorCode
import javax.xml.parsers.DocumentBuilder
import javax.xml.parsers.DocumentBuilderFactory
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution
-import org.onap.so.bpmn.common.scripts.AaiUtil
import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
import org.onap.so.bpmn.common.scripts.ExceptionUtil
import org.onap.so.bpmn.common.scripts.MsoUtils
import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
-import org.onap.so.bpmn.common.scripts.VfModule
import org.onap.so.bpmn.core.UrnPropertiesReader
import org.onap.so.bpmn.core.WorkflowException
import org.onap.so.bpmn.core.json.JsonUtils
@@ -44,10 +43,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.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
-import org.springframework.web.util.UriUtils
import org.w3c.dom.Document
import org.w3c.dom.Element
import org.w3c.dom.Node
@@ -358,7 +355,7 @@ public class DoDeleteVfModule extends AbstractServiceTaskProcessor{
public void handleDoDeleteVfModuleFailure(DelegateExecution execution) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"AAI error occurred deleting the Generic Vnf: " + execution.getVariable("DoDVfMod_deleteGenericVnfResponse"),
- "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(), "Exception");
+ "BPMN", ErrorCode.UnknownError.getValue(), "Exception");
String processKey = getProcessKey(execution);
WorkflowException exception = new WorkflowException(processKey, 5000,
execution.getVariable("DoDVfMod_deleteGenericVnfResponse"))
@@ -579,7 +576,7 @@ public class DoDeleteVfModule 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 prepUpdateAAIGenericVnf(): ' + e.getMessage())
}
}
@@ -628,7 +625,7 @@ public class DoDeleteVfModule 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 queryAAIVfModuleForStatus(): ' + e.getMessage())
}
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnf.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnf.groovy
index 0c244e8e67..3be52f50f7 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnf.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnf.groovy
@@ -26,6 +26,7 @@ import org.onap.aai.domain.yang.GenericVnf
import org.onap.aai.domain.yang.NetworkPolicies
import org.onap.aai.domain.yang.NetworkPolicy
import org.onap.aai.domain.yang.VfModule
+import org.onap.so.logger.ErrorCode
import static org.apache.commons.lang3.StringUtils.*
import org.camunda.bpm.engine.delegate.BpmnError
@@ -44,7 +45,6 @@ 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.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
@@ -112,7 +112,7 @@ public class DoDeleteVfModuleFromVnf extends VfModuleBase {
if (sdncCallbackUrl == null || sdncCallbackUrl.trim().isEmpty()) {
def msg = 'Required variable \'mso.workflow.sdncadapter.callback\' is missing'
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception");
+ ErrorCode.UnknownError.getValue(), "Exception");
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
execution.setVariable("sdncCallbackUrl", sdncCallbackUrl)
@@ -162,7 +162,7 @@ public class DoDeleteVfModuleFromVnf extends VfModuleBase {
} 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 queryAAIForVfModule(): ' + e.getMessage())
}
}
@@ -215,7 +215,7 @@ public class DoDeleteVfModuleFromVnf extends VfModuleBase {
} 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 validateVfModule(): ' + e.getMessage())
}
}
@@ -241,7 +241,7 @@ public class DoDeleteVfModuleFromVnf extends VfModuleBase {
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occured Processing preProcessSDNCDeactivateRequest. Exception is:\n" + e, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessSDNCDeactivateRequest Method:\n" + e.getMessage())
}
logger.trace("COMPLETED preProcessSDNCDeactivateRequest ")
@@ -403,7 +403,7 @@ public class DoDeleteVfModuleFromVnf extends VfModuleBase {
public void handleDoDeleteVfModuleFailure(DelegateExecution execution) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"AAI error occurred deleting the Generic Vnf: " + execution.getVariable("DDVFMV_deleteGenericVnfResponse"),
- "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(), "Exception");
+ "BPMN", ErrorCode.UnknownError.getValue(), "Exception");
String processKey = getProcessKey(execution);
WorkflowException exception = new WorkflowException(processKey, 5000,
execution.getVariable("DDVFMV_deleteGenericVnfResponse"))
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy
index a2c6a82a93..fb62babae9 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVnfAndModules.groovy
@@ -44,8 +44,8 @@ import org.onap.so.client.graphinventory.entities.uri.Depth
import org.onap.so.client.aai.entities.uri.AAIResourceUri
import org.onap.so.client.aai.entities.uri.AAIUriFactory
import org.onap.so.client.aai.AAIObjectType
+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
@@ -111,7 +111,7 @@ class DoDeleteVnfAndModules extends AbstractServiceTaskProcessor {
if (sdncCallbackUrl == null || sdncCallbackUrl.trim().isEmpty()) {
def msg = 'Required variable \'mso.workflow.sdncadapter.callback\' is missing'
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception");
+ ErrorCode.UnknownError.getValue(), "Exception");
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
execution.setVariable("sdncCallbackUrl", sdncCallbackUrl)
@@ -240,7 +240,7 @@ class DoDeleteVnfAndModules extends AbstractServiceTaskProcessor {
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occured Processing preProcessAddOnModule." + e, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessAddOnModule Method:\n" + e.getMessage())
}
logger.trace("COMPLETED preProcessSDNCAssignRequest ")
@@ -341,7 +341,7 @@ class DoDeleteVnfAndModules 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 queryAAIVfModule(): ' + e.getMessage())
}
}
@@ -369,7 +369,7 @@ class DoDeleteVnfAndModules extends AbstractServiceTaskProcessor {
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occured Processing preProcessAddOnModule." + e, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during prepareNextModuleToDelete Method:\n" + e.getMessage())
}
logger.trace("COMPLETED prepareNextModuleToDelete ")
@@ -395,7 +395,7 @@ class DoDeleteVnfAndModules extends AbstractServiceTaskProcessor {
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occured Processing preProcessSDNCDeactivateRequest." + e, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during preProcessSDNCDeactivateRequest Method:\n" + e.getMessage())
}
logger.trace("COMPLETED preProcessSDNCDeactivateRequest ")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleE2EServiceInstance.groovy
index 7f168d99ad..ce3b243533 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleE2EServiceInstance.groovy
@@ -21,6 +21,8 @@
*/
package org.onap.so.bpmn.infrastructure.scripts
+import org.onap.so.logger.ErrorCode
+
import static org.apache.commons.lang3.StringUtils.*;
import org.camunda.bpm.engine.delegate.BpmnError
@@ -32,7 +34,6 @@ import org.onap.so.bpmn.common.scripts.ExceptionUtil
import org.onap.so.bpmn.common.scripts.MsoUtils
import org.onap.so.bpmn.core.json.JsonUtils
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import org.springframework.web.util.UriUtils;
@@ -139,7 +140,7 @@ public class DoScaleE2EServiceInstance extends AbstractServiceTaskProcessor {
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occured Processing preInitResourcesOperStatus.", "BPMN",
- MsoLogger.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/DoScaleVFCNetworkServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleVFCNetworkServiceInstance.groovy
index 905afb53d5..1b089d2a2b 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleVFCNetworkServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoScaleVFCNetworkServiceInstance.groovy
@@ -33,6 +33,7 @@ import org.onap.so.bpmn.core.json.JsonUtils
import org.camunda.bpm.engine.delegate.BpmnError
import com.fasterxml.jackson.databind.ObjectMapper
import org.onap.so.client.HttpClientFactory
+import org.onap.so.logger.ErrorCode
import javax.ws.rs.core.Response
@@ -47,7 +48,6 @@ import org.onap.so.bpmn.infrastructure.vfcmodel.NsScaleParameters
import org.onap.so.bpmn.infrastructure.vfcmodel.NsParameters
import org.onap.so.bpmn.infrastructure.vfcmodel.LocationConstraint
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
@@ -184,7 +184,7 @@ public class DoScaleVFCNetworkServiceInstance extends AbstractServiceTaskProcess
} catch (InterruptedException e) {
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Time Delay exception" + e, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
}
}
@@ -217,7 +217,7 @@ public class DoScaleVFCNetworkServiceInstance extends AbstractServiceTaskProcess
logger.trace("Completed Execute VF-C adapter Post Process ")
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), "Exception occured " +
- "while executing VFC Post Call.", "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(), e);
+ "while executing VFC Post Call.", "BPMN", ErrorCode.UnknownError.getValue(), e);
throw new BpmnError("MSOWorkflowException")
}
return apiResponse
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy
index 47647bd9a6..a17dc9d7fe 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy
@@ -44,8 +44,8 @@ import org.onap.so.client.aai.entities.uri.AAIUri
import org.onap.so.client.aai.entities.uri.AAIUriFactory;
import org.onap.so.client.aai.entities.uri.AAIResourceUri
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
@@ -327,7 +327,7 @@ public class DoUpdateVfModule extends VfModuleBase {
if (sdncCallbackUrl == null || sdncCallbackUrl.trim().isEmpty()) {
def msg = 'Required variable \'mso.workflow.sdncadapter.callback\' is missing'
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, msg)
}
@@ -337,7 +337,7 @@ public class DoUpdateVfModule extends VfModuleBase {
} 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 preProcessRequest(): ' + e.getMessage())
}
}
@@ -378,7 +378,7 @@ public class DoUpdateVfModule extends VfModuleBase {
} 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 preparePrepareUpdateAAIVfModule(): ' + e.getMessage())
}
}
@@ -429,14 +429,14 @@ public class DoUpdateVfModule extends VfModuleBase {
} catch(BpmnError b){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Rethrowing MSOWorkflowException", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + b);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + b);
throw b
}catch (Exception e) {
// try error
String errorMessage = "Bpmn error encountered in CreateVfModule flow. Unexpected Response from AAI - " + e.getMessage()
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"AAI Query Cloud Region Failed. Exception - " + "\n" + errorMessage, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Exception occured during prepConfirmVolumeGroupTenant(): " + e.getMessage())
}
logger.trace('Exited ' + method)
@@ -543,7 +543,7 @@ public class DoUpdateVfModule extends VfModuleBase {
} 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 prepSDNCTopologyChg(): ' + e.getMessage())
}
}
@@ -607,7 +607,7 @@ public class DoUpdateVfModule extends VfModuleBase {
} 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 prepSDNCTopologyQuery(): ' + e.getMessage())
}
}
@@ -709,7 +709,7 @@ public class DoUpdateVfModule extends VfModuleBase {
} 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 prepVnfAdapterRest(): ' + e.getMessage())
}
}
@@ -757,7 +757,7 @@ public class DoUpdateVfModule extends VfModuleBase {
} 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 prepUpdateAAIGenericVnf(): ' + e.getMessage())
}
}
@@ -831,7 +831,7 @@ public class DoUpdateVfModule extends VfModuleBase {
} 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 prepUpdateAAIVfModule(): ' + e.getMessage())
}
}
@@ -934,7 +934,7 @@ public class DoUpdateVfModule extends VfModuleBase {
} 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 prepSDNCTopologyAct(): ' + e.getMessage())
}
}
@@ -955,7 +955,7 @@ public class DoUpdateVfModule extends VfModuleBase {
def WorkflowException workflowException = (WorkflowException) execution.getVariable('WorkflowException')
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
method + ' caught WorkflowException: ' + workflowException.getErrorMessage(), "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
logger.trace('Exited ' + method)
} catch (BpmnError e) {
@@ -963,7 +963,7 @@ public class DoUpdateVfModule extends VfModuleBase {
} 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, 1002, 'Error in handleWorkflowException(): ' + e.getMessage())
}
}
@@ -1042,7 +1042,7 @@ public class DoUpdateVfModule extends VfModuleBase {
} 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 queryAAIVfModule(): ' + e.getMessage())
}
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModules.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModules.groovy
index 3d8205fd2a..3dd5e61246 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModules.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVnfAndModules.groovy
@@ -23,6 +23,7 @@
package org.onap.so.bpmn.infrastructure.scripts
import org.onap.so.client.HttpClientFactory
+import org.onap.so.logger.ErrorCode
import javax.ws.rs.core.Response
import org.camunda.bpm.engine.delegate.BpmnError
@@ -41,7 +42,6 @@ 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.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import org.onap.so.utils.TargetEntity
@@ -275,7 +275,7 @@ class DoUpdateVnfAndModules 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 queryAAIVfModule(): ' + e.getMessage())
}
}
@@ -331,7 +331,7 @@ class DoUpdateVnfAndModules extends AbstractServiceTaskProcessor {
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occured Processing preProcessAddOnModule. Exception is:\n" + e, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occurred during prepareNextModuleToUpdate Method:\n" + e.getMessage())
}
logger.trace("COMPLETED prepareNextModuleToUpdate ")
@@ -407,7 +407,7 @@ class DoUpdateVnfAndModules 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 prepUpdateAAIGenericVnf(): ' + e.getMessage())
}
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ReplaceVnfInfra.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ReplaceVnfInfra.groovy
index 534e5b513a..4321dbadd5 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ReplaceVnfInfra.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ReplaceVnfInfra.groovy
@@ -34,8 +34,8 @@ import org.onap.so.bpmn.core.json.JsonUtils
import org.onap.so.client.aai.*
import org.onap.so.client.appc.ApplicationControllerOrchestrator
import org.onap.so.client.appc.ApplicationControllerSupport
+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
@@ -235,7 +235,7 @@ public class ReplaceVnfInfra extends VnfCmBase {
String restFaultMessage = e.getMessage()
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Encountered - " + "\n" + restFaultMessage, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 5000, restFaultMessage)
}
}
@@ -278,7 +278,7 @@ public class ReplaceVnfInfra extends VnfCmBase {
} 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 sendResponse(): ' + e.getMessage())
}
}
@@ -329,7 +329,7 @@ public class ReplaceVnfInfra extends VnfCmBase {
} 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 getVnfResourceDecomposition(): ' + e.getMessage())
}
}
@@ -371,7 +371,7 @@ public class ReplaceVnfInfra extends VnfCmBase {
} 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);
execution.setVariable("errorCode", "1002")
execution.setVariable("errorText", e.getMessage())
//exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in checkIfVnfInMaintInAAI(): ' + e.getMessage())
@@ -415,7 +415,7 @@ public class ReplaceVnfInfra extends VnfCmBase {
} 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);
execution.setVariable("errorCode", "1002")
execution.setVariable("errorText", e.getMessage())
//exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in checkIfPserversInMaintInAAI(): ' + e.getMessage())
@@ -463,7 +463,7 @@ public class ReplaceVnfInfra extends VnfCmBase {
} 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);
execution.setVariable("errorCode", "1002")
execution.setVariable("errorText", e.getMessage())
}
@@ -533,19 +533,19 @@ public class ReplaceVnfInfra extends VnfCmBase {
} 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);
execution.setVariable("errorCode", "1002")
execution.setVariable("errorText", e.getMessage())
} catch (java.lang.NoSuchMethodError 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);
execution.setVariable("errorCode", "1002")
execution.setVariable("errorText", e.getMessage())
} 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);
execution.setVariable("errorCode", "1002")
execution.setVariable("errorText", e.getMessage())
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/RollbackVnf.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/RollbackVnf.groovy
index 5f215479e9..ef4a78ffde 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/RollbackVnf.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/RollbackVnf.groovy
@@ -21,41 +21,14 @@
package org.onap.so.bpmn.infrastructure.scripts
-import groovy.json.JsonOutput
-
-import groovy.json.JsonSlurper
-import groovy.util.Node
-import groovy.util.XmlParser;
-import groovy.xml.QName
-
-import java.io.Serializable;
-import java.util.UUID;
+import org.onap.so.logger.ErrorCode
import org.onap.so.bpmn.common.scripts.ExceptionUtil
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.impl.cmd.AbstractSetVariableCmd
import org.camunda.bpm.engine.delegate.DelegateExecution
-
-import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor;
-import org.onap.so.bpmn.common.scripts.VidUtils;
-import org.onap.so.bpmn.core.RollbackData
-import org.onap.so.bpmn.core.WorkflowException
import org.onap.so.bpmn.common.scripts.ExceptionUtil
import org.onap.so.bpmn.core.json.JsonUtils
-import org.onap.so.bpmn.core.domain.ModelInfo
-import org.onap.so.bpmn.core.domain.ServiceDecomposition
-import org.onap.so.bpmn.core.domain.VnfResource
-import org.onap.so.client.aai.*
-
-import org.onap.so.client.appc.ApplicationControllerClient;
-import org.onap.so.client.appc.ApplicationControllerSupport;
-import org.onap.so.client.aai.AAIResourcesClient
-import org.onap.so.client.aai.entities.AAIResultWrapper
-import org.onap.so.client.aai.entities.uri.AAIUri
-import org.onap.so.client.aai.entities.uri.AAIUriFactory
import org.onap.appc.client.lcm.model.Action;
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
@@ -116,7 +89,7 @@ public class RollbackVnf extends VnfCmBase {
String restFaultMessage = e.getMessage()
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Encountered - " + "\n" + restFaultMessage, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
execution.setVariable("rollbackErrorCode", "1")
exceptionUtil.buildAndThrowWorkflowException(execution, 5000, restFaultMessage)
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstance.groovy
index 010ac7cda8..0afa34bdec 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ScaleCustomE2EServiceInstance.groovy
@@ -22,6 +22,8 @@
package org.onap.so.bpmn.infrastructure.scripts
+import org.onap.so.logger.ErrorCode
+
import static org.apache.commons.lang3.StringUtils.*
import org.camunda.bpm.engine.delegate.BpmnError
@@ -33,7 +35,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
import org.onap.so.utils.UUIDChecker
@@ -295,7 +296,7 @@ public class ScaleCustomE2EServiceInstance extends AbstractServiceTaskProcessor
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occured Processing prepareInitServiceOperationStatus.", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), e);
+ ErrorCode.UnknownError.getValue(), e);
execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during prepareInitServiceOperationStatus Method:\n" + e.getMessage())
}
logger.trace("COMPLETED prepareInitServiceOperationStatus Process ")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModule.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModule.groovy
index 175bbbdbc9..9db5b7366a 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModule.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModule.groovy
@@ -28,8 +28,8 @@ import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
import org.onap.so.bpmn.common.scripts.ExceptionUtil
import org.onap.so.bpmn.common.scripts.MsoUtils
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
@@ -98,7 +98,7 @@ public class UpdateVfModule 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 preProcessRequest(): ' + e.getMessage())
}
}
@@ -153,7 +153,7 @@ public class UpdateVfModule 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 sendSynchResponse(): ' + e.getMessage())
}
}
@@ -183,7 +183,7 @@ public class UpdateVfModule 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 prepDoUpdateVfModule(): ' + e.getMessage())
}
}
@@ -239,7 +239,7 @@ public class UpdateVfModule 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 prepUpdateInfraRequest(): ' + e.getMessage())
}
}
@@ -280,7 +280,7 @@ public class UpdateVfModule 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')
}
}
@@ -335,7 +335,7 @@ public class UpdateVfModule 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')
}
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleInfra.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleInfra.groovy
index cad1c6f204..2404169493 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleInfra.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleInfra.groovy
@@ -30,8 +30,8 @@ import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
import org.onap.so.bpmn.common.scripts.ExceptionUtil
import org.onap.so.bpmn.common.scripts.MsoUtils
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
@@ -223,7 +223,7 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor {
catch(Exception e) {
String restFaultMessage = e.getMessage()
logger.error("{} {} Exception Encountered - \n{}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), restFaultMessage, e)
+ ErrorCode.UnknownError.getValue(), restFaultMessage, e)
exceptionUtil.buildAndThrowWorkflowException(execution, 5000, restFaultMessage)
}
}
@@ -264,7 +264,7 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor {
throw e;
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage())
}
}
@@ -293,7 +293,7 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor {
throw e;
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepDoUpdateVfModule(): ' + e.getMessage())
}
}
@@ -347,7 +347,7 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor {
throw e;
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepUpdateInfraRequest(): ' + e.getMessage())
}
}
@@ -386,7 +386,7 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor {
throw e;
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, 'Internal Error')
}
}
@@ -439,7 +439,7 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor {
throw e;
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
exceptionUtil.buildWorkflowException(execution, 2000, 'Internal Error')
}
}
@@ -509,7 +509,7 @@ public class UpdateVfModuleInfra extends AbstractServiceTaskProcessor {
throw e;
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Invalid Message")
}
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleInfraV2.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleInfraV2.groovy
index f04fa002fe..575a8f3f1a 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleInfraV2.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleInfraV2.groovy
@@ -235,7 +235,6 @@ public class UpdateVfModuleInfraV2 {
}
catch(Exception e) {
String restFaultMessage = e.getMessage()
- //logger.error("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), " Exception Encountered - " + "\n" + restFaultMessage, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 5000, restFaultMessage)
}
}
@@ -276,7 +275,6 @@ public class UpdateVfModuleInfraV2 {
} catch (BpmnError e) {
throw e;
} catch (Exception e) {
- //logger.error("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage())
}
}
@@ -362,7 +360,6 @@ public class UpdateVfModuleInfraV2 {
} catch (BpmnError e) {
throw e;
} catch (Exception e) {
- //logger.error("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepDoUpdateVfModule(): ' + e.getMessage())
}
@@ -398,7 +395,6 @@ public class UpdateVfModuleInfraV2 {
} catch (BpmnError e) {
throw e;
} catch (Exception e) {
- //logger.error("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), 'Caught exception in ' + method, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, 'Internal Error')
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy
index 367a63fede..0c3294778a 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy
@@ -37,8 +37,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
@@ -111,7 +111,7 @@ class UpdateVfModuleVolume extends VfModuleBase {
throw bpmnError
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in preProcessRequest(): ' + e.getMessage())
}
}
@@ -163,7 +163,7 @@ class UpdateVfModuleVolume extends VfModuleBase {
throw e
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in sendSynchResponse(): ' + e.getMessage())
}
}
@@ -214,7 +214,7 @@ class UpdateVfModuleVolume extends VfModuleBase {
throw e
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in queryAAIForVolumeGroup(): ' + e.getMessage())
}
}
@@ -283,7 +283,7 @@ class UpdateVfModuleVolume extends VfModuleBase {
throw e
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepVnfAdapterRest(): ' + e.getMessage())
}
}
@@ -328,7 +328,7 @@ class UpdateVfModuleVolume extends VfModuleBase {
throw e
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
exceptionUtil.buildWorkflowException(execution, 1002, 'Error in prepDbInfraDbRequest(): ' + e.getMessage())
}
}
@@ -366,7 +366,7 @@ class UpdateVfModuleVolume extends VfModuleBase {
throw e
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in prepCompletionHandlerRequest(): ' + e.getMessage())
}
}
@@ -416,7 +416,7 @@ class UpdateVfModuleVolume extends VfModuleBase {
throw e
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
exceptionUtil.buildWorkflowException(execution, 1002, 'Error in prepFalloutHandler(): ' + e.getMessage())
}
}
@@ -444,7 +444,7 @@ class UpdateVfModuleVolume extends VfModuleBase {
'\' retrieved from AAI for Volume Group Id \'' + volumeGroupId + '\', AIC Cloud Region \'' + aicCloudRegion + '\''
logger.error("{} {} Error in UpdateVfModuleVol: {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), errorMessage)
+ ErrorCode.UnknownError.getValue(), errorMessage)
WorkflowException exception = new WorkflowException(processKey, 5000, errorMessage)
execution.setVariable("WorkflowException", exception)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1.groovy
index 9e1694089e..361d6a2173 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1.groovy
@@ -41,8 +41,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
@@ -480,7 +480,7 @@ class UpdateVfModuleVolumeInfraV1 extends VfModuleBase {
ExceptionUtil exceptionUtil = new ExceptionUtil()
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), 'Error in ' +
- 'UpdateVfModuleVol: ' + errorMessage, "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(), "Exception")
+ 'UpdateVfModuleVol: ' + errorMessage, "BPMN", ErrorCode.UnknownError.getValue(), "Exception")
exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
}
@@ -499,7 +499,7 @@ class UpdateVfModuleVolumeInfraV1 extends VfModuleBase {
ExceptionUtil exceptionUtil = new ExceptionUtil()
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), 'Error in ' +
- 'UpdateVfModuleVol: ' + errorMessage, "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(), "Exception")
+ 'UpdateVfModuleVol: ' + errorMessage, "BPMN", ErrorCode.UnknownError.getValue(), "Exception")
exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMessage)
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVnfInfra.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVnfInfra.groovy
index 60af2a0fe2..26a509022c 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVnfInfra.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVnfInfra.groovy
@@ -35,8 +35,8 @@ import org.onap.so.bpmn.core.json.JsonUtils
import org.onap.so.client.aai.AAIRestClientImpl
import org.onap.so.client.aai.AAIUpdatorImpl
import org.onap.so.client.aai.AAIValidatorImpl
+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
@@ -214,7 +214,7 @@ public class UpdateVnfInfra extends VnfCmBase {
catch(Exception e) {
String restFaultMessage = e.getMessage()
logger.error("{} {} Exception Encountered - \n{}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), restFaultMessage, e)
+ ErrorCode.UnknownError.getValue(), restFaultMessage, e)
exceptionUtil.buildAndThrowWorkflowException(execution, 5000, restFaultMessage)
}
}
@@ -255,7 +255,7 @@ public class UpdateVnfInfra extends VnfCmBase {
throw e;
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage())
}
}
@@ -305,7 +305,7 @@ public class UpdateVnfInfra extends VnfCmBase {
throw e;
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in getVnfResourceDecomposition(): ' + e.getMessage())
}
}
@@ -346,7 +346,7 @@ public class UpdateVnfInfra extends VnfCmBase {
throw e;
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
execution.setVariable("errorCode", "1002")
execution.setVariable("errorText", e.getMessage())
//exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in checkIfVnfInMaintInAAI(): ' + e.getMessage())
@@ -389,7 +389,7 @@ public class UpdateVnfInfra extends VnfCmBase {
throw e;
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
execution.setVariable("errorCode", "1002")
execution.setVariable("errorText", e.getMessage())
//exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in checkIfPserversInMaintInAAI(): ' + e.getMessage())
@@ -436,7 +436,7 @@ public class UpdateVnfInfra extends VnfCmBase {
throw e;
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
execution.setVariable("errorCode", "1002")
execution.setVariable("errorText", e.getMessage())
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfCmBase.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfCmBase.groovy
index a83b36fd6e..09e7516f85 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfCmBase.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfCmBase.groovy
@@ -46,8 +46,8 @@ import org.onap.so.client.aai.entities.uri.AAIUri
import org.onap.so.client.aai.entities.uri.AAIUriFactory
import org.onap.so.client.appc.ApplicationControllerClient
import org.onap.so.client.appc.ApplicationControllerSupport
+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
@@ -100,7 +100,7 @@ public abstract class VnfCmBase extends AbstractServiceTaskProcessor {
throw e;
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage())
}
}
@@ -149,7 +149,7 @@ public abstract class VnfCmBase extends AbstractServiceTaskProcessor {
throw e;
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in getVnfResourceDecomposition(): ' + e.getMessage())
}
}
@@ -190,7 +190,7 @@ public abstract class VnfCmBase extends AbstractServiceTaskProcessor {
throw e;
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
execution.setVariable("errorCode", "1002")
execution.setVariable("errorText", e.getMessage())
//exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in checkIfVnfInMaintInAAI(): ' + e.getMessage())
@@ -320,7 +320,7 @@ public abstract class VnfCmBase extends AbstractServiceTaskProcessor {
throw e;
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in queryAAIForVnf(): ' + e.getMessage())
}
}
@@ -362,7 +362,7 @@ public abstract class VnfCmBase extends AbstractServiceTaskProcessor {
throw e;
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
execution.setVariable("errorCode", "1002")
execution.setVariable("errorText", e.getMessage())
//exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in checkIfPserversInMaintInAAI(): ' + e.getMessage())
@@ -409,7 +409,7 @@ public abstract class VnfCmBase extends AbstractServiceTaskProcessor {
throw e;
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
execution.setVariable("errorCode", "1002")
execution.setVariable("errorText", e.getMessage())
}
@@ -454,7 +454,7 @@ public abstract class VnfCmBase extends AbstractServiceTaskProcessor {
throw e;
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
execution.setVariable("errorCode", "1002")
execution.setVariable("errorText", e.getMessage())
}
@@ -500,7 +500,7 @@ public abstract class VnfCmBase extends AbstractServiceTaskProcessor {
throw e;
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
execution.setVariable("errorCode", "1002")
execution.setVariable("errorText", e.getMessage())
}
@@ -579,19 +579,19 @@ public abstract class VnfCmBase extends AbstractServiceTaskProcessor {
logger.trace('Exited ' + method)
} catch (BpmnError e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
execution.setVariable("errorCode", "1002")
execution.setVariable("errorText", e.getMessage())
} catch (java.lang.NoSuchMethodError e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
execution.setVariable("errorCode", "1002")
execution.setVariable("errorText", e.getMessage())
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
execution.setVariable("errorCode", "1002")
execution.setVariable("errorText", e.getMessage())
@@ -658,7 +658,7 @@ public abstract class VnfCmBase extends AbstractServiceTaskProcessor {
throw e;
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
exceptionUtil.buildAndThrowWorkflowException(execution, 2000, 'Internal Error')
}
}
@@ -729,7 +729,7 @@ public abstract class VnfCmBase extends AbstractServiceTaskProcessor {
throw e;
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
exceptionUtil.buildWorkflowException(execution, 2000, 'Internal Error')
}
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy
index 0a748db561..90523a02be 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy
@@ -33,8 +33,8 @@ import org.onap.so.client.aai.*
import org.onap.so.client.aai.entities.AAIResultWrapper
import org.onap.so.client.aai.entities.uri.AAIUri
import org.onap.so.client.aai.entities.uri.AAIUriFactory
+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
@@ -159,7 +159,7 @@ public class VnfConfigUpdate extends VnfCmBase {
catch(Exception e) {
String restFaultMessage = e.getMessage()
logger.error("{} {} Exception Encountered - \n {} \n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), restFaultMessage, e)
+ ErrorCode.UnknownError.getValue(), restFaultMessage, e)
exceptionUtil.buildAndThrowWorkflowException(execution, 5000, restFaultMessage)
}
}
@@ -201,7 +201,7 @@ public class VnfConfigUpdate extends VnfCmBase {
throw e;
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage())
}
}
@@ -242,7 +242,7 @@ public class VnfConfigUpdate extends VnfCmBase {
throw e;
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
execution.setVariable("errorCode", "1002")
execution.setVariable("errorText", e.getMessage())
//exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in checkIfVnfInMaintInAAI(): ' + e.getMessage())
@@ -285,7 +285,7 @@ public class VnfConfigUpdate extends VnfCmBase {
throw e;
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
execution.setVariable("errorCode", "1002")
execution.setVariable("errorText", e.getMessage())
//exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in checkIfPserversInMaintInAAI(): ' + e.getMessage())
@@ -333,7 +333,7 @@ public class VnfConfigUpdate extends VnfCmBase {
throw e;
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
execution.setVariable("errorCode", "1002")
execution.setVariable("errorText", e.getMessage())
}
@@ -378,7 +378,7 @@ public class VnfConfigUpdate extends VnfCmBase {
throw e;
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
execution.setVariable("errorCode", "1002")
execution.setVariable("errorText", e.getMessage())
//exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in checkIfVnfInMaintInAAI(): ' + e.getMessage())
@@ -424,7 +424,7 @@ public class VnfConfigUpdate extends VnfCmBase {
throw e;
} catch (Exception e) {
logger.error("{} {} Caught exception in {}\n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
execution.setVariable("errorCode", "1002")
execution.setVariable("errorText", e.getMessage())
//exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in checkIfVnfInMaintInAAI(): ' + e.getMessage())
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy
index fe6045dc3b..05aff713bc 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy
@@ -38,8 +38,8 @@ import org.onap.so.client.aai.entities.uri.AAIUri
import org.onap.so.client.aai.entities.uri.AAIUriFactory
import org.onap.so.client.appc.ApplicationControllerClient
import org.onap.so.client.appc.ApplicationControllerSupport
+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
@@ -179,7 +179,7 @@ public class VnfInPlaceUpdate extends VnfCmBase {
catch(Exception e) {
String restFaultMessage = e.getMessage()
logger.error("{} {} Exception Encountered - {} \n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), restFaultMessage, e)
+ ErrorCode.UnknownError.getValue(), restFaultMessage, e)
exceptionUtil.buildAndThrowWorkflowException(execution, 5000, restFaultMessage)
}
}
@@ -220,7 +220,7 @@ public class VnfInPlaceUpdate extends VnfCmBase {
throw e;
} catch (Exception e) {
logger.error("{} {} Caught exception in {} \n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage())
}
}
@@ -262,7 +262,7 @@ public class VnfInPlaceUpdate extends VnfCmBase {
throw e;
} catch (Exception e) {
logger.error("{} {} Caught exception in {} \n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
execution.setVariable("errorCode", "1002")
execution.setVariable("errorText", e.getMessage())
//exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in checkIfVnfInMaintInAAI(): ' + e.getMessage())
@@ -305,7 +305,7 @@ public class VnfInPlaceUpdate extends VnfCmBase {
throw e;
} catch (Exception e) {
logger.error("{} {} Caught exception in {} \n ", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- MsoLogger.ErrorCode.UnknownError.getValue(), method, e)
+ ErrorCode.UnknownError.getValue(), method, e)
execution.setVariable("errorCode", "1002")
execution.setVariable("errorText", e.getMessage())
//exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in checkIfPserversInMaintInAAI(): ' + e.getMessage())
@@ -352,7 +352,7 @@ public class VnfInPlaceUpdate extends VnfCmBase {
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);
execution.setVariable("errorCode", "1002")
execution.setVariable("errorText", e.getMessage())
}
@@ -397,7 +397,7 @@ public class VnfInPlaceUpdate extends VnfCmBase {
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);
execution.setVariable("errorCode", "1002")
execution.setVariable("errorText", e.getMessage())
}
@@ -442,7 +442,7 @@ public class VnfInPlaceUpdate extends VnfCmBase {
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);
execution.setVariable("errorCode", "1002")
execution.setVariable("errorText", e.getMessage())
}
@@ -521,17 +521,17 @@ public class VnfInPlaceUpdate extends VnfCmBase {
logger.trace('Exited ' + method)
} catch (BpmnError 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);
execution.setVariable("errorCode", "1002")
execution.setVariable("errorText", e.getMessage())
} catch (java.lang.NoSuchMethodError 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);
execution.setVariable("errorCode", "1002")
execution.setVariable("errorText", e.getMessage())
} 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);
execution.setVariable("errorCode", "1002")
execution.setVariable("errorText", e.getMessage())
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy
index 628088c380..9829419128 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/CreateVcpeResCustService.groovy
@@ -19,7 +19,9 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.onap.so.bpmn.vcpe.scripts;
+package org.onap.so.bpmn.vcpe.scripts
+
+import org.onap.so.logger.ErrorCode;
import static org.apache.commons.lang3.StringUtils.*
@@ -34,7 +36,6 @@ import org.onap.so.bpmn.core.domain.*
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.springframework.web.util.UriUtils
import org.slf4j.Logger
import org.slf4j.LoggerFactory
@@ -421,7 +422,7 @@ public class CreateVcpeResCustService 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)
}
}
@@ -848,7 +849,7 @@ public class CreateVcpeResCustService extends AbstractServiceTaskProcessor {
} catch (BpmnError b) {
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Rethrowing MSOWorkflowException", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
throw b
} catch (Exception e) {
logger.debug("Caught Exception during processJavaException Method: " + e)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustService.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustService.groovy
index 312f3ca102..a1cdacaf08 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustService.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DeleteVcpeResCustService.groovy
@@ -30,8 +30,8 @@ import org.onap.so.bpmn.common.scripts.NetworkUtils
import org.onap.so.bpmn.common.scripts.VidUtils
import org.onap.so.bpmn.core.WorkflowException
import org.onap.so.bpmn.core.json.JsonUtils
+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
@@ -421,7 +421,7 @@ public class DeleteVcpeResCustService extends AbstractServiceTaskProcessor {
}catch(BpmnError b){
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Rethrowing MSOWorkflowException", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue());
+ ErrorCode.UnknownError.getValue());
throw b
}catch(Exception e){
logger.debug("Caught Exception during processJavaException Method: " + e)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy
index 8bf16a0dc4..24589a0893 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRG.groovy
@@ -34,8 +34,8 @@ import org.onap.so.client.aai.AAIObjectType
import org.onap.so.client.aai.AAIResourcesClient
import org.onap.so.client.aai.entities.uri.AAIResourceUri
import org.onap.so.client.aai.entities.uri.AAIUriFactory
+import org.onap.so.logger.ErrorCode
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
@@ -587,7 +587,7 @@ public class DoCreateAllottedResourceBRG extends AbstractServiceTaskProcessor{
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occurred Processing preProcessSDNCGetRequest.", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during SDNC GET Method:\n" + e.getMessage())
}
logger.trace("end preProcessSDNCGet")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollback.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollback.groovy
index 255b1f32eb..f27b3d94b1 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollback.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceBRGRollback.groovy
@@ -30,8 +30,8 @@ import org.onap.so.bpmn.common.scripts.AllottedResourceUtils
import org.onap.so.bpmn.common.scripts.ExceptionUtil
import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
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
@@ -207,7 +207,7 @@ public class DoCreateAllottedResourceBRGRollback extends AbstractServiceTaskProc
}catch(Exception ex){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occurred Processing preProcessSDNCGetRequest.", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + ex);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + ex);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during SDNC GET Method:\n" + ex.getMessage())
}
logger.trace("end deleteAaiAR")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy
index d74510a25e..b6e7470834 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXC.groovy
@@ -33,8 +33,8 @@ import org.onap.so.bpmn.core.json.JsonUtils
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.ErrorCode
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
@@ -522,7 +522,7 @@ public class DoCreateAllottedResourceTXC extends AbstractServiceTaskProcessor{
}catch(Exception e){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occurred Processing preProcessSDNCGetRequest.", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during SDNC GET Method:\n" + e.getMessage())
}
logger.trace("end preProcessSDNCGet")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollback.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollback.groovy
index def3cca2f7..ad2c9e155d 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollback.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoCreateAllottedResourceTXCRollback.groovy
@@ -27,20 +27,14 @@ import org.onap.so.bpmn.common.scripts.*;
import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
import org.onap.so.bpmn.core.WorkflowException
import org.onap.so.bpmn.common.scripts.ExceptionUtil
-import org.onap.so.bpmn.common.scripts.MsoUtils
-import org.onap.so.bpmn.common.scripts.AaiUtil
import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
-
-
-import java.util.UUID;
+import org.onap.so.logger.ErrorCode
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution
-import org.apache.commons.lang3.*
-import org.springframework.web.util.UriUtils;
+
import static org.apache.commons.lang3.StringUtils.*
import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
import org.slf4j.Logger
import org.slf4j.LoggerFactory
@@ -214,7 +208,7 @@ public class DoCreateAllottedResourceTXCRollback extends AbstractServiceTaskProc
}catch(Exception ex){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occurred Processing preProcessSDNCGetRequest.", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + ex);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + ex);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during SDNC GET Method:\n" + ex.getMessage())
}
logger.trace("end deleteAaiAR")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRG.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRG.groovy
index 8929f67cfc..ca1b2ded2a 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRG.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceBRG.groovy
@@ -31,8 +31,8 @@ import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
import org.onap.so.bpmn.core.UrnPropertiesReader
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
@@ -353,7 +353,7 @@ public class DoDeleteAllottedResourceBRG extends AbstractServiceTaskProcessor{
}catch(Exception ex){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occurred Processing preProcessSDNCGetRequest." + ex, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:" + ex);
+ ErrorCode.UnknownError.getValue(), "Exception is:" + ex);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during SDNC GET Method:\n" + ex.getMessage())
}
logger.trace("end deleteAaiAR")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXC.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXC.groovy
index 84e77afda7..0da6fd26f4 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXC.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/vcpe/scripts/DoDeleteAllottedResourceTXC.groovy
@@ -31,8 +31,8 @@ import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils
import org.onap.so.bpmn.core.UrnPropertiesReader
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
@@ -357,7 +357,7 @@ public class DoDeleteAllottedResourceTXC extends AbstractServiceTaskProcessor{
}catch(Exception ex){
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
"Exception Occurred Processing preProcessSDNCGetRequest.", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + ex);
+ ErrorCode.UnknownError.getValue(), "Exception is:\n" + ex);
exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Error Occured during SDNC GET Method:\n" + ex.getMessage())
}
logger.trace("end deleteAaiAR")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/JsonUtilForPnfCorrelationId.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/JsonUtilForPnfCorrelationId.java
index 53f6b78d69..fb5d04328f 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/JsonUtilForPnfCorrelationId.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/JsonUtilForPnfCorrelationId.java
@@ -33,7 +33,7 @@ import java.util.Spliterator;
public final class JsonUtilForPnfCorrelationId {
- private static final String JSON_PNF_CORRELATION_ID_FIELD_NAME = "pnfCorrelationId";
+ private static final String JSON_PNF_CORRELATION_ID_FIELD_NAME = "correlationId";
static List<String> parseJsonToGelAllPnfCorrelationId(String json) {
JsonElement je = new JsonParser().parse(json);
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/properties/BPMNProperties.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/properties/BPMNProperties.java
index 0d7c4abeee..ee8743f846 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/properties/BPMNProperties.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/properties/BPMNProperties.java
@@ -24,7 +24,6 @@ import java.util.List;
import org.onap.so.bpmn.core.UrnPropertiesReader;
import org.onap.so.bpmn.core.UrnPropertiesReader;
-import org.onap.so.logger.MsoLogger;
public class BPMNProperties {
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/vfcmodel/NSResourceInputParameter.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/vfcmodel/NSResourceInputParameter.java
index ae320bdfb0..292f6ef575 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/vfcmodel/NSResourceInputParameter.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/vfcmodel/NSResourceInputParameter.java
@@ -21,7 +21,6 @@
package org.onap.so.bpmn.infrastructure.vfcmodel;
-import org.onap.so.logger.MsoLogger;
/**
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java
index 1f837eb444..113f05d3ca 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java
@@ -62,8 +62,8 @@ import org.onap.so.client.aai.entities.AAIResultWrapper;
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.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.web.util.UriUtils;
@@ -688,7 +688,7 @@ public class ServicePluginFactory {
return mapper.readValue(jsonstr, type);
} catch (IOException e) {
logger.error("{} {} fail to unMarshal json", MessageEnum.RA_NS_EXC.toString(),
- MsoLogger.ErrorCode.BusinessProcesssError.getValue(), e);
+ ErrorCode.BusinessProcesssError.getValue(), e);
}
return null;
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java
index 4f02fe2ec0..4c9bb4259e 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java
@@ -45,8 +45,8 @@ import org.onap.so.bpmn.core.BaseTask;
import org.onap.so.bpmn.core.UrnPropertiesReader;
import org.onap.so.bpmn.infrastructure.workflow.serviceTask.client.GenericResourceApi;
import org.onap.so.db.request.beans.ResourceOperationStatus;
+import org.onap.so.logger.ErrorCode;
import org.onap.so.logger.MessageEnum;
-import org.onap.so.logger.MsoLogger;
import org.onap.so.requestsdb.RequestsDbConstant;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -285,7 +285,7 @@ public abstract class AbstractSdncOperationTask extends BaseTask {
logger.error("exception: AbstractSdncOperationTask.updateProgress fail:", exception);
logger.error("{} {} {} {} {}", MessageEnum.GENERAL_EXCEPTION.toString(),
" updateProgress catch exception: ", this.getTaskName(),
- MsoLogger.ErrorCode.UnknownError.getValue(), exception.getClass().toString());
+ ErrorCode.UnknownError.getValue(), exception.getClass().toString());
}
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/JsonUtilForPnfCorrelationIdTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/JsonUtilForPnfCorrelationIdTest.java
index 02a6f20992..17a6ee09d8 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/JsonUtilForPnfCorrelationIdTest.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/JsonUtilForPnfCorrelationIdTest.java
@@ -29,13 +29,13 @@ import org.junit.Test;
public class JsonUtilForPnfCorrelationIdTest {
- private static final String JSON_EXAMPLE_WITH_PNF_CORRELATION_ID = "[{\"pnfCorrelationId\": \"corrTest1\","
- + "\"key1\":\"value1\"},{\"pnfCorrelationId\": \"corrTest2\",\"key2\":\"value2\"}]";
+ private static final String JSON_EXAMPLE_WITH_PNF_CORRELATION_ID = "[{\"correlationId\": \"corrTest1\","
+ + "\"key1\":\"value1\"},{\"correlationId\": \"corrTest2\",\"key2\":\"value2\"}]";
- private static final String JSON_WITH_ONE_PNF_CORRELATION_ID = "[{\"pnfCorrelationId\":\"corrTest3\"}]";
+ private static final String JSON_WITH_ONE_PNF_CORRELATION_ID = "[{\"correlationId\":\"corrTest3\"}]";
private static final String JSON_WITH_TWO_PNF_CORRELATION_ID_AND_ESCAPED_CHARACTERS =
- "[\"{\\\"pnfCorrelationId\\\":\\\"corrTest4\\\"}\", \"{\\\"pnfCorrelationId\\\":\\\"corrTest5\\\"}\"]";
+ "[\"{\\\"correlationId\\\":\\\"corrTest4\\\"}\", \"{\\\"correlationId\\\":\\\"corrTest5\\\"}\"]";
private static final String JSON_WITH_NO_PNF_CORRELATION_ID = "[{\"key1\":\"value1\"}]";
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClientTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClientTest.java
index 078c2f7784..60f51ff783 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClientTest.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClientTest.java
@@ -58,8 +58,8 @@ public class PnfEventReadyDmaapClientTest {
private static final String PNF_CORRELATION_ID = "corrTestId";
private static final String PNF_CORRELATION_ID_NOT_FOUND_IN_MAP = "otherCorrId";
- private static final String JSON_EXAMPLE_WITH_PNF_CORRELATION_ID = "[{\"pnfCorrelationId\": \"%s\","
- + "\"value\":\"value1\"},{\"pnfCorrelationId\": \"corr\",\"value\":\"value2\"}]";
+ private static final String JSON_EXAMPLE_WITH_PNF_CORRELATION_ID = "[{\"correlationId\": \"%s\","
+ + "\"value\":\"value1\"},{\"correlationId\": \"corr\",\"value\":\"value2\"}]";
private static final String JSON_EXAMPLE_WITH_NO_PNF_CORRELATION_ID = "[{\"key1\":\"value1\"}]";
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java
index 8dd55d9eac..760f623812 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAICreateTasks.java
@@ -62,8 +62,8 @@ import org.onap.so.client.orchestration.AAIVfModuleResources;
import org.onap.so.client.orchestration.AAIVnfResources;
import org.onap.so.client.orchestration.AAIVolumeGroupResources;
import org.onap.so.client.orchestration.AAIVpnBindingResources;
+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.beans.factory.annotation.Autowired;
@@ -121,7 +121,7 @@ public class AAICreateTasks {
String errorMessage = "Exception in creating ServiceSubscription. Customer not present for ServiceInstanceID: "
+ serviceInstance.getServiceInstanceId();
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), errorMessage, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), errorMessage);
+ ErrorCode.UnknownError.getValue(), errorMessage);
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, errorMessage);
}
aaiSIResources.createServiceSubscription(customer);
@@ -166,13 +166,13 @@ public class AAICreateTasks {
if (owningEntityName == null || "".equals(owningEntityName)) {
String msg = "Exception in AAICreateOwningEntity. Can't create an owningEntity with no owningEntityName.";
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), msg);
+ ErrorCode.UnknownError.getValue(), msg);
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg);
} else {
if(aaiSIResources.existsOwningEntityName(owningEntityName)){
String msg = "Exception in AAICreateOwningEntity. Can't create OwningEntity as name already exists in AAI associated with a different owning-entity-id (name must be unique)";
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), msg);
+ ErrorCode.UnknownError.getValue(), msg);
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg);
}else{
aaiSIResources.createOwningEntityandConnectServiceInstance(owningEntity, serviceInstance);
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIFlagTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIFlagTasks.java
index 94529f915b..ccc9fb0e43 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIFlagTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIFlagTasks.java
@@ -73,4 +73,45 @@ public class AAIFlagTasks {
}
}
+ public void checkVnfClosedLoopDisabledFlag(BuildingBlockExecution execution) {
+ boolean isClosedLoopDisabled = false;
+ try {
+ GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID, execution.getLookupMap().get(ResourceKey.GENERIC_VNF_ID));
+ String vnfId = vnf.getVnfId();
+ isClosedLoopDisabled = aaiVnfResources.checkVnfClosedLoopDisabledFlag(vnfId);
+ } catch (Exception ex) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
+ }
+ if (isClosedLoopDisabled) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "VNF Close Loop Disabled in A&AI");
+ }
+ }
+
+ public void modifyVnfClosedLoopDisabledFlag(BuildingBlockExecution execution, boolean closedLoopDisabled) {
+ try {
+ GenericVnf genericVnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID, execution.getLookupMap().get(ResourceKey.GENERIC_VNF_ID));
+
+ GenericVnf copiedGenericVnf = genericVnf.shallowCopyId();
+ copiedGenericVnf.setClosedLoopDisabled(closedLoopDisabled);
+ genericVnf.setClosedLoopDisabled(closedLoopDisabled);
+
+ aaiVnfResources.updateObjectVnf(copiedGenericVnf);
+ } catch(Exception ex) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
+ }
+ }
+
+ public void checkVnfPserversLockedFlag(BuildingBlockExecution execution) {
+ boolean inPserversLocked = false;
+ try {
+ GenericVnf vnf = extractPojosForBB.extractByKey(execution, ResourceKey.GENERIC_VNF_ID, execution.getLookupMap().get(ResourceKey.GENERIC_VNF_ID));
+ String vnfId = vnf.getVnfId();
+ inPserversLocked = aaiVnfResources.checkVnfPserversLockedFlag(vnfId);
+ } catch (Exception ex) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
+ }
+ if (inPserversLocked) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "VNF PServers in Locked in A&AI");
+ }
+ }
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java
index dc8f72c7a5..821dfc18b0 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java
@@ -36,8 +36,8 @@ import org.onap.so.bpmn.servicedecomposition.entities.BuildingBlock;
import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock;
import org.onap.so.bpmn.servicedecomposition.entities.WorkflowResourceIds;
import org.onap.so.client.exception.ExceptionBuilder;
+import org.onap.so.logger.ErrorCode;
import org.onap.so.logger.MessageEnum;
-import org.onap.so.logger.MsoLogger;
import org.onap.so.serviceinstancebeans.RequestDetails;
import org.onap.so.serviceinstancebeans.ServiceInstancesRequest;
import org.slf4j.Logger;
@@ -136,7 +136,7 @@ public class ExecuteActivity implements JavaDelegate {
protected void buildAndThrowException(DelegateExecution execution, String msg, Exception ex) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), msg, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), msg, ex);
+ ErrorCode.UnknownError.getValue(), msg, ex);
execution.setVariable("ExecuteActivityErrorMessage", msg);
exceptionBuilder.buildAndThrowWorkflowException(execution, 7000, msg);
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/network/tasks/NetworkAdapterDeleteTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/network/tasks/NetworkAdapterDeleteTasks.java
index 41dabf9302..5eab6110f9 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/network/tasks/NetworkAdapterDeleteTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/network/tasks/NetworkAdapterDeleteTasks.java
@@ -29,7 +29,6 @@ import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB;
import org.onap.so.client.adapter.network.mapper.NetworkAdapterObjectMapper;
import org.onap.so.client.exception.ExceptionBuilder;
-import org.onap.so.logger.MsoLogger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImpl.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImpl.java
index 47357d8ef3..05ddb2e417 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImpl.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterImpl.java
@@ -37,8 +37,8 @@ import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
import org.onap.so.bpmn.servicedecomposition.tasks.ExtractPojosForBB;
import org.onap.so.client.exception.ExceptionBuilder;
import org.onap.so.exceptions.MarshallerException;
+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.beans.factory.annotation.Autowired;
@@ -167,9 +167,9 @@ public class VnfAdapterImpl {
SAXSource source = new SAXSource(xmlReader, inputSource);
return jaxbUnmarshaller.unmarshal(source);
} catch (Exception e) {
- logger.error("{} {} {}", MessageEnum.GENERAL_EXCEPTION.toString(), MsoLogger.ErrorCode.SchemaError.getValue(),
+ logger.error("{} {} {}", MessageEnum.GENERAL_EXCEPTION.toString(), ErrorCode.SchemaError.getValue(),
e.getMessage(), e);
- throw new MarshallerException("Error parsing VNF Adapter response. " + e.getMessage(), MsoLogger.ErrorCode.SchemaError.getValue(), e);
+ throw new MarshallerException("Error parsing VNF Adapter response. " + e.getMessage(), ErrorCode.SchemaError.getValue(), e);
}
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasks.java
index 4b4b3eca23..876a555b10 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/appc/tasks/AppcRunTasks.java
@@ -37,8 +37,8 @@ import org.onap.so.client.exception.BBObjectNotFoundException;
import org.onap.so.client.exception.ExceptionBuilder;
import org.onap.so.db.catalog.beans.ControllerSelectionReference;
import org.onap.so.db.catalog.client.CatalogDbClient;
+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.beans.factory.annotation.Autowired;
@@ -137,7 +137,7 @@ public class AppcRunTasks {
catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION.toString(),
"Caught exception in runAppcCommand", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "APPC Error", e);
+ ErrorCode.UnknownError.getValue(), "APPC Error", e);
appcMessage = e.getMessage();
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOut.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOut.java
index 6c0cdb39f6..717d0deff6 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOut.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/ConfigurationScaleOut.java
@@ -39,8 +39,8 @@ import org.onap.so.client.appc.ApplicationControllerAction;
import org.onap.so.client.exception.ExceptionBuilder;
import org.onap.so.db.catalog.beans.ControllerSelectionReference;
import org.onap.so.db.catalog.client.CatalogDbClient;
+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.beans.factory.annotation.Autowired;
@@ -155,7 +155,7 @@ public class ConfigurationScaleOut {
} catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION.toString(),
"Caught exception in runAppcCommand in ConfigurationScaleOut", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "APPC Error", e);
+ ErrorCode.UnknownError.getValue(), "APPC Error", e);
appcMessage = e.getMessage();
}
logger.error("Error Message: " + appcMessage);
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java
index feb9fb81b4..ce14bde0b3 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/GenericVnfHealthCheck.java
@@ -34,8 +34,8 @@ import org.onap.so.client.appc.ApplicationControllerAction;
import org.onap.so.client.exception.ExceptionBuilder;
import org.onap.so.db.catalog.client.CatalogDbClient;
import org.onap.so.db.catalog.beans.ControllerSelectionReference;
+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.beans.factory.annotation.Autowired;
@@ -111,7 +111,7 @@ public class GenericVnfHealthCheck {
appcMessage = appCClient.getErrorMessage();
} catch (BpmnError ex) {
logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
- "Caught exception in GenericVnfHealthCheck", "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(), ex);
+ "Caught exception in GenericVnfHealthCheck", "BPMN", ErrorCode.UnknownError.getValue(), ex);
appcMessage = ex.getMessage();
exceptionUtil.buildAndThrowWorkflowException(execution, Integer.parseInt(appcCode), appcMessage);
} catch (Exception e) {
@@ -120,13 +120,13 @@ public class GenericVnfHealthCheck {
appcMessage = "Request to APPC timed out. ";
logger.error("{} {} {} {} {}", MessageEnum.RA_CONNECTION_EXCEPTION.toString(),
"Caught timedOut exception in runAppcCommand in GenericVnfHealthCheck", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "APPC Error", e);
+ ErrorCode.UnknownError.getValue(), "APPC Error", e);
throw e;
}
else {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION.toString(),
"Caught exception in runAppcCommand in GenericVnfHealthCheck", "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), "APPC Error", e);
+ ErrorCode.UnknownError.getValue(), "APPC Error", e);
appcMessage = e.getMessage();
exceptionUtil.buildAndThrowWorkflowException(execution, Integer.parseInt(appcCode), appcMessage);
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/NetworkBBUtils.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/NetworkBBUtils.java
index 945c693d47..217a60b60a 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/NetworkBBUtils.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/NetworkBBUtils.java
@@ -26,7 +26,6 @@ import java.util.Optional;
import org.onap.so.bpmn.common.BuildingBlockExecution;
import org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion;
import org.onap.so.bpmn.servicedecomposition.entities.GeneralBuildingBlock;
-import org.onap.so.logger.MsoLogger;
import org.springframework.stereotype.Component;
@Component
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/manualhandling/tasks/ManualHandlingTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/manualhandling/tasks/ManualHandlingTasks.java
index 2fba3b3b25..9214635602 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/manualhandling/tasks/ManualHandlingTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/manualhandling/tasks/ManualHandlingTasks.java
@@ -11,14 +11,16 @@ import org.onap.so.client.exception.ExceptionBuilder;
import org.onap.so.client.ticket.ExternalTicket;
import org.onap.so.db.request.beans.InfraActiveRequests;
import org.onap.so.db.request.client.RequestsDbClient;
+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.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class ManualHandlingTasks {
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, ManualHandlingTasks.class);
+ private static final Logger logger = LoggerFactory.getLogger(ManualHandlingTasks.class);
private static final String TASK_TYPE_PAUSE = "pause";
private static final String TASK_TYPE_FALLOUT = "fallout";
@@ -34,7 +36,7 @@ public class ManualHandlingTasks {
DelegateExecution execution = task.getExecution();
try {
String taskId = task.getId();
- msoLogger.debug("taskId is: " + taskId);
+ logger.debug("taskId is: " + taskId);
String type = TASK_TYPE_FALLOUT;
String nfRole = (String) execution.getVariable("vnfType");
String subscriptionServiceType = (String) execution.getVariable("serviceType");
@@ -66,13 +68,13 @@ public class ManualHandlingTasks {
TaskService taskService = execution.getProcessEngineServices().getTaskService();
taskService.setVariables(taskId, taskVariables);
- msoLogger.debug("successfully created fallout task: "+ taskId);
+ logger.debug("successfully created fallout task: "+ taskId);
} catch (BpmnError e) {
- msoLogger.debug("BPMN exception: " + e.getMessage());
+ logger.debug("BPMN exception: " + e.getMessage());
throw e;
} catch (Exception ex){
String msg = "Exception in setFalloutTaskVariables " + ex.getMessage();
- msoLogger.debug(msg);
+ logger.debug(msg);
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg);
}
}
@@ -83,7 +85,7 @@ public class ManualHandlingTasks {
try {
String taskId = task.getId();
- msoLogger.debug("taskId is: " + taskId);
+ logger.debug("taskId is: " + taskId);
String type = TASK_TYPE_PAUSE;
String nfRole = (String) execution.getVariable("vnfType");
String subscriptionServiceType = (String) execution.getVariable("serviceType");
@@ -115,13 +117,13 @@ public class ManualHandlingTasks {
TaskService taskService = execution.getProcessEngineServices().getTaskService();
taskService.setVariables(taskId, taskVariables);
- msoLogger.debug("successfully created pause task: "+ taskId);
+ logger.debug("successfully created pause task: "+ taskId);
} catch (BpmnError e) {
- msoLogger.debug("BPMN exception: " + e.getMessage());
+ logger.debug("BPMN exception: " + e.getMessage());
throw e;
} catch (Exception ex){
String msg = "Exception in setPauseTaskVariables " + ex.getMessage();
- msoLogger.debug(msg);
+ logger.debug(msg);
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg);
}
@@ -134,24 +136,24 @@ public class ManualHandlingTasks {
try {
String taskId = task.getId();
- msoLogger.debug("taskId is: " + taskId);
+ logger.debug("taskId is: " + taskId);
TaskService taskService = execution.getProcessEngineServices().getTaskService();
Map<String, Object> taskVariables = taskService.getVariables(taskId);
String responseValue = (String) taskVariables.get("responseValue");
- msoLogger.debug("Received responseValue on completion: "+ responseValue);
+ logger.debug("Received responseValue on completion: "+ responseValue);
// Have to set the first letter of the response to upper case
String responseValueUppercaseStart = responseValue.substring(0, 1).toUpperCase() + responseValue.substring(1);
- msoLogger.debug("ResponseValue to taskListener: "+ responseValueUppercaseStart);
+ logger.debug("ResponseValue to taskListener: "+ responseValueUppercaseStart);
execution.setVariable("responseValueTask", responseValueUppercaseStart);
} catch (BpmnError e) {
- msoLogger.debug("BPMN exception: " + e.getMessage());
+ logger.debug("BPMN exception: " + e.getMessage());
throw e;
} catch (Exception ex){
String msg = "Exception in completeManualTask " + ex.getMessage();
- msoLogger.debug(msg);
+ logger.debug(msg);
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg);
}
@@ -177,10 +179,10 @@ public class ManualHandlingTasks {
ticket.createTicket();
} catch (BpmnError e) {
String msg = "BPMN error in createAOTSTicket " + e.getMessage();
- msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, msg, "BPMN", MsoLogger.ErrorCode.UnknownError, "");
+ logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, msg, "BPMN", ErrorCode.UnknownError.getValue());
} catch (Exception ex){
String msg = "Exception in createExternalTicket " + ex.getMessage();
- msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, msg, "BPMN", MsoLogger.ErrorCode.UnknownError, "");
+ logger.error("{} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, msg, "BPMN", ErrorCode.UnknownError.getValue());
}
}
@@ -195,7 +197,7 @@ public class ManualHandlingTasks {
requestDbclient.updateInfraActiveRequests(request);
} catch (Exception e) {
- msoLogger.error("Unable to save the updated request status to the DB",e);
+ logger.error("Unable to save the updated request status to the DB",e);
}
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java
index 877a0dded7..482957e006 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java
@@ -368,7 +368,8 @@ public class WorkflowActionBBTasks {
ExecuteBuildingBlock ebb, List<ExecuteBuildingBlock> flowsToExecute) {
try {
String vnfId = ebb.getWorkflowResourceIds().getVnfId();
- String vfModuleId = ebb.getWorkflowResourceIds().getVfModuleId();
+ String vfModuleId = ebb.getResourceId();
+ ebb.getWorkflowResourceIds().setVfModuleId(vfModuleId);
String vnfCustomizationUUID = bbInputSetupUtils.getAAIGenericVnf(vnfId).getModelCustomizationId();
String vfModuleCustomizationUUID = bbInputSetupUtils.getAAIVfModule(vnfId, vfModuleId).getModelCustomizationId();
List<Vnfc> vnfcs = workflowAction.getRelatedResourcesInVfModule(vnfId, vfModuleId, Vnfc.class, AAIObjectType.VNFC);
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java
index c8eeaa7a2b..518da1fa5f 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java
@@ -254,6 +254,9 @@ public class AAIObjectMapper {
map().setModelCustomizationId(source.getModelInfoConfiguration().getModelCustomizationId());
map().setModelVersionId(source.getModelInfoConfiguration().getModelVersionId());
map().setModelInvariantId(source.getModelInfoConfiguration().getModelInvariantId());
+ map().setConfigurationType(source.getModelInfoConfiguration().getConfigurationType());
+ map().setConfigurationSubType(source.getModelInfoConfiguration().getConfigurationRole());
+ map().setConfigPolicyName(source.getModelInfoConfiguration().getPolicyName());
}
});
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java
index f917aed39e..8c774d8677 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java
@@ -51,7 +51,6 @@ import org.onap.so.bpmn.servicedecomposition.generalobjects.OrchestrationContext
import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoNetwork;
import org.onap.so.entity.MsoRequest;
-import org.onap.so.logger.MsoLogger;
import org.onap.so.openstack.beans.NetworkRollback;
import org.onap.so.openstack.beans.RouteTarget;
import org.onap.so.openstack.beans.Subnet;
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClientResponseValidator.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClientResponseValidator.java
index 17fa10a186..8456f26239 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClientResponseValidator.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/namingservice/NamingClientResponseValidator.java
@@ -31,8 +31,8 @@ import org.onap.namingservice.model.NameGenResponse;
import org.onap.namingservice.model.NameGenResponseError;
import org.onap.namingservice.model.Respelement;
import org.onap.so.client.exception.BadResponseException;
+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.http.ResponseEntity;
@@ -52,7 +52,7 @@ public class NamingClientResponseValidator {
public String validateNameGenResponse(ResponseEntity<NameGenResponse> response) throws BadResponseException {
if (response == null) {
logger.error("{} {} {} {} {}", MessageEnum.RA_GENERAL_EXCEPTION.toString(), NO_RESPONSE_FROM_NAMING_SERVICE,
- "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(),
+ "BPMN", ErrorCode.UnknownError.getValue(),
NO_RESPONSE_FROM_NAMING_SERVICE);
throw new BadResponseException(NO_RESPONSE_FROM_NAMING_SERVICE);
}
@@ -62,7 +62,7 @@ public class NamingClientResponseValidator {
NameGenResponse responseBody = response.getBody();
if (responseBody == null) {
logger.error("{} {} {} {} {}", MessageEnum.RA_GENERAL_EXCEPTION.toString(), NULL_RESPONSE_FROM_NAMING_SERVICE,
- "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(),
+ "BPMN", ErrorCode.UnknownError.getValue(),
NULL_RESPONSE_FROM_NAMING_SERVICE);
throw new BadResponseException(NULL_RESPONSE_FROM_NAMING_SERVICE);
}
@@ -92,7 +92,7 @@ public class NamingClientResponseValidator {
}
String errorMessage = String.format(NAMING_SERVICE_ERROR, errorMessageString);
logger.error("{} {} {} {} {}", MessageEnum.RA_GENERAL_EXCEPTION.toString(), errorMessage, "BPMN",
- MsoLogger.ErrorCode.DataError.getValue(), errorMessage);
+ ErrorCode.DataError.getValue(), errorMessage);
throw new BadResponseException(errorMessage);
}
}
@@ -100,7 +100,7 @@ public class NamingClientResponseValidator {
public String validateNameGenDeleteResponse(ResponseEntity<NameGenDeleteResponse> response) throws BadResponseException {
if (response == null) {
logger.error("{} {} {} {} {}", MessageEnum.RA_GENERAL_EXCEPTION.toString(), NO_RESPONSE_FROM_NAMING_SERVICE,
- "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(),
+ "BPMN", ErrorCode.UnknownError.getValue(),
NO_RESPONSE_FROM_NAMING_SERVICE);
throw new BadResponseException(NO_RESPONSE_FROM_NAMING_SERVICE);
}
@@ -110,7 +110,7 @@ public class NamingClientResponseValidator {
NameGenDeleteResponse responseBody = response.getBody();
if (responseBody == null) {
logger.error("{} {} {} {} {}", MessageEnum.RA_GENERAL_EXCEPTION.toString(), NULL_RESPONSE_FROM_NAMING_SERVICE,
- "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(),
+ "BPMN", ErrorCode.UnknownError.getValue(),
NULL_RESPONSE_FROM_NAMING_SERVICE);
throw new BadResponseException(NULL_RESPONSE_FROM_NAMING_SERVICE);
}
@@ -123,7 +123,7 @@ public class NamingClientResponseValidator {
String errorMessage = String.format(NAMING_SERVICE_ERROR, errorMessageString);
logger.error("{} {} {} {} {}", MessageEnum.RA_GENERAL_EXCEPTION.toString(), errorMessage, "BPMN",
- MsoLogger.ErrorCode.DataError.getValue(), errorMessage);
+ ErrorCode.DataError.getValue(), errorMessage);
throw new BadResponseException(errorMessage);
}
}
@@ -143,7 +143,7 @@ public class NamingClientResponseValidator {
}
String errorMessage = String.format(NAMING_SERVICE_ERROR, errorMessageString);
logger.error("{} {} {} {} {}", MessageEnum.RA_GENERAL_EXCEPTION.toString(), errorMessage, "BPMN",
- MsoLogger.ErrorCode.DataError.getValue(), errorMessage);
+ ErrorCode.DataError.getValue(), errorMessage);
return errorMessage;
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIConfigurationResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIConfigurationResources.java
index 3bb1d81e27..138a20b609 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIConfigurationResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIConfigurationResources.java
@@ -165,7 +165,7 @@ public class AAIConfigurationResources {
injectionHelper.getAaiClient().connect(configurationURI, vpnBindingURI);
}
- public void connectConfigurationToVfModule(String configurationId, String vfModuleId, String vnfId){
+ public void connectConfigurationToVfModule(String configurationId, String vnfId, String vfModuleId){
AAIResourceUri configurationURI = AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, configurationId);
AAIResourceUri vfModuleURI = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnfId, vfModuleId);
injectionHelper.getAaiClient().connect(configurationURI, vfModuleURI);
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVnfResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVnfResources.java
index 0c65abfe0c..48a1c1e558 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVnfResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIVnfResources.java
@@ -22,6 +22,7 @@
package org.onap.so.client.orchestration;
+import java.io.IOException;
import java.util.Optional;
import org.onap.so.bpmn.common.InjectionHelper;
@@ -31,6 +32,7 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.LineOfBusiness;
import org.onap.so.bpmn.servicedecomposition.bbobjects.Platform;
import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
import org.onap.so.client.aai.AAIObjectType;
+import org.onap.so.client.aai.AAIValidatorImpl;
import org.onap.so.client.aai.entities.uri.AAIResourceUri;
import org.onap.so.client.aai.entities.uri.AAIUriFactory;
import org.onap.so.client.aai.mapper.AAIObjectMapper;
@@ -50,6 +52,8 @@ public class AAIVnfResources {
@Autowired
private AAIObjectMapper aaiObjectMapper;
+ private AAIValidatorImpl aaiValidatorImpl= new AAIValidatorImpl();
+
public void createVnfandConnectServiceInstance(GenericVnf vnf, ServiceInstance serviceInstance) {
AAIResourceUri vnfURI = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnf.getVnfId());
vnf.setOrchestrationStatus(OrchestrationStatus.INVENTORIED);
@@ -125,4 +129,19 @@ public class AAIVnfResources {
AAIResourceUri vnfURI = AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnf.getVnfId());
injectionHelper.getAaiClient().connect(tenantURI, vnfURI);
}
+
+ public boolean checkVnfClosedLoopDisabledFlag(String vnfId) {
+ org.onap.aai.domain.yang.GenericVnf vnf = injectionHelper.getAaiClient()
+ .get(org.onap.aai.domain.yang.GenericVnf.class, AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId))
+ .orElse(new org.onap.aai.domain.yang.GenericVnf());
+ return vnf.isIsClosedLoopDisabled();
+ }
+
+ public boolean checkVnfPserversLockedFlag (String vnfId) throws IOException {
+ org.onap.aai.domain.yang.GenericVnf vnf = injectionHelper.getAaiClient()
+ .get(org.onap.aai.domain.yang.GenericVnf.class, AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId))
+ .orElse(new org.onap.aai.domain.yang.GenericVnf());
+ return aaiValidatorImpl.isPhysicalServerLocked(vnf.getVnfId());
+
+ }
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/NetworkAdapterResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/NetworkAdapterResources.java
index 6867cb8ebb..8f3445529e 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/NetworkAdapterResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/NetworkAdapterResources.java
@@ -43,7 +43,6 @@ import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
import org.onap.so.client.adapter.network.NetworkAdapterClientException;
import org.onap.so.client.adapter.network.NetworkAdapterClientImpl;
import org.onap.so.client.adapter.network.mapper.NetworkAdapterObjectMapper;
-import org.onap.so.logger.MsoLogger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SdnCommonTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SdnCommonTasks.java
index 8513b26a5d..418e70a09e 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SdnCommonTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SdnCommonTasks.java
@@ -30,8 +30,8 @@ import org.apache.commons.lang.StringUtils;
import org.apache.http.HttpStatus;
import org.onap.so.client.exception.BadResponseException;
import org.onap.so.client.exception.MapperException;
+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.http.HttpHeaders;
@@ -69,7 +69,7 @@ public class SdnCommonTasks {
} catch (JsonProcessingException e) {
logger.error("{} {} {} {} {}", MessageEnum.JAXB_EXCEPTION.toString(),
COULD_NOT_CONVERT_SDNC_POJO_TO_JSON,
- "BPMN", MsoLogger.ErrorCode.DataError.getValue(), e.getMessage());
+ "BPMN", ErrorCode.DataError.getValue(), e.getMessage());
throw new MapperException(COULD_NOT_CONVERT_SDNC_POJO_TO_JSON);
}
jsonRequest = "{\"input\":" + jsonRequest + "}";
@@ -101,7 +101,7 @@ public class SdnCommonTasks {
public String validateSDNResponse(LinkedHashMap<String, Object> output) throws BadResponseException {
if (CollectionUtils.isEmpty(output)) {
logger.error("{} {} {} {} {}", MessageEnum.RA_RESPONSE_FROM_SDNC.toString(), NO_RESPONSE_FROM_SDNC, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), NO_RESPONSE_FROM_SDNC);
+ ErrorCode.UnknownError.getValue(), NO_RESPONSE_FROM_SDNC);
throw new BadResponseException(NO_RESPONSE_FROM_SDNC);
}
LinkedHashMap<String, Object> embeddedResponse =(LinkedHashMap<String, Object>) output.get("output");
@@ -128,7 +128,7 @@ public class SdnCommonTasks {
} else {
String errorMessage = String.format(SDNC_CODE_NOT_0_OR_IN_200_299, responseMessage);
logger.error("{} {} {} {} {}", MessageEnum.RA_RESPONSE_FROM_SDNC.toString(), errorMessage, "BPMN",
- MsoLogger.ErrorCode.DataError.getValue(), errorMessage);
+ ErrorCode.DataError.getValue(), errorMessage);
throw new BadResponseException(errorMessage);
}
}
@@ -142,7 +142,7 @@ public class SdnCommonTasks {
public String validateSDNGetResponse(LinkedHashMap<String, Object> output) throws BadResponseException {
if (CollectionUtils.isEmpty(output)) {
logger.error("{} {} {} {} {}", MessageEnum.RA_RESPONSE_FROM_SDNC.toString(), NO_RESPONSE_FROM_SDNC, "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), NO_RESPONSE_FROM_SDNC);
+ ErrorCode.UnknownError.getValue(), NO_RESPONSE_FROM_SDNC);
throw new BadResponseException(NO_RESPONSE_FROM_SDNC);
}
ObjectMapper objMapper = new ObjectMapper();
@@ -153,7 +153,7 @@ public class SdnCommonTasks {
}
catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.RA_RESPONSE_FROM_SDNC.toString(), BAD_RESPONSE_FROM_SDNC,
- "BPMN", MsoLogger.ErrorCode.UnknownError.getValue(),
+ "BPMN", ErrorCode.UnknownError.getValue(),
BAD_RESPONSE_FROM_SDNC);
throw new BadResponseException(BAD_RESPONSE_FROM_SDNC);
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java
index 5124435a79..b8c5fad41d 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/mapper/VfModuleTopologyOperationRequestMapper.java
@@ -47,8 +47,8 @@ import org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext;
import org.onap.so.client.exception.MapperException;
import org.onap.so.client.sdnc.beans.SDNCSvcAction;
import org.onap.so.client.sdnc.beans.SDNCSvcOperation;
+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.beans.factory.annotation.Autowired;
@@ -174,7 +174,7 @@ public class VfModuleTopologyOperationRequestMapper {
objectPath = assignResponseInfo.getVfModuleResponseInformation().getObjectPath();
} catch (Exception e) {
logger.error("{} {} {} {} {}", MessageEnum.RA_RESPONSE_FROM_SDNC.toString(), e.getMessage(), "BPMN",
- MsoLogger.ErrorCode.UnknownError.getValue(), e.getMessage());
+ ErrorCode.UnknownError.getValue(), e.getMessage());
}
}
return objectPath;
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/common/aai/tasks/AAIFlagTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/common/aai/tasks/AAIFlagTasksTest.java
index cf28c114e8..cad97cad6e 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/common/aai/tasks/AAIFlagTasksTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/common/aai/tasks/AAIFlagTasksTest.java
@@ -29,6 +29,8 @@ import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
+import java.io.IOException;
+
import org.camunda.bpm.engine.delegate.BpmnError;
import org.junit.Before;
import org.junit.Test;
@@ -119,4 +121,89 @@ public class AAIFlagTasksTest extends BaseTaskTest {
verify(exceptionUtil, times(1)).buildAndThrowWorkflowException(any(BuildingBlockExecution.class), eq(7000), any(String.class));
}
}
+
+ @Test
+ public void checkVnfClosedLoopDisabledTestTrue() throws Exception {
+ doThrow(new BpmnError("VNF Closed Loop Disabled in A&AI")).when(exceptionUtil).buildAndThrowWorkflowException(any(BuildingBlockExecution.class), eq(7000), any(String.class));
+ doReturn(false).when(aaiVnfResources).checkVnfClosedLoopDisabledFlag(isA(String.class));
+ try {
+ aaiFlagTasks.checkVnfClosedLoopDisabledFlag(execution);
+ } catch (Exception e) {
+ verify(aaiVnfResources, times(1)).checkVnfClosedLoopDisabledFlag(any(String.class));
+ verify(exceptionUtil, times(1)).buildAndThrowWorkflowException(any(BuildingBlockExecution.class), eq(7000), eq("VNF Closed Loop Disabled in A&AI"));
+ }
+ }
+
+ @Test
+ public void checkVnfClosedLoopDisabledTestFalse() throws Exception {
+ doReturn(false).when(aaiVnfResources).checkVnfClosedLoopDisabledFlag(isA(String.class));
+ aaiFlagTasks.checkVnfClosedLoopDisabledFlag(execution);
+ verify(exceptionUtil, times(0)).buildAndThrowWorkflowException(any(BuildingBlockExecution.class), any(int.class), any(String.class));
+ }
+
+ @Test
+ public void checkVnfClosedLoopDisabledFlagExceptionTest() {
+
+ doThrow(new BpmnError("Unknown Error")).when(exceptionUtil).buildAndThrowWorkflowException(any(BuildingBlockExecution.class), eq(7000), any(String.class));
+ doThrow(RuntimeException.class).when(aaiVnfResources).checkVnfClosedLoopDisabledFlag(isA(String.class));
+ try {
+ aaiFlagTasks.checkVnfClosedLoopDisabledFlag(execution);
+ } catch (Exception e) {
+ verify(aaiVnfResources, times(1)).checkVnfClosedLoopDisabledFlag(any(String.class));
+ verify(exceptionUtil, times(1)).buildAndThrowWorkflowException(any(BuildingBlockExecution.class), eq(7000), any(String.class));
+ }
+ }
+
+ @Test
+ public void modifyVnfClosedLoopDisabledFlagTest() throws Exception {
+ doNothing().when(aaiVnfResources).updateObjectVnf(ArgumentMatchers.any(GenericVnf.class));
+ aaiFlagTasks.modifyVnfClosedLoopDisabledFlag(execution, true);
+ verify(aaiVnfResources, times(1)).updateObjectVnf(ArgumentMatchers.any(GenericVnf.class));
+ }
+
+ @Test
+ public void modifyVnfClosedLoopDisabledFlagExceptionTest() {
+
+ doThrow(new BpmnError("Unknown Error")).when(exceptionUtil).buildAndThrowWorkflowException(any(BuildingBlockExecution.class), eq(7000), any(String.class));
+ doThrow(RuntimeException.class).when(aaiVnfResources).updateObjectVnf(isA(GenericVnf.class));
+ try {
+ aaiFlagTasks.modifyVnfClosedLoopDisabledFlag(execution, true);
+ } catch (Exception e) {
+ verify(aaiVnfResources, times(1)).checkVnfClosedLoopDisabledFlag(any(String.class));
+ verify(exceptionUtil, times(1)).buildAndThrowWorkflowException(any(BuildingBlockExecution.class), eq(7000), any(String.class));
+ }
+ }
+
+
+ @Test
+ public void checkVnfPserversLockedFlagTestTrue() throws Exception {
+ doThrow(new BpmnError("VNF PServers in Locked in A&AI")).when(exceptionUtil).buildAndThrowWorkflowException(any(BuildingBlockExecution.class), eq(7000), any(String.class));
+ doReturn(true).when(aaiVnfResources).checkVnfPserversLockedFlag(isA(String.class));
+ try {
+ aaiFlagTasks.checkVnfClosedLoopDisabledFlag(execution);
+ } catch (Exception e) {
+ verify(aaiVnfResources, times(1)).checkVnfPserversLockedFlag(any(String.class));
+ verify(exceptionUtil, times(1)).buildAndThrowWorkflowException(any(BuildingBlockExecution.class), eq(7000), eq("VNF PServers in Locked in A&AI"));
+ }
+ }
+
+ @Test
+ public void checkVnfPserversLockedFlagTestFalse() throws Exception {
+ doReturn(false).when(aaiVnfResources).checkVnfPserversLockedFlag(isA(String.class));
+ aaiFlagTasks.checkVnfPserversLockedFlag(execution);
+ verify(exceptionUtil, times(0)).buildAndThrowWorkflowException(any(BuildingBlockExecution.class), any(int.class), any(String.class));
+ }
+
+ @Test
+ public void checkVnfPserversLockedFlagExceptionTest() throws IOException {
+
+ doThrow(new BpmnError("Unknown Error")).when(exceptionUtil).buildAndThrowWorkflowException(any(BuildingBlockExecution.class), eq(7000), any(String.class));
+ doThrow(RuntimeException.class).when(aaiVnfResources).checkVnfClosedLoopDisabledFlag(isA(String.class));
+ try {
+ aaiFlagTasks.checkVnfPserversLockedFlag(execution);
+ } catch (Exception e) {
+ verify(aaiVnfResources, times(1)).checkVnfPserversLockedFlag(any(String.class));
+ verify(exceptionUtil, times(1)).buildAndThrowWorkflowException(any(BuildingBlockExecution.class), eq(7000), any(String.class));
+ }
+ }
}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java
index a8e9a7e57e..d5b529288f 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java
@@ -74,24 +74,27 @@ public class AAIObjectMapperTest {
Configuration configuration = new Configuration();
configuration.setConfigurationId("configId");
configuration.setConfigurationName("VNR");
- configuration.setConfigurationType("VNR-TYPE");
configuration.setOrchestrationStatus(OrchestrationStatus.ASSIGNED);
configuration.setManagementOption("managementOption");
ModelInfoConfiguration modelInfoConfiguration = new ModelInfoConfiguration();
modelInfoConfiguration.setModelCustomizationId("modelCustId");
modelInfoConfiguration.setModelInvariantId("modelInvariantId");
modelInfoConfiguration.setModelVersionId("modelVersionId");
+ modelInfoConfiguration.setConfigurationType("5G");
+ modelInfoConfiguration.setConfigurationRole("ConfigurationRole");
configuration.setModelInfoConfiguration(modelInfoConfiguration);
org.onap.aai.domain.yang.Configuration expectedConfiguration = new org.onap.aai.domain.yang.Configuration();
expectedConfiguration.setConfigurationId(configuration.getConfigurationId());
expectedConfiguration.setConfigurationName(configuration.getConfigurationName());
- expectedConfiguration.setConfigurationType(configuration.getConfigurationType());
+ expectedConfiguration.setConfigurationType(configuration.getModelInfoConfiguration().getConfigurationType());
expectedConfiguration.setOrchestrationStatus(configuration.getOrchestrationStatus().toString());
expectedConfiguration.setManagementOption(configuration.getManagementOption());
expectedConfiguration.setModelInvariantId(configuration.getModelInfoConfiguration().getModelInvariantId());
expectedConfiguration.setModelVersionId(configuration.getModelInfoConfiguration().getModelVersionId());
expectedConfiguration.setModelCustomizationId(configuration.getModelInfoConfiguration().getModelCustomizationId());
+ expectedConfiguration.setConfigurationSubType(configuration.getModelInfoConfiguration().getConfigurationRole());
+ expectedConfiguration.setConfigPolicyName(configuration.getModelInfoConfiguration().getPolicyName());
org.onap.aai.domain.yang.Configuration actualConfiguration = aaiObjectMapper.mapConfiguration(configuration);
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVnfResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVnfResourcesTest.java
index b87b5e4166..d499bcd36e 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVnfResourcesTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIVnfResourcesTest.java
@@ -21,6 +21,7 @@
package org.onap.so.client.orchestration;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.ArgumentMatchers.isA;
@@ -29,6 +30,7 @@ import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
+import java.io.IOException;
import java.util.Optional;
import org.junit.Before;
@@ -47,6 +49,7 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.Platform;
import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance;
import org.onap.so.client.aai.AAIObjectType;
import org.onap.so.client.aai.AAIResourcesClient;
+import org.onap.so.client.aai.AAIValidatorImpl;
import org.onap.so.client.aai.entities.uri.AAIResourceUri;
import org.onap.so.client.aai.entities.uri.AAIUriFactory;
import org.onap.so.client.aai.mapper.AAIObjectMapper;
@@ -70,6 +73,9 @@ public class AAIVnfResourcesTest extends TestDataSetup {
@Mock
protected InjectionHelper MOCK_injectionHelper;
+ @Mock
+ protected AAIValidatorImpl MOCK_aaiValidatorImpl;
+
@InjectMocks
AAIVnfResources aaiVnfResources = new AAIVnfResources();
@@ -182,4 +188,29 @@ public class AAIVnfResourcesTest extends TestDataSetup {
eq(AAIUriFactory.createResourceUri(AAIObjectType.CLOUD_REGION,
cloudRegion.getCloudOwner(), cloudRegion.getLcpCloudRegionId())));
}
+
+
+ @Test
+ public void checkVnfClosedLoopDisabledFlagTest () {
+ Optional<org.onap.aai.domain.yang.GenericVnf> vnf = Optional.of(new org.onap.aai.domain.yang.GenericVnf());
+ vnf.get().setVnfId("vnfId");
+ vnf.get().setIsClosedLoopDisabled(true);
+ doReturn(vnf).when(MOCK_aaiResourcesClient).get(eq(org.onap.aai.domain.yang.GenericVnf.class),isA(AAIResourceUri.class));
+ boolean isCheckVnfClosedLoopDisabledFlag = aaiVnfResources.checkVnfClosedLoopDisabledFlag("vnfId");
+ verify(MOCK_aaiResourcesClient, times(1)).get(eq(org.onap.aai.domain.yang.GenericVnf.class),isA(AAIResourceUri.class));
+ assertEquals(isCheckVnfClosedLoopDisabledFlag, true);
+ }
+
+ @Test
+ public void checkVnfPserversLockedFlagTest () throws IOException {
+
+ Optional<org.onap.aai.domain.yang.GenericVnf> vnf = Optional.of(new org.onap.aai.domain.yang.GenericVnf());
+ vnf.get().setVnfId("vnfId");
+ doReturn(vnf).when(MOCK_aaiResourcesClient).get(eq(org.onap.aai.domain.yang.GenericVnf.class),isA(AAIResourceUri.class));
+ doReturn(true).when(MOCK_aaiValidatorImpl).isPhysicalServerLocked("vnfId");
+ boolean isVnfPserversLockedFlag = aaiVnfResources.checkVnfPserversLockedFlag("vnfId");
+ verify(MOCK_aaiResourcesClient, times(1)).get(eq(org.onap.aai.domain.yang.GenericVnf.class),isA(AAIResourceUri.class));
+ verify(MOCK_aaiValidatorImpl, times(1)).isPhysicalServerLocked(isA(String.class));
+ assertTrue(isVnfPserversLockedFlag);
+ }
}