Add nssiId for AllocateTNNSSI request
[so.git] / bpmn / so-bpmn-infrastructure-common / src / main / groovy / org / onap / so / bpmn / infrastructure / scripts / CreateVfModuleInfra.groovy
index fa9fe62..fc97c29 100644 (file)
@@ -22,6 +22,7 @@
 
 package org.onap.so.bpmn.infrastructure.scripts
 
+import org.onap.so.logger.LoggingAnchor
 import org.camunda.bpm.engine.delegate.BpmnError
 import org.camunda.bpm.engine.delegate.DelegateExecution
 import org.onap.aai.domain.yang.v12.GenericVnf;
@@ -35,7 +36,7 @@ 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.logger.ErrorCode;
+import org.onap.logging.filter.base.ErrorCode;
 import org.onap.so.logger.MessageEnum
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
@@ -251,7 +252,7 @@ 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(),
+                       logger.error(LoggingAnchor.FIVE, 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")
@@ -301,7 +302,7 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
                } catch (BpmnError e) {
                        throw e;
                } catch (Exception e) {
-                       logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+                       logger.error(LoggingAnchor.FIVE, 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())
@@ -402,7 +403,7 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
                        logger.debug("Outgoing MsoCompletionRequest: \n" + payload)
 
                }catch(Exception e){
-                       logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+                       logger.error(LoggingAnchor.FIVE, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
                                        "Exception Occured Processing PostProcessResponse - " + "\n", "BPMN",
                                        ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
                        execution.setVariable("CVFMI_ErrorResponse", "Error Occured during PostProcessResponse Method:\n" + e.getMessage())
@@ -479,7 +480,7 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
                } catch (BpmnError e) {
                        throw e;
                } catch (Exception e) {
-                       logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+                       logger.error(LoggingAnchor.FIVE, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
                                        "Caught exception in " + method , "BPMN",
                                        ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
                        exceptionUtil.buildAndThrowWorkflowException(execution, 1002, "Invalid Message")
@@ -528,7 +529,7 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
                        logger.debug("CreateVfModuleInfra Outgoing UpdateInfra Request: " + payload)
 
                }catch(Exception e){
-                       logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+                       logger.error(LoggingAnchor.FIVE, 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())
@@ -584,7 +585,7 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor {
                } catch (BpmnError e) {
                        throw e;
                } catch (Exception e) {
-                       logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
+                       logger.error(LoggingAnchor.FIVE, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(),
                                        "Caught exception in " + method , "BPMN",
                                        ErrorCode.UnknownError.getValue(), "Exception is:\n" + e);
                        exceptionUtil.buildWorkflowException(execution, 2000, 'Internal Error')