aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2020-11-19 16:47:55 +0000
committerGerrit Code Review <gerrit@onap.org>2020-11-19 16:47:55 +0000
commitb029a27f327851e73ceff94595cbb1e099da8998 (patch)
treee49d5c102ba47f2cb2d4656ba44a8f5653741623 /bpmn
parentbe487995fcdf3f9e245adf48d7fbb795b7d88e14 (diff)
parent42158c7400de39923d3eb8418402ed38770e5a7b (diff)
Merge "Catch exceptions during the select BB method for"
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java30
1 files changed, 17 insertions, 13 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java
index 2be8595336..5e281cff87 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java
@@ -100,22 +100,26 @@ public class WorkflowActionBBTasks {
private RequestsDbListenerRunner requestsDbListener;
public void selectBB(DelegateExecution execution) {
- List<ExecuteBuildingBlock> flowsToExecute =
- (List<ExecuteBuildingBlock>) execution.getVariable("flowsToExecute");
- execution.setVariable("MacroRollback", false);
try {
- flowManipulatorListenerRunner.modifyFlows(flowsToExecute, new DelegateExecutionImpl(execution));
- } catch (NullPointerException ex) {
- workflowAction.buildAndThrowException(execution, "Error in FlowManipulator Modify Flows", ex);
- }
- int currentSequence = (int) execution.getVariable(G_CURRENT_SEQUENCE);
+ List<ExecuteBuildingBlock> flowsToExecute =
+ (List<ExecuteBuildingBlock>) execution.getVariable("flowsToExecute");
+ execution.setVariable("MacroRollback", false);
+ try {
+ flowManipulatorListenerRunner.modifyFlows(flowsToExecute, new DelegateExecutionImpl(execution));
+ } catch (NullPointerException ex) {
+ workflowAction.buildAndThrowException(execution, "Error in FlowManipulator Modify Flows", ex);
+ }
+ int currentSequence = (int) execution.getVariable(G_CURRENT_SEQUENCE);
- ExecuteBuildingBlock ebb = flowsToExecute.get(currentSequence);
+ ExecuteBuildingBlock ebb = flowsToExecute.get(currentSequence);
- execution.setVariable("buildingBlock", ebb);
- currentSequence++;
- execution.setVariable(COMPLETED, currentSequence >= flowsToExecute.size());
- execution.setVariable(G_CURRENT_SEQUENCE, currentSequence);
+ execution.setVariable("buildingBlock", ebb);
+ currentSequence++;
+ execution.setVariable(COMPLETED, currentSequence >= flowsToExecute.size());
+ execution.setVariable(G_CURRENT_SEQUENCE, currentSequence);
+ } catch (Exception e) {
+ workflowAction.buildAndThrowException(execution, "Internal Error occured during selectBB", e);
+ }
}
public void updateFlowStatistics(DelegateExecution execution) {