Set workflowexceptionerrormessage in all cases 02/88002/1
authorBoslet, Cory <cory.boslet@att.com>
Fri, 17 May 2019 14:14:26 +0000 (10:14 -0400)
committerBenjamin, Max (mb388a) <mb388a@us.att.com>
Fri, 17 May 2019 14:14:36 +0000 (10:14 -0400)
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) <mb388a@us.att.com>
bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java

index 0a7a75c..122e718 100644 (file)
@@ -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";