summaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks/src/main/java/org
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@us.att.com>2019-04-02 23:04:18 -0400
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2019-04-02 23:04:36 -0400
commit6dbb05c1b633e64db599ca24041d795545106d65 (patch)
treefd3ecd2d72307119514e2a77bf7d05a73671fdfc /bpmn/so-bpmn-tasks/src/main/java/org
parentd59fc0ad5db7b7cacf5996f86db34f41090061fa (diff)
do not error out when there is no config
fixed rollback execution path creation in bb tasks do not error out when there is no config Change-Id: I3e2ce1e203271deebc45e1f14a884c940ecd5d25 Issue-ID: SO-1733 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/main/java/org')
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java15
1 files changed, 10 insertions, 5 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 242f125bde..359f8ea164 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
@@ -26,6 +26,8 @@ import java.util.List;
import java.util.Optional;
import java.util.UUID;
+import javax.persistence.EntityNotFoundException;
+
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.onap.aai.domain.yang.Vnfc;
import org.onap.so.bpmn.common.workflow.context.WorkflowCallbackResponse;
@@ -296,14 +298,15 @@ public class WorkflowActionBBTasks {
}
}
- int flowSize = rollbackFlows.size();
String handlingCode = (String) execution.getVariable("handlingCode");
+ List<ExecuteBuildingBlock> rollbackFlowsFiltered = new ArrayList<>();
+ rollbackFlowsFiltered.addAll(rollbackFlows);
if(handlingCode.equals("RollbackToAssigned") || handlingCode.equals("RollbackToCreated")){
- for(int i = 0; i<flowSize; i++){
+ for(int i = 0; i<rollbackFlows.size(); i++){
if(rollbackFlows.get(i).getBuildingBlock().getBpmnFlowName().contains("Unassign")){
- rollbackFlows.remove(i);
+ rollbackFlowsFiltered.remove(rollbackFlows.get(i));
} else if(rollbackFlows.get(i).getBuildingBlock().getBpmnFlowName().contains("Delete") && handlingCode.equals("RollbackToCreated")) {
- rollbackFlows.remove(i);
+ rollbackFlowsFiltered.remove(rollbackFlows.get(i));
}
}
}
@@ -314,7 +317,7 @@ public class WorkflowActionBBTasks {
execution.setVariable("isRollbackNeeded", false);
else
execution.setVariable("isRollbackNeeded", true);
- execution.setVariable("flowsToExecute", rollbackFlows);
+ execution.setVariable("flowsToExecute", rollbackFlowsFiltered);
execution.setVariable("handlingCode", "PreformingRollback");
execution.setVariable("isRollback", true);
execution.setVariable("gCurrentSequence", 0);
@@ -396,6 +399,8 @@ public class WorkflowActionBBTasks {
logger.debug("No cvnfcCustomization found for customizationId: " + modelCustomizationId);
}
}
+ } catch (EntityNotFoundException e) {
+ logger.debug(e.getMessage() + " Will not be running Fabric Config Building Blocks");
} catch (Exception e) {
String errorMessage = "Error occurred in post processing of Vf Module create";
execution.setVariable("handlingCode", "RollbackToCreated");