diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/EsToCassandraDataMigrationConfig.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/EsToCassandraDataMigrationConfig.java
index 2c0471f..3242c27 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/EsToCassandraDataMigrationConfig.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/EsToCassandraDataMigrationConfig.java
@@ -23,6 +23,7 @@
 import org.openecomp.sdc.be.dao.cassandra.ArtifactCassandraDao;
 import org.openecomp.sdc.be.dao.cassandra.AuditCassandraDao;
 import org.openecomp.sdc.be.dao.cassandra.CassandraClient;
+import org.openecomp.sdc.be.dao.cassandra.SdcSchemaFilesCassandraDao;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 
@@ -47,5 +48,9 @@
 	public CassandraClient cassandraClient() {
 		return new CassandraClient();
 	}
-
+	
+	@Bean(name = "sdc-schema-files-cassandra-dao")
+	public SdcSchemaFilesCassandraDao sdcSchemaFilesCassandraDao() {
+		return new SdcSchemaFilesCassandraDao();
+	}
 }
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/TitanGraphInitializer.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/TitanGraphInitializer.java
index 3f63570..ace1c03 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/TitanGraphInitializer.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/TitanGraphInitializer.java
@@ -2,18 +2,14 @@
 
 import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
 import java.util.Map;
 
 import org.apache.tinkerpop.gremlin.structure.Edge;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
-import org.openecomp.sdc.be.config.ConfigurationManager;
 import org.openecomp.sdc.be.dao.graph.datatype.ActionEnum;
 import org.openecomp.sdc.be.dao.graph.datatype.GraphElementTypeEnum;
 import org.openecomp.sdc.be.dao.neo4j.GraphEdgePropertiesDictionary;
 import org.openecomp.sdc.be.dao.neo4j.GraphPropertiesDictionary;
-import org.openecomp.sdc.be.dao.titan.TitanOperationStatus;
 import org.openecomp.sdc.be.dao.utils.UserStatusEnum;
 import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
 import org.openecomp.sdc.be.resources.data.UserData;
@@ -72,49 +68,28 @@
 		return false;
 	}
 
-	private static void createDefaultUsers() {
-		List<UserData> users = createUserList();
-		for (UserData user : users) {
-			Vertex vertex = null;
-			Map<String, Object> checkedProperties = new HashMap<String, Object>();
-			checkedProperties.put(GraphPropertiesDictionary.USERID.getProperty(), user.getUserId());
-			checkedProperties.put(GraphPropertiesDictionary.LABEL.getProperty(), NodeTypeEnum.User.getName());
-			Map<String, Object> properties = null;
-			if (!isVertexExist(checkedProperties)) {
-				vertex = graph.addVertex();
-				vertex.property(GraphPropertiesDictionary.LABEL.getProperty(), NodeTypeEnum.User.getName());
-				properties = user.toGraphMap();
-				for (Map.Entry<String, Object> entry : properties.entrySet()) {
-					vertex.property(entry.getKey(), entry.getValue());
-				}
-			}
-		}
+	private static void createDefaultAdminUser() {
+		createUser(getDefaultUserAdmin());
 		graph.tx().commit();
 
 	}
 
-	private static List<UserData> createUserList() {
-		LinkedList<UserData> users = new LinkedList<UserData>();
-		users.add(getDefaultUserAdmin1());
-		users.add(getDefaultUserAdmin2());
-		users.add(getDefaultUserDesigner1());
-		users.add(getDefaultUserDesigner2());
-		users.add(getDefaultUserTester1());
-		users.add(getDefaultUserTester2());
-		users.add(getDefaultUserTester3());
-		users.add(getDefaultUserGovernor1());
-		users.add(getDefaultUserGovernor2());
-		users.add(getDefaultUserOps1());
-		users.add(getDefaultUserOps2());
-		users.add(getDefaultUserProductManager1());
-		users.add(getDefaultUserProductManager2());
-		users.add(getDefaultUserProductStrategist1());
-		users.add(getDefaultUserProductStrategist2());
-		users.add(getDefaultUserProductStrategist3());
-		return users;
+	private static void createUser(UserData user) {
+		Map<String, Object> checkedProperties = new HashMap<>();
+		checkedProperties.put(GraphPropertiesDictionary.USERID.getProperty(), user.getUserId());
+		checkedProperties.put(GraphPropertiesDictionary.LABEL.getProperty(), NodeTypeEnum.User.getName());
+		Map<String, Object> properties = null;
+		if (!isVertexExist(checkedProperties)) {
+            Vertex vertex = graph.addVertex();
+            vertex.property(GraphPropertiesDictionary.LABEL.getProperty(), NodeTypeEnum.User.getName());
+            properties = user.toGraphMap();
+            for (Map.Entry<String, Object> entry : properties.entrySet()) {
+                vertex.property(entry.getKey(), entry.getValue());
+            }
+        }
 	}
 
-	private static UserData getDefaultUserAdmin1() {
+	private static UserData getDefaultUserAdmin() {
 		UserData userData = new UserData();
 		userData.setAction(ActionEnum.Create);
 		userData.setElementType(GraphElementTypeEnum.Node);
@@ -128,215 +103,6 @@
 		return userData;
 	}
 
-	private static UserData getDefaultUserAdmin2() {
-		UserData userData = new UserData();
-		userData.setAction(ActionEnum.Create);
-		userData.setElementType(GraphElementTypeEnum.Node);
-		userData.setUserId("tr0001");
-		userData.setEmail("admin@sdc.com");
-		userData.setFirstName("Todd");
-		userData.setLastName("Rundgren");
-		userData.setRole("ADMIN");
-		userData.setStatus(UserStatusEnum.ACTIVE.name());
-		userData.setLastLoginTime(0L);
-		return userData;
-	}
-
-	private static UserData getDefaultUserDesigner1() {
-		UserData userData = new UserData();
-		userData.setAction(ActionEnum.Create);
-		userData.setElementType(GraphElementTypeEnum.Node);
-		userData.setUserId("cs0008");
-		userData.setEmail("designer@sdc.com");
-		userData.setFirstName("Carlos");
-		userData.setLastName("Santana");
-		userData.setRole("DESIGNER");
-		userData.setStatus(UserStatusEnum.ACTIVE.name());
-		userData.setLastLoginTime(0L);
-		return userData;
-	}
-
-	private static UserData getDefaultUserDesigner2() {
-		UserData userData = new UserData();
-		userData.setAction(ActionEnum.Create);
-		userData.setElementType(GraphElementTypeEnum.Node);
-		userData.setUserId("me0009");
-		userData.setEmail("designer@sdc.com");
-		userData.setFirstName("Melissa");
-		userData.setLastName("Etheridge");
-		userData.setRole("DESIGNER");
-		userData.setStatus(UserStatusEnum.ACTIVE.name());
-		userData.setLastLoginTime(0L);
-		return userData;
-	}
-
-	private static UserData getDefaultUserTester1() {
-		UserData userData = new UserData();
-		userData.setAction(ActionEnum.Create);
-		userData.setElementType(GraphElementTypeEnum.Node);
-		userData.setUserId("jm0007");
-		userData.setEmail("tester@sdc.com");
-		userData.setFirstName("Joni");
-		userData.setLastName("Mitchell");
-		userData.setRole("TESTER");
-		userData.setStatus(UserStatusEnum.ACTIVE.name());
-		userData.setLastLoginTime(0L);
-		return userData;
-	}
-
-	private static UserData getDefaultUserTester2() {
-		UserData userData = new UserData();
-		userData.setAction(ActionEnum.Create);
-		userData.setElementType(GraphElementTypeEnum.Node);
-		userData.setUserId("kb0004");
-		userData.setEmail("tester@sdc.com");
-		userData.setFirstName("Kate");
-		userData.setLastName("Bush");
-		userData.setRole("TESTER");
-		userData.setStatus(UserStatusEnum.ACTIVE.name());
-		userData.setLastLoginTime(0L);
-		return userData;
-	}
-
-	private static UserData getDefaultUserTester3() {
-		UserData userData = new UserData();
-		userData.setAction(ActionEnum.Create);
-		userData.setElementType(GraphElementTypeEnum.Node);
-		userData.setUserId("jt0005");
-		userData.setEmail("tester@sdc.com");
-		userData.setFirstName("James");
-		userData.setLastName("Taylor");
-		userData.setRole("TESTER");
-		userData.setStatus(UserStatusEnum.ACTIVE.name());
-		userData.setLastLoginTime(0L);
-		return userData;
-	}
-
-	private static UserData getDefaultUserOps1() {
-		UserData userData = new UserData();
-		userData.setAction(ActionEnum.Create);
-		userData.setElementType(GraphElementTypeEnum.Node);
-		userData.setUserId("op0001");
-		userData.setEmail("ops@sdc.com");
-		userData.setFirstName("Steve");
-		userData.setLastName("Regev");
-		userData.setRole("OPS");
-		userData.setStatus(UserStatusEnum.ACTIVE.name());
-		userData.setLastLoginTime(0L);
-		return userData;
-	}
-
-	private static UserData getDefaultUserOps2() {
-		UserData userData = new UserData();
-		userData.setAction(ActionEnum.Create);
-		userData.setElementType(GraphElementTypeEnum.Node);
-		userData.setUserId("af0006");
-		userData.setEmail("designer@sdc.com");
-		userData.setFirstName("Aretha");
-		userData.setLastName("Franklin");
-		userData.setRole("OPS");
-		userData.setStatus(UserStatusEnum.ACTIVE.name());
-		userData.setLastLoginTime(0L);
-		return userData;
-	}
-
-	private static UserData getDefaultUserGovernor1() {
-		UserData userData = new UserData();
-		userData.setAction(ActionEnum.Create);
-		userData.setElementType(GraphElementTypeEnum.Node);
-		userData.setUserId("gv0001");
-		userData.setEmail("governor@sdc.com");
-		userData.setFirstName("David");
-		userData.setLastName("Shadmi");
-		userData.setRole("GOVERNOR");
-		userData.setStatus(UserStatusEnum.ACTIVE.name());
-		userData.setLastLoginTime(0L);
-		return userData;
-	}
-
-	private static UserData getDefaultUserGovernor2() {
-		UserData userData = new UserData();
-		userData.setAction(ActionEnum.Create);
-		userData.setElementType(GraphElementTypeEnum.Node);
-		userData.setUserId("ah0002");
-		userData.setEmail("admin@sdc.com");
-		userData.setFirstName("Alex");
-		userData.setLastName("Harvey");
-		userData.setRole("GOVERNOR");
-		userData.setStatus(UserStatusEnum.ACTIVE.name());
-		userData.setLastLoginTime(0L);
-		return userData;
-	}
-
-	private static UserData getDefaultUserProductManager1() {
-		UserData userData = new UserData();
-		userData.setAction(ActionEnum.Create);
-		userData.setElementType(GraphElementTypeEnum.Node);
-		userData.setUserId("pm0001");
-		userData.setEmail("pm1@sdc.com");
-		userData.setFirstName("Teddy");
-		userData.setLastName("Isashar");
-		userData.setRole("PRODUCT_MANAGER");
-		userData.setStatus(UserStatusEnum.ACTIVE.name());
-		userData.setLastLoginTime(0L);
-		return userData;
-	}
-
-	private static UserData getDefaultUserProductManager2() {
-		UserData userData = new UserData();
-		userData.setAction(ActionEnum.Create);
-		userData.setElementType(GraphElementTypeEnum.Node);
-		userData.setUserId("pm0002");
-		userData.setEmail("pm2@sdc.com");
-		userData.setFirstName("Sarah");
-		userData.setLastName("Bettens");
-		userData.setRole("PRODUCT_MANAGER");
-		userData.setStatus(UserStatusEnum.ACTIVE.name());
-		userData.setLastLoginTime(0L);
-		return userData;
-	}
-
-	private static UserData getDefaultUserProductStrategist1() {
-		UserData userData = new UserData();
-		userData.setAction(ActionEnum.Create);
-		userData.setElementType(GraphElementTypeEnum.Node);
-		userData.setUserId("ps0001");
-		userData.setEmail("ps1@sdc.com");
-		userData.setFirstName("Eden");
-		userData.setLastName("Rozin");
-		userData.setRole("PRODUCT_STRATEGIST");
-		userData.setStatus(UserStatusEnum.ACTIVE.name());
-		userData.setLastLoginTime(0L);
-		return userData;
-	}
-
-	private static UserData getDefaultUserProductStrategist2() {
-		UserData userData = new UserData();
-		userData.setAction(ActionEnum.Create);
-		userData.setElementType(GraphElementTypeEnum.Node);
-		userData.setUserId("ps0002");
-		userData.setEmail("ps2@sdc.com");
-		userData.setFirstName("Ella");
-		userData.setLastName("Kvetny");
-		userData.setRole("PRODUCT_STRATEGIST");
-		userData.setStatus(UserStatusEnum.ACTIVE.name());
-		userData.setLastLoginTime(0L);
-		return userData;
-	}
-
-	private static UserData getDefaultUserProductStrategist3() {
-		UserData userData = new UserData();
-		userData.setAction(ActionEnum.Create);
-		userData.setElementType(GraphElementTypeEnum.Node);
-		userData.setUserId("ps0003");
-		userData.setEmail("ps3@sdc.com");
-		userData.setFirstName("Geva");
-		userData.setLastName("Alon");
-		userData.setRole("PRODUCT_STRATEGIST");
-		userData.setStatus(UserStatusEnum.ACTIVE.name());
-		userData.setLastLoginTime(0L);
-		return userData;
-	}
 
 	private static void createVertexIndixes() {
 		logger.info("** createVertexIndixes started");
@@ -399,6 +165,6 @@
 	private static void createIndexesAndDefaults() {
 		createVertexIndixes();
 		createEdgeIndixes();
-		createDefaultUsers();
+		createDefaultAdminUser();
 	}
 }
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/Migration.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/Migration1707Task.java
similarity index 63%
rename from asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/Migration.java
rename to asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/Migration1707Task.java
index d74bae6..92e185d 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/Migration.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/Migration1707Task.java
@@ -1,6 +1,10 @@
 package org.openecomp.sdc.asdctool.impl.migration;
 
-public interface Migration {
+/**
+ * for 1707 migration only!!!
+ * please don't implement this interface unless you are sure you want to run with 1707 migration classes
+ */
+public interface Migration1707Task {
 
     /**
      * performs a migration operation
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1604/AppConfig.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1604/AppConfig.java
index 514c28b..25132ca 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1604/AppConfig.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1604/AppConfig.java
@@ -27,9 +27,11 @@
 import org.openecomp.sdc.asdctool.impl.migration.v1610.ToscaArtifactsAlignment;
 import org.openecomp.sdc.asdctool.impl.migration.v1702.DataTypesUpdate;
 import org.openecomp.sdc.asdctool.impl.migration.v1702.Migration1702;
-import org.openecomp.sdc.asdctool.impl.migration.v1707.VfModulesPropertiesAdding;
+import org.openecomp.sdc.asdctool.impl.migration.v1707.Migration1707RelationsFix;
+import org.openecomp.sdc.asdctool.impl.migration.v1707.Migration1707VnfFix;
 import org.openecomp.sdc.be.auditing.api.IAuditingManager;
 import org.openecomp.sdc.be.auditing.impl.AuditingManager;
+import org.openecomp.sdc.be.components.ArtifactsResolver;
 import org.openecomp.sdc.be.components.distribution.engine.IDistributionEngine;
 import org.openecomp.sdc.be.components.distribution.engine.ServiceDistributionArtifactsBuilder;
 import org.openecomp.sdc.be.components.impl.*;
@@ -51,7 +53,32 @@
 import org.openecomp.sdc.be.model.operations.api.IElementOperation;
 import org.openecomp.sdc.be.model.operations.api.IGraphLockOperation;
 import org.openecomp.sdc.be.model.operations.api.IUserAdminOperation;
-import org.openecomp.sdc.be.model.operations.impl.*;
+import org.openecomp.sdc.be.model.operations.impl.AdditionalInformationOperation;
+import org.openecomp.sdc.be.model.operations.impl.ArtifactOperation;
+import org.openecomp.sdc.be.model.operations.impl.AttributeOperation;
+import org.openecomp.sdc.be.model.operations.impl.CacheMangerOperation;
+import org.openecomp.sdc.be.model.operations.impl.CapabilityInstanceOperation;
+import org.openecomp.sdc.be.model.operations.impl.CapabilityOperation;
+import org.openecomp.sdc.be.model.operations.impl.CapabilityTypeOperation;
+import org.openecomp.sdc.be.model.operations.impl.ComponentInstanceOperation;
+import org.openecomp.sdc.be.model.operations.impl.ConsumerOperation;
+import org.openecomp.sdc.be.model.operations.impl.CsarOperation;
+import org.openecomp.sdc.be.model.operations.impl.ElementOperation;
+import org.openecomp.sdc.be.model.operations.impl.GraphLockOperation;
+import org.openecomp.sdc.be.model.operations.impl.GroupInstanceOperation;
+import org.openecomp.sdc.be.model.operations.impl.GroupOperation;
+import org.openecomp.sdc.be.model.operations.impl.GroupTypeOperation;
+import org.openecomp.sdc.be.model.operations.impl.HeatParametersOperation;
+import org.openecomp.sdc.be.model.operations.impl.InputsOperation;
+import org.openecomp.sdc.be.model.operations.impl.InterfaceLifecycleOperation;
+import org.openecomp.sdc.be.model.operations.impl.LifecycleOperation;
+import org.openecomp.sdc.be.model.operations.impl.OnboardingClient;
+import org.openecomp.sdc.be.model.operations.impl.ProductOperation;
+import org.openecomp.sdc.be.model.operations.impl.PropertyOperation;
+import org.openecomp.sdc.be.model.operations.impl.RequirementOperation;
+import org.openecomp.sdc.be.model.operations.impl.ResourceOperation;
+import org.openecomp.sdc.be.model.operations.impl.ServiceOperation;
+import org.openecomp.sdc.be.model.operations.impl.UserAdminOperation;
 import org.openecomp.sdc.be.tosca.CsarUtils;
 import org.openecomp.sdc.be.tosca.ToscaExportHandler;
 import org.openecomp.sdc.be.user.IUserBusinessLogic;
@@ -66,6 +93,11 @@
 @Import(DAOSpringConfig.class)
 public class AppConfig {
 
+	@Bean(name="artifact-resolver")
+	public ArtifactsResolver artifactsResolver() {
+		return new ArtifactResolverImpl();
+	}
+
 	@Bean(name = "sdc-schema-files-cassandra-dao")
 	public SdcSchemaFilesCassandraDao sdcSchemaFilesCassandraDao() {
 		return new SdcSchemaFilesCassandraDao();
@@ -543,9 +575,22 @@
 		return new MigrationOperationUtils();
 	}
 
-    @Bean(name = "vfModulesPropertiesAdding")
-    public VfModulesPropertiesAdding vfModulesPropertiesAdding() {
-        return new VfModulesPropertiesAdding();
-    }
+	@Bean("consumer-operation")
+	public ConsumerOperation consumerOperation(@Qualifier("titan-generic-dao") TitanGenericDao titanGenericDao) {
+		return new ConsumerOperation(titanGenericDao);
+	}
 
+	@Bean(name = "migration1707relationsFix")
+    public Migration1707RelationsFix migration1707RelationsFix() {
+        return new Migration1707RelationsFix();
+    }
+    @Bean(name = "migration1707vnfFix")
+    public Migration1707VnfFix migration1707VnfFix() {
+        return new Migration1707VnfFix();
+    }
+    
+//    @Bean(name = "migration1707relationsFix")
+//    public Migration1707RelationsFix migration1707RelationsFix() {
+//        return new Migration1707RelationsFix();
+//    }
 }
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1702/Migration1702.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1702/Migration1702.java
index 861e913..6fa8b45 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1702/Migration1702.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1702/Migration1702.java
@@ -1036,10 +1036,8 @@
 				property.setName(fe.getKey());
 				Map<String, Object> definitionInYaml = (Map<String, Object>) fe.getValue();
 				property.setType((String) definitionInYaml.get("type"));
-				// Fix by Tal G
 				property.setRequired((Boolean) definitionInYaml.get("required"));
 				property.setDescription((String) definitionInYaml.get("description"));
-				// Fix by Tal G
 				String defaultValue = definitionInYaml.get("default") == null ? null : definitionInYaml.get("default").toString();
 				if (defaultValue != null) {
 					property.setDefaultValue(defaultValue);
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/DistributionStatusUpdate.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/DistributionStatusUpdate.java
new file mode 100644
index 0000000..7c0b57f
--- /dev/null
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/DistributionStatusUpdate.java
@@ -0,0 +1,140 @@
+package org.openecomp.sdc.asdctool.impl.migration.v1707;
+
+import java.util.EnumMap;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.stream.Collectors;
+
+import org.apache.commons.collections.MapUtils;
+import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
+import org.openecomp.sdc.be.dao.jsongraph.TitanDao;
+import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
+import org.openecomp.sdc.be.dao.titan.TitanOperationStatus;
+import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
+import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum;
+import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields;
+import org.openecomp.sdc.be.model.ComponentParametersView;
+import org.openecomp.sdc.be.model.DistributionStatusEnum;
+import org.openecomp.sdc.be.model.LifecycleStateEnum;
+import org.openecomp.sdc.be.model.Service;
+import org.openecomp.sdc.be.model.jsontitan.operations.ToscaOperationFacade;
+import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
+import org.openecomp.sdc.be.model.operations.impl.DaoStatusConverter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import fj.data.Either;
+
+@Component("distributionStatusUpdate")
+public class DistributionStatusUpdate {
+	private static Logger LOGGER = LoggerFactory.getLogger(DistributionStatusUpdate.class);
+
+	@Autowired
+    private ToscaOperationFacade toscaOperationFacade;
+	@Autowired
+    private TitanDao titanDao;
+	
+    
+	public boolean migrate() {
+		boolean result = true;
+		Either<Map<GraphVertex, org.openecomp.sdc.be.model.Service>, StorageOperationStatus> getAllServiceComponentsRes = getAllServiceComponents();
+		if(getAllServiceComponentsRes.isRight()){
+			result = false;
+		}
+		if(result && MapUtils.isNotEmpty(getAllServiceComponentsRes.left().value())){
+			updateDistributionStatusFromMetadata(getAllServiceComponentsRes.left().value());
+			updateDistributionStatusToNotDistributed(getAllServiceComponentsRes.left().value());
+		}
+		
+		toscaOperationFacade.commit();
+		
+		return result;
+	}
+
+	
+	private void updateDistributionStatusToNotDistributed(Map<GraphVertex, org.openecomp.sdc.be.model.Service> components) {
+		
+		Map<GraphVertex, org.openecomp.sdc.be.model.Service> filteredComponents = components.entrySet()
+				.stream()
+				.filter(e -> e.getValue().getLifecycleState() != LifecycleStateEnum.CERTIFIED)
+				.collect(Collectors.toMap(e -> e.getKey(), e -> (Service)e.getValue()));
+		
+		Service service;
+		Either<GraphVertex, TitanOperationStatus> updateResponse;
+		GraphVertex metadataV;
+		
+		for(Entry<GraphVertex, Service> currComponent : filteredComponents.entrySet()){
+			metadataV = currComponent.getKey();
+			service = currComponent.getValue();
+			try {
+				metadataV.addMetadataProperty(GraphPropertyEnum.DISTRIBUTION_STATUS, DistributionStatusEnum.DISTRIBUTION_NOT_APPROVED.name());
+				updateResponse = titanDao.updateVertex(metadataV);
+				
+				if (updateResponse.isRight()) {
+					LOGGER.debug("failed to updateDistributionStatusToNotDistributed service  {} error {}", service.getUniqueId(), updateResponse.right().value());
+				}
+				
+			} catch (Exception e) {
+				LOGGER.debug("failed to updateDistributionStatusToNotDistributed service  {} error {}", service.getUniqueId(), e.toString());
+			}
+		}
+	}
+	
+	private void updateDistributionStatusFromMetadata(Map<GraphVertex, org.openecomp.sdc.be.model.Service> components) {
+		Service service;
+		String statusFromMetadata;
+		Either<GraphVertex, TitanOperationStatus> updateResponse;
+		GraphVertex metadataV;
+		
+		for(Entry<GraphVertex, Service> currComponent : components.entrySet()){
+			metadataV = currComponent.getKey();
+			service = currComponent.getValue();
+			try {
+				statusFromMetadata = (String) metadataV.getJsonMetadataField(JsonPresentationFields.DISTRIBUTION_STATUS);
+				metadataV.addMetadataProperty(GraphPropertyEnum.DISTRIBUTION_STATUS, statusFromMetadata);
+				updateResponse = titanDao.updateVertex(metadataV);
+				
+				if (updateResponse.isRight()) {
+					LOGGER.debug("failed to updateDistributionStatusFromMetadata service  {} error {}", service.getUniqueId(), updateResponse.right().value());
+				}
+				
+			} catch (Exception e) {
+				LOGGER.debug("failed to read distribution status of service {} error {}", service.getUniqueId(), e.toString());
+			}
+			
+		}
+	}
+	
+	
+	public Either<Map<GraphVertex, org.openecomp.sdc.be.model.Service>, StorageOperationStatus> getAllServiceComponents() {
+
+		Map<GraphVertex, org.openecomp.sdc.be.model.Service> components = new HashMap<>();
+		Map<GraphPropertyEnum, Object> propertiesToMatch = new EnumMap<>(GraphPropertyEnum.class);
+		Map<GraphPropertyEnum, Object> propertiesNotMatch = new EnumMap<>(GraphPropertyEnum.class);
+		propertiesToMatch.put(GraphPropertyEnum.COMPONENT_TYPE, ComponentTypeEnum.SERVICE.name());
+		propertiesNotMatch.put(GraphPropertyEnum.IS_DELETED, true);
+		Either<List<GraphVertex>, TitanOperationStatus> getVerticiesRes = toscaOperationFacade.getTitanDao().getByCriteria(null, propertiesToMatch, propertiesNotMatch, JsonParseFlagEnum.ParseAll);
+
+		if (getVerticiesRes.isRight() && getVerticiesRes.right().value() != TitanOperationStatus.NOT_FOUND) {
+			LOGGER.debug("Failed to fetch all service components. Status is {}", getVerticiesRes.right().value());
+			return Either.right(DaoStatusConverter.convertTitanStatusToStorageStatus(getVerticiesRes.right().value()));
+		}
+		if(getVerticiesRes.isLeft()){
+			List<GraphVertex> componentVerticies = getVerticiesRes.left().value();
+			for (GraphVertex componentV : componentVerticies) {
+				ComponentParametersView filters = new ComponentParametersView(true);
+				Either<org.openecomp.sdc.be.model.Component, StorageOperationStatus> getComponentsRes = toscaOperationFacade.getToscaElement(componentV.getUniqueId(), filters);
+				if (getComponentsRes.isRight()) {
+					return Either.right(getComponentsRes.right().value());
+				}
+				components.put(componentV, (Service) getComponentsRes.left().value());
+			}
+		}
+		return Either.left(components);
+	}
+	
+}
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/Migration1707.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/Migration1707.java
index be40e4c..84214cc 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/Migration1707.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/Migration1707.java
@@ -1,27 +1,29 @@
 package org.openecomp.sdc.asdctool.impl.migration.v1707;
 
-import org.openecomp.sdc.asdctool.impl.migration.Migration;
+import org.openecomp.sdc.asdctool.impl.migration.Migration1707Task;
+import org.openecomp.sdc.be.config.ConfigurationManager;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
-import javax.annotation.Resource;
 import java.util.List;
+import java.util.Optional;
 
 @Component("migration1707")
 public class Migration1707 {
 
     private static Logger LOGGER = LoggerFactory.getLogger(Migration1707.class);
 
-    private List<Migration> migrations;
+    private List<Migration1707Task> migrations;
 
-    public Migration1707(List<Migration> migrations) {
+    public Migration1707(List<Migration1707Task> migrations) {
         this.migrations = migrations;
     }
 
     public boolean migrate() {
-        for (Migration migration : migrations) {
+        int startMigrationFrom = Optional.ofNullable(ConfigurationManager.getConfigurationManager().getConfiguration().getStartMigrationFrom()).orElse(0);
+        List<Migration1707Task> migrations = this.migrations.subList(startMigrationFrom, this.migrations.size());
+        for (Migration1707Task migration : migrations) {
             LOGGER.info(String.format("Starting migration. %s", migration.description()));
             boolean migrationCompletedSuccessfully = migration.migrate();
             if (!migrationCompletedSuccessfully) {
@@ -33,5 +35,4 @@
         return true;
     }
 
-
 }
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/Migration1707Config.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/Migration1707Config.java
index 9c39b58..eeb29d6 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/Migration1707Config.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/Migration1707Config.java
@@ -3,19 +3,8 @@
 
 import java.util.List;
 
-import org.openecomp.sdc.asdctool.impl.migration.Migration;
-import org.openecomp.sdc.asdctool.impl.migration.v1707.jsonmodel.MigrationByIdDerivedNodeTypeResolver;
-import org.openecomp.sdc.asdctool.impl.migration.v1707.jsonmodel.NormativesMigration;
-import org.openecomp.sdc.asdctool.impl.migration.v1707.jsonmodel.NormativesResolver;
-import org.openecomp.sdc.asdctool.impl.migration.v1707.jsonmodel.ResourceVersionMigration;
-import org.openecomp.sdc.asdctool.impl.migration.v1707.jsonmodel.ResourcesCategoriesMigration;
-import org.openecomp.sdc.asdctool.impl.migration.v1707.jsonmodel.ServiceCategoriesMigration;
-import org.openecomp.sdc.asdctool.impl.migration.v1707.jsonmodel.ServiceVersionMigration;
-import org.openecomp.sdc.asdctool.impl.migration.v1707.jsonmodel.ServicesMigration;
-import org.openecomp.sdc.asdctool.impl.migration.v1707.jsonmodel.UserStatesMigration;
-import org.openecomp.sdc.asdctool.impl.migration.v1707.jsonmodel.UsersMigration;
-import org.openecomp.sdc.asdctool.impl.migration.v1707.jsonmodel.VFResourcesMigration;
-import org.openecomp.sdc.asdctool.impl.migration.v1707.jsonmodel.VersionMigration;
+import org.openecomp.sdc.asdctool.impl.migration.Migration1707Task;
+import org.openecomp.sdc.asdctool.impl.migration.v1707.jsonmodel.*;
 import org.openecomp.sdc.asdctool.impl.migration.v1707.jsonmodel.relations.FulfilledCapabilitiesMigrationService;
 import org.openecomp.sdc.asdctool.impl.migration.v1707.jsonmodel.relations.FulfilledRequirementsMigrationService;
 import org.openecomp.sdc.asdctool.impl.migration.v1707.jsonmodel.relations.RequirementsCapabilitiesMigrationService;
@@ -37,6 +26,7 @@
 import org.openecomp.sdc.be.model.operations.api.IElementOperation;
 import org.openecomp.sdc.be.model.operations.api.IUserAdminOperation;
 import org.openecomp.sdc.be.model.operations.api.ToscaDefinitionPathCalculator;
+import org.openecomp.sdc.be.model.operations.impl.ConsumerOperation;
 import org.openecomp.sdc.be.model.operations.impl.ElementOperation;
 import org.openecomp.sdc.be.model.operations.impl.GroupTypeOperation;
 import org.openecomp.sdc.be.model.operations.impl.PropertyOperation;
@@ -45,6 +35,7 @@
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Primary;
 import org.springframework.core.annotation.Order;
 
 @Configuration
@@ -52,69 +43,72 @@
 
 
     @Bean(name = "migration1707")
-    public Migration1707 migration1707(List<Migration> migrations) {
+    public Migration1707 migration1707(List<Migration1707Task> migrations) {
         return new Migration1707(migrations);
     }
 
-    @Bean(name = "renameGraphPropertyKeysMigration")
-    @Order(1)
-    public Migration renameGraphPropertyKeysMigration() {
-        return new RenameGraphPropertyKeys();
-    }
+    //@Bean(name = "renameGraphPropertyKeysMigration")
+    //@Order(1)
+    //public Migration1707Task renameGraphPropertyKeysMigration() {
+     //   return new RenameGraphPropertyKeys();
+   // }
 
-    @Bean(name = "toscaNamesUpdate")
-    @Order(2)
-    public Migration toscaNamesUpdate() {
-        return new ToscaNamesUpdate();
-    }
+    //@Bean(name = "toscaNamesUpdate")
+    //@Order(2)
+    //public Migration1707Task toscaNamesUpdate() {
+    //    return new ToscaNamesUpdate();
+    //}
 
     @Bean(name = "users-migration")
-    @Order(3)
-    public Migration usersMigration() {
+    @Order(1)
+    public Migration1707Task usersMigration() {
         return new UsersMigration();
     }
 
     @Bean(name = "resource-category-migration")
-    @Order(4)
-    public Migration resourceCategoriesMigration() {
+    @Order(2)
+    public Migration1707Task resourceCategoriesMigration() {
         return new ResourcesCategoriesMigration();
     }
 
     @Bean(name = "service-category-migration")
-    @Order(5)
-    public Migration serviceCategoriesMigration() {
+    @Order(3)
+    public Migration1707Task serviceCategoriesMigration() {
         return new ServiceCategoriesMigration();
     }
 
     @Bean(name = "normatives-migration")
-    @Order(6)
-    public Migration normativesMigration() {
+    @Order(4)
+    public Migration1707Task normativesMigration() {
         return new NormativesMigration();
     }
 
     @Bean(name = "vf-migration")
-    @Order(7)
-    public Migration vfMigration() {
+    @Order(5)
+    public Migration1707Task vfMigration() {
         return new VFResourcesMigration();
     }
 
     @Bean(name = "service-migration")
-    @Order(8)
-    public Migration serviceMigration() {
+    @Order(6)
+    public Migration1707Task serviceMigration() {
         return new ServicesMigration();
     }
 
-    @Bean(name = "user-states-migration")
-    @Order(9)
-    public Migration userStatesMigration() {
-        return new UserStatesMigration();
+    @Bean(name = "consumers-migration")
+    @Order(7)
+    public Migration1707Task consumersMigration() { return new ConsumersMigration(); }
+
+    @Bean(name = "tosca-template-regeneration")
+    @Order(8)
+    public Migration1707Task ToscaTemplateRegeneration() {
+        return new ToscaTemplateRegeneration();
     }
-    
-//    @Bean(name = "tosca-template-regeneration")
-//    @Order(10)
-//    public Migration ToscaTemplateRegeneration() {
-//        return new ToscaTemplateRegeneration();
-//    }
+
+    @Bean(name = "distributionStatusUpdate")
+    public DistributionStatusUpdate distributionStatusUpdate() {
+        return new DistributionStatusUpdate();
+    }
 
     @Bean("resource-version-migration")
     public VersionMigration<Resource> resourceVersionMigration() {
@@ -236,5 +230,20 @@
         return new MigrationByIdDerivedNodeTypeResolver();
     }
 
+    @Bean(name = "invariant-uuid-resolver")
+    public InvariantUUIDResolver invariantUUIDResolver() {
+        return new InvariantUUIDResolver();
+    }
+
+    @Bean(name="consumer-operation-mig")
+    @Primary
+    public ConsumerOperation consumerOperation(@Qualifier("titan-generic-dao-migration") TitanGenericDao titanGenericDao) {
+        return new ConsumerOperation(titanGenericDao);
+    }
+    
+    @Bean(name = "vfModulesPropertiesAdding")
+    public VfModulesPropertiesAdding vfModulesPropertiesAdding() {
+        return new VfModulesPropertiesAdding();
+    }
 
 }
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/Migration1707RelationsFix.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/Migration1707RelationsFix.java
new file mode 100644
index 0000000..47bce78
--- /dev/null
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/Migration1707RelationsFix.java
@@ -0,0 +1,131 @@
+package org.openecomp.sdc.asdctool.impl.migration.v1707;
+
+import java.util.EnumMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import org.apache.tinkerpop.gremlin.structure.Direction;
+import org.apache.tinkerpop.gremlin.structure.Edge;
+import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
+import org.openecomp.sdc.be.dao.jsongraph.TitanDao;
+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.titan.TitanOperationStatus;
+import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum;
+import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import fj.data.Either;
+@Component("migration1707relationsFix")
+public class Migration1707RelationsFix {
+
+	private static Logger LOGGER = LoggerFactory.getLogger(Migration1707RelationsFix.class);
+	
+	@Autowired
+    private TitanDao titanDao;
+
+	public boolean migrate() {
+		boolean result = true;
+
+		try{
+			Map<GraphPropertyEnum, Object> propsHasNot = new EnumMap<>(GraphPropertyEnum.class);
+			propsHasNot.put(GraphPropertyEnum.IS_DELETED, true);
+			Either<List<GraphVertex>, TitanOperationStatus> getAllTopologyTemplatesRes = titanDao.getByCriteria(VertexTypeEnum.TOPOLOGY_TEMPLATE, null, propsHasNot, JsonParseFlagEnum.ParseMetadata);
+			if (getAllTopologyTemplatesRes.isRight() && getAllTopologyTemplatesRes.right().value() != TitanOperationStatus.NOT_FOUND) {
+				LOGGER.debug("Failed to fetch all non marked as deleted topology templates , error {}", getAllTopologyTemplatesRes.right().value());
+				result = false;
+			}
+			if(getAllTopologyTemplatesRes.isLeft()){
+				fixComponentsRelations(getAllTopologyTemplatesRes.left().value());
+			}
+			if(result){
+				Either<List<GraphVertex>, TitanOperationStatus> getAllNodeTypesRes = titanDao.getByCriteria(VertexTypeEnum.NODE_TYPE, null, propsHasNot, JsonParseFlagEnum.ParseMetadata);
+				if (getAllNodeTypesRes.isRight() && getAllNodeTypesRes.right().value() != TitanOperationStatus.NOT_FOUND) {
+					LOGGER.debug("Failed to fetch all non marked as deleted node types , error {}", getAllNodeTypesRes.right().value());
+					result = false;
+				}
+				if(getAllNodeTypesRes.isLeft()){
+					fixComponentsRelations(getAllNodeTypesRes.left().value());
+				}
+			}
+		} catch (Exception e){
+			LOGGER.debug("The exception {} occured upon migration 1707 relations fixing. ", e.getMessage());
+			e.printStackTrace();
+			result = false;
+		}
+		finally{
+			if(result){
+				titanDao.commit();
+			} else {
+				titanDao.rollback();
+			}
+		}
+		return result;
+	}
+	
+	private void fixComponentsRelations(List<GraphVertex> notDeletedComponentVerticies) {
+		notDeletedComponentVerticies.stream().forEach(this::fixComponentRelations);
+	}
+	
+	private void fixComponentRelations(GraphVertex componentV) {
+		fixCreatorComponentRelation(componentV);
+		fixLastModifierComponentRelation(componentV);
+		fixStateComponentRelation(componentV);
+	}
+	
+	private void fixStateComponentRelation(GraphVertex componentV) {
+		boolean relevantEdgeFound = false;
+		Iterator<Edge> edges = componentV.getVertex().edges(Direction.IN, EdgeLabelEnum.STATE.name());
+		String getState = (String) componentV.getJsonMetadataField(JsonPresentationFields.LIFECYCLE_STATE);
+		while(edges.hasNext()){
+			Edge edge = edges.next();
+			String edgeState = (String) edge.property(GraphPropertyEnum.STATE.getProperty()).orElse(null);
+			if(getState.equals(edgeState) && !relevantEdgeFound){
+				relevantEdgeFound = true;
+			} else {
+				removeEdge(edge);
+			}
+		}
+	}
+
+	private void fixCreatorComponentRelation(GraphVertex componentV) {
+		boolean relevantUserFound = false;
+		Iterator<Edge> edges = componentV.getVertex().edges(Direction.IN, EdgeLabelEnum.CREATOR.name());
+		String getCreatorUserId = (String) componentV.getJsonMetadataField(JsonPresentationFields.USER_ID_CREATOR);
+		while(edges.hasNext()){
+			Edge edge = edges.next();
+			String userId = (String) edge.outVertex().property(GraphPropertyEnum.USERID.getProperty()).orElse(null);
+			if(getCreatorUserId.equals(userId) && !relevantUserFound){
+				relevantUserFound = true;
+			} else {
+				removeEdge(edge);
+			}
+		}
+	}
+	
+	private void fixLastModifierComponentRelation(GraphVertex componentV) {
+		boolean relevantUserFound = false;
+		Iterator<Edge> edges = componentV.getVertex().edges(Direction.IN, EdgeLabelEnum.LAST_MODIFIER.name());
+		String getLastUpdaterUserId = (String) componentV.getJsonMetadataField(JsonPresentationFields.USER_ID_LAST_UPDATER);
+		while(edges.hasNext()){
+			Edge edge = edges.next();
+			String updaterId = (String) edge.outVertex().property(GraphPropertyEnum.USERID.getProperty()).orElse(null);
+			if(getLastUpdaterUserId.equals(updaterId) && !relevantUserFound){
+				relevantUserFound = true;
+			} else {
+				removeEdge(edge);
+			}
+		}
+	}
+
+	private void removeEdge(Edge edge) {
+		LOGGER.debug("Going to remove edge {} upon migration 1707 relations fixing. ", edge.id());
+		edge.remove();
+		LOGGER.debug("The edge {} has been removed. ", edge.id());
+	}
+	
+}
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/Migration1707VnfFix.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/Migration1707VnfFix.java
new file mode 100644
index 0000000..d3bd494
--- /dev/null
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/Migration1707VnfFix.java
@@ -0,0 +1,100 @@
+package org.openecomp.sdc.asdctool.impl.migration.v1707;
+
+import java.util.EnumMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+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.be.dao.jsongraph.GraphVertex;
+import org.openecomp.sdc.be.dao.jsongraph.TitanDao;
+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.JsonParserUtils;
+import org.openecomp.sdc.be.dao.titan.TitanOperationStatus;
+import org.openecomp.sdc.be.datatypes.elements.ArtifactDataDefinition;
+import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
+import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum;
+import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum;
+import org.openecomp.sdc.be.model.LifecycleStateEnum;
+import org.openecomp.sdc.be.model.jsontitan.operations.TopologyTemplateOperation;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import com.thinkaurelius.titan.core.TitanVertex;
+
+import fj.data.Either;
+
+@Component("migration1707vnfFix")
+public class Migration1707VnfFix{
+
+	private static final String VF_MODULES_METADATA = "vfModulesMetadata";
+
+	@Autowired
+	private TitanDao titanDao;
+
+	@Autowired
+	private TopologyTemplateOperation topologyTemplateOperation;
+
+	private static Logger LOGGER = LoggerFactory.getLogger(Migration1707RelationsFix.class);
+
+	public boolean migrate() {
+		boolean result = true;
+
+		Map<GraphPropertyEnum, Object> propsHasNot = new EnumMap<>(GraphPropertyEnum.class);
+		propsHasNot.put(GraphPropertyEnum.IS_DELETED, true);
+
+		Map<GraphPropertyEnum, Object> propsHas = new EnumMap<>(GraphPropertyEnum.class);
+		propsHas.put(GraphPropertyEnum.COMPONENT_TYPE, ComponentTypeEnum.RESOURCE.name());
+		propsHas.put(GraphPropertyEnum.RESOURCE_TYPE, ResourceTypeEnum.VF.name());
+		propsHas.put(GraphPropertyEnum.STATE, LifecycleStateEnum.CERTIFIED);
+
+		Either<List<GraphVertex>, TitanOperationStatus> getAllTopologyTemplatesRes = titanDao.getByCriteria(VertexTypeEnum.TOPOLOGY_TEMPLATE, null, propsHasNot, JsonParseFlagEnum.ParseMetadata);
+		if (getAllTopologyTemplatesRes.isRight() && getAllTopologyTemplatesRes.right().value() != TitanOperationStatus.NOT_FOUND) {
+			LOGGER.debug("Failed to fetch all non marked as deleted topology templates , error {}", getAllTopologyTemplatesRes.right().value());
+			result = false;
+		}
+		List<GraphVertex> metadataVertices = getAllTopologyTemplatesRes.left().value();
+		for (GraphVertex metadataV : metadataVertices) {
+			Either<Map<String, ArtifactDataDefinition>, TitanOperationStatus> dataFromGraph = topologyTemplateOperation.getDataFromGraph(metadataV.getUniqueId(), EdgeLabelEnum.DEPLOYMENT_ARTIFACTS);
+			if (dataFromGraph.isLeft()) {
+				Map<String, ArtifactDataDefinition> artifacts = dataFromGraph.left().value();
+				if (artifacts.containsKey(VF_MODULES_METADATA)) {
+					artifacts.remove(VF_MODULES_METADATA);
+					Either<GraphVertex, TitanOperationStatus> vertexById = titanDao.getVertexById(metadataV.getUniqueId());
+					TitanVertex vertex = vertexById.left().value().getVertex();
+					Iterator<Edge> edges = vertex.edges(Direction.OUT, EdgeLabelEnum.DEPLOYMENT_ARTIFACTS.name());
+					if (edges.hasNext()) {
+						Edge edge = edges.next();
+						Vertex dataV = edge.inVertex();
+
+						String jsonStr;
+						try {
+							jsonStr = JsonParserUtils.jsonToString(artifacts);
+							dataV.property(GraphPropertyEnum.JSON.getProperty(), jsonStr);
+						} catch (Exception e) {
+							LOGGER.debug("Failed to update deployment artifacts for VF {}", metadataV.getUniqueId());
+						}
+					}
+				}
+			}
+			TitanOperationStatus commit = titanDao.commit();
+			if ( commit != TitanOperationStatus.OK){
+				LOGGER.debug("Failed to commit changes for deployment artifacts for VF {} {}", metadataV.getUniqueId(), metadataV.getMetadataProperty(GraphPropertyEnum.NAME));
+			}
+		}
+
+		return result;
+	}
+
+	public String description() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+}
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/RenameGraphPropertyKeys.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/RenameGraphPropertyKeys.java
index a69fb9d..a1c1b6b 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/RenameGraphPropertyKeys.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/RenameGraphPropertyKeys.java
@@ -1,8 +1,6 @@
 package org.openecomp.sdc.asdctool.impl.migration.v1707;
 
-import org.openecomp.sdc.asdctool.impl.migration.MigrationMsg;
-import org.openecomp.sdc.asdctool.impl.migration.Migration;
-import org.openecomp.sdc.asdctool.impl.migration.MigrationOperationUtils;
+import org.openecomp.sdc.asdctool.impl.migration.*;
 import org.openecomp.sdc.be.dao.neo4j.GraphPropertiesDictionary;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
@@ -11,7 +9,7 @@
 import java.util.Map;
 
 @Component("renameGraphPropertyKeysMigration")
-public class RenameGraphPropertyKeys implements Migration {
+public class RenameGraphPropertyKeys implements Migration1707Task {
 
     private final static Map<String, String> KEY_PROPERTIES_TO_RENAME;
 
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/ToscaNamesUpdate.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/ToscaNamesUpdate.java
index 262c300..5213fae 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/ToscaNamesUpdate.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/ToscaNamesUpdate.java
@@ -8,7 +8,7 @@
 import org.apache.commons.lang3.tuple.ImmutablePair;
 import org.apache.commons.lang3.tuple.ImmutableTriple;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
-import org.openecomp.sdc.asdctool.impl.migration.Migration;
+import org.openecomp.sdc.asdctool.impl.migration.Migration1707Task;
 import org.openecomp.sdc.be.dao.graph.GraphElementFactory;
 import org.openecomp.sdc.be.dao.graph.datatype.GraphElementTypeEnum;
 import org.openecomp.sdc.be.dao.graph.datatype.GraphNode;
@@ -46,7 +46,7 @@
 import fj.data.Either;
 
 @Component("toscaNamesUpdate")
-public class ToscaNamesUpdate implements Migration {
+public class ToscaNamesUpdate implements Migration1707Task {
 	private static Logger log = LoggerFactory.getLogger(ToscaNamesUpdate.class.getName());
 
 	@Override
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/ToscaTemplateRegeneration.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/ToscaTemplateRegeneration.java
index 824bb83..09e5261 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/ToscaTemplateRegeneration.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/ToscaTemplateRegeneration.java
@@ -1,14 +1,11 @@
 package org.openecomp.sdc.asdctool.impl.migration.v1707;
 
 import java.util.EnumMap;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.Map.Entry;
-import java.util.stream.Collectors;
 
-import org.apache.commons.collections.MapUtils;
-import org.openecomp.sdc.asdctool.impl.migration.Migration;
+import org.apache.commons.collections.CollectionUtils;
+import org.openecomp.sdc.asdctool.impl.migration.Migration1707Task;
 import org.openecomp.sdc.be.dao.cassandra.ArtifactCassandraDao;
 import org.openecomp.sdc.be.dao.cassandra.CassandraOperationStatus;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
@@ -34,7 +31,7 @@
 import fj.data.Either;
 
 @Component("toscaTemplateRegeneration")
-public class ToscaTemplateRegeneration implements Migration {
+public class ToscaTemplateRegeneration implements Migration1707Task {
 
 	private static Logger LOGGER = LoggerFactory.getLogger(ToscaTemplateRegeneration.class);
 	
@@ -50,13 +47,13 @@
 	@Override
 	public boolean migrate() {
 		boolean result = true;
-		Either<Map<GraphVertex, org.openecomp.sdc.be.model.Component>, StorageOperationStatus> getAllCertifiedComponentsRes;
+		Either<List<GraphVertex>, StorageOperationStatus> getAllCertifiedComponentsRes;
 		try{
 			getAllCertifiedComponentsRes = getAllCertifiedComponents();
 			if(getAllCertifiedComponentsRes.isRight()){
 				result = false;
 			}
-			if(result && MapUtils.isNotEmpty(getAllCertifiedComponentsRes.left().value())){
+			if(result && CollectionUtils.isNotEmpty(getAllCertifiedComponentsRes.left().value())){
 				result = regenerateToscaTemplateArtifacts(getAllCertifiedComponentsRes.left().value());
 			}
 		} catch(Exception e){
@@ -72,17 +69,21 @@
 		return result;
 	}
 
-	private boolean regenerateToscaTemplateArtifacts(Map<GraphVertex, org.openecomp.sdc.be.model.Component> components) {
+	private boolean regenerateToscaTemplateArtifacts(List<GraphVertex> components) {
 		boolean result = true;
-		
-		Map<GraphVertex, org.openecomp.sdc.be.model.Component> filteredComponents = components.entrySet()
-				.stream()
-				.filter(e -> e.getValue().getToscaArtifacts()!=null && e.getValue().getToscaArtifacts().containsKey(ToscaExportHandler.ASSET_TOSCA_TEMPLATE))
-				.collect(Collectors.toMap(e -> e.getKey(), e -> e.getValue()));
-		
-		for(Entry<GraphVertex, org.openecomp.sdc.be.model.Component> currComponent : filteredComponents.entrySet()){
-			result = regenerateToscaTemplateArtifact(currComponent);
-			if(!result){
+		for(GraphVertex componentV : components){
+			Either<org.openecomp.sdc.be.model.Component, StorageOperationStatus> getComponentsRes = toscaOperationFacade.getToscaElement(componentV);
+			if (getComponentsRes.isRight()) {
+				result = false;
+				break;
+			}
+			if(getComponentsRes.left().value().getToscaArtifacts()!=null && getComponentsRes.left().value().getToscaArtifacts().containsKey(ToscaExportHandler.ASSET_TOSCA_TEMPLATE)){
+				result = regenerateToscaTemplateArtifact(getComponentsRes.left().value(), componentV);
+			}
+			if(result){
+				toscaOperationFacade.commit();
+			} else {
+				toscaOperationFacade.rollback();
 				break;
 			}
 		}
@@ -90,26 +91,26 @@
 	}
 	
 	@SuppressWarnings("unchecked")
-	private boolean regenerateToscaTemplateArtifact(Map.Entry<GraphVertex, org.openecomp.sdc.be.model.Component> parent) {
+	private boolean regenerateToscaTemplateArtifact(org.openecomp.sdc.be.model.Component parent, GraphVertex parentV) {
 		boolean result = true;
 		Either<GraphVertex, TitanOperationStatus> toscaDataVertexRes = null;
 		ArtifactDataDefinition data = null;
 		LOGGER.debug("tosca artifact generation");
-		Either<ToscaRepresentation, ToscaError> exportComponent = toscaExportUtils.exportComponent(parent.getValue());
+		Either<ToscaRepresentation, ToscaError> exportComponent = toscaExportUtils.exportComponent(parent);
 		if (exportComponent.isRight()) {
-			LOGGER.debug("Failed export tosca yaml for component {} error {}", parent.getValue().getUniqueId(), exportComponent.right().value());
+			LOGGER.debug("Failed export tosca yaml for component {} error {}", parent.getUniqueId(), exportComponent.right().value());
 			result = false;
 		}
 		if(result){
-			LOGGER.debug("Tosca yaml exported for component {} ", parent.getValue().getUniqueId());
-			toscaDataVertexRes = toscaOperationFacade.getTitanDao().getChildVertex(parent.getKey(), EdgeLabelEnum.TOSCA_ARTIFACTS, JsonParseFlagEnum.ParseJson);
+			LOGGER.debug("Tosca yaml exported for component {} ", parent.getUniqueId());
+			toscaDataVertexRes = toscaOperationFacade.getTitanDao().getChildVertex(parentV, EdgeLabelEnum.TOSCA_ARTIFACTS, JsonParseFlagEnum.ParseJson);
 			if(toscaDataVertexRes.isRight()){
-				LOGGER.debug("Failed to fetch tosca data vertex {} for component {}. Status is {}", EdgeLabelEnum.TOSCA_ARTIFACTS, parent.getValue().getUniqueId(), exportComponent.right().value());
+				LOGGER.debug("Failed to fetch tosca data vertex {} for component {}. Status is {}", EdgeLabelEnum.TOSCA_ARTIFACTS, parent.getUniqueId(), exportComponent.right().value());
 				result = false;
 			}
 		}
 		if(result){
-			data = parent.getValue().getToscaArtifacts().get(ToscaExportHandler.ASSET_TOSCA_TEMPLATE);
+			data = parent.getToscaArtifacts().get(ToscaExportHandler.ASSET_TOSCA_TEMPLATE);
 			data.setArtifactChecksum(GeneralUtility.calculateMD5ByByteArray(exportComponent.left().value().getMainYaml().getBytes()));
 			
 			((Map<String, ArtifactDataDefinition>) toscaDataVertexRes.left().value().getJson()).put(ToscaExportHandler.ASSET_TOSCA_TEMPLATE, data);
@@ -129,26 +130,19 @@
 		return result;
 	}
 
-	public Either<Map<GraphVertex, org.openecomp.sdc.be.model.Component>, StorageOperationStatus> getAllCertifiedComponents() {
+	public Either<List<GraphVertex>, StorageOperationStatus> getAllCertifiedComponents() {
 
-		Map<GraphVertex, org.openecomp.sdc.be.model.Component> components = new HashMap<>();
 		Map<GraphPropertyEnum, Object> propertiesToMatch = new EnumMap<>(GraphPropertyEnum.class);
 		propertiesToMatch.put(GraphPropertyEnum.STATE, LifecycleStateEnum.CERTIFIED.name());
-		Either<List<GraphVertex>, TitanOperationStatus> getVerticiesRes = toscaOperationFacade.getTitanDao().getByCriteria(null, propertiesToMatch,JsonParseFlagEnum.ParseAll);
+		List<GraphVertex> components = null;
+		Either<List<GraphVertex>, TitanOperationStatus> getVerticiesRes = toscaOperationFacade.getTitanDao().getByCriteria(null, propertiesToMatch,JsonParseFlagEnum.ParseMetadata);
 
 		if (getVerticiesRes.isRight() && getVerticiesRes.right().value() != TitanOperationStatus.NOT_FOUND) {
 			LOGGER.debug("Failed to fetch all certified components. Status is {}", getVerticiesRes.right().value());
 			return Either.right(DaoStatusConverter.convertTitanStatusToStorageStatus(getVerticiesRes.right().value()));
 		}
 		if(getVerticiesRes.isLeft()){
-			List<GraphVertex> componentVerticies = getVerticiesRes.left().value();
-			for (GraphVertex componentV : componentVerticies) {
-				Either<org.openecomp.sdc.be.model.Component, StorageOperationStatus> getComponentsRes = toscaOperationFacade.getToscaElement(componentV);
-				if (getComponentsRes.isRight()) {
-					return Either.right(getComponentsRes.right().value());
-				}
-				components.put(componentV, getComponentsRes.left().value());
-			}
+			components = getVerticiesRes.left().value();
 		}
 		return Either.left(components);
 	}
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/VfModulesPropertiesAdding.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/VfModulesPropertiesAdding.java
index 5b14419..ca1ed2b 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/VfModulesPropertiesAdding.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/VfModulesPropertiesAdding.java
@@ -13,10 +13,12 @@
 import org.apache.commons.collections.CollectionUtils;
 import org.openecomp.sdc.asdctool.impl.migration.v1702.DataTypesUpdate;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
+import org.openecomp.sdc.be.dao.jsongraph.TitanDao;
 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.titan.TitanOperationStatus;
+import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition;
 import org.openecomp.sdc.be.datatypes.enums.GraphPropertyEnum;
 import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields;
 import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
@@ -45,7 +47,7 @@
 @Component("vfModulesPropertiesAdding")
 public class VfModulesPropertiesAdding {
 
-	private static Logger LOGGER = LoggerFactory.getLogger(ToscaTemplateRegeneration.class);
+	private static Logger LOGGER = LoggerFactory.getLogger(VfModulesPropertiesAdding.class);
 	
 	@Autowired
     private ToscaOperationFacade toscaOperationFacade;
@@ -61,25 +63,35 @@
 	
 	
 	public boolean migrate(String groupsTypeYmlFilePath) {
+		LOGGER.debug("Going to add new properties to vfModules. ");
 		boolean result = true;
-		Either<Map<org.openecomp.sdc.be.model.Component, GraphVertex>, StorageOperationStatus> getAllComponentsRes = null;
 		GroupTypeDefinition vfModule;
 		Either<List<GraphVertex>, TitanOperationStatus> getAllTopologyTemplatesRes = null;
-		List<PropertyDefinition> newProperties = null;
-
+		String vfModuleUid = "org.openecomp.groups.VfModule.1.0.grouptype";
 		Either<GroupTypeDefinition, TitanOperationStatus> getGroupTypeVfModuleRes ;
+		List<PropertyDefinition> updatedProperties = null;
 		try{
-			getGroupTypeVfModuleRes = groupTypeOperation.getGroupTypeByUid("org.openecomp.groups.VfModule.1.0.grouptype");
+			LOGGER.debug("Going to fetch {}. ", vfModuleUid);
+			getGroupTypeVfModuleRes = groupTypeOperation.getGroupTypeByUid(vfModuleUid);
 			
-			if(getGroupTypeVfModuleRes.isRight()){
-				 result = false;
+			if(getGroupTypeVfModuleRes.isRight() && getGroupTypeVfModuleRes.right().value() != TitanOperationStatus.NOT_FOUND){
+				LOGGER.debug("Failed to fetch the group type {}. The status is {}. ", vfModuleUid, getGroupTypeVfModuleRes.right().value());
+				result = false;
+			}
+			if(getGroupTypeVfModuleRes.isRight() && getGroupTypeVfModuleRes.right().value() == TitanOperationStatus.NOT_FOUND){
+				LOGGER.debug("The group type with id {} was not found. Skipping adding the new properties. ", vfModuleUid);
+				return true;
 			}
 			if(result){
+				LOGGER.debug("Going to add the new properties {} to org.openecomp.groups.VfModule.1.0.grouptype. ");
 				vfModule = getGroupTypeVfModuleRes.left().value();
-				newProperties = getNewVfModuleTypeProperties(getAllVfModuleTypePropertiesFromYaml(groupsTypeYmlFilePath), vfModule);
-				result = addNewPropertiesToGroupType(vfModule, newProperties);
+				updatedProperties = getAllVfModuleTypePropertiesFromYaml(groupsTypeYmlFilePath);
+				result = addNewPropertiesToGroupType(vfModule, getNewVfModuleTypeProperties(updatedProperties, vfModule));
+				if(!result){
+					LOGGER.debug("Failed to add the new properties {} to org.openecomp.groups.VfModule.1.0.grouptype. ");
+				}
 			}
-			if(result && CollectionUtils.isNotEmpty(newProperties)){
+			if(result && CollectionUtils.isNotEmpty(updatedProperties)){
 				Map<GraphPropertyEnum, Object> propsHasNot = new EnumMap<>(GraphPropertyEnum.class);
 				propsHasNot.put(GraphPropertyEnum.IS_DELETED, true);
 				getAllTopologyTemplatesRes = toscaOperationFacade.getTitanDao().getByCriteria(VertexTypeEnum.TOPOLOGY_TEMPLATE, null, propsHasNot, JsonParseFlagEnum.ParseAll);
@@ -89,13 +101,7 @@
 				}
 			}
 			if(result && getAllTopologyTemplatesRes!=null && getAllTopologyTemplatesRes.isLeft()){
-				getAllComponentsRes = getAllContainerComponents(getAllTopologyTemplatesRes.left().value());
-				if(getAllComponentsRes.isRight()){
-					result = false;
-				}
-			}
-			if(result && getAllComponentsRes != null){
-				result = addNewVfModulesProperties(getAllComponentsRes.left().value(), newProperties);
+				result = addNewVfModulesProperties(getAllTopologyTemplatesRes.left().value(), updatedProperties);
 			}
 		} catch (Exception e){
 			result = false;
@@ -110,41 +116,61 @@
 		return result;
 	}
 
-	private boolean addNewVfModulesProperties(Map<org.openecomp.sdc.be.model.Component, GraphVertex> components, List<PropertyDefinition> newGroupTypeProperties) {
+	private boolean addNewVfModulesProperties(List<GraphVertex> components, List<PropertyDefinition> updatedProperties) {
 		boolean result = true;
-		for(Map.Entry<org.openecomp.sdc.be.model.Component, GraphVertex> component : components.entrySet()){
-			result = addNewPropertiesToVfModules(component, newGroupTypeProperties);
+		for(GraphVertex component : components){
+			LOGGER.debug("Going to add the new properties {} to component {}. ", updatedProperties, component.getUniqueId());
+			result = addNewPropertiesToVfModules(component, updatedProperties);
 			if(!result){
+				LOGGER.debug("Failed to add the new properties {} to component {}. ", updatedProperties, component.getUniqueId());
 				break;
 			}
+			toscaOperationFacade.commit();
 		}
 		return result;
 	}
 
-	private boolean addNewPropertiesToVfModules(Entry<org.openecomp.sdc.be.model.Component, GraphVertex> component, List<PropertyDefinition> newGroupTypeProperties) {
+	private boolean addNewPropertiesToVfModules(GraphVertex componentV, List<PropertyDefinition> updatedProperties) {
 		boolean result = true;
 		List<GroupDefinition> vfModules = null;
-		if(CollectionUtils.isNotEmpty(component.getKey().getGroups())){
-			vfModules = component.getKey().getGroups().stream().filter(g -> g.getType().equals(BaseOperation.VF_MODULE)).collect(Collectors.toList());
+		Either<org.openecomp.sdc.be.model.Component, StorageOperationStatus> getToscaElementRes = toscaOperationFacade.getToscaElement(componentV);
+		if(getToscaElementRes.isRight()){
+			LOGGER.debug("Failed to fetch the component {}. ", componentV.getUniqueId());
+			result = false;
+		}
+		else if(CollectionUtils.isNotEmpty(getToscaElementRes.left().value().getGroups())){
+			vfModules = getToscaElementRes.left().value().getGroups().stream().filter(g -> g.getType().equals(BaseOperation.VF_MODULE)).collect(Collectors.toList());
 		}
 		if(vfModules != null){
-			vfModules.forEach(vfModule -> vfModule.getProperties().addAll(newGroupTypeProperties));
-			StorageOperationStatus status = topologyTemplateOperation.updateToscaDataOfToscaElement(component.getValue(), EdgeLabelEnum.GROUPS, VertexTypeEnum.GROUPS, vfModules, JsonPresentationFields.NAME);
+			vfModules.forEach(vfModule -> addAllNewProperties(vfModule.getProperties(), updatedProperties));
+			StorageOperationStatus status = topologyTemplateOperation.updateToscaDataOfToscaElement(componentV, EdgeLabelEnum.GROUPS, VertexTypeEnum.GROUPS, vfModules, JsonPresentationFields.NAME);
 			if(status!= StorageOperationStatus.OK){
+				LOGGER.debug("Failed to add the new properties {} to groups of component {}. ", updatedProperties, componentV.getUniqueId());
 				result = false;
 			}
 		}
-		if(result && CollectionUtils.isNotEmpty(component.getKey().getComponentInstances())){
-			result = addPropertiesToVfModuleInstances(component, newGroupTypeProperties);
+		if(result && CollectionUtils.isNotEmpty(getToscaElementRes.left().value().getComponentInstances())){
+			result = addPropertiesToVfModuleInstances(getToscaElementRes.left().value(), componentV, updatedProperties);
 		}
 		return result;
 	}
 
-	private boolean addPropertiesToVfModuleInstances(Entry<org.openecomp.sdc.be.model.Component, GraphVertex> component, List<PropertyDefinition> newGroupTypeProperties) {
+	private void addAllNewProperties(List<PropertyDataDefinition> vfModuleProperties, List<PropertyDefinition> updatedProperties) {
+		Map<String, PropertyDataDefinition> propertiesMap = vfModuleProperties.stream().collect(Collectors.toMap(p->p.getName(), p->p));
+		
+		for(PropertyDefinition property : updatedProperties){
+			if(!propertiesMap.containsKey(property.getName())){
+				vfModuleProperties.add(property);
+			}
+		}
+	}
+
+	private boolean addPropertiesToVfModuleInstances(org.openecomp.sdc.be.model.Component component, GraphVertex componentV, List<PropertyDefinition> updatedProperties) {
 		boolean result = true;
 		List<GroupInstance> vfModuleInstances;
 		List<String> pathKeys;
-		for(ComponentInstance componentInstance : component.getKey().getComponentInstances()){
+		LOGGER.debug("Going to add the new properties {} to group instances of component {}. ", updatedProperties, componentV.getUniqueId());
+		for(ComponentInstance componentInstance : component.getComponentInstances()){
 			vfModuleInstances = null;
 			if(CollectionUtils.isNotEmpty(componentInstance.getGroupInstances())){
 				vfModuleInstances = componentInstance.getGroupInstances()
@@ -154,41 +180,25 @@
 			}
 			if(vfModuleInstances != null){
 				for(GroupInstance vfModuleInstance :vfModuleInstances){
-					vfModuleInstance.getProperties().addAll(newGroupTypeProperties);
+					addAllNewProperties(vfModuleInstance.getProperties(),updatedProperties);
 					pathKeys = new ArrayList<>();
 					pathKeys.add(componentInstance.getUniqueId());
 					StorageOperationStatus status = topologyTemplateOperation
-							.updateToscaDataDeepElementOfToscaElement(component.getValue(), EdgeLabelEnum.INST_GROUPS, VertexTypeEnum.INST_GROUPS, vfModuleInstance, pathKeys, JsonPresentationFields.NAME);
+							.updateToscaDataDeepElementOfToscaElement(componentV, EdgeLabelEnum.INST_GROUPS, VertexTypeEnum.INST_GROUPS, vfModuleInstance, pathKeys, JsonPresentationFields.NAME);
 					if(status!= StorageOperationStatus.OK){
 						result = false;
+						LOGGER.debug("Failed to add the new properties {} to group instances of component {}. ", updatedProperties, componentV.getUniqueId());
 						break;
 					}
 				}
 				if(!result){
+					LOGGER.debug("Failed to add the new properties {} to group instances of component {}. ", updatedProperties, componentV.getUniqueId());
 					break;
 				}
 			}
 		}
 		return result;
 	}
-
-	private Either<Map<org.openecomp.sdc.be.model.Component, GraphVertex>, StorageOperationStatus> getAllContainerComponents(List<GraphVertex> componentsV) {
-		Map<org.openecomp.sdc.be.model.Component, GraphVertex> foundComponents = new HashMap<>();
-		Either<Map<org.openecomp.sdc.be.model.Component, GraphVertex>, StorageOperationStatus> result = null;
-		for(GraphVertex componentV : componentsV){
-			Either<org.openecomp.sdc.be.model.Component, StorageOperationStatus> getComponentRes = toscaOperationFacade.getToscaElement(componentV);
-			if(getComponentRes.isRight()){
-				result = Either.right(getComponentRes.right().value());
-				break;
-			}
-			foundComponents.put(getComponentRes.left().value(), componentV);
-		}
-		if(result == null){
-			result = Either.left(foundComponents);
-		}
-		return result;
-	}
-	
 	
 	private boolean addNewPropertiesToGroupType(GroupTypeDefinition vfModule, List<PropertyDefinition> newProperties) {
 		boolean result = true;
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/ComponentMigration.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/ComponentMigration.java
index c9212f9..63eb887 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/ComponentMigration.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/ComponentMigration.java
@@ -1,20 +1,20 @@
 package org.openecomp.sdc.asdctool.impl.migration.v1707.jsonmodel;
 
-import fj.Function;
 import fj.data.Either;
-import org.openecomp.sdc.asdctool.impl.migration.v1707.MigrationUtils;
-import org.openecomp.sdc.asdctool.impl.migration.v1707.jsonmodel.relations.FulfilledCapabilitiesMigrationService;
-import org.openecomp.sdc.asdctool.impl.migration.v1707.jsonmodel.relations.FulfilledRequirementsMigrationService;
 import org.openecomp.sdc.asdctool.impl.migration.v1707.jsonmodel.relations.RequirementsCapabilitiesMigrationService;
 import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
 import org.openecomp.sdc.be.model.Component;
 import org.openecomp.sdc.be.model.jsontitan.operations.ToscaOperationFacade;
 import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
+import org.openecomp.sdc.be.model.operations.migration.MigrationMalformedDataLogger;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import javax.annotation.Resource;
 
+import java.util.List;
+import java.util.stream.Collectors;
+
 import static org.openecomp.sdc.asdctool.impl.migration.v1707.MigrationUtils.handleError;
 
 public abstract class ComponentMigration <T extends Component> extends JsonModelMigration<T> {
@@ -27,10 +27,15 @@
     @Resource(name = "req-cap-mig-service")
     RequirementsCapabilitiesMigrationService<T> requirementsCapabilitiesMigrationService;
 
+    @Resource(name = "invariant-uuid-resolver")
+    private InvariantUUIDResolver <T> invariantUUIDResolver;
+
     @Override
-    Either<T, StorageOperationStatus> save(T element) {
+    boolean save(T element) {
         LOGGER.debug(String.format("creating component %s in new graph", element.getName()));
-        return toscaOperations.createToscaComponent(element).right().map(err -> handleError(err, String.format("failed to create component %s.", element.getName())));
+        return toscaOperations.createToscaComponent(element)
+                .either(savedNode -> true,
+                        err -> handleError(String.format("failed to create component %s with id %s. reason: %s", element.getName(), element.getUniqueId(), err.name())));
 
     }
 
@@ -45,4 +50,26 @@
         return StorageOperationStatus.NOT_FOUND;
     }
 
+    @Override
+    void doPreMigrationOperation(List<T> elements) {
+        setMissingInvariantUids(elements);
+    }
+
+    //some invariants uids are missing in production
+    private void setMissingInvariantUids(List<T> components) {
+        List<T> missingInvariantCmpts = getComponentsWithNoInvariantUUIDs(components);
+        for (T missingInvariantCmpt : missingInvariantCmpts) {
+            missingInvariantCmpt.setInvariantUUID(invariantUUIDResolver.resolveInvariantUUID(components, missingInvariantCmpt));
+        }
+    }
+
+    private List<T> getComponentsWithNoInvariantUUIDs(List<T> components) {
+        List<T> cmptsWithoutInvariant = components.stream().filter(c -> c.getInvariantUUID() == null).collect(Collectors.toList());
+        if (!cmptsWithoutInvariant.isEmpty()) {
+            cmptsWithoutInvariant.forEach(cmpt -> MigrationMalformedDataLogger.logMalformedDataMsg(String.format("component %s is missing invariant uuid", cmpt.getUniqueId())));
+        }
+        return cmptsWithoutInvariant;
+    }
+
+
 }
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/ConsumersMigration.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/ConsumersMigration.java
new file mode 100644
index 0000000..83078ba
--- /dev/null
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/ConsumersMigration.java
@@ -0,0 +1,47 @@
+package org.openecomp.sdc.asdctool.impl.migration.v1707.jsonmodel;
+
+import fj.data.Either;
+import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
+import org.openecomp.sdc.be.model.operations.impl.ConsumerOperation;
+import org.openecomp.sdc.be.resources.data.ConsumerData;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+import static org.openecomp.sdc.asdctool.impl.migration.v1707.MigrationUtils.handleError;
+
+public class ConsumersMigration extends JsonModelMigration<ConsumerData> {
+
+    @Resource(name = "consumer-operation")
+    private ConsumerOperation consumerOperation;
+
+    @Resource(name = "consumer-operation-mig")
+    private ConsumerOperation consumerOperationMigration;
+
+    @Override
+    Either<List<ConsumerData>, ?> getElementsToMigrate() {
+        return consumerOperation.getAll();
+    }
+
+    @Override
+    Either<ConsumerData, ?> getElementFromNewGraph(ConsumerData element) {
+        return consumerOperationMigration.getCredentials(element.getConsumerDataDefinition().getConsumerName());
+    }
+
+    @Override
+    boolean save(ConsumerData element) {
+        return consumerOperationMigration.createCredentials(element)
+                .either(savedConsumer -> true,
+                        err -> handleError(String.format("failed to save consumer %s. reason: %s", element.getConsumerDataDefinition().getConsumerName(), err.name())));
+    }
+
+    @Override
+    StorageOperationStatus getNotFoundErrorStatus() {
+        return StorageOperationStatus.NOT_FOUND;
+    }
+
+    @Override
+    public String description() {
+        return "consumers migration";
+    }
+}
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/InvariantUUIDResolver.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/InvariantUUIDResolver.java
new file mode 100644
index 0000000..bf28507
--- /dev/null
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/InvariantUUIDResolver.java
@@ -0,0 +1,41 @@
+package org.openecomp.sdc.asdctool.impl.migration.v1707.jsonmodel;
+
+import org.openecomp.sdc.be.model.Component;
+import org.openecomp.sdc.be.model.operations.migration.MigrationMalformedDataLogger;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Optional;
+
+public class InvariantUUIDResolver <T extends Component> {
+
+    public String resolveInvariantUUID(List<T> components, T missingInvariantCmpt) {
+        String uuid = missingInvariantCmpt.getUUID();
+        String systemName = missingInvariantCmpt.getSystemName();
+        String invariantUid = findInvariantUUidByAllVersionsMap(missingInvariantCmpt, components).orElseGet(() -> findInvariantUUidByUUIDOrSystemName(components, uuid, systemName));
+        if (invariantUid == null) {
+            MigrationMalformedDataLogger.logMalformedDataMsg(String.format("could not find invariant uuid for component %s with id %s", missingInvariantCmpt.getName(), missingInvariantCmpt.getUniqueId()));
+        }
+        return invariantUid;
+    }
+
+    private String findInvariantUUidByUUIDOrSystemName(List<T> components, String uuid, String systemName) {
+        return components.stream()
+                .filter(c -> c.getUUID().equals(uuid) || c.getSystemName().equals(systemName))
+                .map(Component::getInvariantUUID)
+                .filter(c -> c != null)
+                .findAny().orElse(null);
+    }
+
+    private Optional<String> findInvariantUUidByAllVersionsMap(T component, List<T> allComponents) {
+        if (component.getAllVersions() == null) return Optional.empty();
+        Collection<String> allVersionsComponentIds = component.getAllVersions().values();
+        return allComponents.stream().filter(c -> allVersionsComponentIds.contains(c.getUniqueId()))
+                .map(Component::getInvariantUUID)
+                .filter(c -> c != null)
+                .findAny();
+
+
+    }
+
+}
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/JsonModelMigration.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/JsonModelMigration.java
index 6070104..4e62b2f 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/JsonModelMigration.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/JsonModelMigration.java
@@ -1,17 +1,19 @@
 package org.openecomp.sdc.asdctool.impl.migration.v1707.jsonmodel;
 
 import fj.data.Either;
+import org.openecomp.sdc.asdctool.impl.migration.Migration1707Task;
 import org.openecomp.sdc.asdctool.impl.migration.MigrationMsg;
-import org.openecomp.sdc.asdctool.impl.migration.Migration;
 import org.openecomp.sdc.asdctool.impl.migration.v1707.MigrationUtils;
 import org.openecomp.sdc.be.dao.jsongraph.TitanDao;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.annotation.Resource;
 import java.util.List;
 
-public abstract class JsonModelMigration<T> implements Migration {
+public abstract class JsonModelMigration<T> implements Migration1707Task {
 
-    private final boolean COMPLETED_OK = true;
+    private static final Logger LOGGER = LoggerFactory.getLogger(JsonModelMigration.class);
 
     @Resource(name = "titan-dao")
     TitanDao titanDao;
@@ -31,7 +33,11 @@
         return true;
     }
 
+    void doPreMigrationOperation(List<T> elements){}
+
     private boolean migrateElementsToNewGraph(List<T> elementsToMigrate) {
+        LOGGER.info(this.description() + ": starting to migrate elements to new graph. elements to migrate: {}", elementsToMigrate.size());
+        doPreMigrationOperation(elementsToMigrate);
         for (T node : elementsToMigrate) {
             boolean migratedSuccessfully = migrateElement(node);
             if (!migratedSuccessfully) {
@@ -59,14 +65,10 @@
     }
 
     private boolean saveElementIfNotExists(T element) {
-        return isExists(element).either(isExist -> isExist || createElement(element),
+        return isExists(element).either(isExist -> isExist || save(element),
                                         status -> MigrationUtils.handleError(MigrationMsg.FAILED_TO_GET_NODE_FROM_GRAPH.getMessage(status.toString())));
     }
 
-    private boolean createElement(T element) {
-        return save(element).either(savedNode -> COMPLETED_OK,
-                                 errorStatus -> MigrationUtils.handleError(MigrationMsg.FAILED_TO_CREATE_NODE.getMessage(element.getClass().getName(), errorStatus.toString())));
-    }
 
     private Either<Boolean, ?> isExists(T element) {
         Either<T, ?> byId = getElementFromNewGraph(element);
@@ -82,7 +84,7 @@
 
     abstract Either<T, ?> getElementFromNewGraph(T element);
 
-    abstract Either<T, ?> save(T element);
+    abstract boolean save(T element);
 
     abstract <S extends Enum> S getNotFoundErrorStatus();
 
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/NormativesMigration.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/NormativesMigration.java
index 5fc0230..82d59e5 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/NormativesMigration.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/NormativesMigration.java
@@ -1,18 +1,22 @@
 package org.openecomp.sdc.asdctool.impl.migration.v1707.jsonmodel;
 
 import fj.data.Either;
-import org.openecomp.sdc.be.dao.jsongraph.types.JsonParseFlagEnum;
+import jersey.repackaged.com.google.common.collect.Sets;
+import org.openecomp.sdc.be.model.PropertyDefinition;
 import org.openecomp.sdc.be.model.Resource;
-import org.openecomp.sdc.be.model.jsontitan.operations.ToscaOperationFacade;
-import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
+import org.openecomp.sdc.be.model.tosca.ToscaPropertyType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import java.util.List;
+import java.util.Optional;
+import java.util.Set;
 
 public class NormativesMigration extends ComponentMigration<Resource> {
 
     private static Logger LOGGER = LoggerFactory.getLogger(NormativesMigration.class);
+    private static final String JCP_VERSION_PROPERTY = "jcp-version";
+    private static final Set<String> e2eMalformedVfcs = Sets.newHashSet("71879ee1-ad63-46d0-9943-d33083a6fdbb", "e54e7c4d-6020-4c53-838b-42d34c0da5c9");
 
     @javax.annotation.Resource(name = "normatives-resolver")
     private NormativesResolver normativesResolver;
@@ -31,6 +35,30 @@
     }
 
     @Override
+    boolean save(Resource element) {
+        if (e2eMalformedVfcs.contains(element.getUniqueId())) {
+            replaceJcpVersionPropertyTypeToVersion(element);
+        }
+        return super.save(element);
+    }
+
+    private void replaceJcpVersionPropertyTypeToVersion(Resource element) {
+        getJcpIntegerProperty(element).ifPresent(propertyDefinition -> {
+            LOGGER.info("resource {} with id {}: found property jcp-version with type 'integer', changing type to 'version'", element.getName(), element.getUniqueId());
+            propertyDefinition.setType(ToscaPropertyType.VERSION.getType());
+        });
+    }
+
+    private Optional<PropertyDefinition> getJcpIntegerProperty(Resource element) {
+        if (element.getProperties() == null) return Optional.empty();
+        return element.getProperties().stream()
+                               .filter(prop -> prop.getName().equals(JCP_VERSION_PROPERTY))
+                               .filter(prop -> prop.getType().equals(ToscaPropertyType.INTEGER.getType()))
+                               .findAny();
+
+    }
+
+    @Override
     boolean doPostMigrateOperation(List<Resource> elements) {
         LOGGER.info("migrating node types versions");
         return versionMigration.buildComponentsVersionChain(elements);
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/ResourcesCategoriesMigration.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/ResourcesCategoriesMigration.java
index 01654d2..5285c4c 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/ResourcesCategoriesMigration.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/ResourcesCategoriesMigration.java
@@ -2,7 +2,7 @@
 
 import fj.data.Either;
 import org.openecomp.sdc.asdctool.impl.migration.MigrationMsg;
-import org.openecomp.sdc.asdctool.impl.migration.Migration;
+import org.openecomp.sdc.asdctool.impl.migration.Migration1707Task;
 import org.openecomp.sdc.asdctool.impl.migration.v1707.MigrationUtils;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
 import org.openecomp.sdc.be.dao.jsongraph.TitanDao;
@@ -11,6 +11,7 @@
 import org.openecomp.sdc.be.model.category.CategoryDefinition;
 import org.openecomp.sdc.be.model.category.SubCategoryDefinition;
 import org.openecomp.sdc.be.model.operations.api.IElementOperation;
+import org.openecomp.sdc.be.model.operations.impl.UniqueIdBuilder;
 
 import javax.annotation.Resource;
 import java.util.ArrayList;
@@ -22,7 +23,7 @@
 import static org.openecomp.sdc.asdctool.impl.migration.v1707.jsonmodel.CategoriesUtils.filterOldSubCategories;
 
 
-public class ResourcesCategoriesMigration implements Migration {
+public class ResourcesCategoriesMigration implements Migration1707Task {
 
     @Resource(name = "element-operation")
     private IElementOperation elementOperation;
@@ -74,7 +75,10 @@
     }
 
     private List<SubCategoryDefinition> getAllDistinctSubCategories (List<CategoryDefinition> categoriesDefinitions) {
-        Map<String, List<SubCategoryDefinition>> subCategoriesByNormalName = categoriesDefinitions.stream().flatMap(ct -> ct.getSubcategories().stream()).collect(Collectors.groupingBy(SubCategoryDefinition::getNormalizedName));
+        Map<String, List<SubCategoryDefinition>> subCategoriesByNormalName = categoriesDefinitions.stream()
+                .filter(ct -> ct.getSubcategories()!=null)
+                .flatMap(ct -> ct.getSubcategories().stream())
+                .collect(Collectors.groupingBy(SubCategoryDefinition::getNormalizedName));
         return getDistinctSubCategories(subCategoriesByNormalName);
     }
 
@@ -112,7 +116,7 @@
     }
 
     private boolean migrateSubcategoryIfNotExists(CategoryDefinition parentCategory, SubCategoryDefinition subCategory) {
-        return isExists(subCategory).either(isExists -> isExists || migrateSubCategory(parentCategory, subCategory),
+        return isExists(parentCategory, subCategory).either(isExists -> isExists || migrateSubCategory(parentCategory, subCategory),
                                             status -> MigrationUtils.handleError(MigrationMsg.FAILED_TO_RETRIEVE_CATEGORY.getMessage(subCategory.getName(), status.name())));
     }
 
@@ -124,13 +128,13 @@
     }
 
     private Either<Boolean, ActionStatus> isExists(CategoryDefinition category) {
-        Either<CategoryDefinition, ActionStatus> byId = getCategoryById(category.getUniqueId());
+        Either<CategoryDefinition, ActionStatus> byId = getCategoryById(category);
         return byId.either(existingVal -> Either.left(true),
                            this::getEitherNotExistOrErrorStatus);
     }
 
-    private Either<Boolean, ActionStatus> isExists(SubCategoryDefinition subCategory) {
-        return getSubCategoryById(subCategory.getUniqueId()).either(existingVal -> Either.left(true),
+    private Either<Boolean, ActionStatus> isExists(CategoryDefinition parentCategory, SubCategoryDefinition subCategory) {
+        return getSubCategoryById(parentCategory, subCategory).either(existingVal -> Either.left(true),
                                                this::getEitherNotExistOrErrorStatus);
     }
 
@@ -138,12 +142,19 @@
         return status == ActionStatus.COMPONENT_CATEGORY_NOT_FOUND ? Either.left(false) : Either.right(status);
     }
 
-    private Either<CategoryDefinition, ActionStatus> getCategoryById(String uid) {
-        return elementOperationMigration.getCategory(NodeTypeEnum.ResourceNewCategory, uid);
+    private Either<CategoryDefinition, ActionStatus> getCategoryById(CategoryDefinition category) {
+        return elementOperationMigration.getCategory(NodeTypeEnum.ResourceNewCategory, category.getUniqueId());
     }
 
-    private Either<SubCategoryDefinition, ActionStatus> getSubCategoryById(String uid) {
-        return elementOperationMigration.getSubCategory(NodeTypeEnum.ResourceSubcategory, uid);
+    private Either<SubCategoryDefinition, ActionStatus> getSubCategoryById(CategoryDefinition parentCategory, SubCategoryDefinition subCategory) {
+        String subCategoryUid = getExpectedSubCategoryId(parentCategory, subCategory);
+        return elementOperationMigration.getSubCategory(NodeTypeEnum.ResourceSubcategory, subCategoryUid);
+    }
+
+    //since a sub category might belong to a different category in old graph its new graph id is different than its old graph id
+    private String getExpectedSubCategoryId(CategoryDefinition parentCategory, SubCategoryDefinition subCategory) {
+        String parentId = UniqueIdBuilder.buildCategoryUid(parentCategory.getNormalizedName(), NodeTypeEnum.ResourceNewCategory);
+        return UniqueIdBuilder.buildSubCategoryUid(parentId, subCategory.getNormalizedName());
     }
 
 
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/ServiceCategoriesMigration.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/ServiceCategoriesMigration.java
index f745b88..f8f79ad 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/ServiceCategoriesMigration.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/ServiceCategoriesMigration.java
@@ -10,6 +10,8 @@
 import javax.annotation.Resource;
 import java.util.List;
 
+import static org.openecomp.sdc.asdctool.impl.migration.v1707.MigrationUtils.handleError;
+
 public class ServiceCategoriesMigration extends JsonModelMigration<CategoryDefinition> {
 
     @Resource(name = "element-operation")
@@ -31,12 +33,15 @@
 
     @Override
     Either<CategoryDefinition, ?> getElementFromNewGraph(CategoryDefinition node) {
-        return elementOperationMigration.getCategory(NodeTypeEnum.ServiceNewCategory, node.getUniqueId());
+        String categoryUid = UniqueIdBuilder.buildCategoryUid(node.getNormalizedName(), NodeTypeEnum.ServiceNewCategory);//in malformed graph there are some categories with different id but same normalized name. so in new graph they same id
+        return elementOperationMigration.getCategory(NodeTypeEnum.ServiceNewCategory, categoryUid);
     }
 
     @Override
-    Either<CategoryDefinition, ActionStatus> save(CategoryDefinition graphNode) {
-        return elementOperationMigration.createCategory(graphNode, NodeTypeEnum.ServiceNewCategory);
+    boolean save(CategoryDefinition graphNode) {
+        return elementOperationMigration.createCategory(graphNode, NodeTypeEnum.ServiceNewCategory)
+                .either(savedCategory -> true,
+                        err -> handleError(String.format("failed to save category %s. error: %s", graphNode.getName(), err.name())));
     }
 
     @Override
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/ServicesMigration.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/ServicesMigration.java
index f5ff962..254a75b 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/ServicesMigration.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/ServicesMigration.java
@@ -1,25 +1,23 @@
 package org.openecomp.sdc.asdctool.impl.migration.v1707.jsonmodel;
 
 import fj.data.Either;
-import org.openecomp.sdc.be.datatypes.elements.ComponentInstanceDataDefinition;
 import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
-import org.openecomp.sdc.be.datatypes.enums.OriginTypeEnum;
-import org.openecomp.sdc.be.model.ComponentInstanceAttribute;
 import org.openecomp.sdc.be.model.ComponentInstanceProperty;
 import org.openecomp.sdc.be.model.Service;
 import org.openecomp.sdc.be.model.operations.api.IServiceOperation;
-import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
-import org.openecomp.sdc.be.model.operations.migration.MigrationErrorInformer;
+import org.openecomp.sdc.be.model.operations.migration.MigrationMalformedDataLogger;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import javax.annotation.Resource;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
 
 public class ServicesMigration extends ComponentMigration<Service> {
 
+    private static final String DEFAULT_CONFORMANCE_LEVEL = "0.0";
     private static Logger LOGGER = LoggerFactory.getLogger(ServicesMigration.class);
 
     @Resource(name = "service-operation")
@@ -39,10 +37,10 @@
     }
 
     @Override
-    Either<Service, StorageOperationStatus> save(Service element) {
-        MigrationErrorInformer.logIfServiceUsingMalformedVfs(element);
-        filterOutVFInstancePropsAndAttrs(element);
-        element.setConformanceLevel("0.0");
+    boolean save(Service element) {
+        MigrationMalformedDataLogger.logIfServiceUsingMalformedVfs(element);
+        filterOutDuplicatePropsAndAttrs(element);
+        element.setConformanceLevel(DEFAULT_CONFORMANCE_LEVEL);
         requirementsCapabilitiesMigrationService.overrideInstanceCapabilitiesRequirements(element);
         return super.save(element);
     }
@@ -60,48 +58,95 @@
         return versionMigration.buildComponentsVersionChain(elements);
     }
 
-    private void filterOutVFInstancePropsAndAttrs(Service element) {
-        if (element.getComponentInstances() != null) {
-            List<String> vfInstancesIds = getVFInstancesIds(element);
-            filterOutVFInstacnecProps(element, vfInstancesIds);
-            filterOutVFInstanceAttrs(element, vfInstancesIds);
+    private void filterOutDuplicatePropsAndAttrs(Service element) {
+        if (element.getComponentInstancesProperties() != null) {
+            removeDuplicatedNameProperties(element);
+        }
+        if (element.getComponentInstancesAttributes() != null) {
+            removeDuplicatedNameAttributes(element);
         }
     }
 
-    private void filterOutVFInstanceAttrs(Service element, List<String> vfInstancesIds) {
-        Map<String, List<ComponentInstanceAttribute>> componentInstancesAttributes = element.getComponentInstancesAttributes();
-        if (componentInstancesAttributes != null) {
-            element.setComponentInstancesAttributes(filterOutVFInstanceAttributes(componentInstancesAttributes, vfInstancesIds));
+    private void removeDuplicatedNameProperties(Service service) {
+        Map<String, List<ComponentInstanceProperty>> componentInstancesProperties = service.getComponentInstancesProperties();
+        componentInstancesProperties.forEach((uid, properties) ->  {
+            componentInstancesProperties.put(uid, getUniquedNamePropertyList(service, properties));
+        });
+    }
+
+    private List<ComponentInstanceProperty> getUniquedNamePropertyList(Service service, List<ComponentInstanceProperty> properties) {
+        if (properties == null) {
+            return null;
+        }
+        List<ComponentInstanceProperty> uniqueNameProperties = new ArrayList<>();
+        Map<String, List<ComponentInstanceProperty>> collect = properties.stream().collect(Collectors.groupingBy(ComponentInstanceProperty::getName));
+        collect.forEach((name, duplicatedProperties) -> {
+            logServiceDuplicateProperties(service, name, duplicatedProperties);
+            uniqueNameProperties.add(duplicatedProperties.get(0));
+        });
+        return uniqueNameProperties;
+    }
+
+    private void logServiceDuplicateProperties(Service service, String name, List<ComponentInstanceProperty> duplicatedProperties) {
+        if (duplicatedProperties.size() > 1) {
+            LOGGER.debug("service {} with id {} has instance {} with duplicate property {}", service.getName(), service.getUniqueId(), duplicatedProperties.get(0).getUniqueId(), name);
         }
     }
 
-    private void filterOutVFInstacnecProps(Service element, List<String> vfInstancesIds) {
-        Map<String, List<ComponentInstanceProperty>> componentInstancesProperties = element.getComponentInstancesProperties();
-        if (componentInstancesProperties != null) {
-            element.setComponentInstancesProperties(filterOutVFInstanceProperties(componentInstancesProperties, vfInstancesIds));
+    private void removeDuplicatedNameAttributes(Service service) {
+        Map<String, List<ComponentInstanceProperty>> componentInstancesAttributes = service.getComponentInstancesAttributes();
+        componentInstancesAttributes.forEach((uid, attributes) ->  {
+            componentInstancesAttributes.put(uid, getUniquedNameAttributeList(service, attributes));
+        });
+    }
+
+    private List<ComponentInstanceProperty> getUniquedNameAttributeList(Service service, List<ComponentInstanceProperty> attributes) {
+        if (attributes == null) {
+            return null;
+        }
+        List<ComponentInstanceProperty> uniqueNameAttributes = new ArrayList<>();
+        Map<String, List<ComponentInstanceProperty>> collect = attributes.stream().collect(Collectors.groupingBy(ComponentInstanceProperty::getName));
+        collect.forEach((name, duplicatedAttributess) -> {
+            logServiceMalformedAttributes(service, name, duplicatedAttributess);
+            uniqueNameAttributes.add(duplicatedAttributess.get(0));
+        });
+        return uniqueNameAttributes;
+    }
+
+    private void logServiceMalformedAttributes(Service service, String name, List<ComponentInstanceProperty> duplicatedAttributess) {
+        if (duplicatedAttributess.size() > 1) {
+            MigrationMalformedDataLogger.logMalformedDataMsg(String.format("service %s with id %s has instance %s with duplicate attribute %s",
+                    service.getName(), service.getUniqueId(), duplicatedAttributess.get(0).getUniqueId(), name));
         }
     }
 
-    private Map<String, List<ComponentInstanceProperty>> filterOutVFInstanceProperties(Map<String, List<ComponentInstanceProperty>> instances, List<String> vfInstanceIds) {
-        return instances.entrySet()
-                .stream()
-                .filter(entry -> !vfInstanceIds.contains(entry.getKey()))
-                .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
-    }
+    //    private void filterOutVFInstanceAttrs(Service element, List<String> vfInstancesIds) {
+//        Map<String, List<ComponentInstanceAttribute>> componentInstancesAttributes = element.getComponentInstancesAttributes();
+//        if (componentInstancesAttributes != null) {
+//            element.setComponentInstancesAttributes(filterOutVFInstanceAttributes(componentInstancesAttributes, vfInstancesIds));
+//        }
+//    }
+//
+//    private void filterOutVFInstacnecProps(Service element, List<String> vfInstancesIds) {
+//        Map<String, List<ComponentInstanceProperty>> componentInstancesProperties = element.getComponentInstancesProperties();
+//        if (componentInstancesProperties != null) {
+//            element.setComponentInstancesProperties(filterOutVFInstanceProperties(componentInstancesProperties, vfInstancesIds));
+//        }
+//    }
+//
+//    private Map<String, List<ComponentInstanceProperty>> filterOutVFInstanceProperties(Map<String, List<ComponentInstanceProperty>> instances, List<String> vfInstanceIds) {
+//        return instances.entrySet()
+//                .stream()
+//                .filter(entry -> !vfInstanceIds.contains(entry.getKey()))
+//                .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
+//    }
+//
+//    private Map<String, List<ComponentInstanceAttribute>> filterOutVFInstanceAttributes(Map<String, List<ComponentInstanceAttribute>> instances, List<String> vfInstanceIds) {
+//        return instances.entrySet()
+//                .stream()
+//                .filter(entry -> !vfInstanceIds.contains(entry.getKey()))
+//                .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
+//    }
 
-    private Map<String, List<ComponentInstanceAttribute>> filterOutVFInstanceAttributes(Map<String, List<ComponentInstanceAttribute>> instances, List<String> vfInstanceIds) {
-        return instances.entrySet()
-                .stream()
-                .filter(entry -> !vfInstanceIds.contains(entry.getKey()))
-                .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
-    }
-
-    private List<String> getVFInstancesIds(Service service) {
-        return service.getComponentInstances()
-                    .stream()
-                    .filter(componentInstance -> componentInstance.getOriginType() == OriginTypeEnum.VF)
-                    .map(ComponentInstanceDataDefinition::getUniqueId)
-                    .collect(Collectors.toList());
-    }
 
 }
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/UserStatesMigration.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/UserStatesMigration.java
index b248d90..67d9235 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/UserStatesMigration.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/UserStatesMigration.java
@@ -7,7 +7,6 @@
 import org.apache.tinkerpop.gremlin.structure.Property;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.openecomp.sdc.asdctool.impl.migration.MigrationMsg;
-import org.openecomp.sdc.asdctool.impl.migration.v1707.MigrationUtils;
 import org.openecomp.sdc.be.dao.neo4j.GraphPropertiesDictionary;
 import org.openecomp.sdc.be.dao.titan.TitanGenericDao;
 import org.openecomp.sdc.be.dao.titan.TitanOperationStatus;
@@ -23,6 +22,7 @@
 import java.util.stream.Collectors;
 
 import static fj.data.List.list;
+import static org.openecomp.sdc.asdctool.impl.migration.v1707.MigrationUtils.handleError;
 
 public class UserStatesMigration extends JsonModelMigration<Edge> {
 
@@ -71,9 +71,16 @@
     }
 
     @Override
-    Either<Edge, TitanOperationStatus> save(Edge userState) {
+    boolean save(Edge userState) {
         Either<InOutVertices, TitanOperationStatus> titanVertices = findEdgeInOutVerticesInNewGraph(userState);
-        return titanVertices.left().bind(inOutVertices -> genericDaoMigration.copyEdge(inOutVertices.getOutVertex(), inOutVertices.getInVertex(), userState));
+        return titanVertices.either(inOutVertices -> saveUserState(inOutVertices, userState),
+                                    err ->  handleError(String.format("could not find user edge %s in vertx. error: %s", userState.label(), err.name())));
+    }
+
+    private boolean saveUserState(InOutVertices inOutVertices, Edge userState) {
+        return genericDaoMigration.copyEdge(inOutVertices.getOutVertex(), inOutVertices.getInVertex(), userState)
+                .either(edge -> true,
+                        err -> handleError(String.format("failed to save user state edge %s. reason: %s", userState.label(), err.name())));
     }
 
     @Override
@@ -125,7 +132,7 @@
         String vertexUniqueId = getVertexUniqueId(vertex);
         LOGGER.debug(String.format("fetching vertex %s from new graph", vertexUniqueId));
         return genericDaoMigration.getVertexByProperty(vertexUniqueId, vertex.property(vertexUniqueId).value())
-                                   .right().map(err -> MigrationUtils.handleError(err, String.format("could not find vertex %s in new graph.", vertexUniqueId)))  ;
+                                   .right().map(err -> handleError(err, String.format("could not find vertex %s in new graph.", vertexUniqueId)))  ;
     }
 
 //    private boolean deleteAllEdges(UserData userData, Direction direction) {
@@ -154,6 +161,7 @@
         TitanVertex getInVertex() {
             return inVertex;
         }
+
     }
 
 }
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/UsersMigration.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/UsersMigration.java
index 9dd3fc4..a578f06 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/UsersMigration.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/UsersMigration.java
@@ -1,13 +1,10 @@
 package org.openecomp.sdc.asdctool.impl.migration.v1707.jsonmodel;
 
-import fj.Function;
 import fj.data.Either;
-import org.openecomp.sdc.asdctool.impl.migration.v1707.MigrationUtils;
 import org.openecomp.sdc.be.dao.api.ActionStatus;
 import org.openecomp.sdc.be.dao.utils.UserStatusEnum;
 import org.openecomp.sdc.be.model.User;
 import org.openecomp.sdc.be.model.operations.api.IUserAdminOperation;
-import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -36,13 +33,16 @@
     @Override
     Either<User, ActionStatus> getElementFromNewGraph(User user) {
         LOGGER.debug(String.format("trying to load user %s from new graph", user.getUserId()));
-        return userAdminOperationMigration.getUserData(user.getUserId(), false);
+        return user.getStatus().equals(UserStatusEnum.ACTIVE) ? userAdminOperationMigration.getUserData(user.getUserId(), false) :
+                                                                userAdminOperationMigration.getInactiveUserData(user.getUserId());
     }
 
     @Override
-    Either<User, StorageOperationStatus> save(User user) {
+    boolean save(User user) {
         LOGGER.debug(String.format("trying to save user %s to new graph", user.getUserId()));
-        return userAdminOperationMigration.saveUserData(user);
+        return userAdminOperationMigration.saveUserData(user)
+                .either(savedUser -> true,
+                        err -> handleError(String.format("failed when saving user %s. error %s", user.getUserId(), err.name())));
     }
 
     @Override
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/VFResourcesMigration.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/VFResourcesMigration.java
index b684883..34c40f0 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/VFResourcesMigration.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/VFResourcesMigration.java
@@ -31,7 +31,7 @@
     }
 
     @Override
-    Either<Resource, StorageOperationStatus> save(Resource element) {
+    boolean save(Resource element) {
         requirementsCapabilitiesMigrationService.overrideInstanceCapabilitiesRequirements(element);
         return super.save(element);
     }
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/VersionMigration.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/VersionMigration.java
index 7dadd79..145ae28 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/VersionMigration.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/migration/v1707/jsonmodel/VersionMigration.java
@@ -1,9 +1,7 @@
 package org.openecomp.sdc.asdctool.impl.migration.v1707.jsonmodel;
 
 import fj.data.Either;
-import org.apache.commons.lang3.StringUtils;
 import org.apache.tinkerpop.gremlin.structure.Edge;
-import org.openecomp.sdc.asdctool.impl.migration.MigrationException;
 import org.openecomp.sdc.asdctool.impl.migration.MigrationMsg;
 import org.openecomp.sdc.asdctool.impl.migration.v1707.MigrationUtils;
 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
@@ -13,7 +11,6 @@
 import org.openecomp.sdc.be.dao.titan.TitanOperationStatus;
 import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
 import org.openecomp.sdc.be.model.Component;
-import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
 import org.openecomp.sdc.be.model.operations.impl.UniqueIdBuilder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -36,8 +33,7 @@
     private TitanDao titanDao;
 
     public boolean buildComponentsVersionChain(List<T> components) {
-        setMissingInvariantUid(components);
-        Map<String, List<T>> componentsByInvariant = components.stream().collect(Collectors.groupingBy(Component::getInvariantUUID));
+        Map<String, List<T>> componentsByInvariant = components.stream().filter(c -> c.getInvariantUUID() != null).collect(Collectors.groupingBy(Component::getInvariantUUID));
         for (List<T> componentsList : componentsByInvariant.values()) {
             boolean versionChainBuilt = buildVersionChainForInvariant(componentsList);
             if (!versionChainBuilt) {
@@ -63,7 +59,7 @@
     }
 
     private void sortComponentsByVersion(List<T> components) {
-        Collections.sort(components, (o1, o2) -> o1.getVersion().compareTo(o2.getVersion()));
+        Collections.sort(components, (o1, o2) -> Double.valueOf(o1.getVersion()).compareTo(Double.valueOf(o2.getVersion())));
     }
 
     private boolean createVersionRelationIfNotExist(String fromUid, String toUid) {
@@ -74,10 +70,10 @@
 
     private boolean createVersionRelation(String fromUid, String toUid) {
         LOGGER.debug(String.format("creating version edge between vertex %s and vertex %s", fromUid, toUid));
-        Either<GraphVertex, TitanOperationStatus> vertexById = titanDao.getVertexById(fromUid);
-        Either<GraphVertex, TitanOperationStatus> vertexById1 = titanDao.getVertexById(toUid);
-        if (vertexById1.isLeft() && vertexById.isLeft()) {
-            TitanOperationStatus versionCreated = titanDao.createEdge(vertexById.left().value(), vertexById1.left().value(), EdgeLabelEnum.VERSION, new HashMap<>());
+        Either<GraphVertex, TitanOperationStatus> fromVertex = titanDao.getVertexById(fromUid);
+        Either<GraphVertex, TitanOperationStatus> toVertex = titanDao.getVertexById(toUid);
+        if (toVertex.isLeft() && fromVertex.isLeft()) {
+            TitanOperationStatus versionCreated = titanDao.createEdge(fromVertex.left().value(), toVertex.left().value(), EdgeLabelEnum.VERSION, new HashMap<>());
             return versionCreated == TitanOperationStatus.OK;
         }
         return MigrationUtils.handleError(String.format("could not create version edge between vertex %s and vertex %s.", fromUid, toUid));
@@ -99,28 +95,4 @@
     }
 
     abstract NodeTypeEnum getNodeTypeEnum();
-
-    //some invariatn uids are missing in production
-    private void setMissingInvariantUid(List<T> components) {
-        List<T> missingInvariantCmpts = getComponentsWithNoInvariantUids(components);
-        for (T missingInvariantCmpt : missingInvariantCmpts) {
-            String uuid = missingInvariantCmpt.getUUID();
-            missingInvariantCmpt.setInvariantUUID(findInvariantUidOrElseFail(components, uuid));
-        }
-    }
-
-    private List<T> getComponentsWithNoInvariantUids(List<T> components) {
-        List<T> cmptsWithoutInvariant = components.stream().filter(c -> c.getInvariantUUID() == null).collect(Collectors.toList());
-        LOGGER.info(String.format("the following components are missing invariant uids: %s", StringUtils.join(cmptsWithoutInvariant.stream().map(Component::getUniqueId).collect(Collectors.toList()), ",")));
-        return cmptsWithoutInvariant;
-    }
-
-    private String findInvariantUidOrElseFail(List<T> components, String uuid) {
-        return components.stream()
-                .filter(c -> c.getUUID().equals(uuid))
-                .map(Component::getInvariantUUID)
-                .filter(c -> c != null)
-                .findAny().orElseThrow(() -> new MigrationException(String.format("cannot find invariantuid for component with uuid %s", uuid)));
-    }
-
 }
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/MigrationMenu.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/MigrationMenu.java
index c914e3b..c3d8743 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/MigrationMenu.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/MigrationMenu.java
@@ -35,6 +35,8 @@
 import org.openecomp.sdc.asdctool.impl.migration.v1702.Migration1702;
 import org.openecomp.sdc.asdctool.impl.migration.v1707.Migration1707;
 import org.openecomp.sdc.asdctool.impl.migration.v1707.Migration1707Config;
+import org.openecomp.sdc.asdctool.impl.migration.v1707.DistributionStatusUpdate;
+import org.openecomp.sdc.asdctool.impl.migration.v1707.Migration1707VnfFix;
 import org.openecomp.sdc.asdctool.impl.migration.v1707.VfModulesPropertiesAdding;
 import org.openecomp.sdc.be.config.ConfigurationManager;
 import org.openecomp.sdc.common.api.ConfigurationSource;
@@ -64,7 +66,10 @@
 		FIX_ICONS("fix-icons", "titanFixUtils"),
 		MIGRATION_1610_1702("migrate-1610-1702", "migration1702"),
 		MIGRATION_1702_1707("migrate-1702-1707", "migration1707"),
-		VFMODULES_PROPERTIES_ADDING("vfModules-properties-adding", "vfModulesPropertiesAdding");
+		DISTRIBUTION_STATUS_UPDATE_1707("distribution-status-update-1707", "distributionStatusUpdate"),
+		VFMODULES_PROPERTIES_ADDING("vfModules-properties-adding", "vfModulesPropertiesAdding"),
+		MIGRATION_1707_RELATIONS_FIX("fix-relations-after-migration-1707", "migration1707relationsFix"),
+		MIGRATION_1707_VNF_FIX("fix-vnf-after-migration-1707", "migration1707vnfFix");
 		// UPDATE_DATA_TYPES("update_data_types", "updateDataTypes");
 
 		private String value, beanName;
@@ -238,9 +243,8 @@
 				}
 			
 				break;
-			case MIGRATION_1702_1707:
+			case MIGRATION_1702_1707://this migration is currently not needed, but will be commented out for production env
 //				log.info("Start ASDC migration from 1702 to 1707");
-				System.exit(0);
 //				Migration1707 migration1707 = (Migration1707) context.getBean(operationEnum.getBeanName());
 //				isSuccessful = migration1707.migrate();
 //				if (isSuccessful) {
@@ -250,18 +254,59 @@
 //					log.info("SDC migration from 1702 to 1707 has failed");
 //					System.exit(2);
 //				}
+				System.exit(0);
 				break;
-			case VFMODULES_PROPERTIES_ADDING:
-				log.info("Start adding new properties to vfModules");
-				VfModulesPropertiesAdding migrationVfModulesProperties = (VfModulesPropertiesAdding) context.getBean(operationEnum.getBeanName());
-				isSuccessful = migrationVfModulesProperties.migrate(args[1]);
-				if (isSuccessful) {
-					log.info("Adding new properties to vfModules was finished successfully");
-					System.exit(0);
-				} else{
-					log.info("Adding new properties to vfModules has failed");
-					System.exit(2);
-				}
+			case VFMODULES_PROPERTIES_ADDING://this migration is currently not needed, but will be commented out for production env
+//				log.info("Start adding new properties to vfModules");
+//				VfModulesPropertiesAdding migrationVfModulesProperties = (VfModulesPropertiesAdding) context.getBean(operationEnum.getBeanName());
+//				isSuccessful = migrationVfModulesProperties.migrate(args[1]);
+//				if (isSuccessful) {
+//					log.info("Adding new properties to vfModules was finished successfully");
+//					System.exit(0);
+//				} else{
+//					log.info("Adding new properties to vfModules has failed");
+//					System.exit(2);
+//				}
+				System.exit(0);
+				break;
+			case MIGRATION_1707_VNF_FIX://this migration is currently not needed, but will be commented out for production env
+//				log.info("Start fixing vnf after 1707 migration");
+//				Migration1707VnfFix migrationVnfFix = (Migration1707VnfFix) context.getBean(operationEnum.getBeanName());
+//				isSuccessful = migrationVnfFix.migrate();
+//				if (isSuccessful) {
+//					log.info("Fixing VNFs after 1707 migration was finished successfully");
+//					System.exit(0);
+//				} else{
+//					log.info("Fixing VNFs after 1707 migration has failed");
+//					System.exit(2);
+//				}
+				System.exit(0);
+				break;
+			case DISTRIBUTION_STATUS_UPDATE_1707://not needed can be dropped
+//				log.info("Start Distribution status update 1707");
+//				DistributionStatusUpdate distStatusUpdate = (DistributionStatusUpdate) context.getBean(operationEnum.getBeanName());
+//				isSuccessful = distStatusUpdate.migrate();
+//				if (isSuccessful) {
+//					log.info("ASDC Distribution status update 1707 was finished successful");
+//					System.exit(0);
+//				} else{
+//					log.info("ASDC Distribution status update 1707 has failed");
+//					System.exit(2);
+//				}
+				System.exit(0);
+				break;
+			case MIGRATION_1707_RELATIONS_FIX://not needed can be dropped
+//				log.info("Start fixing relations after 1707 migration");
+//				Migration migrationFix = (Migration1707RelationsFix) context.getBean(operationEnum.getBeanName());
+//				isSuccessful = migrationFix.migrate();
+//				if (isSuccessful) {
+//					log.info("Fixing relations after 1707 migration was finished successfully");
+//					System.exit(0);
+//				} else{
+//					log.info("Fixing relations after 1707 migration has failed");
+//					System.exit(2);
+//				}
+				System.exit(0);
 				break;
 			default:
 				usageAndExit();
@@ -298,6 +343,9 @@
 		System.out.println("Usage: migrate-1610-1702 <configuration dir>");
 		System.out.println("Usage: migrate-1702-1707 <configuration dir>");
 		System.out.println("Usage: update_data_types <configuration dir> <data_types_input_file path>");
+		System.out.println("Usage: distribution-status-update-1707");
 		System.out.println("Usage: vfModules-properties-adding <group_types_input_file path> <configuration dir>");
+		System.out.println("Usage: fix-relations-after-migration-1707 <configuration dir>");
+		System.out.println("Usage: fix-vnf-after-migration-1707 <configuration dir>");
 	}
 }
diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/SdcSchemaFileImport.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/SdcSchemaFileImport.java
new file mode 100644
index 0000000..edeb567
--- /dev/null
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/main/SdcSchemaFileImport.java
@@ -0,0 +1,84 @@
+package org.openecomp.sdc.asdctool.main;
+
+import java.io.File;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Date;
+
+import org.apache.commons.codec.digest.DigestUtils;
+import org.openecomp.sdc.asdctool.impl.EsToCassandraDataMigrationConfig;
+import org.openecomp.sdc.be.config.ConfigurationManager;
+import org.openecomp.sdc.be.dao.cassandra.CassandraOperationStatus;
+import org.openecomp.sdc.be.dao.cassandra.SdcSchemaFilesCassandraDao;
+import org.openecomp.sdc.be.resources.data.SdcSchemaFilesData;
+import org.openecomp.sdc.common.api.ConfigurationSource;
+import org.openecomp.sdc.common.impl.ExternalConfiguration;
+import org.openecomp.sdc.common.impl.FSConfigurationSource;
+import org.springframework.context.annotation.AnnotationConfigApplicationContext;
+
+
+public class SdcSchemaFileImport {
+	
+	private static SdcSchemaFilesCassandraDao schemaFilesCassandraDao;
+	
+	public static void main(String[] args) throws Exception {
+		
+		final String FILE_NAME = "SDC.zip";
+		
+		if (args == null || args.length < 4) {
+			usageAndExit();
+		}
+		
+		String pathAndFile = args[0];
+		String sdcReleaseNum = args[1];
+		String conformanceLevel = args[2];
+		String appConfigDir = args[3];
+		
+		File file = new File(pathAndFile);
+		if(!file.exists()){
+			System.out.println("The file or path does not exist");
+			System.exit(1);
+		} else if(!file.isFile()){
+			System.out.println("Specify the file name");
+			System.exit(1);
+		}
+
+		AnnotationConfigApplicationContext context = initContext(appConfigDir);
+		schemaFilesCassandraDao = (SdcSchemaFilesCassandraDao) context.getBean("sdc-schema-files-cassandra-dao");
+		
+		Path path = Paths.get(pathAndFile);
+		byte[] fileBytes = Files.readAllBytes(path);
+		
+		Date date = new Date();
+		String md5Hex = DigestUtils.md5Hex(fileBytes);
+		
+		SdcSchemaFilesData schemeFileData = new SdcSchemaFilesData(sdcReleaseNum, date, conformanceLevel, FILE_NAME, fileBytes, md5Hex);
+		CassandraOperationStatus saveSchemaFile = schemaFilesCassandraDao.saveSchemaFile(schemeFileData);
+		
+		if(!saveSchemaFile.equals(CassandraOperationStatus.OK)){
+			System.out.println("SdcSchemaFileImport failed cassandra error" + saveSchemaFile);
+			System.exit(1);
+		}
+		
+		System.out.println("SdcSchemaFileImport successfully completed");
+		
+		System.exit(0);
+	}
+	
+	private static void usageAndExit(){
+		SdcSchemaFileImportUsage();
+		System.exit(1);
+	}
+	
+	private static void SdcSchemaFileImportUsage(){
+		System.out.println("Usage: <file dir/filename> <SDC release number> <Schema conformance level> <configuration dir>");
+	}
+	
+	private static AnnotationConfigApplicationContext initContext(String appConfigDir) {
+		ConfigurationSource configurationSource = new FSConfigurationSource(ExternalConfiguration.getChangeListener(), appConfigDir);
+		ConfigurationManager configurationManager = new ConfigurationManager(configurationSource);
+		AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(EsToCassandraDataMigrationConfig.class);
+		return context;
+	}
+}
diff --git a/asdctool/src/main/resources/config/configuration.yaml b/asdctool/src/main/resources/config/configuration.yaml
index d376ba3..beca6c9 100644
--- a/asdctool/src/main/resources/config/configuration.yaml
+++ b/asdctool/src/main/resources/config/configuration.yaml
@@ -25,8 +25,8 @@
 version: 1.0
 released: 2012-11-30
 
-titanCfgFile: C:\Git_work\Git_UGN\d2-sdnc\asdctool\src\main\resources\config\titan.properties
-titanMigrationKeySpaceCfgFile: C:\Git_work\Git_UGN\d2-sdnc\asdctool\src\main\resources\config\titan-migration.properties
+titanCfgFile: src\main\resources\config\titan.properties
+titanMigrationKeySpaceCfgFile: src\main\resources\config\titan-migration.properties
 titanInMemoryGraph: false
 titanLockTimeout: 1800
 titanReconnectIntervalInSeconds: 3
diff --git a/asdctool/src/main/resources/config/groupTypes.yml b/asdctool/src/main/resources/config/groupTypes.yml
index c72dc88..ce457e4 100644
--- a/asdctool/src/main/resources/config/groupTypes.yml
+++ b/asdctool/src/main/resources/config/groupTypes.yml
@@ -63,7 +63,20 @@
         Group. 
         VID operator must select the Volume Group instance to attach to a VF-Module 
         at deployment time.
-      
+    availability_zone_count:
+      type: integer
+      required: false
+      description: >
+        Quantity of Availability Zones needed for this VF-Module    
+        (source: Extracted from VF-Module HEAT template)
+    vfc_list:
+      type: map
+      entry_schema: 
+        description: <vfc_id>:<count>
+        type: string
+      required: false
+      description: >
+        Identifies the set of VM types and their count included in the VF-Module
 tosca.groups.Root:
   description: The TOSCA Group Type all other TOSCA Group Types derive from
   interfaces: 
diff --git a/asdctool/src/main/resources/config/logback.xml b/asdctool/src/main/resources/config/logback.xml
index 87795ae..0426a32 100644
--- a/asdctool/src/main/resources/config/logback.xml
+++ b/asdctool/src/main/resources/config/logback.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <configuration>
-	<property scope="system" name="ECOMP-component-name" value="ASDC" />
-	<property scope="system" name="ECOMP-subcomponent-name" value="ASDC-TOOL" />
+	<property scope="system" name="ECOMP-component-name" value="SDC" />
+	<property scope="system" name="ECOMP-subcomponent-name" value="SDC-TOOL" />
 	<property name="default-log-pattern"
 		value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{uuid}|%X{serviceInstanceID}|%thread||${ECOMP-subcomponent-name}|%X{userId}|%level|%X{alarmSeverity}|%X{localAddr}|${beFqdn}|%X{remoteAddr}|%logger{35}|%X{timer}|ActivityType=&lt;%M&gt;, Desc=&lt;%msg&gt;%n" />
 	
@@ -36,9 +36,33 @@
 		</encoder>
 	</appender>
 
+	<appender name="MALFORMED_DATA"
+			  class="ch.qos.logback.core.rolling.RollingFileAppender">
+		<file>${HOME}/asdctool/logs/${ECOMP-component-name}/${ECOMP-subcomponent-name}/malformed-data.log</file>
+
+		<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+			<fileNamePattern>${HOME}/asdctool/logs/${ECOMP-component-name}/${ECOMP-subcomponent-name}/malformed-data.log.%i
+			</fileNamePattern>
+			<minIndex>1</minIndex>
+			<maxIndex>10</maxIndex>
+		</rollingPolicy>
+
+		<triggeringPolicy
+				class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+			<maxFileSize>20MB</maxFileSize>
+		</triggeringPolicy>
+		<encoder>
+			<pattern>${default-log-pattern}</pattern>
+		</encoder>
+	</appender>
+
+
 	<root level="INFO">
 		<appender-ref ref="DEBUG_ROLLING" />
 	</root>
 	<logger name="org.openecomp.sdc" level="INFO" />
+	<logger name="org.openecomp.sdc.be.model.operations.migration" level="ERROR" >
+		<appender-ref ref="MALFORMED_DATA"/>
+	</logger>
 
 </configuration>
\ No newline at end of file
diff --git a/asdctool/src/main/resources/scripts/dataMigration1707.sh b/asdctool/src/main/resources/scripts/dataMigration1707.sh
index e67de2a..11a151a 100644
--- a/asdctool/src/main/resources/scripts/dataMigration1707.sh
+++ b/asdctool/src/main/resources/scripts/dataMigration1707.sh
@@ -18,7 +18,7 @@
 
 mainClass="org.openecomp.sdc.asdctool.main.MigrationMenu"
 
-command="java $JVM_LOG_FILE -cp $JARS $mainClass migrate-1702-1707 $@"
+command="java $JVM_LOG_FILE -Xmx6000M -cp $JARS $mainClass migrate-1702-1707 $@"
 echo $command
 
 $command
diff --git a/asdctool/src/main/resources/scripts/distributionStatusUpdate1707.sh b/asdctool/src/main/resources/scripts/distributionStatusUpdate1707.sh
new file mode 100644
index 0000000..a9d308f
--- /dev/null
+++ b/asdctool/src/main/resources/scripts/distributionStatusUpdate1707.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+##############################
+# Distribution Status Update 1707
+##############################
+
+CURRENT_DIR=`pwd`
+BASEDIR=$(dirname $0)
+
+if [ ${BASEDIR:0:1} = "/" ]
+then
+                FULL_PATH=$BASEDIR
+else
+                FULL_PATH=$CURRENT_DIR/$BASEDIR
+fi
+
+source ${FULL_PATH}/baseOperation.sh
+
+mainClass="org.openecomp.sdc.asdctool.main.MigrationMenu"
+
+command="java $JVM_LOG_FILE -cp $JARS $mainClass distribution-status-update-1707 $@"
+echo $command
+
+$command
+result=$?
+
+
+
+echo "***********************************"
+echo "***** $result *********************"
+echo "***********************************"
+
+exit $result
+
+
diff --git a/asdctool/src/main/resources/scripts/migration1707RelationsFix.sh b/asdctool/src/main/resources/scripts/migration1707RelationsFix.sh
new file mode 100644
index 0000000..c930243
--- /dev/null
+++ b/asdctool/src/main/resources/scripts/migration1707RelationsFix.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+##############################
+# Data Migration: fix relations after migration 1707
+##############################
+
+CURRENT_DIR=`pwd`
+BASEDIR=$(dirname $0)
+
+if [ ${BASEDIR:0:1} = "/" ]
+then
+                FULL_PATH=$BASEDIR
+else
+                FULL_PATH=$CURRENT_DIR/$BASEDIR
+fi
+
+source ${FULL_PATH}/baseOperation.sh
+
+mainClass="org.openecomp.sdc.asdctool.main.MigrationMenu"
+
+command="java $JVM_LOG_FILE -cp $JARS $mainClass fix-relations-after-migration-1707 $@"
+echo $command
+
+$command
+result=$?
+
+echo "***********************************"
+echo "***** $result *********************"
+echo "***********************************"
+
+exit $result
+
+
diff --git a/asdctool/src/main/resources/scripts/retrieve_schema_file.sh b/asdctool/src/main/resources/scripts/retrieve_schema_file.sh
new file mode 100644
index 0000000..f66b530
--- /dev/null
+++ b/asdctool/src/main/resources/scripts/retrieve_schema_file.sh
@@ -0,0 +1,20 @@
+#!/bin/sh 
+
+cass_user=asdc_user
+cass_pass='Aa1234%^!'
+sdcReleaseNum=$1 
+conformanceLevel=$2
+
+CQLSH="/home/vagrant/cassandra/apache-cassandra-2.1.9/bin/cqlsh"
+
+
+ ### Get payload
+ 
+ select_payload="select payload from sdcartifact.sdcschemafiles where conformanceLevel='$conformanceLevel' and sdcReleaseNum='$sdcReleaseNum'"
+ 
+ echo "Run: [$select_payload]"
+
+$CQLSH -e "$select_payload" |grep "0x" |xxd -r -p > SDC-downloaded.zip
+
+res=$?
+echo "After select payload, res=[$res]"
\ No newline at end of file
diff --git a/asdctool/src/main/resources/scripts/vfmoduleFix1707.sh b/asdctool/src/main/resources/scripts/vfmoduleFix1707.sh
new file mode 100644
index 0000000..4857924
--- /dev/null
+++ b/asdctool/src/main/resources/scripts/vfmoduleFix1707.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+##############################
+# Distribution Status Update 1707
+##############################
+
+CURRENT_DIR=`pwd`
+BASEDIR=$(dirname $0)
+
+if [ ${BASEDIR:0:1} = "/" ]
+then
+                FULL_PATH=$BASEDIR
+else
+                FULL_PATH=$CURRENT_DIR/$BASEDIR
+fi
+
+source ${FULL_PATH}/baseOperation.sh
+
+mainClass="org.openecomp.sdc.asdctool.main.MigrationMenu"
+
+command="java $JVM_LOG_FILE -cp $JARS $mainClass fix-vnf-after-migration-1707 $@"
+echo $command
+
+$command
+result=$?
+
+
+
+echo "***********************************"
+echo "***** $result *********************"
+echo "***********************************"
+
+exit $result
+
+
