Removed MsoLogger class
[so.git] / bpmn / so-bpmn-infrastructure-common / src / main / groovy / org / onap / so / bpmn / infrastructure / scripts / VnfCmBase.groovy
index a83b36f..09e7516 100644 (file)
@@ -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')
                }
        }