aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks/src/main
diff options
context:
space:
mode:
authorElena Kuleshov <evn@att.com>2019-09-26 13:10:46 -0400
committerElena Kuleshov <evn@att.com>2019-09-26 13:12:35 -0400
commit07c30c3f010df4c5a66d060eda4eb0866b078bf6 (patch)
tree19838b7c5266c48224af85d5aadc58b33fd8aa27 /bpmn/so-bpmn-tasks/src/main
parent5323b7150d0c4df4b0c38e0537c78fc011c0fb9b (diff)
Set WorkflowException on BPMN WF error
WorkflowException needs to be set when execution of a custom workflows fails due to an error from BPMN Issue-ID: SO-2369 Signed-off-by: Kuleshov, Elena <evn@att.com> Change-Id: Ie5ab66105681588000693fdbb3ca89310aee8a7c
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/main')
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java
index d9c6857ef1..0c31dfa16f 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/activity/ExecuteActivity.java
@@ -138,7 +138,9 @@ public class ExecuteActivity implements JavaDelegate {
execution.setVariable(WORKFLOW_EXCEPTION, workflowException);
} catch (Exception e) {
- buildAndThrowException(execution, e.getMessage());
+ logger.error("BPMN exception on activity execution: " + e.getMessage());
+ workflowException = new WorkflowException(EXECUTE_BUILDING_BLOCK, 7000, e.getMessage());
+ handlingCode = ABORT_HANDLING_CODE;
}
if (workflowException != null && handlingCode != null && handlingCode.equals(ABORT_HANDLING_CODE)) {