From: Smokowski, Steve (ss835w) Date: Thu, 9 Aug 2018 16:44:57 +0000 (-0400) Subject: Fix Logging X-Git-Tag: 1.3.1~287 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=219ef08ffde8482dbaf6dfa151d9d06da7aabf4e;p=so.git Fix Logging Add more logging information for Java.Lang Exceptions Issue-ID: SO-822 Change-Id: I5eb25adc087c9fb495829af2c9d0d1be7374f4a3 Change-Id: I5eb25adc087c9fb495829af2c9d0d1be7374f4a3 Signed-off-by: Smokowski, Steve (ss835w) --- diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExceptionUtil.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExceptionUtil.groovy index de5408fac5..4b701e6a58 100644 --- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExceptionUtil.groovy +++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExceptionUtil.groovy @@ -381,15 +381,22 @@ class ExceptionUtil extends AbstractServiceTaskProcessor { msoLogger.debug("Started processJavaException Method") // if the BPMN flow java error handler sets "BPMN_javaExpMsg", append it to the WFE String javaExpMsg = execution.getVariable("BPMN_javaExpMsg") + String errorMessage = execution.getVariable("gUnknownError") String wfeExpMsg = "Catch a Java Lang Exception in " + processKey if (javaExpMsg != null && !javaExpMsg.empty) { wfeExpMsg = wfeExpMsg + ": " + javaExpMsg } + if (errorMessage != null && !errorMessage.empty) { + msoLogger.error("Unknown Error: " + errorMessage); + } + msoLogger.error("Java Error: " + wfeExpMsg); buildWorkflowException(execution, 2500, wfeExpMsg) }catch(BpmnError b){ + msoLogger.error(b); throw b }catch(Exception e){ + msoLogger.error(e); msoLogger.debug("Caught Exception during processJavaException Method: " + e) buildWorkflowException(execution, 2500, "Internal Error - During Process Java Exception") } diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateGenericALaCarteServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateGenericALaCarteServiceInstance.bpmn index 3d08fdb1d4..50e65dcaad 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateGenericALaCarteServiceInstance.bpmn +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateGenericALaCarteServiceInstance.bpmn @@ -1,5 +1,5 @@ - + SequenceFlow_0lp2z7l @@ -15,7 +15,7 @@ ex.processJavaException(execution)]]> SequenceFlow_10 - + @@ -197,35 +197,35 @@ csi.prepareCreateServiceInstance(execution)]]> - + - + - + - + - + - + - - + + - + - - + + - + @@ -449,4 +449,4 @@ csi.prepareCreateServiceInstance(execution)]]> - \ No newline at end of file +