From 9630dd840fac8977329d7ff2dacc96e6db31248d Mon Sep 17 00:00:00 2001 From: "Boslet, Cory" Date: Tue, 3 Nov 2020 12:01:12 -0500 Subject: Added to handle inventory failure errors in bpmn. Added to handle inventory failure errors in bpmn. Issue-ID: SO-3358 Signed-off-by: Benjamin, Max (mb388a) Change-Id: Ia578a4e629ac816c79338fbfff7717ad348e9bc4 --- .../org/onap/so/client/exception/ExceptionBuilder.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'bpmn/MSOCommonBPMN/src') 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 43db27917e..f40948fc49 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 @@ -376,4 +376,18 @@ public class ExceptionBuilder { } + public void processInventoryException(DelegateExecution execution) { + String errorMessage = ""; + logger.debug("Processing Inventory Exception"); + try { + errorMessage = (String) execution.getVariable("inventoryErrorMessage"); + } catch (Exception e) { + logger.debug("Error while Processing Inventory Exception", e); + } + buildWorkflowException(execution, 500, errorMessage, Components.OPENSTACK); + throw new BpmnError("MSOWorkflowException"); + + + } + } -- cgit 1.2.3-korg