diff --git a/appc-directed-graph/dg-loader/provider/.gitignore b/appc-directed-graph/dg-loader/provider/.gitignore
new file mode 100644
index 0000000..841e8d9
--- /dev/null
+++ b/appc-directed-graph/dg-loader/provider/.gitignore
@@ -0,0 +1,8 @@
+# Eclipse
+.classpath
+.project
+.settings/
+
+# Maven
+log/
+target/
diff --git a/appc-directed-graph/dg-loader/provider/pom.xml b/appc-directed-graph/dg-loader/provider/pom.xml
new file mode 100644
index 0000000..3bd0ae9
--- /dev/null
+++ b/appc-directed-graph/dg-loader/provider/pom.xml
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.openecomp.appc.plugins</groupId>
+        <artifactId>dg-loader</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+    </parent>
+    <artifactId>dg-loader-provider</artifactId>
+    <packaging>bundle</packaging>
+    <name>Directed Graph Loader - Provider</name>
+    <url>http://maven.apache.org</url>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.openecomp.sdnc.core</groupId>
+            <artifactId>sli-provider</artifactId>
+            <version>${sdnctl.sli.version}</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>${common.io.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.att.eelf</groupId>
+            <artifactId>eelf-core</artifactId>
+            <version>${eelf.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <version>${bundle.plugin.version}</version>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Bundle-SymbolicName>org.openecomp.sdnc.dg.loader</Bundle-SymbolicName>
+                        <Bundle-Activator>org.openecomp.sdnc.dg.loader.DGLoaderActivator</Bundle-Activator>
+                        <Export-Package>org.openecomp.sdnc.dg.loader</Export-Package>
+                        <Import-Package>*</Import-Package>
+                        <DynamicImport-Package>*</DynamicImport-Package>
+                    </instructions>
+                    <manifestLocation>${project.basedir}/src/main/resources/META-INF</manifestLocation>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <version>2.4.1</version>
+                <configuration>
+                    <descriptorRefs>
+                        <descriptorRef>jar-with-dependencies</descriptorRef>
+                    </descriptorRefs>
+                    <finalName>dg-loader</finalName>
+                    <archive>
+                        <manifest>
+                            <mainClass>org.openecomp.sdnc.dg.loader.DGXMLLoadNActivate</mainClass>
+                        </manifest>
+                    </archive>
+                    <attach>false</attach>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>make-assembly</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+        </plugins>
+        <pluginManagement>
+            <plugins>
+                <!--This plugin's configuration is used to store Eclipse m2e settings
+                    only. It has no influence on the Maven build itself. -->
+                <plugin>
+                    <groupId>org.eclipse.m2e</groupId>
+                    <artifactId>lifecycle-mapping</artifactId>
+                    <version>1.0.0</version>
+                    <configuration>
+                        <lifecycleMappingMetadata>
+                            <pluginExecutions>
+                                <pluginExecution>
+                                    <pluginExecutionFilter>
+                                        <groupId>
+                                            com.brocade.developer
+                                        </groupId>
+                                        <artifactId>
+                                            providermodule-plugin
+                                        </artifactId>
+                                        <versionRange>
+                                            [1.2.0.100-SNAPSHOT,)
+                                        </versionRange>
+                                        <goals>
+                                            <goal>process</goal>
+                                        </goals>
+                                    </pluginExecutionFilter>
+                                    <action>
+                                        <ignore />
+                                    </action>
+                                </pluginExecution>
+                            </pluginExecutions>
+                        </lifecycleMappingMetadata>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+</project>
diff --git a/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGLoaderActivator.java b/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGLoaderActivator.java
new file mode 100644
index 0000000..dd56e6c
--- /dev/null
+++ b/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGLoaderActivator.java
@@ -0,0 +1,58 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property.  All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdnc.dg.loader;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+
+public class DGLoaderActivator implements BundleActivator{
+
+	private List<ServiceRegistration> registrations = new LinkedList<ServiceRegistration>();
+
+
+	private static final EELFLogger log = EELFManager.getInstance().getLogger(DGLoaderActivator.class);
+
+	@Override
+	public void start(BundleContext ctx) throws Exception
+	{
+
+		
+
+	}
+	@Override
+	public void stop(BundleContext arg0) throws Exception
+	{
+		for (ServiceRegistration registration: registrations)
+		{
+			registration.unregister();
+			registration = null;
+		}
+
+	}
+
+}
diff --git a/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLActivate.java b/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLActivate.java
new file mode 100644
index 0000000..1cb446a
--- /dev/null
+++ b/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLActivate.java
@@ -0,0 +1,128 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property.  All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdnc.dg.loader;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang.StringUtils;
+import org.openecomp.sdnc.sli.SvcLogicGraph;
+import org.openecomp.sdnc.sli.SvcLogicStore;
+import org.openecomp.sdnc.sli.SvcLogicStoreFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+
+public class DGXMLActivate {
+
+	private final static Logger logger = LoggerFactory.getLogger(DGXMLLoadNActivate.class);
+	private final SvcLogicStore store;
+	public static String STRING_ENCODING = "utf-8";
+
+	public DGXMLActivate(String propfile) throws Exception{
+		if(StringUtils.isBlank(propfile)){
+			throw new Exception(propfile + " Profile file is not defined");
+		}
+		this.store = SvcLogicStoreFactory.getSvcLogicStore(propfile);
+	}
+
+
+	public void activateDg(String activateFilePath) throws Exception {
+		logger.info("******************** Activating DG into Database *****************************");
+		try {
+			List<String> errors = new ArrayList<String>();
+			if(this.store != null){
+				File activateFile = new File(activateFilePath);
+				if(activateFile != null && activateFile.isFile()){
+					List<String> fileLines = FileUtils.readLines(activateFile,STRING_ENCODING);
+					if(fileLines != null ){
+						for (String line : fileLines) {
+							if(line != null && ! line.trim().startsWith("#")){
+								String lineArray[] = line.trim().split(":");
+								try {
+									if(lineArray != null && lineArray.length >= 4){
+										String module = lineArray[0];
+										String rpc = lineArray[1];
+										String version = lineArray[2];
+										String mode = lineArray[3];
+										if(StringUtils.isNotBlank(module) && StringUtils.isNotBlank(rpc)
+												&& StringUtils.isNotBlank(version) && StringUtils.isNotBlank(mode)){
+											logger.info("Activating DG :" + line);
+											SvcLogicGraph graph = this.store.fetch(module, rpc, version, mode);
+											if(graph != null){
+												logger.info("Found Graph :" + line + " Activating ...");
+												this.store.activate(graph);
+											}else{
+												throw new Exception("Failed to fetch from Database");
+											}
+										}
+									}
+								} catch (Exception e) {
+									e.printStackTrace();
+									errors.add("Failed to Activate "+line + ", "+e.getMessage());
+								}
+							}
+						}
+					}
+				}else{
+					throw new Exception(activateFile + " is not a valid Activate file Path");
+				}
+			}else{
+				throw new Exception("Failed to initialise SvcLogicStore");
+			}
+
+			if(errors.size() > 0){
+				throw new Exception(errors.toString());
+			}
+		} catch (Exception e) {
+			logger.error(e.getMessage());
+		}
+	}
+
+
+	public static void main(String[] args) {
+		try {
+			
+			String activateFile = null;
+			String propertyPath = null;
+			
+			if(args != null && args.length >= 2){
+				activateFile = args[0];
+				propertyPath = args[1];
+			}else{
+				throw new Exception("Sufficient inputs for DGXMLActivate are missing <activatefile> <dbPropertyfile>");
+			}
+
+			DGXMLActivate dgXmlActivate = new DGXMLActivate(propertyPath);
+			dgXmlActivate.activateDg(activateFile);
+		} catch (Exception e) {
+			e.printStackTrace();
+		}finally {
+			System.exit(1);
+		}
+	}
+
+
+
+}
diff --git a/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLGenerator.java b/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLGenerator.java
new file mode 100644
index 0000000..3ffef14
--- /dev/null
+++ b/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLGenerator.java
@@ -0,0 +1,128 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property.  All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdnc.dg.loader;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.script.Invocable;
+import javax.script.ScriptEngine;
+import javax.script.ScriptEngineManager;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class DGXMLGenerator {
+	private final static Logger logger = LoggerFactory.getLogger(DGXMLGenerator.class);
+
+	public static String STRING_ENCODING = "utf-8";
+	public static String JS_INTERFACE_DG_CONVERTOR = "dgconverter";
+	public static String JS_METHOD_GET_NODE_TO_XML = "getNodeToXml";
+	public static String GENERATOR_TEMPLATE_FILE = "js/dg_xml2json.js";
+
+	public void generateXMLFromJSON(String jsonPath, String xmlpath, String propertyPath) throws Exception {
+		try{
+			ScriptEngineManager manager = new ScriptEngineManager();
+			ScriptEngine engine = manager.getEngineByName("JavaScript");
+			if (!(engine instanceof Invocable)) {
+				logger.error("Invoking methods is not supported.");
+				return;
+			}
+			Invocable inv = (Invocable) engine;
+			//		engine.eval(new FileReader(DGXMLGenerator.class.getClassLoader().getResource(GENERATOR_TEMPLATE_FILE).getPath()));
+			String js = IOUtils.toString(DGXMLGenerator.class.getClassLoader().getResourceAsStream(GENERATOR_TEMPLATE_FILE),STRING_ENCODING);
+			engine.eval(js);
+
+			Object dgconverter = engine.get(JS_INTERFACE_DG_CONVERTOR);
+
+			List<File> files = new ArrayList<File>();
+			if(dgconverter != null){
+				File jsonPathFile = new File(jsonPath);
+				if(jsonPathFile.isDirectory()){
+					String[] extensions = new String[] { "json", "JSON" };
+					files = (List<File>) FileUtils.listFiles(jsonPathFile, extensions, true);
+				}else if(jsonPathFile.isFile()){
+					files.add(jsonPathFile);
+				}else{
+					throw new Exception("Failed to get the nature of the JSON path :"+ jsonPath);
+				}
+
+				logger.info("JSON Files identified "+ files.size());
+
+				if(files.size() > 0){
+					boolean isXmlPathDeleted = FileUtils.deleteQuietly(new File(xmlpath));
+					logger.info("Cleaning old DG XML under : " + xmlpath + ", delete status :" + isXmlPathDeleted);
+
+					for (File file : files) {
+						String dgJson = FileUtils.readFileToString(file,STRING_ENCODING);
+						logger.info("Generating XML from  :" + file.getName());
+						String xmlFileName = xmlpath +"/"+file.getName().replace(".json", ".xml");
+
+						Object dgXMl = inv.invokeMethod(dgconverter, JS_METHOD_GET_NODE_TO_XML, dgJson);
+						// Write the XML File
+						if(dgXMl != null){
+							File xmlFile = new File(xmlFileName);
+							FileUtils.writeStringToFile(xmlFile, dgXMl.toString(), STRING_ENCODING);
+							logger.info("Generated XML File under  :" + xmlFile.getCanonicalPath());
+						}
+					}
+
+				}else{
+					logger.info("No JSON Files to generate XML");
+				}
+			}else{
+				logger.error("Couldn't get Java Script Engine..");
+			}
+		}catch (Exception e) {
+			logger.error("Failed to generate generateXMLFromJSON :"+e.getMessage());
+		}
+	}
+
+
+	public static void main(String[] args) {
+		try {
+			DGXMLGenerator application = new DGXMLGenerator();
+			String jsonPath = null;
+			String xmlPath = null;
+			String propertyPath = null;
+			// Generate, GenerateLoad, GenerateLoadActivate
+			//args = new String[]{"src/main/resources/json","src/test/resources/xml"};
+			logger.info("DGXML Conversion Started with arguments :"+ args[0] +":"+ args[1]);
+			if(args != null && args.length >= 2){
+				jsonPath = args[0];
+				xmlPath = args[1];
+			}else{
+				throw new Exception("Sufficient inputs are missing <jsonPath> <xmlPath>");
+			}
+
+			application.generateXMLFromJSON(jsonPath, xmlPath, propertyPath);
+			logger.info("DGXML Conversion Completed...");
+		} catch (Exception e) {
+			logger.error("Failed in DG XML Generation :"+e.getMessage());
+			e.printStackTrace();
+		}
+
+	}
+
+}
diff --git a/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLLoad.java b/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLLoad.java
new file mode 100644
index 0000000..5e96730
--- /dev/null
+++ b/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLLoad.java
@@ -0,0 +1,114 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property.  All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdnc.dg.loader;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.openecomp.sdnc.sli.SvcLogicException;
+import org.openecomp.sdnc.sli.SvcLogicParser;
+import org.openecomp.sdnc.sli.SvcLogicStore;
+import org.openecomp.sdnc.sli.SvcLogicStoreFactory;
+
+public class DGXMLLoad {
+	private final static Logger logger = LoggerFactory.getLogger(DGXMLLoad.class);
+	private final SvcLogicStore store;
+	public static String STRING_ENCODING = "utf-8";
+
+	public DGXMLLoad(String propfile) throws Exception{
+		if(StringUtils.isBlank(propfile)){
+			throw new Exception(propfile + " Profile file is not defined");
+		}
+		this.store = SvcLogicStoreFactory.getSvcLogicStore(propfile);
+	}
+
+	public void loadDGXMLFile(String dgXMLpath) throws SvcLogicException{
+		if(dgXMLpath != null ){
+			SvcLogicParser.load(dgXMLpath, this.store);
+		}
+	}
+
+	private void loadDGXMLDir(String xmlPath) throws Exception {
+		try {
+			logger.info("******************** Loading DG into Database *****************************");
+			List<String> errors = new ArrayList<String>();
+			if(this.store != null){
+				File xmlDir = new File(xmlPath);
+				if(xmlDir != null && xmlDir.isDirectory()){
+					String[] extensions = new String[] { "xml", "XML" };
+					List<File> files = (List<File>) FileUtils.listFiles(xmlDir, extensions, true);
+					for (File file : files) {
+						logger.info("Loading DG XML file :" + file.getCanonicalPath());
+						try{
+							SvcLogicParser.load(file.getCanonicalPath(), this.store);
+						}catch (Exception e) {
+							errors.add("Failed to load XML "+file.getCanonicalPath() + ", Exception : "+e.getMessage());
+						}
+					}
+				}else{
+					throw new Exception(xmlPath + " is not a valid XML Directory");
+				}
+			}else{
+				throw new Exception("Failed to initialise SvcLogicStore");
+			}
+
+			if(errors.size() > 0){
+				throw new Exception(errors.toString());
+			}
+		} catch (Exception e) {
+			logger.error(e.getMessage());
+		}
+	}
+
+	
+
+
+	public static void main(String[] args) {
+		try {
+			String xmlPath = null;
+			String propertyPath = null;
+
+			if(args != null && args.length >= 2){
+				xmlPath = args[0];
+				propertyPath = args[1];
+			}else{
+				throw new Exception("Sufficient inputs for DGXMLLoadNActivate are missing <xmlpath> <dbPropertyfile>");
+			}
+			
+			//propertyPath = "/Users/bs2796/0Source/ecomp/bvc-3.2.2/others/properties/dblib.properties";
+			//xmlPath = DGXMLLoadNActivate.class.getClassLoader().getResource(".").getPath() +"/xml" ;
+
+			DGXMLLoad dgXMLLoadDB = new DGXMLLoad(propertyPath);
+			dgXMLLoadDB.loadDGXMLDir(xmlPath);
+		} catch (Exception e) {
+			e.printStackTrace();
+		}finally {
+			System.exit(1);
+		}
+	}
+
+}
diff --git a/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLLoadNActivate.java b/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLLoadNActivate.java
new file mode 100644
index 0000000..1373143
--- /dev/null
+++ b/appc-directed-graph/dg-loader/provider/src/main/java/org/openecomp/sdnc/dg/loader/DGXMLLoadNActivate.java
@@ -0,0 +1,168 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property.  All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdnc.dg.loader;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.openecomp.sdnc.sli.SvcLogicException;
+import org.openecomp.sdnc.sli.SvcLogicGraph;
+import org.openecomp.sdnc.sli.SvcLogicParser;
+import org.openecomp.sdnc.sli.SvcLogicStore;
+import org.openecomp.sdnc.sli.SvcLogicStoreFactory;
+
+public class DGXMLLoadNActivate {
+	private final static Logger logger = LoggerFactory.getLogger(DGXMLLoadNActivate.class);
+	private final SvcLogicStore store;
+	public static String STRING_ENCODING = "utf-8";
+
+	public DGXMLLoadNActivate(String propfile) throws Exception{
+		if(StringUtils.isBlank(propfile)){
+			throw new Exception(propfile + " Profile file is not defined");
+		}
+		this.store = SvcLogicStoreFactory.getSvcLogicStore(propfile);
+	}
+
+	public void loadDGXMLFile(String dgXMLpath) throws SvcLogicException{
+		if(dgXMLpath != null ){
+			SvcLogicParser.load(dgXMLpath, this.store);
+		}
+	}
+
+	private void loadDGXMLDir(String xmlPath) throws Exception {
+		try {
+			logger.info("******************** Loading DG into Database *****************************");
+			List<String> errors = new ArrayList<String>();
+			if(this.store != null){
+				File xmlDir = new File(xmlPath);
+				if(xmlDir != null && xmlDir.isDirectory()){
+					String[] extensions = new String[] { "xml", "XML" };
+					List<File> files = (List<File>) FileUtils.listFiles(xmlDir, extensions, true);
+					for (File file : files) {
+						logger.info("Loading DG XML file :" + file.getCanonicalPath());
+						try{
+							SvcLogicParser.load(file.getCanonicalPath(), this.store);
+						}catch (Exception e) {
+							errors.add("Failed to load XML "+file.getCanonicalPath() + ", Exception : "+e.getMessage());
+						}
+					}
+				}else{
+					throw new Exception(xmlPath + " is not a valid XML Directory");
+				}
+			}else{
+				throw new Exception("Failed to initialise SvcLogicStore");
+			}
+
+			if(errors.size() > 0){
+				throw new Exception(errors.toString());
+			}
+		} catch (Exception e) {
+			logger.error(e.getMessage());
+		}
+	}
+
+	public void activateDg(String activateFilePath) throws Exception {
+		logger.info("******************** Activating DG into Database *****************************");
+		try {
+			List<String> errors = new ArrayList<String>();
+			if(this.store != null){
+				File activateFile = new File(activateFilePath);
+				if(activateFile != null && activateFile.isFile()){
+					List<String> fileLines = FileUtils.readLines(activateFile,STRING_ENCODING);
+					if(fileLines != null ){
+						for (String line : fileLines) {
+							if(line != null && ! line.trim().startsWith("#")){
+								String lineArray[] = line.trim().split(":");
+								try {
+									if(lineArray != null && lineArray.length >= 4){
+										String module = lineArray[0];
+										String rpc = lineArray[1];
+										String version = lineArray[2];
+										String mode = lineArray[3];
+										if(StringUtils.isNotBlank(module) && StringUtils.isNotBlank(rpc)
+												&& StringUtils.isNotBlank(version) && StringUtils.isNotBlank(mode)){
+											logger.info("Activating DG :" + line);
+											SvcLogicGraph graph = this.store.fetch(module, rpc, version, mode);
+											if(graph != null){
+												logger.info("Found Graph :" + line + " Activating ...");
+												this.store.activate(graph);
+											}else{
+												throw new Exception("Failed to fetch from Database");
+											}
+										}
+									}
+								} catch (Exception e) {
+									e.printStackTrace();
+									errors.add("Failed to Activate "+line + ", "+e.getMessage());
+								}
+							}
+						}
+					}
+				}else{
+					throw new Exception(activateFile + " is not a valid Activate file Path");
+				}
+			}else{
+				throw new Exception("Failed to initialise SvcLogicStore");
+			}
+
+			if(errors.size() > 0){
+				throw new Exception(errors.toString());
+			}
+		} catch (Exception e) {
+			logger.error(e.getMessage());
+		}
+	}
+
+
+	public static void main(String[] args) {
+		try {
+			String xmlPath = null;
+			String propertyPath = null;
+			String activateFile = null;
+
+			if(args != null && args.length >= 3){
+				xmlPath = args[0];
+				activateFile = args[1];
+				propertyPath = args[2];
+			}else{
+				throw new Exception("Sufficient inputs for DGXMLLoadNActivate are missing <xmlpath> <activatefile> <dbPropertyfile>");
+			}
+
+			//propertyPath = "/Users/bs2796/0Source/ecomp/bvc-3.2.2/others/properties/dblib.properties";
+			//xmlPath = DGXMLLoadNActivate.class.getClassLoader().getResource(".").getPath() +"/xml" ;
+
+			DGXMLLoadNActivate dgXMLLoadDB = new DGXMLLoadNActivate(propertyPath);
+			dgXMLLoadDB.loadDGXMLDir(xmlPath);
+			dgXMLLoadDB.activateDg(activateFile);
+		} catch (Exception e) {
+			e.printStackTrace();
+		}finally {
+			System.exit(1);
+		}
+	}
+
+}
diff --git a/appc-directed-graph/dg-loader/provider/src/main/resources/adaptor.properties b/appc-directed-graph/dg-loader/provider/src/main/resources/adaptor.properties
new file mode 100644
index 0000000..367d25d
--- /dev/null
+++ b/appc-directed-graph/dg-loader/provider/src/main/resources/adaptor.properties
@@ -0,0 +1,25 @@
+###
+# ============LICENSE_START=======================================================
+# ONAP : APP-C
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property.  All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#      http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+###
+
+adaptorName=
+vSphere.url=
+vSphere.user=
+vSphere.passwd=
+org.xml.sax.driver=org.apache.xerces.parsers.SAXParser
diff --git a/appc-directed-graph/dg-loader/provider/src/main/resources/js/dg_xml2json.js b/appc-directed-graph/dg-loader/provider/src/main/resources/js/dg_xml2json.js
new file mode 100644
index 0000000..052d75d
--- /dev/null
+++ b/appc-directed-graph/dg-loader/provider/src/main/resources/js/dg_xml2json.js
@@ -0,0 +1,165 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APP-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property.  All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+
+var dgconverter = new Object();
+
+dgconverter.getNodeToXml = function (inputNodeSet) {
+    var exportableNodeSet = JSON.parse(inputNodeSet);
+    //uses inputNodeSet if passed otherwise build the latest nodeSet
+
+    //$("#btn-deploy").removeClass("disabled");
+
+    function getDgStartNode(nodeList) {
+        for (var i = 0; i < nodeList.length; i++) {
+            if (nodeList[i].type == 'dgstart' && nodeList[i].wires != null && nodeList[i].wires != undefined) {
+                return nodeList[i];
+            }
+        }
+        return null;
+    }
+
+
+    function getNode(id) {
+        for (var i = 0; i < exportableNodeSet.length; i++) {
+            if (exportableNodeSet[i].id == id) {
+                return exportableNodeSet[i];
+            }
+        }
+        return null;
+    }
+
+    function getStartTag(node) {
+        var startTag = "";
+        var xmlStr = "";
+        if (node != null && node.type != 'dgstart') {
+            xmlStr = node.xml;
+            var regex = /(<)([\w-]+)(.*)?/;
+            var match = regex.exec(xmlStr);
+            if (match != null) {
+                if (match[1] != undefined && match[2] != undefined) {
+                    startTag = match[2];
+                }
+            } else {
+                console.log("startTag not found.");
+            }
+        }
+        return startTag;
+    }
+
+    // if (inputNodeSet == null || inputNodeSet == undefined) {
+    //     exportableNodeSet = getCurrentFlowNodeSet();
+    // } else {
+    //     exportableNodeSet = JSON.parse(inputNodeSet);
+    // }
+    var dgstartNode = getDgStartNode(exportableNodeSet);
+
+    var level = 0;
+    var fullXmlStr = "";
+
+    printXml(dgstartNode);
+
+
+    function printXml(node) {
+        var xmlStr = "";
+        var startTag = "";
+        if (node != null && node.type != 'dgstart') {
+            var comments = node.comments;
+            if (comments != null && comments != "") {
+                //if xml comments field already has the <!-- and --> remove them
+                comments = comments.replace("<!--", "");
+                comments = comments.replace("-->", "");
+                xmlStr = "<!--" + comments + "-->";
+            }
+            xmlStr += node.xml;
+            startTag = getStartTag(node);
+          //special handling for break node
+			if(xmlStr != undefined && xmlStr != null && xmlStr.trim() == "<break>"){
+				fullXmlStr += "<break/>";
+			}else{	
+				fullXmlStr +=xmlStr;
+			}
+            /*
+            if(level > 0){
+                var spacing = Array(level).join("  ");
+                xmlStr=xmlStr.replace(/\n/g,spacing);
+                fullXmlStr +=xmlStr;
+
+                console.log(xmlStr);
+            }else{
+                fullXmlStr +=xmlStr;
+                console.log(xmlStr);
+            }
+            */
+        }
+
+        //console.log("startTag:" + startTag);
+
+        var wiredNodes = [];
+        var wiredNodesArr = [];
+        if (node != null && node.wires != null && node.wires[0] != null && node.wires[0] != undefined && node.wires[0].length > 0) {
+            wiredNodes = node.wires[0];
+            //console.log("Before sort");
+            for (var k = 0; wiredNodes != undefined && wiredNodes != null && k < wiredNodes.length; k++) {
+                wiredNodesArr.push(getNode(wiredNodes[k]));
+            }
+            //console.dir(wiredNodesArr);
+            //sort based on y position
+            wiredNodesArr.sort(function (a, b) {
+                return a.y - b.y;
+            });
+            //console.log("After sort");
+            //console.dir(wiredNodesArr);
+        }
+
+        for (var k = 0; wiredNodesArr != null && k < wiredNodesArr.length; k++) {
+            level++;
+            var nd = wiredNodesArr[k];
+            printXml(nd);
+        }
+
+        //append end tag
+        if (startTag != "") {
+        	if(startTag != "break"){
+				fullXmlStr += "</" + startTag + ">";
+			}
+            /*
+            if(level >0){
+                var spacing = Array(level).join("  ");
+                fullXmlStr += spacing + "</" + startTag + ">";
+                console.log(spacing + "</" + startTag + ">");
+            }else{
+                fullXmlStr += "</" + startTag + ">";
+                console.log("</" + startTag + ">");
+            }
+            */
+        }
+
+        /*if(level>0){
+            level=level-1;
+        }
+        */
+        //console.log("endTag:" + startTag);
+        //console.log("xml:" + fullXmlStr);
+    }
+    //console.log("fullXmlStr:" + fullXmlStr);
+    return fullXmlStr;
+};
+
diff --git a/appc-directed-graph/dg-loader/provider/src/main/resources/scripts/dg_load_activate.sh b/appc-directed-graph/dg-loader/provider/src/main/resources/scripts/dg_load_activate.sh
new file mode 100644
index 0000000..7d34a45
--- /dev/null
+++ b/appc-directed-graph/dg-loader/provider/src/main/resources/scripts/dg_load_activate.sh
@@ -0,0 +1,49 @@
+#!/bin/bash
+
+###
+# ============LICENSE_START=======================================================
+# ONAP : APP-C
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property.  All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#      http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+###
+
+export BVC_DIR=/opt/app/bvc
+export DG_DIR=${BVC_DIR}/dg
+
+if (( "$#" != 1 )) 
+then
+    echo "DG JSON Directory is Missing"
+exit 1
+fi
+
+export DG_JSON_DIR=$1
+echo "Processing DG JSON directory : ${DG_JSON_DIR}"
+
+cd ${DG_JSON_DIR}
+
+######################################################################
+rm -rf ${DG_JSON_DIR}/xml
+
+################## To Genetare XML from JSON ########################
+$JAVA_HOME/bin/java -cp ${DG_DIR}/lib/dg-loader-provider.jar org.openecomp.sdnc.dg.loader.DGXMLGenerator ${DG_JSON_DIR} ${DG_JSON_DIR}/xml
+
+################## To Load DG XML ########################
+$JAVA_HOME/bin/java -cp ${DG_DIR}/lib/dg-loader-provider.jar org.openecomp.sdnc.dg.loader.DGXMLLoad ${DG_JSON_DIR}/xml ${BVC_DIR}/properties/dblib.properties
+
+################## To Activate ########################
+$JAVA_HOME/bin/java -cp ${DG_DIR}/lib/dg-loader-provider.jar org.openecomp.sdnc.dg.loader.DGXMLActivate ${DG_JSON_DIR}/dg_activate.txt ${BVC_DIR}/properties/dblib.properties
+
+exit 0
