Removed MsoLogger class
[so.git] / bpmn / so-bpmn-infrastructure-common / src / main / groovy / org / onap / so / bpmn / infrastructure / scripts / CreateVfModuleInfra.groovy
index e3ac04e..712512f 100644 (file)
@@ -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.*
@@ -252,9 +251,9 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
                        String restFaultMessage = e.getMessage()
                        //execution.setVariable("CVFMODVOL2_RESTFault", restFaultMessage)
                        //execution.setVariable("CVFMODVOL2_isDataOk", false)
-                       logger.error("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
-                                       " Exception Encountered - " + "\n" + restFaultMessage, "BPMN", MsoLogger.getServiceName(),
-                                       MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+                       logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+                                       " Exception Encountered - " + "\n" + restFaultMessage, "BPMN",
+                                       ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
                        exceptionUtil.buildAndThrowWorkflowException(execution, 400, "Internal Error - During PreProcessRequest")
                }
 
@@ -302,9 +301,9 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
                } catch (BpmnError e) {
                        throw e;
                } catch (Exception e) {
-                       logger.error("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
-                                       "Exception Encountered ", "BPMN", MsoLogger.getServiceName(),
-                                       MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+                       logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+                                       "Exception Encountered ", "BPMN",
+                                       ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
                        exceptionUtil.buildAndThrowWorkflowException(execution, 1002, 'Error in sendResponse(): ' + e.getMessage())
                }
        }
@@ -403,9 +402,9 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
                        logger.debug("Outgoing MsoCompletionRequest: \n" + payload)
 
                }catch(Exception e){
-                       logger.error("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+                       logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
                                        "Exception Occured Processing PostProcessResponse - " + "\n", "BPMN",
-                                       MsoLogger.getServiceName(),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")
@@ -480,9 +479,9 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
                } 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);
+                       logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+                                       "Caught exception in " + method , "BPMN",
+                                       ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
                        exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Invalid Message")
                }
        }
@@ -529,9 +528,9 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
                        logger.debug("CreateVfModuleInfra Outgoing UpdateInfra Request: " + payload)
 
                }catch(Exception e){
-                       logger.error("{} {} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
-                                       "Exception Occured Processing prepareUpdateInfraRequest.", "BPMN", MsoLogger.getServiceName(),
-                                       MsoLogger.ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
+                       logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+                                       "Exception Occured Processing prepareUpdateInfraRequest.", "BPMN",
+                                       ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
                        execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during prepareUpdateInfraRequest Method:\n" + e.getMessage())
                }
                logger.trace("COMPLETED prepareUpdateInfraRequest Process")
@@ -585,9 +584,9 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
                } 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);
+                       logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+                                       "Caught exception in " + method , "BPMN",
+                                       ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
                        exceptionUtil.buildWorkflowException(execution, 2000, 'Internal Error')
                }
        }