aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks/src/main
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2019-09-25 12:13:32 +0000
committerGerrit Code Review <gerrit@onap.org>2019-09-25 12:13:32 +0000
commit05f41e9128029a57a45a58fe0863d876ce577abe (patch)
tree1fdaf461618f7c13312a0753b3340f10615bc06d /bpmn/so-bpmn-tasks/src/main
parent2cbcb94bb96ed9ea14588a238b71407f0d6accaf (diff)
parenta7017351a7c22023ed005280d6331a6afc6979c1 (diff)
Merge "sdn post 1908 rollback and resume mso should"
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/WorkflowActionBBFailure.java12
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java3
2 files changed, 14 insertions, 1 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBFailure.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBFailure.java
index be3e06c9ea..56cd9fd70f 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBFailure.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBFailure.java
@@ -39,6 +39,8 @@ import org.springframework.stereotype.Component;
@Component
public class WorkflowActionBBFailure {
+ private static final String DEACTIVATE_FABRIC_CONFIGURATION_FLOW = "DeactivateFabricConfigurationBB";
+ private static final String UNASSIGN_FABRIC_CONFIGURATION_FLOW = "UnassignFabricConfigurationBB";
private static final Logger logger = LoggerFactory.getLogger(WorkflowActionBBFailure.class);
public static final String ROLLBACK_TARGET_STATE = "rollbackTargetState";
@Autowired
@@ -96,6 +98,16 @@ public class WorkflowActionBBFailure {
String rollbackTargetState = (String) execution.getVariable(ROLLBACK_TARGET_STATE);
request.setRequestStatus(rollbackTargetState);
} else if (isRollbackFailure) {
+ if (ebb != null && ebb.getBuildingBlock() != null && ebb.getBuildingBlock().getBpmnFlowName() != null) {
+ String flowName = ebb.getBuildingBlock().getBpmnFlowName();
+ if (DEACTIVATE_FABRIC_CONFIGURATION_FLOW.equalsIgnoreCase(flowName)
+ || UNASSIGN_FABRIC_CONFIGURATION_FLOW.equalsIgnoreCase(flowName)) {
+ String statusMessage = String.format(
+ "%s Warning: The vf-module is active but configuration was not removed completely for one or more VMs.",
+ request.getStatusMessage());
+ request.setStatusMessage(statusMessage);
+ }
+ }
Optional<String> rollbackErrorMsgOp = retrieveErrorMessage(execution);
if (rollbackErrorMsgOp.isPresent()) {
rollbackErrorMsg = rollbackErrorMsgOp.get();
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 f5bbcf5bc0..39aa9d6c41 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
@@ -310,7 +310,8 @@ public class WorkflowActionBBTasks {
rollbackFlowsFiltered.addAll(rollbackFlows);
if ("RollbackToAssigned".equals(handlingCode) || ROLLBACKTOCREATED.equals(handlingCode)) {
for (int i = 0; i < rollbackFlows.size(); i++) {
- if (rollbackFlows.get(i).getBuildingBlock().getBpmnFlowName().contains("Unassign")) {
+ if (rollbackFlows.get(i).getBuildingBlock().getBpmnFlowName().contains("Unassign") && !rollbackFlows
+ .get(i).getBuildingBlock().getBpmnFlowName().contains("FabricConfiguration")) {
rollbackFlowsFiltered.remove(rollbackFlows.get(i));
} else if (rollbackFlows.get(i).getBuildingBlock().getBpmnFlowName().contains("Delete")
&& ROLLBACKTOCREATED.equals(handlingCode)) {