aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks
diff options
context:
space:
mode:
authorKALKERE RAMESH, SHARAN <sharan.kalkere.ramesh@att.com>2021-03-05 12:50:00 -0500
committerBenjamin, Max (mb388a) <mb388a@att.com>2021-03-07 20:14:45 -0500
commitcd24b2b9acd1223463dbc0e2d17489ef89e39d4e (patch)
tree4cd733499c89d1ffc86511d3e33c01dd59c507bb /bpmn/so-bpmn-tasks
parent1ae03802fb8d3e29f64dc84e8d5899d60860321b (diff)
improve error handling in postProcessingExecuteBB
improve error handling in postProcessingExecuteBB Issue-ID: SO-3572 Signed-off-by: AT&T Open Source <g22940@att.com> Change-Id: Idcccdf8f5f10db8445a42536d0bd891bc2cf5a42 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com>
Diffstat (limited to 'bpmn/so-bpmn-tasks')
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java29
1 files changed, 18 insertions, 11 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 ccefc772c3..ec2ca74fa7 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
@@ -420,18 +420,25 @@ public class WorkflowActionBBTasks {
}
public void postProcessingExecuteBB(DelegateExecution execution) {
- List<ExecuteBuildingBlock> flowsToExecute =
- (List<ExecuteBuildingBlock>) execution.getVariable("flowsToExecute");
- String handlingCode = (String) execution.getVariable(HANDLINGCODE);
- final boolean aLaCarte = (boolean) execution.getVariable(G_ALACARTE);
- int currentSequence = (int) execution.getVariable(G_CURRENT_SEQUENCE);
- ExecuteBuildingBlock ebb = flowsToExecute.get(currentSequence - 1);
- String bbFlowName = ebb.getBuildingBlock().getBpmnFlowName();
- if ("ActivateVfModuleBB".equalsIgnoreCase(bbFlowName) && aLaCarte && "Success".equalsIgnoreCase(handlingCode)) {
- postProcessingExecuteBBActivateVfModule(execution, ebb, flowsToExecute);
- }
+ try {
+ List<ExecuteBuildingBlock> flowsToExecute =
+ (List<ExecuteBuildingBlock>) execution.getVariable("flowsToExecute");
+ String handlingCode = (String) execution.getVariable(HANDLINGCODE);
+ final boolean aLaCarte = (boolean) execution.getVariable(G_ALACARTE);
+ int currentSequence = (int) execution.getVariable(G_CURRENT_SEQUENCE);
+ logger.debug("Current Sequence: {}", currentSequence);
+ ExecuteBuildingBlock ebb = flowsToExecute.get(currentSequence - 1);
+ String bbFlowName = ebb.getBuildingBlock().getBpmnFlowName();
+ if ("ActivateVfModuleBB".equalsIgnoreCase(bbFlowName) && aLaCarte
+ && "Success".equalsIgnoreCase(handlingCode)) {
+ postProcessingExecuteBBActivateVfModule(execution, ebb, flowsToExecute);
+ }
- flowManipulatorListenerRunner.postModifyFlows(flowsToExecute, new DelegateExecutionImpl(execution));
+ flowManipulatorListenerRunner.postModifyFlows(flowsToExecute, new DelegateExecutionImpl(execution));
+ } catch (Exception ex) {
+ logger.error("Exception in postProcessingExecuteBB", ex);
+ workflowAction.buildAndThrowException(execution, "Failed to post process Execute BB");
+ }
}
protected void postProcessingExecuteBBActivateVfModule(DelegateExecution execution, ExecuteBuildingBlock ebb,