From 27ea1f0d983103bc9fc6174acc357f4a48e9fe56 Mon Sep 17 00:00:00 2001 From: "Boslet, Cory" Date: Fri, 17 May 2019 10:14:26 -0400 Subject: Set workflowexceptionerrormessage in all cases Removed white spaces so that they are gone. Change to set workflowexceptionerrormessage in all cases so that its available to workflowactionbb. Change-Id: I66130b80eab0c0a0f96c3a7a5509bb70dda26884 Issue-ID: SO-1886 Signed-off-by: Benjamin, Max (mb388a) --- .../tasks/ExecuteBuildingBlockRainyDay.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'bpmn/MSOCommonBPMN/src') diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java index 0a7a75c89b..122e71851f 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java @@ -9,9 +9,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -81,14 +81,13 @@ public class ExecuteBuildingBlockRainyDay { String serviceType = ASTERISK; boolean aLaCarte = (boolean) execution.getVariable("aLaCarte"); boolean suppressRollback = (boolean) execution.getVariable("suppressRollback"); - String handlingCode = ""; WorkflowException workflowException = (WorkflowException) execution.getVariable("WorkflowException"); - try { - // Extract error data to be returned to WorkflowAction + if (workflowException != null) { execution.setVariable("WorkflowExceptionErrorMessage", workflowException.getErrorMessage()); - } catch (Exception e) { - logger.error("No WorkflowException Found", e); + } else { + logger.debug("WorkflowException is null, unable to set WorkflowExceptionErrorMessage"); } + String handlingCode = ""; if (suppressRollback) { handlingCode = "Abort"; -- cgit 1.2.3-korg