aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks/src/main
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2019-04-03 09:09:16 +0000
committerGerrit Code Review <gerrit@onap.org>2019-04-03 09:09:16 +0000
commit0ea204d5d1db87a34be2581d8ea4790d0dfacb8b (patch)
tree8480406f69c8a158762d36dd55da4d393690e323 /bpmn/so-bpmn-tasks/src/main
parentd638b2c18956ead1916ecb77780f34aec9297d0f (diff)
parent6dbb05c1b633e64db599ca24041d795545106d65 (diff)
Merge "do not error out when there is no config"
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/main')
-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 a0b48fda37..a327f0670a 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
@@ -25,6 +25,8 @@ import java.util.ArrayList;
import java.util.List;
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;
@@ -290,14 +292,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));
}
}
}
@@ -308,7 +311,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");