aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/MSOCommonBPMN/src')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/exception/ExceptionBuilder.java15
1 files changed, 13 insertions, 2 deletions
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) {