aboutsummaryrefslogtreecommitdiffstats
path: root/asdctool
diff options
context:
space:
mode:
Diffstat (limited to 'asdctool')
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/InstanceMigrationBase.java16
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig1802/SdcCatalogMigration.java168
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig1806/ForwardPathMigration.java256
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig1806/ResourceLifecycleMigration.java159
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig1806/SDCInstancesMigration.java236
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig1806/SdcArchiveMigration.java96
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig1902/InterfaceOperationMigration.java172
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig1902/SdcConsumerMigration.java108
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig1911/SdcDeploymentArtTimeOutMigration.java152
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig2002/SdcCollapsingRolesCERTIFIEDstateMigration.java154
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig2002/SdcCollapsingRolesCIPstateMigration.java153
-rw-r--r--asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig2002/SdcCollapsingRolesRFCstateMigration.java147
-rw-r--r--asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/tasks/mig1802/SdcCatalogMigrationTest.java65
-rw-r--r--asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/tasks/mig1806/ForwardPathMigrationTest.java77
-rw-r--r--asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/tasks/mig1806/ResourceLifecycleMigrationTest.java74
-rw-r--r--asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/tasks/mig1806/SDCInstancesMigrationTest.java95
-rw-r--r--asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/tasks/mig1806/SdcArchiveMigrationTest.java66
-rw-r--r--asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/tasks/mig1806/Version.java36
18 files changed, 0 insertions, 2230 deletions
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/InstanceMigrationBase.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/InstanceMigrationBase.java
index b0a1d502aa..5876898d7e 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/InstanceMigrationBase.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/InstanceMigrationBase.java
@@ -24,7 +24,6 @@ import fj.data.Either;
import org.apache.tinkerpop.gremlin.structure.Direction;
import org.apache.tinkerpop.gremlin.structure.Edge;
import org.janusgraph.core.JanusGraphVertex;
-import org.openecomp.sdc.asdctool.migration.tasks.mig2002.SdcCollapsingRolesRFCstateMigration;
import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
@@ -152,21 +151,6 @@ public abstract class InstanceMigrationBase {
return false;
}
- protected List<JanusGraphVertex> getVertexByEdgeSide(Iterator<Edge> edges, SdcCollapsingRolesRFCstateMigration.EdgeSide side) {
- List<JanusGraphVertex> vertexList = new ArrayList();
- while (edges.hasNext()) {
- Edge edge = edges.next();
-
- if (side == SdcCollapsingRolesRFCstateMigration.EdgeSide.OUT) {
- vertexList.add((JanusGraphVertex) edge.outVertex());
- } else {
- vertexList.add((JanusGraphVertex) edge.inVertex());
- }
- }
-
- return vertexList;
- }
-
protected Iterator<Edge> getVertexEdge(GraphVertex containerV, Direction direction, EdgeLabelEnum edgeLabel) {
return containerV.getVertex().edges(direction, edgeLabel.name());
}
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig1802/SdcCatalogMigration.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig1802/SdcCatalogMigration.java
deleted file mode 100644
index 43399b616d..0000000000
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig1802/SdcCatalogMigration.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.sdc.asdctool.migration.tasks.mig1802;
-
-import fj.data.Either;
-import org.apache.commons.collections.ListUtils;
-import org.apache.tinkerpop.gremlin.structure.Direction;
-import org.openecomp.sdc.asdctool.migration.core.DBVersion;
-import org.openecomp.sdc.asdctool.migration.core.task.Migration;
-import org.openecomp.sdc.asdctool.migration.core.task.MigrationResult;
-import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
-import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
-import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
-import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
-import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
-import org.openecomp.sdc.be.dao.jsongraph.utils.IdBuilderUtils;
-import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
-import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum;
-import org.openecomp.sdc.be.model.jsonjanusgraph.operations.TopologyTemplateOperation;
-import org.openecomp.sdc.be.model.jsonjanusgraph.operations.ToscaElementOperation;
-import org.openecomp.sdc.common.log.wrappers.Logger;
-import org.springframework.stereotype.Component;
-
-import java.math.BigInteger;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.stream.Collectors;
-
-@Component
-public class SdcCatalogMigration implements Migration {
- private static final Logger LOGGER = Logger.getLogger(SdcCatalogMigration.class);
- private static final List<ResourceTypeEnum> EXCLUDE_TYPES = Arrays.asList(ResourceTypeEnum.VFCMT, ResourceTypeEnum.Configuration);
-
- private ToscaElementOperation toscaElementOperation;
- private JanusGraphDao janusGraphDao;
-
- public SdcCatalogMigration(TopologyTemplateOperation toscaElementOperation, JanusGraphDao janusGraphDao) {
- this.toscaElementOperation = toscaElementOperation;
- this.janusGraphDao = janusGraphDao;
- }
-
- @Override
- public String description() {
- return "optimize sdc catalog vertices";
- }
-
- @Override
- public DBVersion getVersion() {
- return DBVersion.from(BigInteger.valueOf(1802), BigInteger.valueOf(0));
- }
-
- @Override
- public MigrationResult migrate() {
- JanusGraphOperationStatus status = null;
- try {
- status = getOrCreateCatalogRoot()
- .either(this::associateCatalogRootToCatalogElements,
- err -> {LOGGER.error("failed to create catalog root. err: {}", err); return err;});
- return status == JanusGraphOperationStatus.OK ? MigrationResult.success() : MigrationResult.error("failed to create and associate catalog root. error: " + status);
- } finally {
- commitOrRollBack(status);
- }
- }
-
- private void commitOrRollBack(JanusGraphOperationStatus status) {
- if (status == JanusGraphOperationStatus.OK) {
- janusGraphDao.commit();
- } else {
- janusGraphDao.rollback();
- }
- }
-
- private Either<GraphVertex, JanusGraphOperationStatus> getOrCreateCatalogRoot() {
- LOGGER.info("creating or getting catalog root vertex");
- return janusGraphDao.getVertexByLabel(VertexTypeEnum.CATALOG_ROOT)
- .right()
- .bind(this::createRootCatalogVertexOrError);
- }
-
-
- private Either<GraphVertex, JanusGraphOperationStatus> createRootCatalogVertexOrError(JanusGraphOperationStatus janusGraphOperationStatus) {
- return janusGraphOperationStatus == JanusGraphOperationStatus.NOT_FOUND ? createRootCatalogVertex() : Either.right(
- janusGraphOperationStatus);
- }
-
- private Either<GraphVertex, JanusGraphOperationStatus> createRootCatalogVertex() {
- LOGGER.info("Creating root catalog vertex");
- GraphVertex catalogRootVertex = new GraphVertex(VertexTypeEnum.CATALOG_ROOT);
- catalogRootVertex.setUniqueId(IdBuilderUtils.generateUniqueId());
- return janusGraphDao.createVertex(catalogRootVertex);
- }
-
- private Either<List<GraphVertex>, JanusGraphOperationStatus> getAllCatalogVertices() {
- LOGGER.info("fetching all catalog resources");
- return toscaElementOperation.getListOfHighestComponents(ComponentTypeEnum.RESOURCE, EXCLUDE_TYPES, JsonParseFlagEnum.ParseMetadata)
- .right()
- .bind(this::errOrEmptyListIfNotFound)
- .left()
- .bind(this::getAllCatalogVertices);
- }
-
- private Either<List<GraphVertex>, JanusGraphOperationStatus> errOrEmptyListIfNotFound(JanusGraphOperationStatus err) {
- return JanusGraphOperationStatus.NOT_FOUND.equals(err) ? Either.left(new ArrayList<>()) : Either.right(err);
- }
-
- @SuppressWarnings("unchecked")
- private Either<List<GraphVertex>, JanusGraphOperationStatus> getAllCatalogVertices(List<GraphVertex> allResourceCatalogVertices) {
- LOGGER.info("number of resources: {}", allResourceCatalogVertices.size());
- LOGGER.info("fetching all catalog services");
- return toscaElementOperation.getListOfHighestComponents(ComponentTypeEnum.SERVICE, EXCLUDE_TYPES, JsonParseFlagEnum.ParseMetadata)
- .right()
- .bind(this::errOrEmptyListIfNotFound)
- .left()
- .map(allServiceVertices -> ListUtils.union(allServiceVertices, allResourceCatalogVertices));
- }
-
- private JanusGraphOperationStatus associateCatalogRootToCatalogElements(GraphVertex root) {
- return getAllCatalogVertices()
- .either(catalogVertices -> associateCatalogRootToCatalogElements(root, catalogVertices),
- err -> err);
- }
-
- private JanusGraphOperationStatus associateCatalogRootToCatalogElements(GraphVertex root, List<GraphVertex> catalogElements) {
- LOGGER.info("number of catalog elements: {}", catalogElements.size());
- LOGGER.info("connect all catalog elements to root edge");
- List<GraphVertex> nonConnectedElements = catalogElements.stream().filter(this::edgeNotAlreadyExists).collect(Collectors.toList());
- int numOfCreatedEdges = 0;
- for (GraphVertex catalogElement : nonConnectedElements) {
- JanusGraphOperationStatus
- edgeCreationStatus = janusGraphDao
- .createEdge(root, catalogElement, EdgeLabelEnum.CATALOG_ELEMENT, null);
- if (edgeCreationStatus != JanusGraphOperationStatus.OK) {
- LOGGER.error("failed to create edge from catalog element to vertex {}", catalogElement.getUniqueId());
- return edgeCreationStatus;
- }
- LOGGER.debug("created edge from catalog root to element {}", catalogElement.getUniqueId());
- numOfCreatedEdges++;
- }
- LOGGER.info("number edges created: {}", numOfCreatedEdges);
- return JanusGraphOperationStatus.OK;
- }
-
- private boolean edgeNotAlreadyExists(GraphVertex catalogElement) {
- return !catalogElement.getVertex().edges(Direction.IN, EdgeLabelEnum.CATALOG_ELEMENT.name()).hasNext();
- }
-
-
-}
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig1806/ForwardPathMigration.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig1806/ForwardPathMigration.java
deleted file mode 100644
index 8796517c6e..0000000000
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig1806/ForwardPathMigration.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * Copyright © 2016-2018 European Support Limited
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.openecomp.sdc.asdctool.migration.tasks.mig1806;
-
-import com.google.common.collect.ImmutableSet;
-import fj.data.Either;
-import org.apache.tinkerpop.gremlin.structure.Direction;
-import org.apache.tinkerpop.gremlin.structure.Edge;
-import org.apache.tinkerpop.gremlin.structure.Vertex;
-import org.janusgraph.core.JanusGraphVertex;
-import org.openecomp.sdc.asdctool.migration.core.DBVersion;
-import org.openecomp.sdc.asdctool.migration.core.task.Migration;
-import org.openecomp.sdc.asdctool.migration.core.task.MigrationResult;
-import org.openecomp.sdc.be.config.ConfigurationManager;
-import org.openecomp.sdc.be.dao.api.ActionStatus;
-import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
-import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
-import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
-import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
-import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
-import org.openecomp.sdc.be.dao.jsongraph.utils.IdBuilderUtils;
-import org.openecomp.sdc.be.datatypes.elements.ForwardingPathDataDefinition;
-import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
-import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum;
-import org.openecomp.sdc.be.model.Component;
-import org.openecomp.sdc.be.model.ComponentParametersView;
-import org.openecomp.sdc.be.model.Service;
-import org.openecomp.sdc.be.model.User;
-import org.openecomp.sdc.be.model.jsonjanusgraph.operations.ToscaOperationFacade;
-import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
-import org.openecomp.sdc.be.model.operations.impl.DaoStatusConverter;
-import org.openecomp.sdc.be.model.operations.impl.UserAdminOperation;
-
-import java.math.BigInteger;
-import java.util.ArrayList;
-import java.util.EnumMap;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.stream.Collectors;
-
-//@org.springframework.stereotype.Component
-public class ForwardPathMigration implements Migration {
-
- private JanusGraphDao janusGraphDao;
- private UserAdminOperation userAdminOperation;
- private ToscaOperationFacade toscaOperationFacade;
- private User user = null;
-
- public ForwardPathMigration(JanusGraphDao janusGraphDao,
- UserAdminOperation userAdminOperation, ToscaOperationFacade toscaOperationFacade) {
- this.janusGraphDao = janusGraphDao;
- this.userAdminOperation = userAdminOperation;
- this.toscaOperationFacade = toscaOperationFacade;
- }
-
- @Override
- public String description() {
- return "remove corrupted forwarding paths ";
- }
-
- @Override
- public DBVersion getVersion() {
- return DBVersion.from(BigInteger.valueOf(1806), BigInteger.valueOf(0));
- }
-
- @Override
- public MigrationResult migrate() {
- final String userId = ConfigurationManager.getConfigurationManager().getConfiguration().getAutoHealingOwner();
-
- Either<User, ActionStatus> userData = (Either<User, ActionStatus>) userAdminOperation
- .getUserData(userId, false);
- if (userData.isRight()) {
- return MigrationResult.error(
- "failed to delete unused forwarding paths. Failed to resolve user : " + userId + " error " + userData
- .right().value());
- } else {
- user = userData.left().value();
- }
- StorageOperationStatus status = cleanAllServices();
-
- return status == StorageOperationStatus.OK ? MigrationResult.success()
- : MigrationResult.error("failed to remove corrupted forwarding paths . Error : " + status);
-
- }
-
- private StorageOperationStatus cleanAllServices() {
- StorageOperationStatus status;
-
- Map<GraphPropertyEnum, Object> hasProps = new EnumMap<>(GraphPropertyEnum.class);
- hasProps.put(GraphPropertyEnum.COMPONENT_TYPE, ComponentTypeEnum.SERVICE.name());
- Map<GraphPropertyEnum, Object> hasNotProps = new HashMap<>();
- hasNotProps.put(GraphPropertyEnum.IS_DELETED, true);
- status = janusGraphDao
- .getByCriteria(VertexTypeEnum.TOPOLOGY_TEMPLATE, hasProps, hasNotProps, JsonParseFlagEnum.ParseAll)
- .either(this::cleanServices, this::handleError);
- return status;
- }
-
- private StorageOperationStatus cleanServices(List<GraphVertex> containersV) {
- StorageOperationStatus status = StorageOperationStatus.OK;
- for (GraphVertex container : containersV) {
- ComponentParametersView componentParametersView = new ComponentParametersView();
- componentParametersView.setIgnoreComponentInstances(false);
- componentParametersView.setIgnoreCapabilities(false);
- componentParametersView.setIgnoreRequirements(false);
- componentParametersView.setIgnoreServicePath(false);
- Either<Component, StorageOperationStatus> toscaElement = toscaOperationFacade
- .getToscaElement(container.getUniqueId(), componentParametersView);
- if (toscaElement.isRight()) {
- return toscaElement.right().value();
- }
- status = fixDataOnGraph(toscaElement.left().value());
- if (status != StorageOperationStatus.OK) {
- break;
- }
- }
- return status;
- }
-
-
- private StorageOperationStatus handleError(JanusGraphOperationStatus err) {
- janusGraphDao.rollback();
- return DaoStatusConverter
- .convertJanusGraphStatusToStorageStatus(
- JanusGraphOperationStatus.NOT_FOUND == err ? JanusGraphOperationStatus.OK : err);
- }
-
- private StorageOperationStatus fixDataOnGraph(Component component) {
- if (!(component instanceof Service)){
- return StorageOperationStatus.OK;
- }
- Service service = (Service) component;
- Either<GraphVertex, JanusGraphOperationStatus> getResponse = janusGraphDao.getVertexById(service.getUniqueId(),
- JsonParseFlagEnum.NoParse);
- if (getResponse.isRight()) {
- return DaoStatusConverter.convertJanusGraphStatusToStorageStatus(getResponse.right().value());
-
- }
- Set<String> ciNames = new HashSet<>();
- if (service.getComponentInstances() != null && !service.getComponentInstances().isEmpty()) {
- ciNames = service.getComponentInstances().stream().map(ci -> ci.getName())
- .collect(Collectors.toSet());
- }
- GraphVertex componentVertex = getResponse.left().value();
-
- GraphVertex toscaDataVertex;
- Either<GraphVertex, JanusGraphOperationStatus> groupVertexEither = janusGraphDao.getChildVertex(componentVertex,
- EdgeLabelEnum.FORWARDING_PATH, JsonParseFlagEnum.ParseJson);
- if (groupVertexEither.isRight() && groupVertexEither.right().value() == JanusGraphOperationStatus.NOT_FOUND) {
- return StorageOperationStatus.OK;
- }
- if (groupVertexEither.isRight()) {
- return DaoStatusConverter.convertJanusGraphStatusToStorageStatus(groupVertexEither.right().value());
- }
- toscaDataVertex = groupVertexEither.left().value();
- Map<String, ForwardingPathDataDefinition> forwardingPaths = new HashMap<>(
- (Map<String, ForwardingPathDataDefinition>) toscaDataVertex.getJson());
- List<String> toBeDeletedFP = new ArrayList<>();
- for (Map.Entry<String, ForwardingPathDataDefinition> forwardingPathDataDefinition : forwardingPaths
- .entrySet()) {
- Set<String> nodeNames = forwardingPathDataDefinition.getValue().getPathElements()
- .getListToscaDataDefinition()
- .stream().map(element -> ImmutableSet.of(element.getFromNode(), element.getToNode()))
- .flatMap(set -> set.stream()).collect(Collectors.toSet());
- if (!ciNames.containsAll(nodeNames)) {
- toBeDeletedFP.add(forwardingPathDataDefinition.getKey());
- }
- }
- if (toBeDeletedFP.isEmpty()) {
- janusGraphDao.rollback();
- return StorageOperationStatus.OK;
- }
- toBeDeletedFP.stream().forEach(fpKey -> forwardingPaths.remove(fpKey));
- toscaDataVertex.setJson(forwardingPaths);
- Either<GraphVertex, JanusGraphOperationStatus> updatevertexEither = updateOrCopyOnUpdate(
- toscaDataVertex, componentVertex);
- if (updatevertexEither.isRight()) {
- janusGraphDao.rollback();
- return DaoStatusConverter.convertJanusGraphStatusToStorageStatus(updatevertexEither.right().value());
- }
- janusGraphDao.commit();
- return StorageOperationStatus.OK;
- }
-
- private Either<GraphVertex, JanusGraphOperationStatus> cloneDataVertex(GraphVertex dataVertex, GraphVertex toscaElementVertex, Edge edgeToRemove) {
- EdgeLabelEnum label = EdgeLabelEnum.FORWARDING_PATH;
- GraphVertex newDataVertex = new GraphVertex(dataVertex.getLabel());
- String id = IdBuilderUtils. }
<?xml version="1.0" encoding="UTF-8"?>
<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_Wblj8GyfEeWUWLTvug7ZOg" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="3.7.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
  <bpmn2:process id="DoCreateVfModuleRollback" name="DoCreateVfModuleRollback" isExecutable="true">
    <bpmn2:startEvent id="StartEvent_1">
      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
    </bpmn2:startEvent>
    <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="InitializeVariables" />
    <bpmn2:exclusiveGateway id="ExclusiveGateway_1" name="Rollback PrepareUpdateAAIVfModule?" default="SequenceFlow_9">
      <bpmn2:incoming>SequenceFlow_11er1t8</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
      <bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
    </bpmn2:exclusiveGateway>
    <bpmn2:callActivity id="InvokePrepareUpdateAAIVfModule" name="Invoke&#10;PrepareUpdateAAIVfModule" calledElement="PrepareUpdateAAIVfModule">
      <bpmn2:extensionElements>
        <camunda:in source="PrepareUpdateAAIVfModuleRequest" target="PrepareUpdateAAIVfModuleRequest" />
        <camunda:out source="WorkflowException" target="WorkflowException" />
        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
        <camunda:out source="PUAAIVfMod_heatStackId" target="DCVFMR_heatStackId" />
      </bpmn2:extensionElements>
      <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
    </bpmn2:callActivity>
    <bpmn2:sequenceFlow id="SequenceFlow_6" name="yes" sourceRef="ExclusiveGateway_1" targetRef="InvokePrepareUpdateAAIVfModule">
      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy">execution.getVariable("DCVFMR_rollbackPrepareUpdateVfModule") == "true" &amp;&amp;  !(execution.getVariable('aLaCarte') == true &amp;&amp; execution.getVariable("DCVFMR_rollbackSDNCRequestAssign") == "true")</bpmn2:conditionExpression>
    </bpmn2:sequenceFlow>
    <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="InvokePrepareUpdateAAIVfModule" targetRef="ExclusiveGateway_2" />
    <bpmn2:sequenceFlow id="SequenceFlow_9" name="no" sourceRef="ExclusiveGateway_1" targetRef="ExclusiveGateway_2" />
    <bpmn2:exclusiveGateway id="ExclusiveGateway_2" name="Rollback 1707 SDNC Activate?" default="SequenceFlow_15">
      <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
      <bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_10</bpmn2:outgoing>
      <bpmn2:outgoing>SequenceFlow_15</bpmn2:outgoing>
    </bpmn2:exclusiveGateway>
    <bpmn2:scriptTask id="VNFAdapterPrep" name="VNFAdapter&#10;Prep" scriptFormat="groovy">
      <bpmn2:incoming>SequenceFlow_1p0v6yk</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_16</bpmn2:outgoing>
      <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
def dcvfmr = new DoCreateVfModuleRollback()
dcvfmr.prepVNFAdapterRequest(execution)</bpmn2:script>
    </bpmn2:scriptTask>
    <bpmn2:sequenceFlow id="SequenceFlow_16" name="" sourceRef="VNFAdapterPrep" targetRef="InvokeVNFAdapter" />
    <bpmn2:callActivity id="InvokeVNFAdapter" name="Invoke&#10;VNFAdapterTask" calledElement="openstackAdapterTask">
      <bpmn2:extensionElements>
        <camunda:out source="WorkflowException" target="WorkflowException" />
        <camunda:in source="vnfAdapterTaskRequest" target="openstackAdapterTaskRequest" />
        <camunda:out source="WorkflowResponse" target="DoDVfMod_DoCreateVfModuleRollbackResponse" />
        <camunda:in source="mso-request-id" target="mso-request-id" />
        <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
      </bpmn2:extensionElements>
      <bpmn2:incoming>SequenceFlow_16</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_08aruzz</bpmn2:outgoing>
    </bpmn2:callActivity>
    <bpmn2:sequenceFlow id="SequenceFlow_10" name="yes" sourceRef="ExclusiveGateway_2" targetRef="PrepareSDNCDeactivateRequest">
      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable("DCVFMR_rollbackSDNCRequestActivate") == "true" &amp;&amp; execution.getVariable("sdncVersion") == "1707"}</bpmn2:conditionExpression>
    </bpmn2:sequenceFlow>
    <bpmn2:sequenceFlow id="SequenceFlow_15" name="no" sourceRef="ExclusiveGateway_2" targetRef="ExclusiveGateway_1938vz9" />
    <bpmn2:scriptTask id="UpdateAAIVfModulePrep" name="UpdateAAIVfModule&#10;Prep" scriptFormat="groovy">
      <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
      <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
def dcvfmr = new DoCreateVfModuleRollback()
dcvfmr.prepUpdateAAIVfModule(execution)</bpmn2:script>
    </bpmn2:scriptTask>
    <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="UpdateAAIVfModulePrep" targetRef="InvokeUpdateAAIVfModule" />
    <bpmn2:callActivity id="InvokeUpdateAAIVfModule" name="Invoke&#10;UpdateAAIVfModule" calledElement="UpdateAAIVfModule">
      <bpmn2:extensionElements>
        <camunda:out source="WorkflowException" target="WorkflowException" />
        <camunda:in source="UpdateAAIVfModuleRequest" target="UpdateAAIVfModuleRequest" />
        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
      </bpmn2:extensionElements>
      <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_18</bpmn2:outgoing>
    </bpmn2:callActivity>
    <bpmn2:sequenceFlow id="SequenceFlow_18" name="" sourceRef="InvokeUpdateAAIVfModule" targetRef="ExclusiveGateway_4" />
    <bpmn2:exclusiveGateway id="ExclusiveGateway_3" name="Rollback Update AAI Vf Module?" default="SequenceFlow_17">
      <bpmn2:incoming>SequenceFlow_1gcfdej</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
      <bpmn2:outgoing>SequenceFlow_17</bpmn2:outgoing>
    </bpmn2:exclusiveGateway>
    <bpmn2:sequenceFlow id="SequenceFlow_13" name="yes" sourceRef="ExclusiveGateway_3" targetRef="UpdateAAIVfModulePrep">
      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable("DCVFMR_rollbackUpdateAAIVfModule") == "true"}</bpmn2:conditionExpression>
    </bpmn2:sequenceFlow>
    <bpmn2:sequenceFlow id="SequenceFlow_17" name="no" sourceRef="ExclusiveGateway_3" targetRef="ExclusiveGateway_4" />
    <bpmn2:exclusiveGateway id="ExclusiveGateway_4" name="Rollback SDNC Request?" default="SequenceFlow_20">
      <bpmn2:incoming>SequenceFlow_17</bpmn2:incoming>
      <bpmn2:incoming>SequenceFlow_18</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_19</bpmn2:outgoing>
      <bpmn2:outgoing>SequenceFlow_20</bpmn2:outgoing>
    </bpmn2:exclusiveGateway>
    <bpmn2:sequenceFlow id="SequenceFlow_19" name="yes" sourceRef="ExclusiveGateway_4" targetRef="ExclusiveGateway_1h87hhh">
      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable("DCVFMR_rollbackSDNCRequestAssign") == "true" || execution.getVariable("DCVFMR_rollbackSDNCRequestActivate") == "true"}</bpmn2:conditionExpression>
    </bpmn2:sequenceFlow>
    <bpmn2:sequenceFlow id="SequenceFlow_20" name="no" sourceRef="ExclusiveGateway_4" targetRef="ExclusiveGateway_5" />
    <bpmn2:scriptTask id="SDNCAdapterPrep2" name="SDNCAdapter&#10;Prep" scriptFormat="groovy">
      <bpmn2:incoming>SequenceFlow_1rpg6ac</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_32</bpmn2:outgoing>
      <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
def dcvfmr = new DoCreateVfModuleRollback()
dcvfmr.prepSDNCAdapterRequest(execution)</bpmn2:script>
    </bpmn2:scriptTask>
    <bpmn2:sequenceFlow id="SequenceFlow_32" name="" sourceRef="SDNCAdapterPrep2" targetRef="InvokeSDNCAdapterV1_2" />
    <bpmn2:callActivity id="InvokeSDNCAdapterV1_2" name="Invoke&#10;SDNCAdapterV1" calledElement="sdncAdapter">
      <bpmn2:extensionElements>
        <camunda:out source="WorkflowException" target="WorkflowException" />
        <camunda:in source="sdncAdapterWorkflowRequest" target="sdncAdapterWorkflowRequest" />
        <camunda:in source="mso-request-id" target="mso-request-id" />
        <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
        <camunda:out source="sdncAdapterResponse" target="DCVFMR_DoCreateVfModuleRollbackResponse" />
        <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
      </bpmn2:extensionElements>
      <bpmn2:incoming>SequenceFlow_32</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
    </bpmn2:callActivity>
    <bpmn2:exclusiveGateway id="ExclusiveGateway_5" name="Delete AAI VF Modlue?" default="SequenceFlow_21">
      <bpmn2:incoming>SequenceFlow_20</bpmn2:incoming>
      <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
      <bpmn2:incoming>SequenceFlow_12otwa4</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_21</bpmn2:outgoing>
      <bpmn2:outgoing>SequenceFlow_24</bpmn2:outgoing>
    </bpmn2:exclusiveGateway>
    <bpmn2:sequenceFlow id="SequenceFlow_21" name="no" sourceRef="ExclusiveGateway_5" targetRef="SetSuccessfulRollbackStatus" />
    <bpmn2:sequenceFlow id="SequenceFlow_24" name="yes" sourceRef="ExclusiveGateway_5" targetRef="DeleteAAIVfModulePrep">
      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable("DCVFMR_rollbackCreateAAIVfModule") == "true"}</bpmn2:conditionExpression>
    </bpmn2:sequenceFlow>
    <bpmn2:callActivity id="InvokeDeleteAAIVfModule" name="Invoke&#10;DeleteAAIVfModule" calledElement="DeleteAAIVfModule">
      <bpmn2:extensionElements>
        <camunda:in source="DeleteAAIVfModuleRequest" target="DeleteAAIVfModuleRequest" />
        <camunda:in source="isVidRequest" target="isVidRequest" />
        <camunda:out source="WorkflowException" target="WorkflowException" />
        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
      </bpmn2:extensionElements>
      <bpmn2:incoming>SequenceFlow_34</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_35</bpmn2:outgoing>
    </bpmn2:callActivity>
    <bpmn2:sequenceFlow id="SequenceFlow_35" name="" sourceRef="InvokeDeleteAAIVfModule" targetRef="SetSuccessfulRollbackStatus" />
    <bpmn2:endEvent id="EndEvent_9">
      <bpmn2:incoming>SequenceFlow_0ggp8wz</bpmn2:incoming>
      <bpmn2:incoming>SequenceFlow_1h8ve60</bpmn2:incoming>
    </bpmn2:endEvent>
    <bpmn2:scriptTask id="DeleteAAIVfModulePrep" name="DeleteAAIVfModule&#10;Prep" scriptFormat="groovy">
      <bpmn2:incoming>SequenceFlow_24</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_34</bpmn2:outgoing>
      <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
def dcvfmr = new DoCreateVfModuleRollback()
dcvfmr.prepDeleteAAIVfModule(execution)</bpmn2:script>
    </bpmn2:scriptTask>
    <bpmn2:sequenceFlow id="SequenceFlow_34" name="" sourceRef="DeleteAAIVfModulePrep" targetRef="InvokeDeleteAAIVfModule" />
    <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="InvokeSDNCAdapterV1_2" targetRef="ScriptTask_1" />
    <bpmn2:scriptTask id="ScriptTask_1" name="Validate SDNC Response" scriptFormat="groovy">
      <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
      <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
def dcvfmr = new DoCreateVfModuleRollback()
dcvfmr.sdncValidateResponse(execution, DCVFMR_DoCreateVfModuleRollbackResponse)</bpmn2:script>
    </bpmn2:scriptTask>
    <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="ScriptTask_1" targetRef="ExclusiveGateway_5" />
    <bpmn2:subProcess id="SubProcess_1" name="Rollback Error Handling" triggeredByEvent="true">
      <bpmn2:startEvent id="CatchExceptions" name="Catch Exceptions">
        <bpmn2:outgoing>SequenceFlow_12</bpmn2:outgoing>
        <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" />
      </bpmn2:startEvent>
      <bpmn2:endEvent id="EndEvent_1">
        <bpmn2:incoming>SequenceFlow_22</bpmn2:incoming>
      </bpmn2:endEvent>
      <bpmn2:sequenceFlow id="SequenceFlow_22" name="" sourceRef="LogSaveWorkflowException" targetRef="EndEvent_1" />
      <bpmn2:sequenceFlow id="SequenceFlow_12" name="" sourceRef="CatchExceptions" targetRef="SetFailedRollbackStatus" />
      <bpmn2:scriptTask id="LogSaveWorkflowException" name="Log and Save Workflow Exception" scriptFormat="groovy">
        <bpmn2:incoming>SequenceFlow_02fx6z6</bpmn2:incoming>
        <bpmn2:outgoing>SequenceFlow_22</bpmn2:outgoing>
        <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
def dcvfmr = new DoCreateVfModuleRollback()
dcvfmr.logWorkflowException(execution, 'DoCreateVfModuleRollback caught an event')
dcvfmr.saveWorkflowException(execution, 'DCVFMR_CaughtWorkflowException1')</bpmn2:script>
      </bpmn2:scriptTask>
      <bpmn2:sequenceFlow id="SequenceFlow_02fx6z6" sourceRef="SetFailedRollbackStatus" targetRef="LogSaveWorkflowException" />
      <bpmn2:scriptTask id="SetFailedRollbackStatus" name="Set Failed Rollback Status" scriptFormat="groovy">
        <bpmn2:incoming>SequenceFlow_12</bpmn2:incoming>
        <bpmn2:outgoing>SequenceFlow_02fx6z6</bpmn2:outgoing>
        <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
def dcvfmr = new DoCreateVfModuleRollback()
dcvfmr.setFailedRollbackStatus(execution)</bpmn2:script>
      </bpmn2:scriptTask>
    </bpmn2:subProcess>
    <bpmn2:boundaryEvent id="BoundaryEvent_1" name="" attachedToRef="SubProcess_1">
      <bpmn2:outgoing>SequenceFlow_23</bpmn2:outgoing>
      <bpmn2:errorEventDefinition id="_ErrorEventDefinition_86" />
    </bpmn2:boundaryEvent>
    <bpmn2:endEvent id="EndEvent_2">
      <bpmn2:incoming>SequenceFlow_23</bpmn2:incoming>
    </bpmn2:endEvent>
    <bpmn2:sequenceFlow id="SequenceFlow_23" name="" sourceRef="BoundaryEvent_1" targetRef="EndEvent_2" />
    <bpmn2:scriptTask id="InitializeVariables" name="Initialize Variables" scriptFormat="groovy">
      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
      <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
def dcvfmr = new DoCreateVfModuleRollback()
dcvfmr.preProcessRequest(execution)</bpmn2:script>
    </bpmn2:scriptTask>
    <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="InitializeVariables" targetRef="ExclusiveGateway_1yozzae" />
    <bpmn2:exclusiveGateway id="ExclusiveGateway_0a0hroy" name="Rollback Update AAI Generic VNF?" default="SequenceFlow_185bo77">
      <bpmn2:incoming>SequenceFlow_0djpj3r</bpmn2:incoming>
      <bpmn2:incoming>SequenceFlow_0n58kg1</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_185bo77</bpmn2:outgoing>
      <bpmn2:outgoing>SequenceFlow_111l1he</bpmn2:outgoing>
    </bpmn2:exclusiveGateway>
    <bpmn2:scriptTask id="Task_08csf14" name="Delete Network Policies from AAI" scriptFormat="groovy">
      <bpmn2:incoming>SequenceFlow_0unumxv</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_0djpj3r</bpmn2:outgoing>
      <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
def dcvfmr = new DoCreateVfModuleRollback()
dcvfmr.deleteNetworkPoliciesFromAAI(execution)</bpmn2:script>
    </bpmn2:scriptTask>
    <bpmn2:scriptTask id="Task_18r7u02" name="PreProcess Update AAI Generic VNF" scriptFormat="groovy">
      <bpmn2:incoming>SequenceFlow_111l1he</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_0ca4brn</bpmn2:outgoing>
      <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
def dcvfmr = new DoCreateVfModuleRollback()
dcvfmr.preProcessUpdateAAIGenericVnf(execution)</bpmn2:script>
    </bpmn2:scriptTask>
    <bpmn2:callActivity id="Task_01ajtiy" name="Update AAI Generic VNF" calledElement="UpdateAAIGenericVnf">
      <bpmn2:extensionElements>
        <camunda:in source="DCVFMR_updateAAIGenericVnfRequest" target="UpdateAAIGenericVnfRequest" />
        <camunda:in source="mso-request-id" target="mso-request-id" />
        <camunda:in source="mso-service-id" target="mso-service-id" />
        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
        <camunda:out source="WorkflowException" target="WorkflowException" />
      </bpmn2:extensionElements>
      <bpmn2:incoming>SequenceFlow_0ca4brn</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_19r2uus</bpmn2:outgoing>
    </bpmn2:callActivity>
    <bpmn2:sequenceFlow id="SequenceFlow_0djpj3r" sourceRef="Task_08csf14" targetRef="ExclusiveGateway_0a0hroy" />
    <bpmn2:exclusiveGateway id="ExclusiveGateway_0uvarlv" name="Rollback VNF Adapter Create?" default="SequenceFlow_03i4czf">
      <bpmn2:incoming>SequenceFlow_185bo77</bpmn2:incoming>
      <bpmn2:incoming>SequenceFlow_19r2uus</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_1p0v6yk</bpmn2:outgoing>
      <bpmn2:outgoing>SequenceFlow_03i4czf</bpmn2:outgoing>
    </bpmn2:exclusiveGateway>
    <bpmn2:sequenceFlow id="SequenceFlow_185bo77" name="no" sourceRef="ExclusiveGateway_0a0hroy" targetRef="ExclusiveGateway_0uvarlv" />
    <bpmn2:sequenceFlow id="SequenceFlow_111l1he" name="yes" sourceRef="ExclusiveGateway_0a0hroy" targetRef="Task_18r7u02">
      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable("DCVFMR_rollbackUpdateVnfAAI") == "true"}</bpmn2:conditionExpression>
    </bpmn2:sequenceFlow>
    <bpmn2:sequenceFlow id="SequenceFlow_0ca4brn" sourceRef="Task_18r7u02" targetRef="Task_01ajtiy" />
    <bpmn2:sequenceFlow id="SequenceFlow_19r2uus" sourceRef="Task_01ajtiy" targetRef="ExclusiveGateway_0uvarlv" />
    <bpmn2:sequenceFlow id="SequenceFlow_1p0v6yk" name="yes&#10;&#10;" sourceRef="ExclusiveGateway_0uvarlv" targetRef="VNFAdapterPrep">
      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable("DCVFMR_rollbackVnfAdapterCreate") == "true"}</bpmn2:conditionExpression>
    </bpmn2:sequenceFlow>
    <bpmn2:sequenceFlow id="SequenceFlow_03i4czf" name="no" sourceRef="ExclusiveGateway_0uvarlv" targetRef="ExclusiveGateway_0ahc44p" />
    <bpmn2:exclusiveGateway id="ExclusiveGateway_1yozzae" name="Skip Rollback?" default="SequenceFlow_11er1t8">
      <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_11er1t8</bpmn2:outgoing>
      <bpmn2:outgoing>SequenceFlow_0ggp8wz</bpmn2:outgoing>
    </bpmn2:exclusiveGateway>
    <bpmn2:sequenceFlow id="SequenceFlow_11er1t8" name="no" sourceRef="ExclusiveGateway_1yozzae" targetRef="ExclusiveGateway_1" />
    <bpmn2:sequenceFlow id="SequenceFlow_0ggp8wz" name="yes" sourceRef="ExclusiveGateway_1yozzae" targetRef="EndEvent_9">
      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable("skipRollback" )  == true}</bpmn2:conditionExpression>
    </bpmn2:sequenceFlow>
    <bpmn2:exclusiveGateway id="ExclusiveGateway_1938vz9" name="Rollback Network Policies Creation?" default="SequenceFlow_0n58kg1">
      <bpmn2:incoming>SequenceFlow_06rm0hg</bpmn2:incoming>
      <bpmn2:incoming>SequenceFlow_15</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_0n58kg1</bpmn2:outgoing>
      <bpmn2:outgoing>SequenceFlow_0unumxv</bpmn2:outgoing>
    </bpmn2:exclusiveGateway>
    <bpmn2:scriptTask id="PrepareSDNCDeactivateRequest" name="Prepare SDNC Deactivate Request" scriptFormat="groovy">
      <bpmn2:incoming>SequenceFlow_10</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_0ugalf8</bpmn2:outgoing>
      <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
def dcvfmr = new DoCreateVfModuleRollback()
dcvfmr.preProcessSDNCDeactivateRequest(execution)</bpmn2:script>
    </bpmn2:scriptTask>
    <bpmn2:callActivity id="CallSDNCDeactivate" name="Call SDNC Adapter Deactivate" calledElement="sdncAdapter">
      <bpmn2:extensionElements>
        <camunda:in source="DCVFMR_deactivateSDNCRequest" target="sdncAdapterWorkflowRequest" />
        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
        <camunda:in source="mso-request-id" target="mso-request-id" />
        <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
        <camunda:out source="WorkflowException" target="WorkflowException" />
        <camunda:out source="sdncAdapterResponse" target="DCVFMR_deactivateSDNCAdapterResponse" />
        <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
      </bpmn2:extensionElements>
      <bpmn2:incoming>SequenceFlow_0ugalf8</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_0n78x37</bpmn2:outgoing>
    </bpmn2:callActivity>
    <bpmn2:scriptTask id="PostProcessSDNCDeactivateRequest" name="PostProcess SDNC Deactivate Request" scriptFormat="groovy">
      <bpmn2:incoming>SequenceFlow_0n78x37</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_06rm0hg</bpmn2:outgoing>
      <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
def dcvfmr = new DoCreateVfModuleRollback()
String response = execution.getVariable("DCVFMR_deactivateSDNCAdapterResponse")
dcvfmr.sdncValidateResponse(execution, response)</bpmn2:script>
    </bpmn2:scriptTask>
    <bpmn2:sequenceFlow id="SequenceFlow_0ugalf8" sourceRef="PrepareSDNCDeactivateRequest" targetRef="CallSDNCDeactivate" />
    <bpmn2:sequenceFlow id="SequenceFlow_0n78x37" sourceRef="CallSDNCDeactivate" targetRef="PostProcessSDNCDeactivateRequest" />
    <bpmn2:sequenceFlow id="SequenceFlow_06rm0hg" sourceRef="PostProcessSDNCDeactivateRequest" targetRef="ExclusiveGateway_1938vz9" />
    <bpmn2:sequenceFlow id="SequenceFlow_0n58kg1" name="no" sourceRef="ExclusiveGateway_1938vz9" targetRef="ExclusiveGateway_0a0hroy" />
    <bpmn2:sequenceFlow id="SequenceFlow_0unumxv" name="yes" sourceRef="ExclusiveGateway_1938vz9" targetRef="Task_08csf14">
      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable("DCVFMR_rollbackCreateNetworkPoliciesAAI") == "true"}</bpmn2:conditionExpression>
    </bpmn2:sequenceFlow>
    <bpmn2:sequenceFlow id="SequenceFlow_1iufuuu" sourceRef="PrepareSDNCUnassignRequest" targetRef="CallSDNCAdapterUnassign" />
    <bpmn2:sequenceFlow id="SequenceFlow_1l4n37b" sourceRef="CallSDNCAdapterUnassign" targetRef="PostProcessSDNCUnassignRequest" />
    <bpmn2:scriptTask id="PrepareSDNCUnassignRequest" name="Prepare SDNC Unassign Request" scriptFormat="groovy">
      <bpmn2:incoming>SequenceFlow_16ghmax</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_1iufuuu</bpmn2:outgoing>
      <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
def dcvfmr = new DoCreateVfModuleRollback()
dcvfmr.preProcessSDNCUnassignRequest(execution)</bpmn2:script>
    </bpmn2:scriptTask>
    <bpmn2:callActivity id="CallSDNCAdapterUnassign" name="Call SDNC Adapter Unassign" calledElement="sdncAdapter">
      <bpmn2:extensionElements>
        <camunda:in source="DCVFMR_unassignSDNCRequest" target="sdncAdapterWorkflowRequest" />
        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
        <camunda:in source="mso-request-id" target="mso-request-id" />
        <camunda:in source="mso-service-instance-id" target="mso-service-instance-id" />
        <camunda:out source="WorkflowException" target="WorkflowException" />
        <camunda:out source="sdncAdapterResponse" target="DCVFMR_unassignSDNCAdapterResponse" />
        <camunda:out source="SDNCA_SuccessIndicator" target="SDNCA_SuccessIndicator" />
      </bpmn2:extensionElements>
      <bpmn2:incoming>SequenceFlow_1iufuuu</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_1l4n37b</bpmn2:outgoing>
    </bpmn2:callActivity>
    <bpmn2:scriptTask id="PostProcessSDNCUnassignRequest" name="PostProcess SDNC Unassign Request" scriptFormat="groovy">
      <bpmn2:incoming>SequenceFlow_1l4n37b</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_12otwa4</bpmn2:outgoing>
      <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
def dcvfmr = new DoCreateVfModuleRollback()
String response = execution.getVariable("DCVFMR_unassignSDNCAdapterResponse")
dcvfmr.sdncValidateResponse(execution, response)</bpmn2:script>
    </bpmn2:scriptTask>
    <bpmn2:exclusiveGateway id="ExclusiveGateway_1h87hhh" name="Rollback 1707 SDNC Activate?" default="SequenceFlow_1rpg6ac">
      <bpmn2:incoming>SequenceFlow_19</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_1rpg6ac</bpmn2:outgoing>
      <bpmn2:outgoing>SequenceFlow_16ghmax</bpmn2:outgoing>
    </bpmn2:exclusiveGateway>
    <bpmn2:sequenceFlow id="SequenceFlow_1rpg6ac" name="no" sourceRef="ExclusiveGateway_1h87hhh" targetRef="SDNCAdapterPrep2" />
    <bpmn2:sequenceFlow id="SequenceFlow_16ghmax" name="yes" sourceRef="ExclusiveGateway_1h87hhh" targetRef="PrepareSDNCUnassignRequest">
      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">#{execution.getVariable("DCVFMR_rollbackSDNCRequestAssign") == "true" &amp;&amp; execution.getVariable("sdncVersion") == "1707"}</bpmn2:conditionExpression>
    </bpmn2:sequenceFlow>
    <bpmn2:sequenceFlow id="SequenceFlow_12otwa4" sourceRef="PostProcessSDNCUnassignRequest" targetRef="ExclusiveGateway_5" />
    <bpmn2:sequenceFlow id="SequenceFlow_1h8ve60" sourceRef="SetSuccessfulRollbackStatus" targetRef="EndEvent_9" />
    <bpmn2:scriptTask id="SetSuccessfulRollbackStatus" name="Set Successful Rollback Status" scriptFormat="groovy">
      <bpmn2:incoming>SequenceFlow_21</bpmn2:incoming>
      <bpmn2:incoming>SequenceFlow_35</bpmn2:incoming>
      <bpmn2:incoming>SequenceFlow_17it51d</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_1h8ve60</bpmn2:outgoing>
      <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
def dcvfmr = new DoCreateVfModuleRollback()
dcvfmr.setSuccessfulRollbackStatus(execution)</bpmn2:script>
    </bpmn2:scriptTask>
    <bpmn2:exclusiveGateway id="ExclusiveGateway_0ahc44p" name="Set AAI Status to Assigned?" default="SequenceFlow_1gcfdej">
      <bpmn2:incoming>SequenceFlow_03i4czf</bpmn2:incoming>
      <bpmn2:incoming>SequenceFlow_08aruzz</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_1gcfdej</bpmn2:outgoing>
      <bpmn2:outgoing>SequenceFlow_17ne2iz</bpmn2:outgoing>
    </bpmn2:exclusiveGateway>
    <bpmn2:sequenceFlow id="SequenceFlow_1gcfdej" name="no" sourceRef="ExclusiveGateway_0ahc44p" targetRef="ExclusiveGateway_3" />
    <bpmn2:sequenceFlow id="SequenceFlow_17ne2iz" name="yes" sourceRef="ExclusiveGateway_0ahc44p" targetRef="Task_1sqxedz">
      <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" language="groovy">execution.getVariable('aLaCarte') == true &amp;&amp; execution.getVariable("DCVFMR_rollbackSDNCRequestAssign") == "true"</bpmn2:conditionExpression>
    </bpmn2:sequenceFlow>
    <bpmn2:sequenceFlow id="SequenceFlow_17it51d" sourceRef="Task_0k9gnp2" targetRef="SetSuccessfulRollbackStatus" />
    <bpmn2:sequenceFlow id="SequenceFlow_0fvuowt" sourceRef="Task_1sqxedz" targetRef="Task_0k9gnp2" />
    <bpmn2:callActivity id="Task_0k9gnp2" name="Invoke UpdateAAIVfModule to Assigned" calledElement="UpdateAAIVfModule">
      <bpmn2:extensionElements>
        <camunda:in source="UpdateAAIVfModuleRequest" target="UpdateAAIVfModuleRequest" />
        <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
        <camunda:out source="WorkflowException" target="WorkflowException" />
      </bpmn2:extensionElements>
      <bpmn2:incoming>SequenceFlow_0fvuowt</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_17it51d</bpmn2:outgoing>
    </bpmn2:callActivity>
    <bpmn2:scriptTask id="Task_1sqxedz" name="UpdateAAIVfModule To Assigned Prep" scriptFormat="groovy">
      <bpmn2:incoming>SequenceFlow_17ne2iz</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_0fvuowt</bpmn2:outgoing>
      <bpmn2:script>import org.onap.so.bpmn.infrastructure.scripts.*
def dcvfmr = new DoCreateVfModuleRollback()
dcvfmr.prepUpdateAAIVfModuleToAssigned(execution)</bpmn2:script>
    </bpmn2:scriptTask>
    <bpmn2:sequenceFlow id="SequenceFlow_08aruzz" sourceRef="InvokeVNFAdapter" targetRef="ExclusiveGateway_0ahc44p" />
  </bpmn2:process>
  <bpmn2:error id="Error_1" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
  <bpmn2:message id="Message_1" name="DoCreateVfModuleRollbackRequest" />
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateVfModuleRollback">
      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_37" bpmnElement="StartEvent_1">
        <dc:Bounds x="203" y="210" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="31" y="141" width="0" height="0" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_22" bpmnElement="InitializeVariables">
        <dc:Bounds x="305" y="188" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_37" targetElement="_BPMNShape_ScriptTask_22">
        <di:waypoint x="239" y="228" />
        <di:waypoint x="305" y="228" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="82" y="103" width="0" height="0" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_160" bpmnElement="InvokePrepareUpdateAAIVfModule">
        <dc:Bounds x="915" y="133" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_170" bpmnElement="VNFAdapterPrep">
        <dc:Bounds x="294" y="873" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_13" bpmnElement="InvokeVNFAdapter">
        <dc:Bounds x="452" y="873" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_16" sourceElement="_BPMNShape_ScriptTask_170" targetElement="_BPMNShape_CallActivity_13">
        <di:waypoint x="394" y="913" />
        <di:waypoint x="452" y="913" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="225" y="803" width="0" height="0" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_171" bpmnElement="UpdateAAIVfModulePrep">
        <dc:Bounds x="922" y="868" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_14" bpmnElement="InvokeUpdateAAIVfModule">
        <dc:Bounds x="1102" y="868" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_172" bpmnElement="SDNCAdapterPrep2">
        <dc:Bounds x="377" y="1105" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_15" bpmnElement="InvokeSDNCAdapterV1_2">
        <dc:Bounds x="517" y="1105" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_173" bpmnElement="DeleteAAIVfModulePrep">
        <dc:Bounds x="894" y="1108" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="_BPMNShape_CallActivity_16" bpmnElement="InvokeDeleteAAIVfModule">
        <dc:Bounds x="1050" y="1108" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_32" bpmnElement="SequenceFlow_32" sourceElement="_BPMNShape_ScriptTask_172" targetElement="_BPMNShape_CallActivity_15">
        <di:waypoint x="477" y="1145" />
        <di:waypoint x="517" y="1145" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="307" y="1035" width="0" height="0" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_34" bpmnElement="SequenceFlow_34" sourceElement="_BPMNShape_ScriptTask_173" targetElement="_BPMNShape_CallActivity_16">
        <di:waypoint x="994" y="1148" />
        <di:waypoint x="1050" y="1148" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="820" y="1038" width="0" height="0" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_169" bpmnElement="EndEvent_9">
        <dc:Bounds x="1349" y="1215" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1177" y="1146" width="0" height="0" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_35" bpmnElement="SequenceFlow_35" sourceElement="_BPMNShape_CallActivity_16" targetElement="ScriptTask_0lrbhgj_di">
        <di:waypoint x="1150" y="1148" />
        <di:waypoint x="1268" y="1148" />
        <di:waypoint x="1268" y="1193" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1019" y="1023" width="0" height="0" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_223" bpmnElement="ExclusiveGateway_1" isMarkerVisible="true">
        <dc:Bounds x="728" y="203" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="708" y="262" width="90" height="40" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ScriptTask_22" targetElement="ExclusiveGateway_1yozzae_di">
        <di:waypoint x="405" y="228" />
        <di:waypoint x="468" y="228" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="247" y="103" width="0" height="0" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_224" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
        <dc:Bounds x="1102" y="202" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1087" y="262" width="80" height="27" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ExclusiveGateway_223">
        <di:waypoint x="753" y="203" />
        <di:waypoint x="753" y="173" />
        <di:waypoint x="915" y="173" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="764" y="149" width="17" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_160" targetElement="_BPMNShape_ExclusiveGateway_224">
        <di:waypoint x="1015" y="173" />
        <di:waypoint x="1052" y="173" />
        <di:waypoint x="1127" y="173" />
        <di:waypoint x="1127" y="202" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="888" y="63" width="6" height="6" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ExclusiveGateway_223" targetElement="_BPMNShape_ExclusiveGateway_224">
        <di:waypoint x="778" y="228" />
        <di:waypoint x="1102" y="227" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="933" y="228" width="13" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_10" sourceElement="_BPMNShape_ExclusiveGateway_224" targetElement="ScriptTask_17dmaj7_di">
        <di:waypoint x="1127" y="252" />
        <di:waypoint x="1127" y="339" />
        <di:waypoint x="219" y="339" />
        <di:waypoint x="219" y="431" />
        <di:waypoint x="393" y="431" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="692" y="345" width="17" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_225" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
        <dc:Bounds x="784" y="947" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="769" y="1002" width="81" height="27" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ExclusiveGateway_225" targetElement="_BPMNShape_ScriptTask_171">
        <di:waypoint x="834" y="972" />
        <di:waypoint x="855" y="972" />
        <di:waypoint x="855" y="908" />
        <di:waypoint x="922" y="908" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="878" y="913" width="17" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ScriptTask_171" targetElement="_BPMNShape_CallActivity_14">
        <di:waypoint x="1022" y="908" />
        <di:waypoint x="1102" y="908" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="843" y="798" width="0" height="0" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_226" bpmnElement="ExclusiveGateway_4" isMarkerVisible="true">
        <dc:Bounds x="1282" y="947" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1269" y="1002" width="77" height="27" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_15" sourceElement="_BPMNShape_ExclusiveGateway_224" targetElement="ExclusiveGateway_1938vz9_di">
        <di:waypoint x="1152" y="227" />
        <di:waypoint x="1215" y="227" />
        <di:waypoint x="1215" y="322" />
        <di:waypoint x="209" y="322" />
        <di:waypoint x="209" y="492" />
        <di:waypoint x="1112" y="492" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="691" y="297" width="13" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="SequenceFlow_17" sourceElement="_BPMNShape_ExclusiveGateway_225" targetElement="_BPMNShape_ExclusiveGateway_226">
        <di:waypoint x="834" y="972" />
        <di:waypoint x="1282" y="972" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1045" y="972" width="13" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="SequenceFlow_18" sourceElement="_BPMNShape_CallActivity_14" targetElement="_BPMNShape_ExclusiveGateway_226">
        <di:waypoint x="1202" y="908" />
        <di:waypoint x="1307" y="908" />
        <di:waypoint x="1307" y="947" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1090" y="798" width="0" height="0" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_19" bpmnElement="SequenceFlow_19" sourceElement="_BPMNShape_ExclusiveGateway_226" targetElement="ExclusiveGateway_1h87hhh_di">
        <di:waypoint x="1307" y="997" />
        <di:waypoint x="1307" y="1068" />
        <di:waypoint x="224" y="1068" />
        <di:waypoint x="224" y="1213" />
        <di:waypoint x="246" y="1213" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="453" y="1068" width="17" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_227" bpmnElement="ExclusiveGateway_5" isMarkerVisible="true">
        <dc:Bounds x="779" y="1208" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="769" y="1263" width="70" height="27" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_20" bpmnElement="SequenceFlow_20" sourceElement="_BPMNShape_ExclusiveGateway_226" targetElement="_BPMNShape_ExclusiveGateway_227">
        <di:waypoint x="1282" y="972" />
        <di:waypoint x="1219" y="972" />
        <di:waypoint x="1219" y="1052" />
        <di:waypoint x="215" y="1052" />
        <di:waypoint x="215" y="1356" />
        <di:waypoint x="804" y="1356" />
        <di:waypoint x="804" y="1258" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1166" y="1022" width="13" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_21" bpmnElement="SequenceFlow_21" sourceElement="_BPMNShape_ExclusiveGateway_227" targetElement="ScriptTask_0lrbhgj_di">
        <di:waypoint x="829" y="1233" />
        <di:waypoint x="1218" y="1233" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1001" y="1233" width="13" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_24" bpmnElement="SequenceFlow_24" sourceElement="_BPMNShape_ExclusiveGateway_227" targetElement="_BPMNShape_ScriptTask_173">
        <di:waypoint x="829" y="1233" />
        <di:waypoint x="854" y="1233" />
        <di:waypoint x="854" y="1177" />
        <di:waypoint x="854" y="1148" />
        <di:waypoint x="894" y="1148" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="870" y="1154" width="17" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_255" bpmnElement="ScriptTask_1">
        <dc:Bounds x="651" y="1105" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_CallActivity_15" targetElement="_BPMNShape_ScriptTask_255">
        <di:waypoint x="617" y="1145" />
        <di:waypoint x="651" y="1145" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="446" y="1035" width="0" height="0" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_255" targetElement="_BPMNShape_ExclusiveGateway_227">
        <di:waypoint x="751" y="1145" />
        <di:waypoint x="804" y="1145" />
        <di:waypoint x="804" y="1208" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="614" y="1040" width="0" height="0" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="_BPMNShape_SubProcess_22" bpmnElement="SubProcess_1" isExpanded="true">
        <dc:Bounds x="217" y="1574" width="699" height="159" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_59" bpmnElement="CatchExceptions">
        <dc:Bounds x="237" y="1625" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="243" y="1670" width="87" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_281" bpmnElement="LogSaveWorkflowException">
        <dc:Bounds x="581" y="1603" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_188" bpmnElement="EndEvent_1">
        <dc:Bounds x="755" y="1625" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="583" y="1551" width="0" height="0" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_55" bpmnElement="BoundaryEvent_1">
        <dc:Bounds x="898" y="1624" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="726" y="1550" width="0" height="0" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="_BPMNShape_EndEvent_189" bpmnElement="EndEvent_2">
        <dc:Bounds x="1070" y="1624" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="898" y="1555" width="0" height="0" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_23" bpmnElement="SequenceFlow_23" sourceElement="_BPMNShape_BoundaryEvent_55" targetElement="_BPMNShape_EndEvent_189">
        <di:waypoint x="934" y="1642" />
        <di:waypoint x="1008" y="1642" />
        <di:waypoint x="1008" y="1642" />
        <di:waypoint x="1070" y="1642" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="833" y="1532" width="0" height="0" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="ExclusiveGateway_0a0hroy_di" bpmnElement="ExclusiveGateway_0a0hroy" isMarkerVisible="true">
        <dc:Bounds x="603" y="698" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="584" y="748" width="90" height="27" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ScriptTask_0mnb4d7_di" bpmnElement="Task_08csf14">
        <dc:Bounds x="402" y="617" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ScriptTask_1shi2a6_di" bpmnElement="Task_18r7u02">
        <dc:Bounds x="742" y="617" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="CallActivity_0zvct4i_di" bpmnElement="Task_01ajtiy">
        <dc:Bounds x="937" y="617" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_0djpj3r_di" bpmnElement="SequenceFlow_0djpj3r">
        <di:waypoint x="502" y="657" />
        <di:waypoint x="628" y="657" />
        <di:waypoint x="628" y="699" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="375" y="532" width="0" height="0" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="ExclusiveGateway_0uvarlv_di" bpmnElement="ExclusiveGateway_0uvarlv" isMarkerVisible="true">
        <dc:Bounds x="1111" y="698" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1096" y="748" width="80" height="27" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_185bo77_di" bpmnElement="SequenceFlow_185bo77">
        <di:waypoint x="653" y="723" />
        <di:waypoint x="882" y="723" />
        <di:waypoint x="882" y="723" />
        <di:waypoint x="1111" y="723" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="891" y="723" width="13" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_111l1he_di" bpmnElement="SequenceFlow_111l1he">
        <di:waypoint x="653" y="723" />
        <di:waypoint x="683" y="723" />
        <di:waypoint x="683" y="657" />
        <di:waypoint x="742" y="657" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="699" y="663" width="17" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_0ca4brn_di" bpmnElement="SequenceFlow_0ca4brn">
        <di:waypoint x="842" y="657" />
        <di:waypoint x="883" y="657" />
        <di:waypoint x="883" y="657" />
        <di:waypoint x="937" y="657" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="708" y="547" width="0" height="0" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_19r2uus_di" bpmnElement="SequenceFlow_19r2uus">
        <di:waypoint x="1037" y="657" />
        <di:waypoint x="1136" y="657" />
        <di:waypoint x="1136" y="698" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="897" y="532" width="0" height="0" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_1p0v6yk_di" bpmnElement="SequenceFlow_1p0v6yk">
        <di:waypoint x="1136" y="748" />
        <di:waypoint x="1136" y="834" />
        <di:waypoint x="237" y="834" />
        <di:waypoint x="237" y="913" />
        <di:waypoint x="294" y="913" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="698" y="842" width="17" height="40" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_03i4czf_di" bpmnElement="SequenceFlow_03i4czf">
        <di:waypoint x="1161" y="723" />
        <di:waypoint x="1226" y="723" />
        <di:waypoint x="1226" y="819" />
        <di:waypoint x="220" y="819" />
        <di:waypoint x="220" y="972" />
        <di:waypoint x="656" y="972" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="698" y="793" width="13" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="ExclusiveGateway_1yozzae_di" bpmnElement="ExclusiveGateway_1yozzae" isMarkerVisible="true">
        <dc:Bounds x="468" y="203" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="457" y="253" width="73" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_11er1t8_di" bpmnElement="SequenceFlow_11er1t8">
        <di:waypoint x="518" y="228" />
        <di:waypoint x="728" y="228" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="547" y="202" width="13" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_0ggp8wz_di" bpmnElement="SequenceFlow_0ggp8wz">
        <di:waypoint x="493" y="203" />
        <di:waypoint x="493" y="99" />
        <di:waypoint x="1348" y="99" />
        <di:waypoint x="1367" y="1215" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="914" y="84" width="17" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_22" bpmnElement="SequenceFlow_22" sourceElement="_BPMNShape_ScriptTask_281" targetElement="_BPMNShape_EndEvent_188">
        <di:waypoint x="681" y="1643" />
        <di:waypoint x="755" y="1643" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="528" y="1518" width="0" height="0" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_12" bpmnElement="SequenceFlow_12" sourceElement="_BPMNShape_StartEvent_59" targetElement="ScriptTask_0cd144f_di">
        <di:waypoint x="273" y="1643" />
        <di:waypoint x="388" y="1643" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="141" y="1518" width="0" height="0" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="ExclusiveGateway_1938vz9_di" bpmnElement="ExclusiveGateway_1938vz9" isMarkerVisible="true">
        <dc:Bounds x="1112" y="467" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1093" y="517" width="89" height="27" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ScriptTask_17dmaj7_di" bpmnElement="PrepareSDNCDeactivateRequest">
        <dc:Bounds x="394" y="391" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="CallActivity_0ouj5y6_di" bpmnElement="CallSDNCDeactivate">
        <dc:Bounds x="591" y="390" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ScriptTask_1fmh02z_di" bpmnElement="PostProcessSDNCDeactivateRequest">
        <dc:Bounds x="803" y="390" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_0ugalf8_di" bpmnElement="SequenceFlow_0ugalf8">
        <di:waypoint x="494" y="431" />
        <di:waypoint x="591" y="430" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="353" y="295.5" width="0" height="0" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_0n78x37_di" bpmnElement="SequenceFlow_0n78x37">
        <di:waypoint x="691" y="430" />
        <di:waypoint x="803" y="430" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="557" y="295" width="0" height="0" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_06rm0hg_di" bpmnElement="SequenceFlow_06rm0hg">
        <di:waypoint x="903" y="430" />
        <di:waypoint x="1137" y="430" />
        <di:waypoint x="1137" y="467" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="830" y="305" width="0" height="0" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_0n58kg1_di" bpmnElement="SequenceFlow_0n58kg1">
        <di:waypoint x="1162" y="492" />
        <di:waypoint x="1223" y="492" />
        <di:waypoint x="1223" y="576" />
        <di:waypoint x="204" y="576" />
        <di:waypoint x="204" y="723" />
        <di:waypoint x="603" y="723" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="698" y="554" width="13" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_0unumxv_di" bpmnElement="SequenceFlow_0unumxv">
        <di:waypoint x="1137" y="517" />
        <di:waypoint x="1137" y="592" />
        <di:waypoint x="222" y="592" />
        <di:waypoint x="222" y="657" />
        <di:waypoint x="401" y="657" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="697" y="603" width="17" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_1iufuuu_di" bpmnElement="SequenceFlow_1iufuuu">
        <di:waypoint x="477" y="1287" />
        <di:waypoint x="518" y="1287" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="308" y="1162" width="0" height="0" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_1l4n37b_di" bpmnElement="SequenceFlow_1l4n37b">
        <di:waypoint x="618" y="1287" />
        <di:waypoint x="659" y="1286" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="449" y="1161.5" width="0" height="0" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="ScriptTask_0qvylv2_di" bpmnElement="PrepareSDNCUnassignRequest">
        <dc:Bounds x="377" y="1248" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="CallActivity_1stidyk_di" bpmnElement="CallSDNCAdapterUnassign">
        <dc:Bounds x="518" y="1247" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ScriptTask_1ub9z2k_di" bpmnElement="PostProcessSDNCUnassignRequest">
        <dc:Bounds x="659" y="1246" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ExclusiveGateway_1h87hhh_di" bpmnElement="ExclusiveGateway_1h87hhh" isMarkerVisible="true">
        <dc:Bounds x="246" y="1188" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="231" y="1238" width="80" height="27" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_1rpg6ac_di" bpmnElement="SequenceFlow_1rpg6ac">
        <di:waypoint x="271" y="1188" />
        <di:waypoint x="271" y="1145" />
        <di:waypoint x="377" y="1145" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="290" y="1121" width="13" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_16ghmax_di" bpmnElement="SequenceFlow_16ghmax">
        <di:waypoint x="271" y="1238" />
        <di:waypoint x="271" y="1288" />
        <di:waypoint x="377" y="1288" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="283" y="1292" width="17" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_12otwa4_di" bpmnElement="SequenceFlow_12otwa4">
        <di:waypoint x="759" y="1286" />
        <di:waypoint x="769" y="1286" />
        <di:waypoint x="769" y="1233" />
        <di:waypoint x="779" y="1233" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="594" y="1139.5" width="0" height="0" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_1h8ve60_di" bpmnElement="SequenceFlow_1h8ve60">
        <di:waypoint x="1318" y="1233" />
        <di:waypoint x="1349" y="1233" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1144" y="1108" width="0" height="0" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="ScriptTask_0lrbhgj_di" bpmnElement="SetSuccessfulRollbackStatus">
        <dc:Bounds x="1218" y="1193" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_02fx6z6_di" bpmnElement="SequenceFlow_02fx6z6">
        <di:waypoint x="488" y="1643" />
        <di:waypoint x="581" y="1643" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="345" y="1518" width="0" height="0" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="ScriptTask_0cd144f_di" bpmnElement="SetFailedRollbackStatus">
        <dc:Bounds x="388" y="1603" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ExclusiveGateway_0ahc44p_di" bpmnElement="ExclusiveGateway_0ahc44p" isMarkerVisible="true">
        <dc:Bounds x="656" y="947" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="689" y="915" width="84" height="27" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_1gcfdej_di" bpmnElement="SequenceFlow_1gcfdej">
        <di:waypoint x="706" y="972" />
        <di:waypoint x="784" y="972" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="741" y="947" width="13" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_17ne2iz_di" bpmnElement="SequenceFlow_17ne2iz">
        <di:waypoint x="681" y="997" />
        <di:waypoint x="681" y="1041" />
        <di:waypoint x="152" y="1041" />
        <di:waypoint x="152" y="1457" />
        <di:waypoint x="294" y="1457" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="650" y="995" width="17" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_17it51d_di" bpmnElement="SequenceFlow_17it51d">
        <di:waypoint x="552" y="1457" />
        <di:waypoint x="1268" y="1457" />
        <di:waypoint x="1268" y="1273" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="720" y="1332" width="0" height="0" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_0fvuowt_di" bpmnElement="SequenceFlow_0fvuowt">
        <di:waypoint x="394" y="1457" />
        <di:waypoint x="452" y="1457" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="233" y="1332" width="0" height="0" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="CallActivity_0i5a02m_di" bpmnElement="Task_0k9gnp2">
        <dc:Bounds x="452" y="1417" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ScriptTask_008e45v_di" bpmnElement="Task_1sqxedz">
        <dc:Bounds x="294" y="1418" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_08aruzz_di" bpmnElement="SequenceFlow_08aruzz">
        <di:waypoint x="552" y="913" />
        <di:waypoint x="681" y="913" />
        <di:waypoint x="681" y="947" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="427" y="778" width="0" height="0" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn2:definitions>
, Object> propertiesNotToMatch = new EnumMap<>(GraphPropertyEnum.class);
- propertiesNotToMatch.put(GraphPropertyEnum.IS_DELETED, true);
- Either<List<GraphVertex>, JanusGraphOperationStatus> byCriteria = janusGraphDao
- .getByCriteria(VertexTypeEnum.TOPOLOGY_TEMPLATE, propertiesToMatch, propertiesNotToMatch,
- JsonParseFlagEnum.ParseAll);
- return byCriteria.either(this::proceed, this::handleError);
- }
-
- @Override
- protected StorageOperationStatus handleOneContainer(GraphVertex containerVorig) {
- StorageOperationStatus status = StorageOperationStatus.NOT_FOUND;
- GraphVertex containerV = getVertexById(containerVorig.getUniqueId());
-
- if (containerV == null) {
- log.error("Unexpected null value for `containerV`");
- } else {
- try {
-
- //update edges to meet above change
- // update LS eges from RFC to NOT_CERTIFIED_CHECKIN
-
- updateEdgeProperty(EdgePropertyEnum.STATE, LifecycleStateEnum.NOT_CERTIFIED_CHECKIN.name(),
- getVertexEdge(containerV, Direction.IN, EdgeLabelEnum.LAST_STATE));
-
- if (containerV.getMetadataProperty(GraphPropertyEnum.DISTRIBUTION_STATUS)
- .equals(DistributionStatusEnum.DISTRIBUTION_APPROVED.name()) || containerV
- .getMetadataProperty(GraphPropertyEnum.DISTRIBUTION_STATUS)
- .equals(DistributionStatusEnum.DISTRIBUTION_REJECTED.name())) {
-
- // update vertex state property from DISTRIBUTION_APPROVED/REJECTED to DISTRIBUTION_NOT_APPROVED state
-
- Map<GraphPropertyEnum, Object> metadataProperties = containerV.getMetadataProperties();
- metadataProperties.put(GraphPropertyEnum.DISTRIBUTION_STATUS,
- DistributionStatusEnum.DISTRIBUTION_NOT_APPROVED.name());
- containerV.setMetadataProperties(metadataProperties);
-
- //update edges to meet above change
- //delete LAST_DISTRIBUTION_STATE_MODIFIER edge
-
- removeEdges(
- getVertexEdge(containerV, Direction.IN, EdgeLabelEnum.LAST_DISTRIBUTION_STATE_MODIFIER));
-
- }
-
- status = updateVertexAndCommit(containerV);
-
- } catch (NullPointerException e) {
- log.error(
- "Null Pointer Exception occurred - this mean we have zombie vertex, migration task will continue anyway",
- e);
- status = StorageOperationStatus.EXEUCTION_FAILED;
- } catch (Exception e) {
- //it is happy flow as well
- log.error("Exception occurred:", e);
- log.error(
- "Migration task will continue anyway, please find below vertex details related to this exception",
- e);
- log.error("containerV.getUniqueId() ---> {} ", containerV.getUniqueId());
-
- } finally {
- if (status != StorageOperationStatus.OK) {
- janusGraphDao.rollback();
- log.info("failed to update vertex ID {} ", containerV.getUniqueId());
- log.info("Storage Operation Status {}", status.toString());
- } else {
- log.info("vertex ID {} successfully updated", containerV.getUniqueId());
- }
- }
- }
-
- return status;
- }
-
-
-}
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig2002/SdcCollapsingRolesCIPstateMigration.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig2002/SdcCollapsingRolesCIPstateMigration.java
deleted file mode 100644
index 463ccd8695..0000000000
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig2002/SdcCollapsingRolesCIPstateMigration.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.sdc.asdctool.migration.tasks.mig2002;
-
-import fj.data.Either;
-import org.apache.tinkerpop.gremlin.structure.Direction;
-import org.apache.tinkerpop.gremlin.structure.Edge;
-import org.apache.tinkerpop.gremlin.structure.Vertex;
-import org.openecomp.sdc.asdctool.enums.LifecycleStateEnum;
-import org.openecomp.sdc.asdctool.migration.core.DBVersion;
-import org.openecomp.sdc.asdctool.migration.core.task.Migration;
-import org.openecomp.sdc.asdctool.migration.core.task.MigrationResult;
-import org.openecomp.sdc.asdctool.migration.tasks.InstanceMigrationBase;
-import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
-import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
-import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
-import org.openecomp.sdc.be.dao.jsongraph.types.EdgePropertyEnum;
-import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
-import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
-import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
-import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum;
-import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Component;
-
-import java.math.BigInteger;
-import java.util.EnumMap;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-@Component
-public class SdcCollapsingRolesCIPstateMigration extends InstanceMigrationBase implements Migration {
-
- private static final Logger log = LoggerFactory.getLogger(SdcCollapsingRolesCIPstateMigration.class);
-
- public SdcCollapsingRolesCIPstateMigration(JanusGraphDao janusGraphDao) {
- super(janusGraphDao);
- }
-
- @Override
- public String description() {
- return "update Service state from CERTIFICATION_IN_PROGRES to NOT_CERTIFIED_CHECKOUT state ";
- }
-
- @Override
- public DBVersion getVersion() {
- return DBVersion.from(BigInteger.valueOf(2002), BigInteger.valueOf(0));
- }
-
- @Override
- public MigrationResult migrate() {
- StorageOperationStatus status = updateServiceLifeCycleState();
- return status == StorageOperationStatus.OK ?
- MigrationResult.success() : MigrationResult.error("failed to service state. Error : " + status);
- }
-
- protected StorageOperationStatus updateServiceLifeCycleState() {
- Map<GraphPropertyEnum, Object> propertiesToMatch = new EnumMap<>(GraphPropertyEnum.class);
- propertiesToMatch.put(GraphPropertyEnum.COMPONENT_TYPE, ComponentTypeEnum.SERVICE.name());
- propertiesToMatch.put(GraphPropertyEnum.STATE, LifecycleStateEnum.CERTIFICATION_IN_PROGRESS.name());
- propertiesToMatch.put(GraphPropertyEnum.IS_HIGHEST_VERSION, true);
- Map<GraphPropertyEnum, Object> propertiesNotToMatch = new EnumMap<>(GraphPropertyEnum.class);
- propertiesNotToMatch.put(GraphPropertyEnum.IS_DELETED, true);
- Either<List<GraphVertex>, JanusGraphOperationStatus> byCriteria = janusGraphDao.getByCriteria(VertexTypeEnum.TOPOLOGY_TEMPLATE, propertiesToMatch, propertiesNotToMatch, JsonParseFlagEnum.ParseAll);
- return byCriteria.either(this::proceed, this::handleError);
- }
-
- @Override
- protected StorageOperationStatus handleOneContainer(GraphVertex containerVorig) {
- StorageOperationStatus status = StorageOperationStatus.NOT_FOUND;
- GraphVertex containerV = getVertexById(containerVorig.getUniqueId());
- try {
-
- // update vertex state property from READY_FOR_CERTIFICATION to NOT_CERTIFIED_CHECKIN state
-
- Map<GraphPropertyEnum, Object> metadataProperties = containerV.getMetadataProperties();
- metadataProperties.put(GraphPropertyEnum.STATE, LifecycleStateEnum.NOT_CERTIFIED_CHECKIN.name());
- containerV.setMetadataProperties(metadataProperties);
-
- //update edges to meet above change
- // remove STATE and LAST_MODIFIER edges
- removeEdges(getVertexEdge(containerV, Direction.IN, EdgeLabelEnum.STATE));
- removeEdges(getVertexEdge(containerV, Direction.IN, EdgeLabelEnum.LAST_MODIFIER));
-
- //find designer with LS = NOT_CERTIFIED_CHECKIN
- Vertex relevantDesigner = findRelevantDesigner(getVertexEdge(containerV, Direction.IN, EdgeLabelEnum.LAST_STATE));
- removeEdges(getVertexEdge(containerV, Direction.IN, EdgeLabelEnum.LAST_STATE));
- Map<EdgePropertyEnum, Object> edgeProperties = new HashMap<>();
- edgeProperties.put(EdgePropertyEnum.STATE, LifecycleStateEnum.NOT_CERTIFIED_CHECKIN.name());
- JanusGraphOperationStatus createSTedgeStatus = janusGraphDao.createEdge(relevantDesigner, containerV.getVertex(), EdgeLabelEnum.STATE, edgeProperties);
- JanusGraphOperationStatus createLMedgeStatus = janusGraphDao.createEdge(relevantDesigner, containerV.getVertex(), EdgeLabelEnum.LAST_MODIFIER, new HashMap<>());
-
- status = updateVertexAndCommit(containerV);
-
- } catch (NullPointerException e) {
- log.error("Null Pointer Exception occurred - this mean we have zombie vertex, migration task will continue anyway", e);
- status = StorageOperationStatus.EXEUCTION_FAILED;
- } catch (Exception e) {
- //it is happy flow as well
- log.error("Exception occurred:", e);
- log.error("Migration task will continue anyway, please find below vertex details related to this exception", e);
- if (containerV != null) {
- log.error("containerV.getUniqueId() ---> {} ", containerV.getUniqueId());
- }
-
- } finally {
- if (status != StorageOperationStatus.OK) {
- janusGraphDao.rollback();
- log.info("failed to update vertex ID {} ", containerV.getUniqueId());
- log.info("Storage Operation Status {}", status.toString());
- } else {
- log.info("vertex ID {} successfully updated", containerV.getUniqueId());
- }
-
- }
- return status;
- }
-
- private Vertex findRelevantDesigner(Iterator<Edge> edges) {
- Vertex vertex = null;
- while (edges.hasNext()) {
- Edge edge = edges.next();
- String state = (String) janusGraphDao.getProperty(edge, EdgePropertyEnum.STATE);
- if (state.equals(LifecycleStateEnum.NOT_CERTIFIED_CHECKIN.name())) {
- vertex = edge.outVertex();
- }
- }
- return vertex;
- }
-
-}
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig2002/SdcCollapsingRolesRFCstateMigration.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig2002/SdcCollapsingRolesRFCstateMigration.java
deleted file mode 100644
index 559715ef5d..0000000000
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/tasks/mig2002/SdcCollapsingRolesRFCstateMigration.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.sdc.asdctool.migration.tasks.mig2002;
-
-import fj.data.Either;
-import org.apache.tinkerpop.gremlin.structure.Direction;
-import org.janusgraph.core.JanusGraphVertex;
-import org.openecomp.sdc.asdctool.enums.LifecycleStateEnum;
-import org.openecomp.sdc.asdctool.migration.core.DBVersion;
-import org.openecomp.sdc.asdctool.migration.core.task.Migration;
-import org.openecomp.sdc.asdctool.migration.core.task.MigrationResult;
-import org.openecomp.sdc.asdctool.migration.tasks.InstanceMigrationBase;
-import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
-import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
-import org.openecomp.sdc.be.dao.jsongraph.types.EdgeLabelEnum;
-import org.openecomp.sdc.be.dao.jsongraph.types.EdgePropertyEnum;
-import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
-import org.openecomp.sdc.be.dao.jsongraph.types.VertexTypeEnum;
-import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
-import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum;
-import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Component;
-
-import java.math.BigInteger;
-import java.util.EnumMap;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-@Component
-public class SdcCollapsingRolesRFCstateMigration extends InstanceMigrationBase implements Migration {
-
- private static final Logger log = LoggerFactory.getLogger(SdcCollapsingRolesRFCstateMigration.class);
-
- public SdcCollapsingRolesRFCstateMigration(JanusGraphDao janusGraphDao) {
- super(janusGraphDao);
- }
-
- @Override
- public String description() {
- return "update Service state from READY_FOR_CERTIFICATION to NOT_CERTIFIED_CHECKOUT state ";
- }
-
- @Override
- public DBVersion getVersion() {
- return DBVersion.from(BigInteger.valueOf(2002), BigInteger.valueOf(0));
- }
-
- @Override
- public MigrationResult migrate() {
- StorageOperationStatus status = updateServiceLifeCycleState();
- return status == StorageOperationStatus.OK ?
- MigrationResult.success() : MigrationResult.error("failed to service state. Error : " + status);
- }
-
- protected StorageOperationStatus updateServiceLifeCycleState() {
- Map<GraphPropertyEnum, Object> propertiesToMatch = new EnumMap<>(GraphPropertyEnum.class);
- propertiesToMatch.put(GraphPropertyEnum.COMPONENT_TYPE, ComponentTypeEnum.SERVICE.name());
- propertiesToMatch.put(GraphPropertyEnum.STATE, LifecycleStateEnum.READY_FOR_CERTIFICATION.name());
- propertiesToMatch.put(GraphPropertyEnum.IS_HIGHEST_VERSION, true);
- Map<GraphPropertyEnum, Object> propertiesNotToMatch = new EnumMap<>(GraphPropertyEnum.class);
- propertiesNotToMatch.put(GraphPropertyEnum.IS_DELETED, true);
- Either<List<GraphVertex>, JanusGraphOperationStatus> byCriteria = janusGraphDao.getByCriteria(VertexTypeEnum.TOPOLOGY_TEMPLATE, propertiesToMatch, propertiesNotToMatch, JsonParseFlagEnum.ParseAll);
- return byCriteria.either(this::proceed, this::handleError);
- }
-
- @Override
- protected StorageOperationStatus handleOneContainer(GraphVertex containerVorig) {
- StorageOperationStatus status = StorageOperationStatus.NOT_FOUND;
- GraphVertex containerV = getVertexById(containerVorig.getUniqueId());
- try {
-
- // update vertex state property from READY_FOR_CERTIFICATION to NOT_CERTIFIED_CHECKIN state
-
- Map<GraphPropertyEnum, Object> metadataProperties = containerV.getMetadataProperties();
- metadataProperties.put(GraphPropertyEnum.STATE, LifecycleStateEnum.NOT_CERTIFIED_CHECKIN.name());
- containerV.setMetadataProperties(metadataProperties);
-
- //update edges to meet above change
-
- List<JanusGraphVertex> stateEdgesOutVertexList = getVertexByEdgeSide(getVertexEdge(containerV, Direction.IN, EdgeLabelEnum.STATE), EdgeSide.OUT);
- List<JanusGraphVertex> lastStateEdgesOutVertexList = getVertexByEdgeSide(getVertexEdge(containerV, Direction.IN, EdgeLabelEnum.LAST_STATE), EdgeSide.OUT);
-
- if (sameUser(stateEdgesOutVertexList, lastStateEdgesOutVertexList)) {
- updateEdgeProperty(EdgePropertyEnum.STATE, LifecycleStateEnum.NOT_CERTIFIED_CHECKIN.name(), getVertexEdge(containerV, Direction.IN, EdgeLabelEnum.STATE));
- removeEdges(getVertexEdge(containerV, Direction.IN, EdgeLabelEnum.LAST_STATE));
- } else {
- removeEdges(getVertexEdge(containerV, Direction.IN, EdgeLabelEnum.STATE));
- removeEdges(getVertexEdge(containerV, Direction.IN, EdgeLabelEnum.LAST_STATE));
- Map<EdgePropertyEnum, Object> edgeProperties = new HashMap<>();
- edgeProperties.put(EdgePropertyEnum.STATE, LifecycleStateEnum.NOT_CERTIFIED_CHECKIN.name());
- janusGraphDao.createEdge(lastStateEdgesOutVertexList.get(0), containerV.getVertex(), EdgeLabelEnum.STATE, edgeProperties);
-
- }
-
- status = updateVertexAndCommit(containerV);
-
- } catch (NullPointerException e) {
- log.error("Null Pointer Exception occurred - this mean we have zombie vertex, migration task will continue anyway", e);
- status = StorageOperationStatus.EXEUCTION_FAILED;
- } catch (Exception e) {
- //it is happy flow as well
- log.error("Exception occurred:", e);
- log.error("Migration task will ?" +
- "" +
- "" +
- ", please find below vertex details related to this exception", e);
- if (containerV != null) {
- log.error("containerV.getUniqueId() ---> {} ", containerV.getUniqueId());
- }
-
- } finally {
- if (status != StorageOperationStatus.OK) {
- janusGraphDao.rollback();
- log.info("failed to update vertex ID {} ", containerV.getUniqueId());
- log.info("Storage Operation Status {}", status.toString());
- } else {
- log.info("vertex ID {} successfully updated", containerV.getUniqueId());
- }
-
- }
- return status;
- }
-
-
-}
diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/tasks/mig1802/SdcCatalogMigrationTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/tasks/mig1802/SdcCatalogMigrationTest.java
deleted file mode 100644
index 2223d2847d..0000000000
--- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/tasks/mig1802/SdcCatalogMigrationTest.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.sdc.asdctool.migration.tasks.mig1802;
-
-import org.junit.Test;
-import org.openecomp.sdc.asdctool.migration.core.DBVersion;
-import org.openecomp.sdc.asdctool.migration.core.task.MigrationResult;
-import org.openecomp.sdc.be.dao.janusgraph.JanusGraphClient;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
-import org.openecomp.sdc.be.model.jsonjanusgraph.operations.TopologyTemplateOperation;
-
-public class SdcCatalogMigrationTest {
-
- private SdcCatalogMigration createTestSubject() {
- return new SdcCatalogMigration(new TopologyTemplateOperation(), new JanusGraphDao(new JanusGraphClient()));
- }
-
- @Test
- public void testDescription() throws Exception {
- SdcCatalogMigration testSubject;
- String result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.description();
- }
-
- @Test
- public void testGetVersion() throws Exception {
- SdcCatalogMigration testSubject;
- DBVersion result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.getVersion();
- }
-
- @Test
- public void testMigrate() throws Exception {
- SdcCatalogMigration testSubject;
- MigrationResult result;
-
- // default test
- testSubject = createTestSubject();
- result = testSubject.migrate();
- }
-}
diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/tasks/mig1806/ForwardPathMigrationTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/tasks/mig1806/ForwardPathMigrationTest.java
deleted file mode 100644
index 5a1f0bf0dc..0000000000
--- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/tasks/mig1806/ForwardPathMigrationTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.sdc.asdctool.migration.tasks.mig1806;
-
-import static org.junit.Assert.assertThat;
-
-import java.math.BigInteger;
-import org.hamcrest.core.Is;
-import org.hamcrest.core.IsNull;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.ExtendWith;
-import org.mockito.Mock;
-import org.mockito.junit.jupiter.MockitoExtension;
-import org.openecomp.sdc.asdctool.migration.core.DBVersion;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
-import org.openecomp.sdc.be.model.jsonjanusgraph.operations.ToscaOperationFacade;
-import org.openecomp.sdc.be.model.operations.impl.UserAdminOperation;
-
-@ExtendWith(MockitoExtension.class)
-class ForwardPathMigrationTest {
-
- private ForwardPathMigration forwardPathMigration = null;
-
- @Mock
- private JanusGraphDao janusGraphDao;
-
- @Mock
- private UserAdminOperation userAdminOperation;
-
- @Mock
- private ToscaOperationFacade toscaOperationFacade;
-
- @BeforeEach
- public void setUp() throws Exception {
- forwardPathMigration = new ForwardPathMigration(janusGraphDao, userAdminOperation, toscaOperationFacade);
- }
-
- @Test
- void testDescription() {
- assertThat(forwardPathMigration, IsNull.notNullValue());
- assertThat("remove corrupted forwarding paths ", Is.is(forwardPathMigration.description()));
- }
-
- @Test
- void testGetVersion() {
- DBVersion dbVersion = DBVersion.from(BigInteger.valueOf(Version.MAJOR.getValue()), BigInteger.valueOf(Version.MINOR.getValue()));
- assertThat(dbVersion, Is.is(forwardPathMigration.getVersion()));
- }
-
- @Test
- void testMigrate() {
- assertThat(forwardPathMigration, IsNull.notNullValue());
- Assertions.assertThrows(NullPointerException.class, () -> {
- forwardPathMigration.migrate();
- });
- }
-}
diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/tasks/mig1806/ResourceLifecycleMigrationTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/tasks/mig1806/ResourceLifecycleMigrationTest.java
deleted file mode 100644
index d11f70c4bb..0000000000
--- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/tasks/mig1806/ResourceLifecycleMigrationTest.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.sdc.asdctool.migration.tasks.mig1806;
-
-import org.hamcrest.core.Is;
-import org.hamcrest.core.IsNull;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnitRunner;
-import org.openecomp.sdc.asdctool.migration.core.DBVersion;
-import org.openecomp.sdc.be.components.lifecycle.LifecycleBusinessLogic;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
-import org.openecomp.sdc.be.model.operations.impl.UserAdminOperation;
-
-import java.math.BigInteger;
-
-import static org.junit.Assert.assertThat;
-
-@RunWith(MockitoJUnitRunner.class)
-public class ResourceLifecycleMigrationTest {
-
- @Mock
- private JanusGraphDao janusGraphDao;
- @Mock
- private LifecycleBusinessLogic lifecycleBusinessLogic;
- @Mock
- private UserAdminOperation userAdminOperation;
-
- ResourceLifecycleMigration resourceLifecycleMigration = null;
-
- @Before
- public void setUp() throws Exception {
- resourceLifecycleMigration =
- new ResourceLifecycleMigration(janusGraphDao, lifecycleBusinessLogic, userAdminOperation);
- }
-
- @Test
- public void testDescription() {
- assertThat(resourceLifecycleMigration,IsNull.notNullValue());
- assertThat("change resource lifecycle state from testing to certified", Is.is(resourceLifecycleMigration.description()));
- }
-
- @Test
- public void testGetVersion() {
- DBVersion dbVersion = DBVersion.from(BigInteger.valueOf(Version.MAJOR.getValue()), BigInteger.valueOf(Version.MINOR.getValue()));
- assertThat(dbVersion, Is.is(resourceLifecycleMigration.getVersion()));
- }
-
- @Test(expected = NullPointerException.class)
- public void testMigrate() {
- assertThat(resourceLifecycleMigration,IsNull.notNullValue());
- resourceLifecycleMigration.migrate();
- }
-}
diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/tasks/mig1806/SDCInstancesMigrationTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/tasks/mig1806/SDCInstancesMigrationTest.java
deleted file mode 100644
index 4721b1eb02..0000000000
--- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/tasks/mig1806/SDCInstancesMigrationTest.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.sdc.asdctool.migration.tasks.mig1806;
-
-import fj.data.Either;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnitRunner;
-import org.openecomp.sdc.asdctool.migration.core.task.MigrationResult;
-import org.openecomp.sdc.asdctool.migration.core.task.MigrationResult.MigrationStatus;
-import org.openecomp.sdc.be.dao.janusgraph.JanusGraphOperationStatus;
-import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
-import org.openecomp.sdc.be.datatypes.elements.ComponentInstanceDataDefinition;
-import org.openecomp.sdc.be.datatypes.elements.CompositionDataDefinition;
-import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
-import org.openecomp.sdc.be.model.jsonjanusgraph.enums.JsonConstantKeysEnum;
-import org.openecomp.sdc.be.model.jsonjanusgraph.operations.NodeTemplateOperation;
-import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import static org.junit.Assert.assertEquals;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.when;
-
-@RunWith(MockitoJUnitRunner.class)
-public class SDCInstancesMigrationTest{
- @Mock
- private JanusGraphDao janusGraphDao;
- @Mock
- private NodeTemplateOperation nodeTemplateOperation;
- @Mock
- GraphVertex topologyTemplateVertex;
-
-
- @Test
- public void testFailedMigration(){
- SDCInstancesMigration instancesMigration = new SDCInstancesMigration(janusGraphDao, nodeTemplateOperation);
- when(janusGraphDao.getByCriteria(any(), any(), any(), any() )).thenReturn(Either.right(
- JanusGraphOperationStatus.GENERAL_ERROR));
-
- MigrationResult migrate = instancesMigration.migrate();
- MigrationStatus migrationStatus = migrate.getMigrationStatus();
- assertEquals(MigrationStatus.FAILED, migrationStatus);
- }
- @Test
- public void testSuccessMigration(){
- SDCInstancesMigration instancesMigration = new SDCInstancesMigration(janusGraphDao, nodeTemplateOperation);
- List<GraphVertex> list = new ArrayList<>();
- GraphVertex vertexOrig = new GraphVertex();
- Map<String, CompositionDataDefinition> jsonComposition = new HashMap<>();
- CompositionDataDefinition composition = new CompositionDataDefinition();
- Map<String, ComponentInstanceDataDefinition> componentInstances = new HashMap<>();
- ComponentInstanceDataDefinition instance = new ComponentInstanceDataDefinition();
- componentInstances.put("instanceId", instance);
- composition.setComponentInstances(componentInstances);
- jsonComposition.put(JsonConstantKeysEnum.COMPOSITION.getValue(), composition);
- vertexOrig.setJson(jsonComposition);
- vertexOrig.setType(ComponentTypeEnum.SERVICE);
- list.add(vertexOrig);
-
-
- when(janusGraphDao.getVertexById(any())).thenReturn(Either.left(vertexOrig));
- when(janusGraphDao.getByCriteria(any(), any(), any(), any() )).thenReturn(Either.left(list));
- when(nodeTemplateOperation.createInstanceEdge(vertexOrig, instance)).thenReturn(StorageOperationStatus.OK);
- when(janusGraphDao.commit()).thenReturn(JanusGraphOperationStatus.OK);
-
- MigrationResult migrate = instancesMigration.migrate();
- MigrationStatus migrationStatus = migrate.getMigrationStatus();
- assertEquals(MigrationStatus.COMPLETED, migrationStatus);
- }
-}
diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/tasks/mig1806/SdcArchiveMigrationTest.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/tasks/mig1806/SdcArchiveMigrationTest.java
deleted file mode 100644
index 03695367b0..0000000000
--- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/tasks/mig1806/SdcArchiveMigrationTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.sdc.asdctool.migration.tasks.mig1806;
-
-import org.hamcrest.core.Is;
-import org.hamcrest.core.IsNull;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnitRunner;
-import org.openecomp.sdc.asdctool.migration.core.DBVersion;
-import org.openecomp.sdc.be.dao.jsongraph.JanusGraphDao;
-
-import java.math.BigInteger;
-
-import static org.junit.Assert.assertThat;
-
-@RunWith(MockitoJUnitRunner.class)
-public class SdcArchiveMigrationTest {
- @Mock
- private JanusGraphDao janusGraphDao;
-
- SdcArchiveMigration sdcArchiveMigration = null;
-
- @Before
- public void setUp() throws Exception {
- sdcArchiveMigration = new SdcArchiveMigration(janusGraphDao);
- }
-
- @Test
- public void testDescription() {
- assertThat(sdcArchiveMigration,IsNull.notNullValue());
- assertThat("add archive node for archiving/restoring components ", Is.is(sdcArchiveMigration.description()));
- }
-
- @Test
- public void testGetVersion() {
- DBVersion dbVersion = DBVersion.from(BigInteger.valueOf(Version.MAJOR.getValue()), BigInteger.valueOf(Version.MINOR.getValue()));
- assertThat(dbVersion, Is.is(sdcArchiveMigration.getVersion()));
- }
-
- @Test(expected = NullPointerException.class)
- public void testMigrate() {
- assertThat(sdcArchiveMigration,IsNull.notNullValue());
- sdcArchiveMigration.migrate();
- }
-}
diff --git a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/tasks/mig1806/Version.java b/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/tasks/mig1806/Version.java
deleted file mode 100644
index 9df5232cce..0000000000
--- a/asdctool/src/test/java/org/openecomp/sdc/asdctool/migration/tasks/mig1806/Version.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.sdc.asdctool.migration.tasks.mig1806;
-
-public enum Version {
-
- MINOR(0), MAJOR(1806);
-
- private final int value;
-
- private Version(final int newValue) {
- value = newValue;
- }
-
- public int getValue() {
- return value;
- }
-}