aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@us.att.com>2019-03-04 09:48:00 -0500
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2019-03-04 09:48:16 -0500
commit89c1ed09024b96ad67d7c656b6dfd2d76cbcfbc0 (patch)
treec41cd7d18cb8329c16ef1b624956c3011e6945aa /bpmn/MSOCommonBPMN/src
parent0f4371f47e72c413b2a28d3a0426bdac49f1291b (diff)
put error message in execution
put error message in execution before checking rollback Change-Id: I41bc89f589a260aece0c837d83218794ec1ec72e Issue-ID: SO-1591 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN/src')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/ExecuteBuildingBlockRainyDay.java17
1 files changed, 10 insertions, 7 deletions
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 054198fd9a..aa992d6153 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
@@ -83,6 +83,15 @@ public class ExecuteBuildingBlockRainyDay {
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
+ execution.setVariable("WorkflowExceptionErrorMessage", workflowException.getErrorMessage());
+ } catch (Exception e) {
+ logger.error("No WorkflowException Found",e);
+ }
+
if (suppressRollback) {
handlingCode = "Abort";
} else {
@@ -103,7 +112,7 @@ public class ExecuteBuildingBlockRainyDay {
} catch (Exception ex) {
// keep default vnfType value
}
- WorkflowException workflowException = (WorkflowException) execution.getVariable("WorkflowException");
+
String errorCode = ASTERISK;
try {
errorCode = "" + workflowException.getErrorCode();
@@ -123,12 +132,6 @@ public class ExecuteBuildingBlockRainyDay {
// keep default workStep value
}
- try {
- // Extract error data to be returned to WorkflowAction
- execution.setVariable("WorkflowExceptionErrorMessage", workflowException.getErrorMessage());
- } catch (Exception e) {
- logger.error("No WorkflowException Found",e);
- }
RainyDayHandlerStatus rainyDayHandlerStatus;
rainyDayHandlerStatus = catalogDbClient
.getRainyDayHandlerStatusByFlowNameAndServiceTypeAndVnfTypeAndErrorCodeAndWorkStep(bbName,