Removed MsoLogger class
[so.git] / bpmn / so-bpmn-infrastructure-common / src / main / groovy / org / onap / so / bpmn / infrastructure / scripts / DoDeleteVfModuleFromVnf.groovy
index 0c244e8..3be52f5 100644 (file)
@@ -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"))