Fixed error handling in the completion handler 21/106621/2
authorBoslet, Cory <cory.boslet@att.com>
Fri, 24 Apr 2020 20:13:29 +0000 (16:13 -0400)
committerBenjamin, Max (mb388a) <mb388a@att.com>
Tue, 28 Apr 2020 01:51:10 +0000 (21:51 -0400)
Fixed error handling in the completion handler subflows.

Issue-ID: SO-2829
Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com>
Change-Id: Id8c7332de6d7b0e382b56e86afa83ff231d8cda3

bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcess.groovy

index a86e1de..40776e4 100644 (file)
@@ -51,7 +51,7 @@ public class CompleteMsoProcess extends AbstractServiceTaskProcessor {
             execution.setVariable("CMSO_mso-bpel-name",msoBpelName)
 
             if (utils.nodeExists(xml, "request-information")) {
-                throw new BpmnError("500", "FalloutHandler subflow does not support this request type.")
+                throw new BpmnError("500", "CompleteMsoProcess subflow does not support this request type.")
             }
 
             def request_id = ""
@@ -60,7 +60,7 @@ public class CompleteMsoProcess extends AbstractServiceTaskProcessor {
             }
 
         } catch (BpmnError e) {
-            throw e;
+            exceptionUtil.buildAndThrowWorkflowException(execution, 500, e.getMessage())
         } catch (Exception e) {
             logger.debug("Exception Occured During PreProcessRequest: " + e);
             exceptionUtil.buildAndThrowWorkflowException(execution, 2000, "Internal Error - Occured in preprocess")