From 219ef08ffde8482dbaf6dfa151d9d06da7aabf4e Mon Sep 17 00:00:00 2001 From: "Smokowski, Steve (ss835w)" Date: Thu, 9 Aug 2018 12:44:57 -0400 Subject: 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) --- .../so/bpmn/common/scripts/ExceptionUtil.groovy | 7 +++++ .../CreateGenericALaCarteServiceInstance.bpmn | 30 +++++++++++----------- 2 files changed, 22 insertions(+), 15 deletions(-) (limited to 'bpmn') 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 + -- cgit 1.2.3-korg