From 39761146b77f58973612f8fdee3de9f987278edf Mon Sep 17 00:00:00 2001 From: "BOSLET, CORY" Date: Wed, 10 Mar 2021 17:22:28 -0500 Subject: add new sdnc interaction Added Cors auth support option for sdnc interaction Issue-ID: SO-3580 Signed-off-by: AT&T Open Source Change-Id: I54d17ea5e02a20114f5857940cc4dabc72854dea --- .../org/onap/so/client/exception/ExceptionBuilder.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'bpmn/MSOCommonBPMN/src/main') 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 f40948fc49..7113386052 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 @@ -207,7 +207,8 @@ public class ExceptionBuilder { } } - public void buildAndThrowWorkflowException(DelegateExecution execution, int errorCode, String errorMessage) { + public void buildAndThrowWorkflowException(DelegateExecution execution, int errorCode, String errorMessage) + throws BpmnError { buildWorkflowException(execution, errorCode, errorMessage); logger.info("Throwing MSOWorkflowException"); @@ -372,8 +373,18 @@ public class ExceptionBuilder { } buildWorkflowException(execution, 500, workflowExceptionMessage.toString(), Components.OPENSTACK); throw new BpmnError("MSOWorkflowException"); + } - + public void processSDNCException(DelegateExecution execution) { + logger.debug("Processing SDNC Exception"); + String errorMessage = ""; + try { + errorMessage = (String) execution.getVariable("errorMessage"); + } catch (Exception e) { + logger.debug("Error while Processing SDNC Exception", e); + } + buildWorkflowException(execution, 500, errorMessage, ONAPComponents.SDNC); + throw new BpmnError("MSOWorkflowException"); } public void processInventoryException(DelegateExecution execution) { -- cgit 1.2.3-korg