diff --git a/appc-config/appc-flow-controller/.gitignore b/appc-config/appc-flow-controller/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/appc-config/appc-flow-controller/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/appc-config/appc-flow-controller/features/.gitignore b/appc-config/appc-flow-controller/features/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/appc-config/appc-flow-controller/features/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/appc-config/appc-flow-controller/features/pom.xml b/appc-config/appc-flow-controller/features/pom.xml
new file mode 100644
index 0000000..9db5fee
--- /dev/null
+++ b/appc-config/appc-flow-controller/features/pom.xml
@@ -0,0 +1,103 @@
+<?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</groupId>
+        <artifactId>appc-config-flow-controller</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+    </parent>
+    <artifactId>appc-config-flow-controller-features</artifactId>
+    <name>Flow Executor - Features</name>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.openecomp.appc</groupId>
+            <artifactId>appc-config-flow-controller-provider</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+            <version>2.6</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.opendaylight.mdsal</groupId>
+            <artifactId>features-mdsal</artifactId>
+            <version>${odl.mdsal.version}</version>
+            <classifier>features</classifier>
+            <type>xml</type>
+
+            <scope>runtime</scope>
+        </dependency>
+
+
+        <!-- dependency for opendaylight-karaf-empty for use by testing -->
+        <dependency>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>opendaylight-karaf-empty</artifactId>
+            <version>${odl.karaf.empty.distro.version}</version>
+            <type>zip</type>
+        </dependency>
+
+
+        <dependency>
+            <!-- Required for launching the feature tests -->
+            <groupId>org.opendaylight.odlparent</groupId>
+            <artifactId>features-test</artifactId>
+            <version>${odl.commons.opendaylight.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <resources>
+            <resource>
+                <filtering>true</filtering>
+                <directory>src/main/resources</directory>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>filter</id>
+                        <goals>
+                            <goal>resources</goal>
+                        </goals>
+                        <phase>generate-resources</phase>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>attach-artifacts</id>
+                        <goals>
+                            <goal>attach-artifact</goal>
+                        </goals>
+                        <phase>package</phase>
+                        <configuration>
+                            <artifacts>
+                                <artifact>
+                                    <file>${project.build.directory}/classes/${features.file}</file>
+                                    <type>xml</type>
+                                    <classifier>features</classifier>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/appc-config/appc-flow-controller/features/src/main/resources/features.xml b/appc-config/appc-flow-controller/features/src/main/resources/features.xml
new file mode 100644
index 0000000..76161bd
--- /dev/null
+++ b/appc-config/appc-flow-controller/features/src/main/resources/features.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ============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=========================================================
+  -->
+
+
+<features name="appc-config-flow-controller-${project.version}"
+	xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0 http://karaf.apache.org/xmlns/features/v1.2.0">
+
+	<repository>mvn:org.opendaylight.mdsal/features-mdsal/${odl.mdsal.version}/xml/features</repository>
+
+	<feature name='appc-config-flow-controller' description="Application Controller Flow Executor"
+		version='${project.version}'>
+		<!-- Most applications will have a dependency on the ODL MD-SAL Broker -->
+		<feature version="${broker-mdsal.version}">odl-mdsal-broker</feature>
+		<feature version= '${sdnc.sli.version}'>sdnc-sli</feature>
+		
+		<bundle>mvn:commons-lang/commons-lang/2.6</bundle>
+		<bundle>mvn:commons-collections/commons-collections/${common.collections.version}</bundle>
+				
+		<bundle>wrap:mvn:com.att.eelf/eelf-core/${eelf.version}</bundle>
+		<bundle>mvn:ch.qos.logback/logback-core/${logback.version}</bundle>
+		<bundle>mvn:ch.qos.logback/logback-classic/${logback.version}</bundle>
+		<bundle>mvn:org.openecomp.appc/appc-flow-controller-provider/${project.version}</bundle>
+	</feature>
+</features>
diff --git a/appc-config/appc-flow-controller/installer/pom.xml b/appc-config/appc-flow-controller/installer/pom.xml
new file mode 100644
index 0000000..11c8f87
--- /dev/null
+++ b/appc-config/appc-flow-controller/installer/pom.xml
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ============LICENSE_START=======================================================
+  APPC
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+  Copyright (C) 2017 Amdocs
+  ================================================================================
+  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=========================================================
+  ECOMP is a trademark and service mark of AT&T Intellectual Property.
+  -->
+<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</groupId>
+        <artifactId>appc-config-flow-controller</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>appc-config-flow-controller-installer</artifactId>
+    <name>Config Component Params - Installer</name>
+    <packaging>pom</packaging>
+    <properties>
+        <application.name>appc-config-flow-controller</application.name>
+        <features.boot>appc-config-flow-controller</features.boot>
+        <features.repositories>mvn:org.openecomp.appc/appc-config-flow-controller-features/${project.version}/xml/features</features.repositories>
+        <include.transitive.dependencies>false</include.transitive.dependencies>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>org.openecomp.appc</groupId>
+            <artifactId>appc-config-flow-controller-features</artifactId>
+            <classifier>features</classifier>
+            <type>xml</type>
+            <exclusions>
+                <exclusion>
+                    <groupId>*</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.openecomp.appc</groupId>
+            <artifactId>appc-config-flow-controller-provider</artifactId>
+            <version>1.1.0-SNAPSHOT</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>maven-repo-zip</id>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                        <phase>package</phase>
+                        <configuration>
+                            <appendAssemblyId>false</appendAssemblyId>
+                            <attach>false</attach>
+                            <finalName>stage/${application.name}-${project.version}</finalName>
+                            <descriptors>
+                                <descriptor>src/assembly/assemble_mvnrepo_zip.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>installer-zip</id>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                        <phase>package</phase>
+                        <configuration>
+                            <appendAssemblyId>false</appendAssemblyId>
+                            <attach>true</attach>
+                            <finalName>${application.name}-${project.version}</finalName>
+                            <descriptors>
+                                <descriptor>src/assembly/assemble_installer_zip.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy-dependencies</id>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                        <phase>prepare-package</phase>
+                        <configuration>
+                            <transitive>false</transitive>
+                            <outputDirectory>${project.build.directory}/assembly/system</outputDirectory>
+                            <overWriteReleases>false</overWriteReleases>
+                            <overWriteSnapshots>true</overWriteSnapshots>
+                            <overWriteIfNewer>true</overWriteIfNewer>
+                            <useRepositoryLayout>true</useRepositoryLayout>
+                            <addParentPoms>false</addParentPoms>
+                            <copyPom>false</copyPom>
+                            <excludeGroupIds>org.opendaylight</excludeGroupIds>
+                            <scope>provided</scope>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-resources-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy-version</id>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <!-- here the phase you need -->
+                        <phase>validate</phase>
+                        <configuration>
+                            <outputDirectory>${basedir}/target/stage</outputDirectory>
+                            <resources>
+                                <resource>
+                                    <directory>src/main/resources/scripts</directory>
+                                    <includes>
+                                        <include>install-feature.sh</include>
+                                    </includes>
+                                    <filtering>true</filtering>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/appc-config/appc-flow-controller/installer/src/assembly/assemble_installer_zip.xml b/appc-config/appc-flow-controller/installer/src/assembly/assemble_installer_zip.xml
new file mode 100644
index 0000000..3ea5ea0
--- /dev/null
+++ b/appc-config/appc-flow-controller/installer/src/assembly/assemble_installer_zip.xml
@@ -0,0 +1,59 @@
+<!--
+  ============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=========================================================
+  ECOMP is a trademark and service mark of AT&T Intellectual Property.
+  -->
+
+<!-- Defines how we build the .zip file which is our distribution. -->
+
+<assembly
+	xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+	<id>flow-controller</id>
+	<formats>
+		<format>zip</format>
+	</formats>
+
+	<!--  we want "system" and related files right at the root level
+		  as this file is suppose to be unzip on top of a karaf
+		  distro. -->
+	<includeBaseDirectory>false</includeBaseDirectory>
+
+	<fileSets>
+		<fileSet>
+			<directory>target/stage/</directory>
+			<outputDirectory>${application.name}</outputDirectory>
+			<fileMode>755</fileMode>
+			<includes>
+				<include>*.sh</include>
+			</includes>
+		</fileSet>
+		<fileSet>
+			<directory>target/stage/</directory>
+			<outputDirectory>${application.name}</outputDirectory>
+			<fileMode>644</fileMode>
+			<excludes>
+				<exclude>*.sh</exclude>
+			</excludes>
+		</fileSet>
+	</fileSets>
+
+
+
+</assembly>
diff --git a/appc-config/appc-flow-controller/installer/src/assembly/assemble_mvnrepo_zip.xml b/appc-config/appc-flow-controller/installer/src/assembly/assemble_mvnrepo_zip.xml
new file mode 100644
index 0000000..c29a43e
--- /dev/null
+++ b/appc-config/appc-flow-controller/installer/src/assembly/assemble_mvnrepo_zip.xml
@@ -0,0 +1,47 @@
+<!--
+  ============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=========================================================
+  ECOMP is a trademark and service mark of AT&T Intellectual Property.
+  -->
+
+<!-- Defines how we build the .zip file which is our distribution. -->
+
+<assembly
+	xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+	<id>flow-controller</id>
+	<formats>
+		<format>zip</format>
+	</formats>
+
+	<!--  we want "system" and related files right at the root level
+		  as this file is suppose to be unzip on top of a karaf
+		  distro. -->
+	<includeBaseDirectory>false</includeBaseDirectory>
+
+	<fileSets>
+		<fileSet>
+			<directory>target/assembly/</directory>
+			<outputDirectory>.</outputDirectory>
+			<excludes>
+			</excludes>
+		</fileSet>
+	</fileSets>
+
+</assembly>
diff --git a/appc-config/appc-flow-controller/installer/src/main/resources/scripts/install-feature.sh b/appc-config/appc-flow-controller/installer/src/main/resources/scripts/install-feature.sh
new file mode 100644
index 0000000..d3d2ea6
--- /dev/null
+++ b/appc-config/appc-flow-controller/installer/src/main/resources/scripts/install-feature.sh
@@ -0,0 +1,40 @@
+###
+# ============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=========================================================
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.
+###
+
+#!/bin/bash
+
+ODL_HOME=${ODL_HOME:-/opt/opendaylight/current}
+ODL_KARAF_CLIENT=${ODL_KARAF_CLIENT:-${ODL_HOME}/bin/client}
+ODL_KARAF_CLIENT_OPTS=${ODL_KARAF_CLIENT_OPTS:-"-u karaf"}
+INSTALLERDIR=$(dirname $0)
+
+REPOZIP=${INSTALLERDIR}/${features.boot}-${project.version}.zip
+
+if [ -f ${REPOZIP} ]
+then
+	unzip -n -d ${ODL_HOME} ${REPOZIP}
+else
+	echo "ERROR : repo zip ($REPOZIP) not found"
+	exit 1
+fi
+
+${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:repo-add ${features.repositories}
+${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:install ${features.boot}
diff --git a/appc-config/appc-flow-controller/pom.xml b/appc-config/appc-flow-controller/pom.xml
new file mode 100644
index 0000000..60cb3a2
--- /dev/null
+++ b/appc-config/appc-flow-controller/pom.xml
@@ -0,0 +1,49 @@
+<?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/maven-v4_0_0.xsd">
+    <parent>
+        <groupId>org.openecomp.appc</groupId>
+        <artifactId>appc-config</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>pom</packaging>
+    <artifactId>appc-config-flow-controller</artifactId>
+
+    <name>APPC Flow Executor</name>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>        
+    </properties>
+
+
+    <dependencyManagement>
+
+        <dependencies>
+            <dependency>
+                <groupId>org.openecomp.appc</groupId>
+                <artifactId>appc-config-flow-controller-features</artifactId>
+                <classifier>features</classifier>
+                <type>xml</type>
+                <version>${project.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>org.openecomp.appc</groupId>
+                <artifactId>appc-config-flow-controller-provider</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+        </dependencies>
+
+
+    </dependencyManagement>
+
+
+    <modules>
+        <module>provider</module>
+        <module>features</module>
+        <module>installer</module>
+    </modules>
+    <description>Flow sequence executor for APPC</description>
+</project>
diff --git a/appc-config/appc-flow-controller/provider/.gitignore b/appc-config/appc-flow-controller/provider/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/appc-config/appc-flow-controller/provider/pom.xml b/appc-config/appc-flow-controller/provider/pom.xml
new file mode 100644
index 0000000..e76d42d
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/pom.xml
@@ -0,0 +1,138 @@
+<?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</groupId>
+        <artifactId>appc-config-flow-controller</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+    </parent>
+    <artifactId>appc-config-flow-controller-provider</artifactId>
+    <packaging>bundle</packaging>
+    <name>Flow Executor - Provider</name>
+    <url>http://maven.apache.org</url>
+
+    <dependencies>
+        <dependency>
+            <groupId>equinoxSDK381</groupId>
+            <artifactId>org.eclipse.osgi</artifactId>
+            <version>${equinox.osgi.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.openecomp.sdnc.core</groupId>
+            <artifactId>sli-provider</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-annotations</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.dataformat</groupId>
+            <artifactId>jackson-dataformat-yaml</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.att.eelf</groupId>
+            <artifactId>eelf-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.openecomp.sdnc.adaptors</groupId>
+            <artifactId>sql-resource-provider</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.openecomp.sdnc.core</groupId>
+            <artifactId>sli-provider</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.openecomp.sdnc.core</groupId>
+            <artifactId>sli-common</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.jersey</groupId>
+            <artifactId>jersey-client</artifactId>
+            <version>1.17</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.json</groupId>
+            <artifactId>json</artifactId>
+        </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.appc.flow.controller</Bundle-SymbolicName>
+                        <Bundle-Activator>org.openecomp.appc.flow.controller.FlowControllerActivator</Bundle-Activator>
+                        <Export-Package>org.openecomp.appc.flow.controller</Export-Package>
+                        <Import-Package>*</Import-Package>
+                        <DynamicImport-Package>*</DynamicImport-Package>
+                    </instructions>
+                    <manifestLocation>${project.basedir}/src/main/resources/META-INF</manifestLocation>
+                </configuration>
+            </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-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/FlowControllerActivator.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/FlowControllerActivator.java
new file mode 100644
index 0000000..e7e80b7
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/FlowControllerActivator.java
@@ -0,0 +1,80 @@
+/*-
+ * ============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.appc.flow.controller;
+
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Properties;
+
+import org.openecomp.appc.flow.controller.node.FlowControlNode;
+import org.openecomp.appc.flow.controller.node.JsonParsingNode;
+import org.openecomp.appc.flow.controller.node.RestServiceNode;
+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 FlowControllerActivator implements BundleActivator{
+
+    private List<ServiceRegistration> registrations = new LinkedList<ServiceRegistration>();
+
+
+    private static final EELFLogger log = EELFManager.getInstance().getLogger(FlowControllerActivator.class);
+    
+    @Override
+    public void start(BundleContext ctx) throws Exception
+    {
+
+        try {
+            
+            FlowControlNode flowExecutorNode = new FlowControlNode();
+            log.debug("Registering service "+ flowExecutorNode.getClass().getName());
+            registrations.add(ctx.registerService(flowExecutorNode.getClass().getName(), flowExecutorNode, null));
+            log.debug("Registering service sccessful for  "+ flowExecutorNode.getClass().getName());
+            
+            RestServiceNode restServiceNode = new RestServiceNode();
+            log.debug("Registering service "+ restServiceNode.getClass().getName());
+            registrations.add(ctx.registerService(restServiceNode.getClass().getName(), restServiceNode, null));
+            log.debug("Registering service sccessful for  "+ restServiceNode.getClass().getName());
+            
+            JsonParsingNode jsonParsingNode = new JsonParsingNode();
+            log.debug("Registering service "+ jsonParsingNode.getClass().getName());
+            registrations.add(ctx.registerService(jsonParsingNode.getClass().getName(), jsonParsingNode, null));
+            log.debug("Registering service sccessful for  "+ jsonParsingNode.getClass().getName());
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+    }
+    @Override
+    public void stop(BundleContext arg0) throws Exception
+    {
+        for (ServiceRegistration registration: registrations)
+        {
+            registration.unregister();
+            registration = null;
+        }
+
+    }
+}
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/ResponseHandlerImpl/DefaultResponseHandler.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/ResponseHandlerImpl/DefaultResponseHandler.java
new file mode 100644
index 0000000..5887734
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/ResponseHandlerImpl/DefaultResponseHandler.java
@@ -0,0 +1,55 @@
+/*-
+ * ============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.appc.flow.controller.ResponseHandlerImpl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.openecomp.appc.flow.controller.data.Response;
+import org.openecomp.appc.flow.controller.data.ResponseAction;
+import org.openecomp.appc.flow.controller.data.Transaction;
+import org.openecomp.appc.flow.controller.utils.FlowControllerConstants;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+
+
+public class DefaultResponseHandler {
+
+    private static final EELFLogger log = EELFManager.getInstance().getLogger(DefaultResponseHandler.class);
+
+    public ResponseAction handlerResponse(Transaction transaction){
+
+        log.info("Transaction Input params " + transaction.toString());
+        ResponseAction responseAction = new ResponseAction();
+        if(transaction.getResponses() != null && !transaction.getResponses().isEmpty()){        
+            for(Response response : transaction.getResponses()){                
+                if(response.getResponseCode() != null && response.getResponseCode().equals(transaction.getStatusCode())){    
+                    responseAction = response.getResponseAction();
+                    break;
+                }
+
+            }
+
+        }
+        return responseAction ;
+    }
+}
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/data/ActionIdentifier.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/data/ActionIdentifier.java
new file mode 100644
index 0000000..422bb11
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/data/ActionIdentifier.java
@@ -0,0 +1,70 @@
+/*-
+ * ============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.appc.flow.controller.data;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class ActionIdentifier {
+    
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((vnfId == null) ? 0 : vnfId.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        ActionIdentifier other = (ActionIdentifier) obj;
+        if (vnfId == null) {
+            if (other.vnfId != null)
+                return false;
+        } else if (!vnfId.equals(other.vnfId))
+            return false;
+        return true;
+    }
+
+    @JsonProperty("vnf-id")
+    private String vnfId ;
+
+    public String getVnfId() {
+        return vnfId;
+    }
+
+    public void setVnfId(String vnfId) {
+        this.vnfId = vnfId;
+    }
+
+    @Override
+    public String toString() {
+        return "ActionIdentifier [vnfId=" + vnfId + "]";
+    }
+
+    
+    
+}
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/data/Parameters.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/data/Parameters.java
new file mode 100644
index 0000000..fe3ae8f
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/data/Parameters.java
@@ -0,0 +1,82 @@
+/*-
+ * ============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.appc.flow.controller.data;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class Parameters {
+    
+
+    @JsonProperty("name")
+    private String paramName ;
+    
+    @JsonProperty("value")
+    private String paramValue ;
+    
+    
+    public String getParamValue() {
+        return paramValue;
+    }
+    public void setParamValue(String paramValue) {
+        this.paramValue = paramValue;
+    }
+    public String getParamName() {
+        return paramName;
+    }
+    public void setParamName(String paramName) {
+        this.paramName = paramName;
+    }
+    @Override
+    public String toString() {
+        return "Parameters [paramName=" + paramName + ", paramValue=" + paramValue + "]";
+    }
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((paramName == null) ? 0 : paramName.hashCode());
+        result = prime * result + ((paramValue == null) ? 0 : paramValue.hashCode());
+        return result;
+    }
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        Parameters other = (Parameters) obj;
+        if (paramName == null) {
+            if (other.paramName != null)
+                return false;
+        } else if (!paramName.equals(other.paramName))
+            return false;
+        if (paramValue == null) {
+            if (other.paramValue != null)
+                return false;
+        } else if (!paramValue.equals(other.paramValue))
+            return false;
+        return true;
+    }
+    
+
+}
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/data/PreCheck.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/data/PreCheck.java
new file mode 100644
index 0000000..9ee3d61
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/data/PreCheck.java
@@ -0,0 +1,93 @@
+/*-
+ * ============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.appc.flow.controller.data;
+
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class PreCheck {
+
+    
+    @JsonProperty("precheck-operator")
+    private String  precheckOperator;
+
+    public String getPrecheckOperator() {
+        return precheckOperator;
+    }
+
+    public void setPrecheckOperator(String precheckOperator) {
+        this.precheckOperator = precheckOperator;
+    }
+
+    @JsonProperty("precheck-options")
+    private List<PrecheckOption>  precheckOptions;
+
+    public List<PrecheckOption> getPrecheckOptions() {
+        return precheckOptions;
+    }
+
+    public void setPrecheckOptions(List<PrecheckOption> precheckOptions) {
+        this.precheckOptions = precheckOptions;
+    }
+
+    
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((precheckOperator == null) ? 0 : precheckOperator.hashCode());
+        result = prime * result + ((precheckOptions == null) ? 0 : precheckOptions.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        PreCheck other = (PreCheck) obj;
+        if (precheckOperator == null) {
+            if (other.precheckOperator != null)
+                return false;
+        } else if (!precheckOperator.equals(other.precheckOperator))
+            return false;
+        if (precheckOptions == null) {
+            if (other.precheckOptions != null)
+                return false;
+        } else if (!precheckOptions.equals(other.precheckOptions))
+            return false;
+        return true;
+    }
+
+    @Override
+    public String toString() {
+        return "PreCheck [precheckOperator=" + precheckOperator + ", precheckOptions=" + precheckOptions + "]";
+    }
+    
+    
+    
+    
+
+}
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/data/PrecheckOption.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/data/PrecheckOption.java
new file mode 100644
index 0000000..efa1902
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/data/PrecheckOption.java
@@ -0,0 +1,109 @@
+/*-
+ * ============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.appc.flow.controller.data;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class PrecheckOption {
+
+    
+    @JsonProperty("pre-transaction-id")
+    private int  pTransactionID ;
+
+    @JsonProperty("param-name")
+    private String  paramName ;
+    
+    
+    @JsonProperty("param-value")
+    private String  paramValue ;
+    
+    @JsonProperty("rule")
+    private String  rule ;
+
+    public int getpTransactionID() {
+        return pTransactionID;
+    }
+
+    public void setpTransactionID(int pTransactionID) {
+        this.pTransactionID = pTransactionID;
+    }
+
+    public String getParamName() {
+        return paramName;
+    }
+
+    public void setParamName(String paramName) {
+        this.paramName = paramName;
+    }
+
+    public String getParamValue() {
+        return paramValue;
+    }
+
+    public void setParamValue(String paramValue) {
+        this.paramValue = paramValue;
+    }
+
+    
+
+    @Override
+    public String toString() {
+        return "PrecheckOption [pTransactionID=" + pTransactionID + ", paramName=" + paramName + ", paramValue="
+                + paramValue + ", rule=" + rule + "]";
+    }
+
+    
+    public String getRule() {
+        return rule;
+    }
+
+    public void setRule(String rule) {
+        this.rule = rule;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        PrecheckOption other = (PrecheckOption) obj;
+        if (pTransactionID != other.pTransactionID)
+            return false;
+        if (paramName == null) {
+            if (other.paramName != null)
+                return false;
+        } else if (!paramName.equals(other.paramName))
+            return false;
+        if (paramValue == null) {
+            if (other.paramValue != null)
+                return false;
+        } else if (!paramValue.equals(other.paramValue))
+            return false;
+        if (rule != other.rule)
+            return false;
+        return true;
+    }
+    
+    
+}
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/data/Response.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/data/Response.java
new file mode 100644
index 0000000..fb20edb
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/data/Response.java
@@ -0,0 +1,79 @@
+/*-
+ * ============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.appc.flow.controller.data;    
+
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class Response {
+    
+    @JsonProperty("response-code")
+    private String responseCode;
+    
+    @JsonProperty("response-message")
+    private String responseMessage;
+    
+    @JsonProperty("response-action")
+    private ResponseAction responseAction;
+    
+    private String responseActionHanlder;
+
+    public String getResponseCode() {
+        return responseCode;
+    }
+
+    public void setResponseCode(String responseCode) {
+        this.responseCode = responseCode;
+    }
+
+    public String getResponseMessage() {
+        return responseMessage;
+    }
+
+    public void setResponseMessage(String responseMessage) {
+        this.responseMessage = responseMessage;
+    }
+
+
+    public String getResponseActionHanlder() {
+        return responseActionHanlder;
+    }
+
+    public void setResponseActionHanlder(String responseActionHanlder) {
+        this.responseActionHanlder = responseActionHanlder;
+    }
+
+    public ResponseAction getResponseAction() {
+        return responseAction;
+    }
+
+    public void setResponseAction(ResponseAction responseAction) {
+        this.responseAction = responseAction;
+    }
+    
+    @Override
+    public String toString() {
+        return "Response [responseCode=" + responseCode + ", responseMessage=" + responseMessage + ", responseAction="
+                + responseAction + ", responseActionHanlder=" + responseActionHanlder + "]";
+    }
+
+}
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/data/ResponseAction.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/data/ResponseAction.java
new file mode 100644
index 0000000..84497de
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/data/ResponseAction.java
@@ -0,0 +1,103 @@
+/*-
+ * ============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.appc.flow.controller.data;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class ResponseAction {
+    
+    @JsonProperty("wait")
+    private String wait;
+    
+    @JsonProperty("retry")
+    private String retry;
+    
+    @JsonProperty("jump")
+    private String jump;
+    
+    @JsonProperty("ignore")
+    private boolean  ignore;
+    
+    @JsonProperty("stop")
+    private boolean stop;
+    
+    @JsonProperty("intermediate-message")
+    private boolean intermediateMessage;
+
+    public String getWait() {
+        return wait;
+    }
+
+    public void setWait(String wait) {
+        this.wait = wait;
+    }
+
+    public String getRetry() {
+        return retry;
+    }
+
+    public void setRetry(String retry) {
+        this.retry = retry;
+    }
+
+    public String getJump() {
+        return jump;
+    }
+
+    public void setJump(String jump) {
+        this.jump = jump;
+    }
+
+    public boolean isIgnore() {
+        return ignore;
+    }
+
+    public void setIgnore(boolean ignore) {
+        this.ignore = ignore;
+    }
+
+    public boolean isStop() {
+        return stop;
+    }
+
+    public void setStop(boolean stop) {
+        this.stop = stop;
+    }
+
+
+
+    @Override
+    public String toString() {
+        return "ResponseAction [wait=" + wait + ", retry=" + retry + ", jump=" + jump + ", ignore=" + ignore + ", stop="
+                + stop + ", intermediateMessage=" + intermediateMessage + "]";
+    }
+
+    public boolean isIntermediateMessage() {
+        return intermediateMessage;
+    }
+
+    public void setIntermediateMessage(boolean intermediateMessage) {
+        this.intermediateMessage = intermediateMessage;
+    }
+    
+    
+
+}
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/data/Transaction.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/data/Transaction.java
new file mode 100644
index 0000000..8f26e80
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/data/Transaction.java
@@ -0,0 +1,365 @@
+/*-
+ * ============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.appc.flow.controller.data;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.core.JsonGenerationException;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public class Transaction {
+
+    @JsonProperty("transaction-id")
+    private int transactionId ;
+
+    @JsonProperty("action")
+    private String action ;
+
+    @JsonProperty("action-level")
+    private String actionLevel ;
+
+    @JsonProperty("action-identifier")
+    private ActionIdentifier actionIdentifier ;
+    
+    @JsonProperty("parameters")
+    private List<Parameters> parameters ;
+
+    private String executionType;
+    
+    private String uId;
+    
+    private String statusCode;
+
+    private String pswd;
+    
+    private String executionEndPoint;
+    
+    private String executionModule;
+    
+    private String executionRPC;
+    
+    @JsonProperty("state")
+    private String state;
+    
+    @JsonProperty("precheck")
+    private PreCheck precheck;
+
+    @JsonProperty("payload")
+    private String payload ;
+
+    @JsonProperty("responses")
+    private List<Response> responses ;
+    
+    
+    private String status = "PENDING";
+    
+    public String getuId() {
+        return uId;
+    }
+
+    public void setuId(String uId) {
+        this.uId = uId;
+    }
+
+    public String getPswd() {
+        return pswd;
+    }
+
+    public void setPswd(String pswd) {
+        this.pswd = pswd;
+    }
+    
+    public String getExecutionEndPoint() {
+        return executionEndPoint;
+    }
+
+    public void setExecutionEndPoint(String executionEndPoint) {
+        this.executionEndPoint = executionEndPoint;
+    }
+
+
+    public String getExecutionType() {
+        return executionType;
+    }
+
+    public void setExecutionType(String executionType) {
+        this.executionType = executionType;
+    }
+
+    public String getExecutionModule() {
+        return executionModule;
+    }
+
+
+    public void setExecutionModule(String executionModule) {
+        this.executionModule = executionModule;
+    }
+
+
+    public String getExecutionRPC() {
+        return executionRPC;
+    }
+
+
+    public void setExecutionRPC(String executionRPC) {
+        this.executionRPC = executionRPC;
+    }
+
+
+    public List<Parameters> getParameters() {
+        return parameters;
+    }
+
+
+    public void setParameters(List<Parameters> parameters) {
+        this.parameters = parameters;
+    }
+    
+    public String getState() {
+        return state;
+    }
+
+    public void setState(String state) {
+        this.state = state;
+    }
+
+    public PreCheck getPrecheck() {
+        return precheck;
+    }
+
+    public void setPrecheck(PreCheck precheck) {
+        this.precheck = precheck;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public List<Response> getResponses() {
+        return responses;
+    }
+
+
+    public void setResponses(List<Response> responses) {
+        this.responses = responses;
+    }
+
+    public int getTransactionId() {
+        return transactionId;
+    }
+
+
+    public void setTransactionId(int transactionId) {
+        this.transactionId = transactionId;
+    }
+
+
+    public String getAction() {
+        return action;
+    }
+
+
+    public void setAction(String action) {
+        this.action = action;
+    }
+
+
+    public String getActionLevel() {
+        return actionLevel;
+    }
+
+
+    public void setActionLevel(String actionLevel) {
+        this.actionLevel = actionLevel;
+    }
+
+
+
+    public String getPayload() {
+        return payload;
+    }
+
+
+    public void setPayload(String payload) {
+        this.payload = payload;
+    }
+
+
+    public ActionIdentifier getActionIdentifier() {
+        return actionIdentifier;
+    }
+
+
+    public void setActionIdentifier(ActionIdentifier actionIdentifier) {
+        this.actionIdentifier = actionIdentifier;
+    }
+    
+    public String getStatusCode() {
+        return statusCode;
+    }
+
+    public void setStatusCode(String statusCode) {
+        this.statusCode = statusCode;
+    }
+
+    @Override
+    public String toString() {
+        return "Transaction [transactionId=" + transactionId + ", action=" + action + ", actionLevel=" + actionLevel
+                + ", actionIdentifier=" + actionIdentifier + ", parameters=" + parameters + ", executionType="
+                + executionType + ", uId=" + uId + ", statusCode=" + statusCode + ", pswd=" + pswd
+                + ", executionEndPoint=" + executionEndPoint + ", executionModule=" + executionModule
+                + ", executionRPC=" + executionRPC + ", state=" + state + ", precheck=" + precheck + ", payload="
+                + payload + ", responses=" + responses + ", status=" + status + "]";
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((action == null) ? 0 : action.hashCode());
+        result = prime * result + ((actionIdentifier == null) ? 0 : actionIdentifier.hashCode());
+        result = prime * result + ((actionLevel == null) ? 0 : actionLevel.hashCode());
+        result = prime * result + ((executionEndPoint == null) ? 0 : executionEndPoint.hashCode());
+        result = prime * result + ((executionModule == null) ? 0 : executionModule.hashCode());
+        result = prime * result + ((executionRPC == null) ? 0 : executionRPC.hashCode());
+        result = prime * result + ((executionType == null) ? 0 : executionType.hashCode());
+        result = prime * result + ((parameters == null) ? 0 : parameters.hashCode());
+        result = prime * result + ((payload == null) ? 0 : payload.hashCode());
+        result = prime * result + ((precheck == null) ? 0 : precheck.hashCode());
+        result = prime * result + ((pswd == null) ? 0 : pswd.hashCode());
+        result = prime * result + ((responses == null) ? 0 : responses.hashCode());
+        result = prime * result + ((state == null) ? 0 : state.hashCode());
+        result = prime * result + ((status == null) ? 0 : status.hashCode());
+        result = prime * result + ((statusCode == null) ? 0 : statusCode.hashCode());
+        result = prime * result + transactionId;
+        result = prime * result + ((uId == null) ? 0 : uId.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        Transaction other = (Transaction) obj;
+        if (action == null) {
+            if (other.action != null)
+                return false;
+        } else if (!action.equals(other.action))
+            return false;
+        if (actionIdentifier == null) {
+            if (other.actionIdentifier != null)
+                return false;
+        } else if (!actionIdentifier.equals(other.actionIdentifier))
+            return false;
+        if (actionLevel == null) {
+            if (other.actionLevel != null)
+                return false;
+        } else if (!actionLevel.equals(other.actionLevel))
+            return false;
+        if (executionEndPoint == null) {
+            if (other.executionEndPoint != null)
+                return false;
+        } else if (!executionEndPoint.equals(other.executionEndPoint))
+            return false;
+        if (executionModule == null) {
+            if (other.executionModule != null)
+                return false;
+        } else if (!executionModule.equals(other.executionModule))
+            return false;
+        if (executionRPC == null) {
+            if (other.executionRPC != null)
+                return false;
+        } else if (!executionRPC.equals(other.executionRPC))
+            return false;
+        if (executionType == null) {
+            if (other.executionType != null)
+                return false;
+        } else if (!executionType.equals(other.executionType))
+            return false;
+        if (parameters == null) {
+            if (other.parameters != null)
+                return false;
+        } else if (!parameters.equals(other.parameters))
+            return false;
+        if (payload == null) {
+            if (other.payload != null)
+                return false;
+        } else if (!payload.equals(other.payload))
+            return false;
+        if (precheck == null) {
+            if (other.precheck != null)
+                return false;
+        } else if (!precheck.equals(other.precheck))
+            return false;
+        if (pswd == null) {
+            if (other.pswd != null)
+                return false;
+        } else if (!pswd.equals(other.pswd))
+            return false;
+        if (responses == null) {
+            if (other.responses != null)
+                return false;
+        } else if (!responses.equals(other.responses))
+            return false;
+        if (state == null) {
+            if (other.state != null)
+                return false;
+        } else if (!state.equals(other.state))
+            return false;
+        if (status == null) {
+            if (other.status != null)
+                return false;
+        } else if (!status.equals(other.status))
+            return false;
+        if (statusCode == null) {
+            if (other.statusCode != null)
+                return false;
+        } else if (!statusCode.equals(other.statusCode))
+            return false;
+        if (transactionId != other.transactionId)
+            return false;
+        if (uId == null) {
+            if (other.uId != null)
+                return false;
+        } else if (!uId.equals(other.uId))
+            return false;
+        return true;
+    }
+
+
+}
+
+
+
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/data/Transactions.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/data/Transactions.java
new file mode 100644
index 0000000..736b7f3
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/data/Transactions.java
@@ -0,0 +1,50 @@
+/*-
+ * ============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.appc.flow.controller.data;
+
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class Transactions {
+
+    
+    @JsonProperty("transactions")
+    private List<Transaction> transactions ;
+
+    public List<Transaction> getTransactions() {
+        return transactions;
+    }
+
+    public void setTransactions(List<Transaction> transactions) {
+        this.transactions = transactions;
+    }
+
+    @Override
+    public String toString() {
+        return "Transactions [transactions=" + transactions + "]";
+    }
+    
+    
+}
+
+
+
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/dbervices/FlowControlDBService.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/dbervices/FlowControlDBService.java
new file mode 100644
index 0000000..c3ea6ed
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/dbervices/FlowControlDBService.java
@@ -0,0 +1,220 @@
+/*-
+ * ============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.appc.flow.controller.dbervices;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.openecomp.appc.flow.controller.data.Transaction;
+import org.openecomp.appc.flow.controller.utils.EscapeUtils;
+import org.openecomp.appc.flow.controller.utils.FlowControllerConstants;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.openecomp.sdnc.sli.SvcLogicException;
+import org.openecomp.sdnc.sli.SvcLogicResource;
+import org.openecomp.sdnc.sli.SvcLogicResource.QueryStatus;
+import org.openecomp.sdnc.sli.resource.sql.SqlResource;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+
+public class FlowControlDBService {
+
+    private static final EELFLogger log = EELFManager.getInstance().getLogger(FlowControlDBService.class);
+    private SvcLogicResource serviceLogic;
+    private static FlowControlDBService dgGeneralDBService = null;
+    public static FlowControlDBService initialise() {
+        if (dgGeneralDBService == null) {
+            dgGeneralDBService = new FlowControlDBService();
+        }
+        return dgGeneralDBService;
+    }
+    private FlowControlDBService() {
+        if (serviceLogic == null) {
+            serviceLogic = new SqlResource();
+        }
+    }
+
+    public void getFlowReferenceData(SvcLogicContext ctx, Map<String, String> inParams, SvcLogicContext localContext) throws SvcLogicException {
+        
+        String fn = "DBService.getflowModelInfo";
+    //    log.debug("Testing "  + ctx.getAttribute(FlowExecutorConstants.VNF_TYPE) + " and " + ctx.getAttribute(FlowExecutorConstants.ACTION_LEVEL));    
+        String whereClause = " where ACTION = $" +FlowControllerConstants.REQUEST_ACTION ;
+    
+        if(ctx.getAttribute(FlowControllerConstants.VNF_TYPE) !=null)        
+            whereClause = whereClause.concat(" and VNF_TYPE = $" + FlowControllerConstants.VNF_TYPE);
+        
+        if(ctx.getAttribute(FlowControllerConstants.ACTION_LEVEL) !=null)
+            whereClause = whereClause.concat(" and ACTION_LEVEL = $" + FlowControllerConstants.ACTION_LEVEL);
+        
+        QueryStatus status = null;
+        if (serviceLogic != null && localContext != null) {    
+            String key = "select SEQUENCE_TYPE, CATEGORY, GENERATION_NODE, EXECUTION_NODE from " + FlowControllerConstants.DB_MULTISTEP_FLOW_REFERENCE + 
+                        whereClause ;
+            log.debug(fn + "Query String : " + key);
+            status = serviceLogic.query("SQL", false, null, key, null, null, localContext);
+            if(status.toString().equals("FAILURE"))
+                throw new SvcLogicException("Error - while getting FlowReferenceData ");
+        }        
+    }
+    public String getEndPointByAction(String action) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+    public String getDesignTimeFlowModel(SvcLogicContext localContext) throws SvcLogicException {
+        String fn = "DBService.getDesignTimeFlowModel ";        
+        QueryStatus status = null;
+        if (serviceLogic != null && localContext != null) {    
+            String queryString = "select max(internal_version) as maxInternalVersion, artifact_name as artifactName from " + FlowControllerConstants.DB_ASDC_ARTIFACTS
+                    + " where artifact_name in (select artifact_name from " + FlowControllerConstants.DB_ASDC_REFERENCE + 
+                    " where vnf_type= $" + FlowControllerConstants.VNF_TYPE + 
+                     " and  vnfc_type = $" + FlowControllerConstants.VNFC_TYPE + 
+                     " and  action = $" + FlowControllerConstants.REQUEST_ACTION + 
+                     " and file_category =  $" + FlowControllerConstants.CATEGORY + " )" ;
+                    
+                    
+            log.debug(fn + "Query String : " + queryString);
+            status = serviceLogic.query("SQL", false, null, queryString, null, null, localContext);        
+
+            if(status.toString().equals("FAILURE"))
+                throw new SvcLogicException("Error - while getting FlowReferenceData ");
+                        
+            String queryString1 = "select artifact_content from " + FlowControllerConstants.DB_ASDC_ARTIFACTS + 
+                    " where artifact_name = $artifactName  and internal_version = $maxInternalVersion ";
+            
+            log.debug(fn + "Query String : " + queryString1);
+            status = serviceLogic.query("SQL", false, null, queryString1, null, null, localContext);            
+            if(status.toString().equals("FAILURE"))
+                throw new SvcLogicException("Error - while getting FlowReferenceData ");
+        }
+                    
+        return localContext.getAttribute("artifact-content");
+    }
+    public QueryStatus loadSequenceIntoDB(SvcLogicContext localContext) throws SvcLogicException {
+        String fn = "DBService.saveArtifacts";
+        localContext.setAttribute(FlowControllerConstants.ARTIFACT_CONTENT_ESCAPED, EscapeUtils.escapeSql(localContext.getAttribute(FlowControllerConstants.ARTIFACT_CONTENT)));
+        log.debug("ESCAPED sequence for DB : "  +  localContext.getAttribute(FlowControllerConstants.ARTIFACT_CONTENT_ESCAPED));
+        
+        for (Object key : localContext.getAttributeKeySet()) {
+            String parmName = (String) key;
+            String parmValue = localContext.getAttribute(parmName);
+            log.debug(" loadSequenceIntoDB " + parmName +  "="  + parmValue);
+            
+        }
+        
+        
+        QueryStatus status = null;
+        if (serviceLogic != null && localContext != null) {
+            String queryString = "INSERT INTO " + FlowControllerConstants.DB_REQUEST_ARTIFACTS + 
+                        " set request_id =  $" + FlowControllerConstants.REQUEST_ID + 
+                        " , action =  $" + FlowControllerConstants.REQUEST_ACTION + 
+                        " , action_level =  $" + FlowControllerConstants.ACTION_LEVEL + 
+                        " , vnf_type = $" + FlowControllerConstants.VNF_TYPE + 
+                        " , category = $" + FlowControllerConstants.CATEGORY + 
+                        " , artifact_content = $" + FlowControllerConstants.ARTIFACT_CONTENT_ESCAPED + 
+                        " , updated_date = sysdate() ";        
+
+            status = serviceLogic.save("SQL", false, false, queryString, null, null, localContext);
+            if(status.toString().equals("FAILURE"))
+                throw new SvcLogicException("Error While processing storing Artifact: " +localContext.getAttribute(FlowControllerConstants.ARTIFACT_NAME));
+        }
+        return status;
+
+    }
+    public void populateModuleAndRPC(Transaction transaction, String vnf_type) throws SvcLogicException {
+        String fn = "FlowControlDBService.populateModuleAndRPC ";
+        QueryStatus status = null;
+        SvcLogicContext context = new SvcLogicContext();        
+        if (serviceLogic != null && context != null) {    
+            String key = "select execution_type, execution_module, execution_rpc from " + FlowControllerConstants.DB_PROCESS_FLOW_REFERENCE + 
+                        " where action = '" + transaction.getAction() + "'" + 
+                        " and action_level = '" + transaction.getActionLevel() + "'" + 
+                        " and protocol in ( select protocol from " + FlowControllerConstants.DB_PROTOCOL_REFERENCE  + 
+                        " where action = '" + transaction.getAction() + "'" ;
+            if(vnf_type !=null && !vnf_type.isEmpty())
+                key = key +     " and vnf_type ='" + vnf_type + "' )" ;
+            else
+                key = key + " ) " ;
+            log.debug(fn + "Query String : " + key);
+            status = serviceLogic.query("SQL", false, null, key, null, null, context);
+            if(status.toString().equals("FAILURE"))
+                throw new SvcLogicException("Error - while getting FlowReferenceData ");
+            
+            transaction.setExecutionModule(context.getAttribute(FlowControllerConstants.EXECUTTION_MODULE));
+            transaction.setExecutionRPC(context.getAttribute(FlowControllerConstants.EXECUTION_RPC));
+            transaction.setExecutionType(context.getAttribute(FlowControllerConstants.EXECUTION_TYPE));
+        }
+     
+    }
+    
+    public String getDependencyInfo(SvcLogicContext localContext) throws SvcLogicException {
+        String fn = "DBService.getDependencyInfo ";        
+        QueryStatus status = null;
+        if (serviceLogic != null && localContext != null) {    
+            String queryString = "select max(internal_version) as maxInternalVersion, artifact_name as artifactName from " + FlowControllerConstants.DB_ASDC_ARTIFACTS
+                    + " where artifact_name in (select artifact_name from " + FlowControllerConstants.DB_ASDC_REFERENCE + 
+                    " where vnf_type= $" + FlowControllerConstants.VNF_TYPE  +
+                     " and file_category = '" + FlowControllerConstants.DEPENDENCYMODEL +"' )" ;
+                    
+            log.debug(fn + "Query String : " + queryString);
+            status = serviceLogic.query("SQL", false, null, queryString, null, null, localContext);        
+
+            if(status.toString().equals("FAILURE"))
+                throw new SvcLogicException("Error - while getting dependencydata ");
+                        
+            String queryString1 = "select artifact_content from " + FlowControllerConstants.DB_ASDC_ARTIFACTS + 
+                    " where artifact_name = $artifactName  and internal_version = $maxInternalVersion ";
+            
+            log.debug(fn + "Query String : " + queryString1);
+            status = serviceLogic.query("SQL", false, null, queryString1, null, null, localContext);            
+            if(status.toString().equals("FAILURE"))
+                throw new SvcLogicException("Error - while getting dependencyData ");
+        }
+                    
+        return localContext.getAttribute("artifact-content");
+    }
+    
+        public String getCapabilitiesData(SvcLogicContext localContext) throws SvcLogicException {
+            String fn = "DBService.getCapabilitiesData ";        
+            QueryStatus status = null;
+            if (serviceLogic != null && localContext != null) {    
+                String queryString = "select max(internal_version) as maxInternalVersion, artifact_name as artifactName from " + FlowControllerConstants.DB_ASDC_ARTIFACTS
+                        + " where artifact_name in (select artifact_name from " + FlowControllerConstants.DB_ASDC_REFERENCE + 
+                        " where vnf_type= $" + FlowControllerConstants.VNF_TYPE  +  
+                        " and file_category = '" + FlowControllerConstants.CAPABILITY +"' )" ;
+                                            
+                log.info(fn + "Query String : " + queryString);
+                status = serviceLogic.query("SQL", false, null, queryString, null, null, localContext);        
+
+                if(status.toString().equals("FAILURE"))
+                    throw new SvcLogicException("Error - while getting capabilitiesData ");
+                            
+                String queryString1 = "select artifact_content from " + FlowControllerConstants.DB_ASDC_ARTIFACTS + 
+                        " where artifact_name = $artifactName  and internal_version = $maxInternalVersion ";
+                
+                log.debug(fn + "Query String : " + queryString1);
+                status = serviceLogic.query("SQL", false, null, queryString1, null, null, localContext);            
+                if(status.toString().equals("FAILURE"))
+                    throw new SvcLogicException("Error - while getting capabilitiesData ");
+            }
+                        
+            return localContext.getAttribute("artifact-content");
+        }
+}
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/executorImpl/GraphExecutor.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/executorImpl/GraphExecutor.java
new file mode 100644
index 0000000..9c8a37c
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/executorImpl/GraphExecutor.java
@@ -0,0 +1,163 @@
+/*-
+ * ============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.appc.flow.controller.executorImpl;
+
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Properties;
+
+import org.openecomp.appc.flow.controller.data.Parameters;
+import org.openecomp.appc.flow.controller.data.Transaction;
+import org.openecomp.appc.flow.controller.interfaces.FlowExecutorInterface;
+import org.openecomp.appc.flow.controller.utils.FlowControllerConstants;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.openecomp.sdnc.sli.SvcLogicException;
+import org.openecomp.sdnc.sli.SvcLogicGraph;
+import org.openecomp.sdnc.sli.provider.SvcLogicService;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.framework.ServiceReference;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+
+
+public class GraphExecutor implements FlowExecutorInterface {
+
+    private static final EELFLogger log = EELFManager.getInstance().getLogger(GraphExecutor.class);
+
+    private SvcLogicService svcLogic = null;
+
+    public GraphExecutor() {
+        BundleContext bctx = FrameworkUtil.getBundle(SvcLogicService.class)
+                .getBundleContext();
+        
+        ServiceReference sref = bctx.getServiceReference(SvcLogicService.NAME);
+        if (sref != null) {
+            svcLogic = (SvcLogicService) bctx.getService(sref);
+            
+
+        } else {
+            log.warn("Cannot find service reference for "
+                    + SvcLogicService.NAME);
+        }
+        log.debug("Graph Executor Initialized successfully");
+    }
+
+    public boolean hasGraph(String module, String rpc, String version,
+            String mode) throws SvcLogicException {
+        return (svcLogic.hasGraph(module, rpc, version, mode));
+    }
+
+    public Properties executeGraph(String module, String rpc, String version,
+            String mode,  Properties parms) throws SvcLogicException {
+        log.debug("Parameters passed to SLI");
+
+//        for (Object key : parms.keySet()) {
+//            String parmName = (String) key;
+//            String parmValue = parms.getProperty(parmName);
+//
+//            log.debug(parmName + " = " + parmValue);
+//        }
+
+    Properties respProps = svcLogic.execute(module, rpc, version, mode,parms);
+    if (log.isDebugEnabled()) {
+        log.debug("Parameters returned by SLI");
+        for (Object key : respProps.keySet()) {
+            String parmName = (String) key;
+            String parmValue = respProps.getProperty(parmName);
+
+            log.debug(parmName + " = " + parmValue);
+        }
+    }    
+    if ("failure"
+            .equalsIgnoreCase(respProps.getProperty("SvcLogic.status"))) {
+        return (respProps);
+    }
+    return (respProps);
+}
+
+@Override
+public HashMap<String, String> execute(Transaction transaction, SvcLogicContext ctx) throws Exception {
+
+    String fn = "GraphExecutor.execute ";
+    log.debug(fn + "About to execute graph : " + transaction.getExecutionRPC())    ;
+    
+    Properties parms = new Properties();
+    for (Object key : ctx.getAttributeKeySet()) {
+            String parmName = (String) key;
+            String parmValue = ctx.getAttribute(parmName);
+            parms.put(parmName, parmValue);
+            log.info(fn + "Setting Key= "  + parmName + "and Value = " +  parmValue);
+            
+    }
+    Properties returnParams = executeGraph(transaction.getExecutionModule(),transaction.getExecutionRPC(), null, "sync",  parms);
+    
+    //log.debug("Return Params executing DG :"  + returnParams.toString());
+
+    log.debug("Returned Params from DG Module: " + transaction.getExecutionModule() + "and DG NAME: "  + transaction.getExecutionRPC()
+     + returnParams.toString());
+
+    Enumeration e = returnParams.propertyNames();
+
+    while (e.hasMoreElements()) {
+         String key = (String) e.nextElement();
+         log.info("NEW KEY =  " + key + " -- " + returnParams.getProperty(key));
+
+            ctx.setAttribute(key, returnParams.getProperty(key));
+    }
+    
+
+    //Get the correct code from the SVC Logic and set it in transaction  
+//    transaction.setStatusCode(returnParams.getProperty("SvcLogic.code"));
+    
+    if (FlowControllerConstants.FAILURE
+            .equalsIgnoreCase(returnParams.getProperty("SvcLogic.status")))    {
+        transaction.setStatus(FlowControllerConstants.FAILURE);
+        ctx.setAttribute(ctx.getAttribute(FlowControllerConstants.RESPONSE_PREFIX) + FlowControllerConstants.OUTPUT_PARAM_STATUS, FlowControllerConstants.OUTPUT_STATUS_FAILURE);
+        ctx.setAttribute(ctx.getAttribute(FlowControllerConstants.RESPONSE_PREFIX) + FlowControllerConstants.OUTPUT_STATUS_MESSAGE, returnParams.getProperty("error-message"));
+        transaction.setStatusCode("401");
+        transaction.setState((ctx.getAttribute(transaction.getExecutionModule() + "." + transaction.getExecutionRPC() + "." + FlowControllerConstants.OUTPUT_STATUS_MESSAGE)) !=null ? 
+                ctx.getAttribute(transaction.getExecutionModule() + "." + transaction.getExecutionRPC() + "." + FlowControllerConstants.OUTPUT_STATUS_MESSAGE): null);
+        //Get error code from above instead setting here ...its for testing purpose
+        
+        
+    }
+    else if(FlowControllerConstants.SUCCESS
+            .equalsIgnoreCase(returnParams.getProperty("SvcLogic.status")))    {        
+        transaction.setStatus(FlowControllerConstants.SUCCESS);
+        transaction.setStatusCode("400");
+        ctx.setAttribute(ctx.getAttribute(FlowControllerConstants.RESPONSE_PREFIX) + FlowControllerConstants.OUTPUT_PARAM_STATUS, FlowControllerConstants.OUTPUT_STATUS_SUCCESS);
+        transaction.setState((ctx.getAttribute(transaction.getExecutionModule() + "." + transaction.getExecutionRPC() + "." + FlowControllerConstants.OUTPUT_STATUS_MESSAGE)) !=null ? 
+                ctx.getAttribute(transaction.getExecutionModule() + "." + transaction.getExecutionRPC() + "." + FlowControllerConstants.OUTPUT_STATUS_MESSAGE): null);
+        //Get error code from above instead setting here ...its for testing purpose
+    }
+    else {        
+        transaction.setStatus(FlowControllerConstants.OTHERS);
+        ctx.setAttribute(ctx.getAttribute(FlowControllerConstants.RESPONSE_PREFIX) + FlowControllerConstants.OUTPUT_PARAM_STATUS, FlowControllerConstants.OUTPUT_STATUS_FAILURE);
+        transaction.setStatusCode("401");
+        ctx.setAttribute(ctx.getAttribute(FlowControllerConstants.RESPONSE_PREFIX) + FlowControllerConstants.OUTPUT_STATUS_MESSAGE, returnParams.getProperty("error-message"));
+    }
+    
+    return null;
+    //Change null to required value if required in upper level
+}
+}
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/executorImpl/NodeExecutor.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/executorImpl/NodeExecutor.java
new file mode 100644
index 0000000..54c627e
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/executorImpl/NodeExecutor.java
@@ -0,0 +1,47 @@
+/*-
+ * ============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.appc.flow.controller.executorImpl;
+
+import java.util.HashMap;
+import java.util.Properties;
+
+import org.openecomp.appc.flow.controller.data.Transaction;
+import org.openecomp.appc.flow.controller.interfaces.FlowExecutorInterface;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.openecomp.sdnc.sli.SvcLogicException;
+import org.openecomp.sdnc.sli.provider.SvcLogicService;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.framework.ServiceReference;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+
+
+public class NodeExecutor implements FlowExecutorInterface {
+
+    private static final EELFLogger LOG = EELFManager.getInstance().getLogger(NodeExecutor.class);
+
+    @Override
+    public HashMap<String, String> execute(Transaction transaction, SvcLogicContext ctx) {
+        return null;
+    }
+}
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/executorImpl/RestExecutor.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/executorImpl/RestExecutor.java
new file mode 100644
index 0000000..ff1ba61
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/executorImpl/RestExecutor.java
@@ -0,0 +1,156 @@
+/*-
+ * ============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.appc.flow.controller.executorImpl;
+
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.net.URI;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Properties;
+
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.SSLContext;
+import javax.ws.rs.HttpMethod;
+import javax.ws.rs.core.MediaType;
+
+import org.apache.commons.io.IOUtils;
+import org.openecomp.appc.flow.controller.data.Response;
+import org.openecomp.appc.flow.controller.data.Transaction;
+import org.openecomp.appc.flow.controller.interfaces.FlowExecutorInterface;
+import org.openecomp.appc.flow.controller.utils.FlowControllerConstants;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import com.sun.jersey.api.client.Client;
+import com.sun.jersey.api.client.ClientResponse;
+import com.sun.jersey.api.client.WebResource;
+import com.sun.jersey.api.client.config.DefaultClientConfig;
+import com.sun.jersey.api.client.filter.HTTPBasicAuthFilter;
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+
+
+public class RestExecutor implements FlowExecutorInterface {
+
+    private static final EELFLogger log = EELFManager.getInstance().getLogger(RestExecutor.class);
+    private static final String SDNC_CONFIG_DIR_VAR = "SDNC_CONFIG_DIR";
+    Properties props = new Properties();
+    public RestExecutor() throws Exception {    
+        String propDir = System.getenv(SDNC_CONFIG_DIR_VAR);
+        if (propDir == null)
+            throw new Exception(" Cannot find Property file -" + SDNC_CONFIG_DIR_VAR);
+        String propFile = propDir + FlowControllerConstants.APPC_FLOW_CONTROLLER;
+        InputStream propStream = new FileInputStream(propFile);
+        try{
+            props.load(propStream);
+        }
+        catch (Exception e){
+            throw new Exception("Could not load properties file " + propFile, e);
+        }
+        finally{
+            try{
+                propStream.close();
+            }
+            catch (Exception e){
+                log.warn("Could not close FileInputStream", e);
+            }
+        }        
+    }
+    @Override
+    public HashMap<String, String> execute(Transaction transaction, SvcLogicContext ctx) throws Exception{    
+        log.info("Configuring Rest Operation....." + transaction.toString());
+        Response response = new Response();
+        HashMap<String, String> outputMessage = new HashMap<String, String>();
+        Client client = null;
+        WebResource webResource = null;
+        ClientResponse clientResponse = null;
+        String responseDataType=MediaType.APPLICATION_JSON;
+        String requestDataType=MediaType.APPLICATION_JSON;
+        
+        
+        try{
+            DefaultClientConfig defaultClientConfig = new DefaultClientConfig();
+            System.setProperty("jsse.enableSNIExtension", "false");
+            SSLContext sslContext = null;
+            SecureRestClientTrustManager secureRestClientTrustManager = new SecureRestClientTrustManager();
+            sslContext = SSLContext.getInstance("SSL");
+            sslContext.init(null, new javax.net.ssl.TrustManager[] { secureRestClientTrustManager }, null);
+            defaultClientConfig.getProperties().put(
+                    com.sun.jersey.client.urlconnection.HTTPSProperties.PROPERTY_HTTPS_PROPERTIES,
+                    new com.sun.jersey.client.urlconnection.HTTPSProperties(getHostnameVerifier(), sslContext));
+            client = Client.create(defaultClientConfig);
+            client.addFilter(new HTTPBasicAuthFilter(transaction.getuId(), transaction.getPswd()));
+            webResource = client.resource(new URI(transaction.getExecutionEndPoint()));
+            webResource.setProperty("Content-Type", "application/json;charset=UTF-8");
+
+            log.info("Starting Rest Operation.....");
+            if(HttpMethod.GET.equalsIgnoreCase(transaction.getExecutionRPC())){
+                clientResponse = webResource.accept(responseDataType).get(ClientResponse.class);
+            }else if(HttpMethod.POST.equalsIgnoreCase(transaction.getExecutionRPC())){
+                clientResponse = webResource.type(requestDataType).post(ClientResponse.class, transaction.getPayload());
+            }else if(HttpMethod.PUT.equalsIgnoreCase(transaction.getExecutionRPC())){
+                clientResponse = webResource.type(requestDataType).put(ClientResponse.class,transaction.getPayload());
+            }else if(HttpMethod.DELETE.equalsIgnoreCase(transaction.getExecutionRPC())){
+                clientResponse = webResource.delete(ClientResponse.class);
+            }
+
+            if(clientResponse.getStatus() == 200){
+                response.setResponseCode(String.valueOf(clientResponse.getStatus()));
+                ArrayList<Response> responses = new ArrayList<Response>();
+                responses.add(response);
+                transaction.setResponses(responses);    
+                outputMessage.put("restResponse", clientResponse.getEntity(String.class));
+            }
+            else{
+                throw new Exception("Can not determine the state of : " + transaction.getActionLevel()  + " HTTP error code : "
+                        + clientResponse.getStatus());
+                
+            }
+            
+            log.info("Completed Rest Operation.....");
+
+        }catch (Exception e) {
+            e.printStackTrace();
+            log.debug("failed in RESTCONT Action ("+transaction.getExecutionRPC()+") for the resource " + transaction.getExecutionEndPoint() + ", falut message :"+e.getMessage());
+            throw new Exception("Error While Sending Rest Request" + e.getMessage());
+        }
+        finally {
+            // clean up.
+            webResource = null;
+            if(client != null){
+                client.destroy();
+                client = null;
+            }
+        }
+
+        return outputMessage;
+    }
+    
+private HostnameVerifier getHostnameVerifier() {
+    return new HostnameVerifier() {
+        @Override
+        public boolean verify(String hostname, javax.net.ssl.SSLSession sslSession) {
+            return true;
+        }
+    };
+}
+
+}
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/executorImpl/SecureRestClientTrustManager.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/executorImpl/SecureRestClientTrustManager.java
new file mode 100644
index 0000000..3cf2d6e
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/executorImpl/SecureRestClientTrustManager.java
@@ -0,0 +1,54 @@
+/*-
+ * ============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.appc.flow.controller.executorImpl;
+
+import java.security.cert.CertificateException;
+import java.security.cert.X509Certificate;
+
+import javax.net.ssl.X509TrustManager;
+
+
+public class SecureRestClientTrustManager implements X509TrustManager {
+
+    @Override
+    public void checkClientTrusted(X509Certificate[] arg0, String arg1)
+            throws CertificateException {
+    }
+
+    @Override
+    public void checkServerTrusted(X509Certificate[] arg0, String arg1)
+            throws CertificateException {
+    }
+
+    @Override
+    public X509Certificate[] getAcceptedIssuers() {
+        return new X509Certificate[0];
+    }
+
+    public boolean isClientTrusted(X509Certificate[] arg0) {
+        return true;
+    }
+
+    public boolean isServerTrusted(X509Certificate[] arg0) {
+        return true;
+    }
+
+}
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/ActionIdentifier.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/ActionIdentifier.java
new file mode 100644
index 0000000..f16477c
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/ActionIdentifier.java
@@ -0,0 +1,158 @@
+/*-
+ * ============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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2017.07.31 at 10:30:39 AM EDT 
+//
+
+
+package org.openecomp.appc.flow.controller.interfaceData;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="vnf-id" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="vserver-id" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="vnfc-name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "vnfId",
+    "vserverId",
+    "vnfcName"
+})
+@XmlRootElement(name = "action-identifier")
+public class ActionIdentifier {
+
+    @XmlElement(name = "vnf-id", required = true)
+    @JsonProperty("vnf-id")
+    protected String vnfId;
+    @XmlElement(name = "vserver-id", required = true)
+    @JsonProperty("vserver-id")
+    protected String vserverId;
+    @XmlElement(name = "vnfc-name", required = true)
+    @JsonProperty("vnfc-name")
+    protected String vnfcName;
+
+    /**
+     * Gets the value of the vnfId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVnfId() {
+        return vnfId;
+    }
+
+    /**
+     * Sets the value of the vnfId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVnfId(String value) {
+        this.vnfId = value;
+    }
+
+    /**
+     * Gets the value of the vserverId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVserverId() {
+        return vserverId;
+    }
+
+    /**
+     * Sets the value of the vserverId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVserverId(String value) {
+        this.vserverId = value;
+    }
+
+    /**
+     * Gets the value of the vnfcName property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVnfcName() {
+        return vnfcName;
+    }
+
+    /**
+     * Sets the value of the vnfcName property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVnfcName(String value) {
+        this.vnfcName = value;
+    }
+
+    @Override
+    public String toString() {
+        return "ActionIdentifier [vnfId=" + vnfId + ", vserverId=" + vserverId
+                + ", vnfcName=" + vnfcName + "]";
+    }
+
+}
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/Capabilities.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/Capabilities.java
new file mode 100644
index 0000000..058d291
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/Capabilities.java
@@ -0,0 +1,190 @@
+/*-
+ * ============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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2017.07.31 at 10:30:39 AM EDT 
+//
+
+
+package org.openecomp.appc.flow.controller.interfaceData;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlList;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "vnf",
+    "vfModule",
+    "vm",
+    "vnfc"
+})
+@XmlRootElement(name = "capabilities")
+public class Capabilities {
+
+    @XmlList
+    @XmlElement(required = true)
+    protected List<String> vnf;
+    @XmlList
+    @XmlElement(name = "vf-module", required = true)
+    @JsonProperty("vf-module")
+    protected List<String> vfModule;
+    @XmlList
+    @XmlElement(required = true)
+    protected List<String> vm;
+    @XmlList
+    @XmlElement(required = true)
+    protected List<String> vnfc;
+
+    /**
+     * Gets the value of the vnf property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the vnf property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getVnf().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link String }
+     * 
+     * 
+     */
+    public List<String> getVnf() {
+        if (vnf == null) {
+            vnf = new ArrayList<String>();
+        }
+        return this.vnf;
+    }
+
+    /**
+     * Gets the value of the vfModule property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the vfModule property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getVfModule().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link String }
+     * 
+     * 
+     */
+    public List<String> getVfModule() {
+        if (vfModule == null) {
+            vfModule = new ArrayList<String>();
+        }
+        return this.vfModule;
+    }
+
+    /**
+     * Gets the value of the vm property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the vm property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getVm().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link String }
+     * 
+     * 
+     */
+    public List<String> getVm() {
+        if (vm == null) {
+            vm = new ArrayList<String>();
+        }
+        return this.vm;
+    }
+
+    /**
+     * Gets the value of the vnfc property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the vnfc property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getVnfc().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link String }
+     * 
+     * 
+     */
+    public List<String> getVnfc() {
+        if (vnfc == null) {
+            vnfc = new ArrayList<String>();
+        }
+        return this.vnfc;
+    }
+
+    @Override
+    public String toString() {
+        return "Capabilities [vnf=" + vnf + ", vfModule=" + vfModule + ", vm="
+                + vm + ", vnfc=" + vnfc + "]";
+    }
+
+}
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/DependencyInfo.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/DependencyInfo.java
new file mode 100644
index 0000000..0bc0186
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/DependencyInfo.java
@@ -0,0 +1,86 @@
+/*-
+ * ============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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2017.07.31 at 10:30:39 AM EDT 
+//
+
+
+package org.openecomp.appc.flow.controller.interfaceData;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "vnfcs"
+})
+@XmlRootElement(name = "dependency-info")
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class DependencyInfo {
+
+    protected List<Vnfcs> vnfcs;
+
+    /**
+     * Gets the value of the vnfcs property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the vnfcs property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getVnfcs().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Vnfcs }
+     * 
+     * 
+     */
+    public List<Vnfcs> getVnfcs() {
+        if (vnfcs == null) {
+            vnfcs = new ArrayList<Vnfcs>();
+        }
+        return this.vnfcs;
+    }
+
+    @Override
+    public String toString() {
+        return "DependencyInfo [vnfcs=" + vnfcs + "]";
+    }
+
+}
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/Input.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/Input.java
new file mode 100644
index 0000000..43564a4
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/Input.java
@@ -0,0 +1,199 @@
+/*-
+ * ============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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2017.07.31 at 10:30:39 AM EDT 
+//
+
+
+package org.openecomp.appc.flow.controller.interfaceData;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonRootName;
+
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@JsonRootName(value="input")
+@XmlType(name = "input", propOrder = {
+    "requestInfo",
+    "inventoryInfo",
+    "dependencyInfo",
+    "tunableParameters",
+    "capabilities"
+})
+@JsonPropertyOrder({"requestInfo",
+    "inventoryInfo",
+    "dependencyInfo",
+    "tunableParameters",
+    "capabilities" })
+public class Input {
+
+    @XmlElement(name = "request-info")
+    @JsonProperty("request-info")
+    protected RequestInfo requestInfo;
+    @XmlElement(name = "inventory-info")
+    @JsonProperty("inventory-info")
+    protected InventoryInfo inventoryInfo;
+    @XmlElement(name = "dependency-info")
+    @JsonProperty("dependency-info")
+    protected DependencyInfo dependencyInfo;
+    @XmlElement(name = "tunable-parameters")
+    @JsonProperty("tunable-parameters")
+    protected TunableParameters tunableParameters;
+    protected Capabilities capabilities;
+
+    /**
+     * Gets the value of the requestInfo property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link RequestInfo }
+     *     
+     */
+    public RequestInfo getRequestInfo() {
+        return requestInfo;
+    }
+
+    /**
+     * Sets the value of the requestInfo property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link RequestInfo }
+     *     
+     */
+    public void setRequestInfo(RequestInfo value) {
+        this.requestInfo = value;
+    }
+
+    /**
+     * Gets the value of the inventoryInfo property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link InventoryInfo }
+     *     
+     */
+    public InventoryInfo getInventoryInfo() {
+        return inventoryInfo;
+    }
+
+    /**
+     * Sets the value of the inventoryInfo property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link InventoryInfo }
+     *     
+     */
+    public void setInventoryInfo(InventoryInfo value) {
+        this.inventoryInfo = value;
+    }
+
+    /**
+     * Gets the value of the dependencyInfo property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link DependencyInfo }
+     *     
+     */
+    public DependencyInfo getDependencyInfo() {
+        return dependencyInfo;
+    }
+
+    /**
+     * Sets the value of the dependencyInfo property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link DependencyInfo }
+     *     
+     */
+    public void setDependencyInfo(DependencyInfo value) {
+        this.dependencyInfo = value;
+    }
+
+    /**
+     * Gets the value of the tunableParameters property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link TunableParameters }
+     *     
+     */
+    public TunableParameters getTunableParameters() {
+        return tunableParameters;
+    }
+
+    /**
+     * Sets the value of the tunableParameters property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link TunableParameters }
+     *     
+     */
+    public void setTunableParameters(TunableParameters value) {
+        this.tunableParameters = value;
+    }
+
+    /**
+     * Gets the value of the capabilities property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Capabilities }
+     *     
+     */
+    public Capabilities getCapabilities() {
+        return capabilities;
+    }
+
+    /**
+     * Sets the value of the capabilities property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Capabilities }
+     *     
+     */
+    public void setCapabilities(Capabilities value) {
+        this.capabilities = value;
+    }
+
+    @Override
+    public String toString() {
+        return "Input [requestInfo=" + requestInfo + ", inventoryInfo="
+                + inventoryInfo + ", dependencyInfo=" + dependencyInfo
+                + ", tunableParameters=" + tunableParameters
+                + ", capabilities=" + capabilities + "]";
+    }
+
+}
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/InventoryInfo.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/InventoryInfo.java
new file mode 100644
index 0000000..12f086f
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/InventoryInfo.java
@@ -0,0 +1,80 @@
+/*-
+ * ============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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2017.07.31 at 10:30:39 AM EDT 
+//
+
+
+package org.openecomp.appc.flow.controller.interfaceData;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "vnfInfo"
+})
+@XmlRootElement(name = "inventory-info")
+public class InventoryInfo {
+
+    @XmlElement(name = "vnf-info", required = true)
+    @JsonProperty("vnf-info")
+    protected VnfInfo vnfInfo;
+
+    /**
+     * Gets the value of the vnfInfo property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link VnfInfo }
+     *     
+     */
+    public VnfInfo getVnfInfo() {
+        return vnfInfo;
+    }
+
+    /**
+     * Sets the value of the vnfInfo property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link VnfInfo }
+     *     
+     */
+    public void setVnfInfo(VnfInfo value) {
+        this.vnfInfo = value;
+    }
+
+    @Override
+    public String toString() {
+        return "InventoryInfo [vnfInfo=" + vnfInfo + "]";
+    }
+
+}
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/ObjectFactory.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/ObjectFactory.java
new file mode 100644
index 0000000..80cb3bf
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/ObjectFactory.java
@@ -0,0 +1,147 @@
+/*-
+ * ============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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2017.07.31 at 10:30:39 AM EDT 
+//
+
+
+package org.openecomp.appc.flow.controller.interfaceData;
+
+import javax.xml.bind.annotation.XmlRegistry;
+
+
+/**
+ * This object contains factory methods for each 
+ * Java content interface and Java element interface 
+ * generated in the org.openecomp.appc.flow.controller.interfaceData package. 
+ * <p>An ObjectFactory allows you to programatically 
+ * construct new instances of the Java representation 
+ * for XML content. The Java representation of XML 
+ * content can consist of schema derived interfaces 
+ * and classes representing the binding of schema 
+ * type definitions, element declarations and model 
+ * groups.  Factory methods for each of these are 
+ * provided in this class.
+ * 
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+
+    /**
+     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.openecomp.appc.flow.controller.interfaceData
+     * 
+     */
+    public ObjectFactory() {
+    }
+
+    /**
+     * Create an instance of {@link Capabilities }
+     * 
+     */
+    public Capabilities createCapabilities() {
+        return new Capabilities();
+    }
+
+    /**
+     * Create an instance of {@link RequestInfo }
+     * 
+     */
+    public RequestInfo createRequestInfo() {
+        return new RequestInfo();
+    }
+
+    /**
+     * Create an instance of {@link ActionIdentifier }
+     * 
+     */
+    public ActionIdentifier createActionIdentifier() {
+        return new ActionIdentifier();
+    }
+
+    /**
+     * Create an instance of {@link DependencyInfo }
+     * 
+     */
+    public DependencyInfo createDependencyInfo() {
+        return new DependencyInfo();
+    }
+
+    /**
+     * Create an instance of {@link Vnfcs }
+     * 
+     */
+    public Vnfcs createVnfcs() {
+        return new Vnfcs();
+    }
+
+    /**
+     * Create an instance of {@link Vm }
+     * 
+     */
+    public Vm createVm() {
+        return new Vm();
+    }
+
+    /**
+     * Create an instance of {@link Vnfcslist }
+     * 
+     */
+    public Vnfcslist createVnfcslist() {
+        return new Vnfcslist();
+    }
+
+    /**
+     * Create an instance of {@link TunableParameters }
+     * 
+     */
+    public TunableParameters createTunableParameters() {
+        return new TunableParameters();
+    }
+
+    /**
+     * Create an instance of {@link VnfInfo }
+     * 
+     */
+    public VnfInfo createVnfInfo() {
+        return new VnfInfo();
+    }
+
+    /**
+     * Create an instance of {@link InventoryInfo }
+     * 
+     */
+    public InventoryInfo createInventoryInfo() {
+        return new InventoryInfo();
+    }
+
+    /**
+     * Create an instance of {@link Input }
+     * 
+     */
+    public Input createInput() {
+        return new Input();
+    }
+
+}
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/RequestInfo.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/RequestInfo.java
new file mode 100644
index 0000000..0a06077
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/RequestInfo.java
@@ -0,0 +1,164 @@
+/*-
+ * ============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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2017.07.31 at 10:30:39 AM EDT 
+//
+
+
+package org.openecomp.appc.flow.controller.interfaceData;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "action",
+    "actionLevel",
+    "actionIdentifier",
+    "payload"
+})
+@XmlRootElement(name = "request-info")
+public class RequestInfo {
+
+    @XmlElement(required = true)
+    protected String action;
+    @XmlElement(name = "action-level", required = true)
+    @JsonProperty("action-level")
+    protected String actionLevel;
+    @XmlElement(name = "action-identifier", required = true)
+    @JsonProperty("action-identifier")
+    protected ActionIdentifier actionIdentifier;
+    @XmlElement(required = true)
+    protected String payload;
+
+    /**
+     * Gets the value of the action property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getAction() {
+        return action;
+    }
+
+    /**
+     * Sets the value of the action property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setAction(String value) {
+        this.action = value;
+    }
+
+    /**
+     * Gets the value of the actionLevel property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getActionLevel() {
+        return actionLevel;
+    }
+
+    /**
+     * Sets the value of the actionLevel property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setActionLevel(String value) {
+        this.actionLevel = value;
+    }
+
+    /**
+     * Gets the value of the actionIdentifier property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link ActionIdentifier }
+     *     
+     */
+    public ActionIdentifier getActionIdentifier() {
+        return actionIdentifier;
+    }
+
+    /**
+     * Sets the value of the actionIdentifier property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link ActionIdentifier }
+     *     
+     */
+    public void setActionIdentifier(ActionIdentifier value) {
+        this.actionIdentifier = value;
+    }
+
+    /**
+     * Gets the value of the payload property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getPayload() {
+        return payload;
+    }
+
+    /**
+     * Sets the value of the payload property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setPayload(String value) {
+        this.payload = value;
+    }
+
+    @Override
+    public String toString() {
+        return "RequestInfo [action=" + action + ", actionLevel=" + actionLevel
+                + ", actionIdentifier=" + actionIdentifier + ", payload="
+                + payload + "]";
+    }
+
+}
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/TunableParameters.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/TunableParameters.java
new file mode 100644
index 0000000..b0bb0e0
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/TunableParameters.java
@@ -0,0 +1,153 @@
+/*-
+ * ============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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2017.07.31 at 10:30:39 AM EDT 
+//
+
+
+package org.openecomp.appc.flow.controller.interfaceData;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="strategy" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="wait-time" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="retry-count" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "strategy",
+    "waitTime",
+    "retryCount"
+})
+@XmlRootElement(name = "tunable-parameters")
+public class TunableParameters {
+
+    @XmlElement(required = true)
+    protected String strategy;
+    @XmlElement(name = "wait-time", required = true)
+    protected String waitTime;
+    @XmlElement(name = "retry-count", required = true)
+    protected String retryCount;
+
+    /**
+     * Gets the value of the strategy property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getStrategy() {
+        return strategy;
+    }
+
+    /**
+     * Sets the value of the strategy property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setStrategy(String value) {
+        this.strategy = value;
+    }
+
+    /**
+     * Gets the value of the waitTime property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getWaitTime() {
+        return waitTime;
+    }
+
+    /**
+     * Sets the value of the waitTime property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setWaitTime(String value) {
+        this.waitTime = value;
+    }
+
+    /**
+     * Gets the value of the retryCount property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getRetryCount() {
+        return retryCount;
+    }
+
+    /**
+     * Sets the value of the retryCount property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setRetryCount(String value) {
+        this.retryCount = value;
+    }
+
+    @Override
+    public String toString() {
+        return "TunableParameters [strategy=" + strategy + ", waitTime="
+                + waitTime + ", retryCount=" + retryCount + "]";
+    }
+
+}
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/Vm.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/Vm.java
new file mode 100644
index 0000000..750719e
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/Vm.java
@@ -0,0 +1,108 @@
+/*-
+ * ============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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2017.07.31 at 10:30:39 AM EDT 
+//
+
+
+package org.openecomp.appc.flow.controller.interfaceData;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "vserverId",
+    "vnfc"
+})
+@XmlRootElement(name = "vm")
+public class Vm {
+
+    @XmlElement(name = "vserver-id", required = true)
+    @JsonProperty("vserver-id")
+    protected String vserverId;
+    @XmlElement(required = true)
+    @JsonProperty("vnfc")
+    protected Vnfcslist vnfc;
+
+    /**
+     * Gets the value of the vserverId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVserverId() {
+        return vserverId;
+    }
+
+    /**
+     * Sets the value of the vserverId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVserverId(String value) {
+        this.vserverId = value;
+    }
+
+    /**
+     * Gets the value of the vnfc property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Vnfcslist }
+     *     
+     */
+    public Vnfcslist getVnfc() {
+        return vnfc;
+    }
+
+    /**
+     * Sets the value of the vnfc property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Vnfcslist }
+     *     
+     */
+    public void setVnfc(Vnfcslist value) {
+        this.vnfc = value;
+    }
+
+    @Override
+    public String toString() {
+        return "Vm [vserverId=" + vserverId + ", vnfc=" + vnfc + "]";
+    }
+
+}
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/VnfInfo.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/VnfInfo.java
new file mode 100644
index 0000000..08ce862
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/VnfInfo.java
@@ -0,0 +1,172 @@
+/*-
+ * ============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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2017.07.31 at 10:30:39 AM EDT 
+//
+
+
+package org.openecomp.appc.flow.controller.interfaceData;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "vnfId",
+    "vnfName",
+    "vnfType",
+    "vm"
+})
+@XmlRootElement(name = "vnf-info")
+public class VnfInfo {
+
+    @XmlElement(name = "vnf-id", required = true)
+    @JsonProperty("vnf-id")
+    protected String vnfId;
+    @XmlElement(name = "vnf-name", required = true)
+    @JsonProperty("vnf-name")
+    protected String vnfName;
+    @XmlElement(name = "vnf-type", required = true)
+    @JsonProperty("vnf-type")
+    protected String vnfType;
+    @JsonProperty("vm")
+    protected List<Vm> vm;
+
+    /**
+     * Gets the value of the vnfId property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVnfId() {
+        return vnfId;
+    }
+
+    /**
+     * Sets the value of the vnfId property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVnfId(String value) {
+        this.vnfId = value;
+    }
+
+    /**
+     * Gets the value of the vnfName property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVnfName() {
+        return vnfName;
+    }
+
+    /**
+     * Sets the value of the vnfName property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVnfName(String value) {
+        this.vnfName = value;
+    }
+
+    /**
+     * Gets the value of the vnfType property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVnfType() {
+        return vnfType;
+    }
+
+    /**
+     * Sets the value of the vnfType property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVnfType(String value) {
+        this.vnfType = value;
+    }
+
+    /**
+     * Gets the value of the vm property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the vm property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getVm().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Vm }
+     * 
+     * 
+     */
+    public List<Vm> getVm() {
+        if (vm == null) {
+            vm = new ArrayList<Vm>();
+        }
+        return this.vm;
+    }
+
+    @Override
+    public String toString() {
+        return "VnfInfo [vnfId=" + vnfId + ", vnfName=" + vnfName
+                + ", vnfType=" + vnfType + ", vm=" + vm + "]";
+    }
+
+}
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/Vnfcs.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/Vnfcs.java
new file mode 100644
index 0000000..a3cab02
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/Vnfcs.java
@@ -0,0 +1,176 @@
+/*-
+ * ============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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2017.07.31 at 10:30:39 AM EDT 
+//
+
+
+package org.openecomp.appc.flow.controller.interfaceData;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlList;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonRootName;
+
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "vnfcType",
+    "mandatory",
+    "resilience",
+    "parents"
+})
+@XmlRootElement(name = "vnfcs")
+@JsonRootName(value="vnfcs")
+public class Vnfcs {
+
+    @XmlElement(name = "vnfc-type", required = true)
+    @JsonProperty("vnfc-type")
+    protected String vnfcType;
+    @XmlElement(required = true)
+    @JsonProperty("mandatory")
+    protected String mandatory;
+    @XmlElement(required = true)
+    @JsonProperty("resilience")
+    protected String resilience;
+    @XmlList
+    @XmlElement(required = true)
+    @JsonProperty("parents")
+    protected List<String> parents;
+
+    /**
+     * Gets the value of the vnfcType property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVnfcType() {
+        return vnfcType;
+    }
+
+    /**
+     * Sets the value of the vnfcType property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVnfcType(String value) {
+        this.vnfcType = value;
+    }
+
+    /**
+     * Gets the value of the mandatory property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getMandatory() {
+        return mandatory;
+    }
+
+    /**
+     * Sets the value of the mandatory property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setMandatory(String value) {
+        this.mandatory = value;
+    }
+
+    /**
+     * Gets the value of the resilience property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getResilience() {
+        return resilience;
+    }
+
+    /**
+     * Sets the value of the resilience property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setResilience(String value) {
+        this.resilience = value;
+    }
+
+    /**
+     * Gets the value of the parents property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the parents property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getParents().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link String }
+     * 
+     * 
+     */
+    public List<String> getParents() {
+        if (parents == null) {
+            parents = new ArrayList<String>();
+        }
+        return this.parents;
+    }
+
+    @Override
+    public String toString() {
+        return "Vnfcs [vnfcType=" + vnfcType + ", mandatory=" + mandatory
+                + ", resilience=" + resilience + ", parents=" + parents + "]";
+    }
+
+}
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/Vnfcslist.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/Vnfcslist.java
new file mode 100644
index 0000000..70692f3
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/Vnfcslist.java
@@ -0,0 +1,127 @@
+/*-
+ * ============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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2017.07.31 at 10:30:39 AM EDT 
+//
+
+
+package org.openecomp.appc.flow.controller.interfaceData;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+
+/**
+ * <p>Java class for vnfcslist complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="vnfcslist">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="vnfc-type" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         &lt;element name="vnfc-name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "vnfcslist", propOrder = {
+    "vnfcType",
+    "vnfcName"
+})
+public class Vnfcslist {
+
+    @XmlElement(name = "vnfc-type", required = true)
+    @JsonProperty("vnfc-type")
+    protected String vnfcType;
+    @XmlElement(name = "vnfc-name", required = true)
+    @JsonProperty("vnfc-name")
+    protected String vnfcName;
+
+    /**
+     * Gets the value of the vnfcType property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVnfcType() {
+        return vnfcType;
+    }
+
+    /**
+     * Sets the value of the vnfcType property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVnfcType(String value) {
+        this.vnfcType = value;
+    }
+
+    /**
+     * Gets the value of the vnfcName property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getVnfcName() {
+        return vnfcName;
+    }
+
+    /**
+     * Sets the value of the vnfcName property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setVnfcName(String value) {
+        this.vnfcName = value;
+    }
+
+    @Override
+    public String toString() {
+        return "Vnfcslist [vnfcType=" + vnfcType + ", vnfcName=" + vnfcName
+                + "]";
+    }
+
+}
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/Vnflist.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/Vnflist.java
new file mode 100644
index 0000000..208970c
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/Vnflist.java
@@ -0,0 +1,150 @@
+/*-
+ * ============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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2017.07.03 at 03:13:44 PM EDT 
+//
+
+
+package org.openecomp.appc.flow.controller.interfaceData;
+
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlEnumValue;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for vnflist.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p>
+ * <pre>
+ * &lt;simpleType name="vnflist">
+ *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     &lt;enumeration value="Restart"/>
+ *     &lt;enumeration value="Rebuild"/>
+ *     &lt;enumeration value="Migrate"/>
+ *     &lt;enumeration value="Evacuate"/>
+ *     &lt;enumeration value="Snapshot"/>
+ *     &lt;enumeration value="Rollback"/>
+ *     &lt;enumeration value="Sync"/>
+ *     &lt;enumeration value="Audit"/>
+ *     &lt;enumeration value="Start"/>
+ *     &lt;enumeration value="Stop"/>
+ *     &lt;enumeration value="Terminate"/>
+ *     &lt;enumeration value="SoftwareUpload"/>
+ *     &lt;enumeration value="HealthCheck"/>
+ *     &lt;enumeration value="LiveUpgrade"/>
+ *     &lt;enumeration value="ModifyConfig"/>
+ *     &lt;enumeration value="Lock"/>
+ *     &lt;enumeration value="Unlock"/>
+ *     &lt;enumeration value="Test"/>
+ *     &lt;enumeration value="CheckLock"/>
+ *     &lt;enumeration value="Configure"/>
+ *     &lt;enumeration value="ConfigModify"/>
+ *     &lt;enumeration value="ConfigScaleOut"/>
+ *     &lt;enumeration value="ConfigRestore"/>
+ *     &lt;enumeration value="ConfigBackup"/>
+ *     &lt;enumeration value="ConfigBackupDelete"/>
+ *     &lt;enumeration value="ConfigExport"/>
+ *   &lt;/restriction>
+ * &lt;/simpleType>
+ * </pre>
+ * 
+ */
+@XmlType(name = "vnflist")
+@XmlEnum
+public enum Vnflist {
+
+    @XmlEnumValue("Restart")
+    RESTART("Restart"),
+    @XmlEnumValue("Rebuild")
+    REBUILD("Rebuild"),
+    @XmlEnumValue("Migrate")
+    MIGRATE("Migrate"),
+    @XmlEnumValue("Evacuate")
+    EVACUATE("Evacuate"),
+    @XmlEnumValue("Snapshot")
+    SNAPSHOT("Snapshot"),
+    @XmlEnumValue("Rollback")
+    ROLLBACK("Rollback"),
+    @XmlEnumValue("Sync")
+    SYNC("Sync"),
+    @XmlEnumValue("Audit")
+    AUDIT("Audit"),
+    @XmlEnumValue("Start")
+    START("Start"),
+    @XmlEnumValue("Stop")
+    STOP("Stop"),
+    @XmlEnumValue("Terminate")
+    TERMINATE("Terminate"),
+    @XmlEnumValue("SoftwareUpload")
+    SOFTWARE_UPLOAD("SoftwareUpload"),
+    @XmlEnumValue("HealthCheck")
+    HEALTH_CHECK("HealthCheck"),
+    @XmlEnumValue("LiveUpgrade")
+    LIVE_UPGRADE("LiveUpgrade"),
+    @XmlEnumValue("ModifyConfig")
+    MODIFY_CONFIG("ModifyConfig"),
+    @XmlEnumValue("Lock")
+    LOCK("Lock"),
+    @XmlEnumValue("Unlock")
+    UNLOCK("Unlock"),
+    @XmlEnumValue("Test")
+    TEST("Test"),
+    @XmlEnumValue("CheckLock")
+    CHECK_LOCK("CheckLock"),
+    @XmlEnumValue("Configure")
+    CONFIGURE("Configure"),
+    @XmlEnumValue("ConfigModify")
+    CONFIG_MODIFY("ConfigModify"),
+    @XmlEnumValue("ConfigScaleOut")
+    CONFIG_SCALE_OUT("ConfigScaleOut"),
+    @XmlEnumValue("ConfigRestore")
+    CONFIG_RESTORE("ConfigRestore"),
+    @XmlEnumValue("ConfigBackup")
+    CONFIG_BACKUP("ConfigBackup"),
+    @XmlEnumValue("ConfigBackupDelete")
+    CONFIG_BACKUP_DELETE("ConfigBackupDelete"),
+    @XmlEnumValue("ConfigExport")
+    CONFIG_EXPORT("ConfigExport");
+    private final String value;
+
+    Vnflist(String v) {
+        value = v;
+    }
+
+    public String value() {
+        return value;
+    }
+
+    public static Vnflist fromValue(String v) {
+        for (Vnflist c: Vnflist.values()) {
+            if (c.value.equals(v)) {
+                return c;
+            }
+        }
+        throw new IllegalArgumentException(v);
+    }
+
+}
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/package-info.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/package-info.java
new file mode 100644
index 0000000..825c7f8
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaceData/package-info.java
@@ -0,0 +1,29 @@
+/*-
+ * ============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=========================================================
+ */
+
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2017.07.31 at 10:30:39 AM EDT 
+//
+
+@javax.xml.bind.annotation.XmlSchema(namespace = "http:org.openecomp.appc/sequence/v1", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package org.openecomp.appc.flow.controller.interfaceData;
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaces/FlowExecutorInterface.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaces/FlowExecutorInterface.java
new file mode 100644
index 0000000..6901910
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/interfaces/FlowExecutorInterface.java
@@ -0,0 +1,37 @@
+/*-
+ * ============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.appc.flow.controller.interfaces;
+
+import java.util.HashMap;
+
+import org.openecomp.appc.flow.controller.data.Transaction;
+import org.openecomp.appc.flow.controller.utils.FlowControllerConstants;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+
+public interface FlowExecutorInterface {
+
+    public HashMap<String, String> execute(Transaction transaction, SvcLogicContext ctx) throws Exception;
+    
+    
+}
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/node/FlowControlNode.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/node/FlowControlNode.java
new file mode 100644
index 0000000..6a125af
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/node/FlowControlNode.java
@@ -0,0 +1,562 @@
+/*-
+ * ============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.appc.flow.controller.node;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.openecomp.appc.flow.controller.ResponseHandlerImpl.DefaultResponseHandler;
+import org.openecomp.appc.flow.controller.data.PrecheckOption;
+import org.openecomp.appc.flow.controller.data.ResponseAction;
+import org.openecomp.appc.flow.controller.data.Transaction;
+import org.openecomp.appc.flow.controller.data.Transactions;
+import org.openecomp.appc.flow.controller.dbervices.FlowControlDBService;
+import org.openecomp.appc.flow.controller.executorImpl.GraphExecutor;
+import org.openecomp.appc.flow.controller.executorImpl.NodeExecutor;
+import org.openecomp.appc.flow.controller.executorImpl.RestExecutor;
+import org.openecomp.appc.flow.controller.interfaceData.ActionIdentifier;
+import org.openecomp.appc.flow.controller.interfaceData.Capabilities;
+import org.openecomp.appc.flow.controller.interfaceData.DependencyInfo;
+import org.openecomp.appc.flow.controller.interfaceData.Input;
+import org.openecomp.appc.flow.controller.interfaceData.InventoryInfo;
+import org.openecomp.appc.flow.controller.interfaceData.RequestInfo;
+import org.openecomp.appc.flow.controller.interfaceData.Vm;
+import org.openecomp.appc.flow.controller.interfaceData.VnfInfo;
+import org.openecomp.appc.flow.controller.interfaceData.Vnfcs;
+import org.openecomp.appc.flow.controller.interfaceData.Vnfcslist;
+import org.openecomp.appc.flow.controller.interfaces.FlowExecutorInterface;
+import org.openecomp.appc.flow.controller.utils.FlowControllerConstants;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.openecomp.sdnc.sli.SvcLogicException;
+import org.openecomp.sdnc.sli.SvcLogicJavaPlugin;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+
+public class FlowControlNode implements SvcLogicJavaPlugin{
+
+
+    private static final  EELFLogger log = EELFManager.getInstance().getLogger(FlowControlNode.class);
+    private static final String SDNC_CONFIG_DIR_VAR = "SDNC_CONFIG_DIR";
+
+    public void processFlow(Map<String, String> inParams, SvcLogicContext ctx) throws SvcLogicException {
+        log.debug("Received processParamKeys call with params : " + inParams);
+        String responsePrefix = inParams.get(FlowControllerConstants.INPUT_PARAM_RESPONSE_PRIFIX);        
+        try
+        {
+            responsePrefix = StringUtils.isNotBlank(responsePrefix) ? (responsePrefix+".") : "";
+            FlowControlDBService dbservice = FlowControlDBService.initialise();
+            SvcLogicContext  localContext = new SvcLogicContext();
+            localContext.setAttribute(FlowControllerConstants.REQUEST_ID, ctx.getAttribute(FlowControllerConstants.REQUEST_ID));
+            localContext.setAttribute(FlowControllerConstants.VNF_TYPE, ctx.getAttribute(FlowControllerConstants.VNF_TYPE));
+            localContext.setAttribute(FlowControllerConstants.REQUEST_ACTION, ctx.getAttribute(FlowControllerConstants.REQUEST_ACTION));
+            localContext.setAttribute(FlowControllerConstants.ACTION_LEVEL, ctx.getAttribute(FlowControllerConstants.ACTION_LEVEL));    
+            localContext.setAttribute(FlowControllerConstants.RESPONSE_PREFIX, responsePrefix);
+            ctx.setAttribute(FlowControllerConstants.RESPONSE_PREFIX, responsePrefix);
+            dbservice.getFlowReferenceData(ctx, inParams, localContext);
+
+            for (Object key : localContext.getAttributeKeySet()) {
+                String parmName = (String) key;
+                String parmValue = ctx.getAttribute(parmName);
+                log.debug("processFlow " + parmName +  "="  + parmValue);
+
+            }
+            processFlowSequence(inParams, ctx, localContext);        
+            if(!ctx.getAttribute(responsePrefix + FlowControllerConstants.OUTPUT_PARAM_STATUS).equals(FlowControllerConstants.OUTPUT_STATUS_SUCCESS))
+                throw new SvcLogicException(ctx.getAttribute(responsePrefix +  FlowControllerConstants.OUTPUT_STATUS_MESSAGE));
+            
+        } catch (Exception e) {
+            ctx.setAttribute(responsePrefix + FlowControllerConstants.OUTPUT_PARAM_STATUS, FlowControllerConstants.OUTPUT_STATUS_FAILURE);
+            ctx.setAttribute(responsePrefix + FlowControllerConstants.OUTPUT_PARAM_ERROR_MESSAGE, e.getMessage());
+            e.printStackTrace();
+            throw new SvcLogicException(e.getMessage());
+        }
+    }
+
+    private void processFlowSequence( Map<String, String> inParams, SvcLogicContext ctx, SvcLogicContext localContext) throws Exception 
+    {
+        String fn = "FlowExecutorNode.processflowSequence";
+        log.debug(fn + "Received model for flow : " + localContext.toString());    
+        FlowControlDBService dbservice = FlowControlDBService.initialise();
+        String flowSequnce  =null;
+        for (Object key : localContext.getAttributeKeySet()) {
+            String parmName = (String) key;
+            String parmValue = ctx.getAttribute(parmName);
+            log.debug(parmName +  "="  + parmValue);
+
+        }
+        if(localContext != null && localContext.getAttribute(FlowControllerConstants.SEQUENCE_TYPE) !=null){
+
+            if(localContext.getAttribute(FlowControllerConstants.GENERATION_NODE) != null){
+                GraphExecutor transactionExecutor = new GraphExecutor();
+                Boolean generatorExists = transactionExecutor.hasGraph("APPC_COMMOM", localContext.getAttribute(FlowControllerConstants.GENERATION_NODE), null, "sync");
+                if(generatorExists){                    
+                    flowSequnce = transactionExecutor.executeGraph("APPC_COMMOM", localContext.getAttribute(FlowControllerConstants.GENERATION_NODE),
+                            null, "sync", null).getProperty(FlowControllerConstants.FLOW_SEQUENCE);
+                }
+                else
+                    throw new Exception("Can not find Custom defined Flow Generator for " + localContext.getAttribute(FlowControllerConstants.GENERATION_NODE));                
+            }            
+            else if(((String) localContext.getAttribute(FlowControllerConstants.SEQUENCE_TYPE)).equalsIgnoreCase(FlowControllerConstants.DESINGTIME)){
+                localContext.setAttribute(FlowControllerConstants.VNFC_TYPE, ctx.getAttribute(FlowControllerConstants.VNFC_TYPE));
+                flowSequnce = dbservice.getDesignTimeFlowModel(localContext);
+                if(flowSequnce == null)
+                    throw new Exception("Flow Sequence is not found User Desinged VNF " + ctx.getAttribute(FlowControllerConstants.VNF_TYPE));
+            }
+            else if(((String) localContext.getAttribute(FlowControllerConstants.SEQUENCE_TYPE)).equalsIgnoreCase(FlowControllerConstants.RUNTIME)){
+                
+                Transaction transaction = new Transaction();
+                String input = collectInputParams(ctx,transaction);
+                log.info("collectInputParamsData" + input );
+                
+                RestExecutor restExe = new RestExecutor();    
+                HashMap<String,String>flowSeq= restExe.execute(transaction, localContext);
+                flowSequnce=flowSeq.get("restResponse");
+                
+                if(flowSequnce == null)
+                    throw new Exception("Failed to get the Flow Sequece runtime for VNF type" + ctx.getAttribute(FlowControllerConstants.VNF_TYPE));
+
+            }
+            else if(((String) localContext.getAttribute(FlowControllerConstants.SEQUENCE_TYPE)).equalsIgnoreCase(FlowControllerConstants.EXTERNAL)){
+                //String input = collectInputParams(localContext);
+                //    flowSequnce = ""; //get it from the External interface calling the Rest End point - TBD
+                if(flowSequnce == null)
+                    throw new Exception("Flow Sequence not found for " + ctx.getAttribute(FlowControllerConstants.VNF_TYPE));                
+            }
+            else
+            {
+                //No other type of model supported...in Future can get flowModel from other generators which will be included here
+                throw new Exception("No information found for sequence Owner Design-Time Vs Run-Time" );
+            }
+        }
+        else{
+            FlowGenerator flowGenerator = new FlowGenerator();
+            Transactions trans = flowGenerator.createSingleStepModel(inParams,ctx);
+            ObjectMapper mapper = new ObjectMapper();    
+            flowSequnce = mapper.writeValueAsString(trans);
+            log.debug("Single step Flow Sequence : " +  flowSequnce);
+
+        }
+        log.debug("Received Flow Sequence : " +  flowSequnce);
+
+        HashMap<Integer, Transaction> transactionMap = createTransactionMap(flowSequnce, localContext);
+        exeuteAllTransaction(transactionMap, ctx); 
+        log.info("Executed all the transacstion successfully");
+
+    }
+
+    private void exeuteAllTransaction(HashMap<Integer, Transaction> transactionMap, SvcLogicContext ctx) throws Exception {
+
+        String fn = "FlowExecutorNode.exeuteAllTransaction ";
+        int retry = 0;
+        FlowExecutorInterface flowExecutor = null;
+        for (int key = 1; key <= transactionMap.size() ; key++ ) 
+        {            
+            log.debug(fn + "Starting transactions ID " + key + " :)=" + retry);
+            Transaction transaction = transactionMap.get(key);
+            if(!preProcessor(transactionMap, transaction)){
+                log.info("Skipping Transaction ID " +  transaction.getTransactionId());
+                continue;
+            }            
+            if(transaction.getExecutionType() != null){
+                switch (transaction.getExecutionType()){
+                case FlowControllerConstants.GRAPH :
+                    flowExecutor = new GraphExecutor();
+                    break;
+                case FlowControllerConstants.NODE :
+                    flowExecutor =  new NodeExecutor();
+                    break;
+                case FlowControllerConstants.REST :
+                    flowExecutor = new RestExecutor();
+                    break;
+                default :
+                    throw new Exception("No Executor found for transaction ID" + transaction.getTransactionId());
+                }
+                flowExecutor.execute(transaction, ctx);
+                ResponseAction responseAction= handleResponse(transaction);
+
+                if(responseAction.getWait() != null && Integer.parseInt(responseAction.getWait()) > 0){
+                    log.debug(fn + "Going to Sleep .... " + responseAction.getWait());
+                    Thread.sleep(Integer.parseInt(responseAction.getWait())*1000);
+                }
+
+                if(responseAction.isIntermediateMessage()){
+                    log.debug(fn + "Sending Intermediate Message back  .... ");
+                    sendIntermediateMessage();
+                }
+                if(responseAction.getRetry() != null && Integer.parseInt(responseAction.getRetry()) > retry ){                
+                    log.debug(fn + "Ooppss!!! We will retry again ....... ");
+                        key--; 
+                        retry++;
+                    log.debug(fn + "key =" +  key +  "retry =" + retry);
+
+                }
+                if(responseAction.isIgnore()){
+                    log.debug(fn + "Ignoring this Error and moving ahead  ....... ");
+                    continue;
+                }
+                if(responseAction.isStop()){
+                    log.debug(fn + "Need to Stop  ....... ");
+                    break;
+                }
+                if(responseAction.getJump() != null && Integer.parseInt(responseAction.getJump()) > 0 ){
+                    key = Integer.parseInt(responseAction.getJump());
+                    key --;        
+                }
+                log.debug(fn + "key =" +  key +  "retry =" + retry);
+
+            }
+            else{
+                throw new Exception("Don't know how to execute transaction ID " + transaction.getTransactionId());
+            }
+        }
+
+    }
+    private void sendIntermediateMessage() {
+        // TODO Auto-generated method stub
+
+    }
+
+    private ResponseAction handleResponse(Transaction transaction) {        
+        log.info("Handling Response for transaction Id " + transaction.getTransactionId());
+        DefaultResponseHandler defaultHandler = new DefaultResponseHandler();         
+        return defaultHandler.handlerResponse(transaction);
+    }
+
+    private boolean preProcessor(HashMap<Integer, Transaction> transactionMap, Transaction transaction) throws IOException {
+
+        log.debug("Starting Preprocessing Logic ");
+        boolean runthisStep = false;
+        try{
+            if(transaction.getPrecheck() != null && transaction.getPrecheck().getPrecheckOptions() != null 
+                    && !transaction.getPrecheck().getPrecheckOptions().isEmpty()){
+                List<PrecheckOption> precheckOptions  = transaction.getPrecheck().getPrecheckOptions();
+                for(PrecheckOption precheck : precheckOptions){
+                    Transaction trans = transactionMap.get(precheck.getpTransactionID());
+                    ObjectMapper mapper = new ObjectMapper();
+                    log.info("Mapper= " + mapper.writeValueAsString(trans));
+                    HashMap<Object, Object> trmap = mapper.readValue(mapper.writeValueAsString(trans), HashMap.class);
+                    if(trmap.get(precheck.getParamName()) != null && 
+                            ((String) trmap.get(precheck.getParamName())).equalsIgnoreCase(precheck.getParamValue()))
+                        runthisStep = true;
+                    else
+                        runthisStep = false;
+
+                    if(transaction.getPrecheck().getPrecheckOperator() != null && 
+                            transaction.getPrecheck().getPrecheckOperator().equalsIgnoreCase("any") && runthisStep)
+                        break;                        
+                }
+            }
+
+            else{
+                log.debug("No Pre check defined for transaction ID " + transaction.getTransactionId());
+                runthisStep = true;
+
+            }
+        }
+        catch(Exception e)
+        {
+            e.printStackTrace();
+            throw e;
+        }
+        log.debug("Returing process current Transaction = " + runthisStep);
+
+        return runthisStep ;
+    }
+
+    private HashMap<Integer, Transaction> createTransactionMap(String flowSequnce, SvcLogicContext localContext) throws SvcLogicException, JsonParseException, JsonMappingException, IOException {
+        ObjectMapper mapper = new ObjectMapper();    
+        Transactions transactions = mapper.readValue(flowSequnce,Transactions.class);
+        HashMap<Integer, Transaction> transMap = new HashMap<Integer, Transaction>();    
+        for(Transaction transaction : transactions.getTransactions()){        
+            compileFlowDependencies(transaction, localContext);
+            //loadTransactionIntoStatus(transactions, ctx); //parse the Transactions Object and create records in process_flow_status table 
+            transMap.put(transaction.getTransactionId(), transaction);            
+        }        
+        return transMap;
+    }
+
+    private void compileFlowDependencies(Transaction transaction, SvcLogicContext localContext) throws SvcLogicException, JsonParseException, JsonMappingException, IOException {
+
+        String fn = "FlowExecutorNode.compileFlowDependencies";
+        FlowControlDBService dbservice = FlowControlDBService.initialise();
+        dbservice.populateModuleAndRPC(transaction, localContext.getAttribute(FlowControllerConstants.VNF_TYPE));
+        ObjectMapper mapper = new ObjectMapper();
+        log.debug("Indivisual Transaction Details :" + transaction.toString());
+        if((localContext.getAttribute(FlowControllerConstants.SEQUENCE_TYPE) == null) ||
+                ( localContext.getAttribute(FlowControllerConstants.SEQUENCE_TYPE) != null && 
+                ! localContext.getAttribute(FlowControllerConstants.SEQUENCE_TYPE).equalsIgnoreCase(FlowControllerConstants.DESINGTIME))){
+            localContext.setAttribute("artifact-content", mapper.writeValueAsString(transaction));
+            dbservice.loadSequenceIntoDB(localContext);
+        }
+        //get a field in transction class as transactionhandle interface and register the Handler here for each trnactions
+    }
+    
+    private String collectInputParams(SvcLogicContext ctx, Transaction transaction) throws Exception {
+
+        String fn = "FlowExecuteNode.collectInputParams";
+        Properties prop = loadProperties();
+        log.info("Loaded Properties " + prop.toString());
+
+        String vnfId = ctx.getAttribute(FlowControllerConstants.VNF_ID);
+        log.debug(fn + "vnfId :" + vnfId);
+
+        if (StringUtils.isBlank(vnfId)) {
+            throw new Exception("VnfId is missing");
+        }
+
+        ActionIdentifier actionIdentifier = new ActionIdentifier();
+        actionIdentifier.setVnfId(vnfId);
+        actionIdentifier.setVserverId(ctx.getAttribute(FlowControllerConstants.VSERVER_ID));
+        actionIdentifier.setVnfcName(ctx.getAttribute(FlowControllerConstants.VNFC_NAME));
+
+        RequestInfo requestInfo = new RequestInfo();
+        requestInfo.setAction(ctx.getAttribute(FlowControllerConstants.ACTION));
+        requestInfo.setActionLevel(ctx.getAttribute(FlowControllerConstants.ACTION_LEVEL));
+        requestInfo.setPayload(ctx.getAttribute(FlowControllerConstants.PAYLOAD));
+        requestInfo.setActionIdentifier(actionIdentifier);
+        
+        InventoryInfo inventoryInfo = getInventoryInfo(ctx,vnfId);
+        DependencyInfo dependencyInfo = getDependencyInfo(ctx);
+        Capabilities capabilites = getCapabilitesData(ctx);
+        
+        Input input = new Input();
+        input.setRequestInfo(requestInfo);
+        input.setInventoryInfo(inventoryInfo);
+        input.setDependencyInfo(dependencyInfo);
+        input.setCapabilities(capabilites);
+        //input.setTunableParameters(null);
+        
+
+        log.info(fn + "Input parameters:" + input.toString());
+
+        String inputData = null;
+        try {
+            ObjectMapper mapper = new ObjectMapper();
+            mapper.setSerializationInclusion(Include.NON_NULL);
+            mapper.configure(SerializationFeature.WRAP_ROOT_VALUE,true);
+            inputData = mapper.writeValueAsString(input);
+            log.info("InputDataJson:"+inputData);
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        String resourceUri = prop.getProperty(FlowControllerConstants.SEQ_GENERATOR_URL);
+        log.info(fn + "resourceUri= " + resourceUri);
+
+        transaction.setPayload(inputData);
+        transaction.setExecutionRPC("POST");
+        transaction.setuId(prop.getProperty(FlowControllerConstants.SEQ_GENERATOR_UID));
+        transaction.setPswd(prop.getProperty(FlowControllerConstants.SEQ_GENERATOR_PWD));
+        transaction.setExecutionEndPoint(resourceUri);
+
+        return inputData;
+
+    }
+    
+    private DependencyInfo getDependencyInfo(SvcLogicContext ctx) throws Exception {
+        
+        String fn = "FlowExecutorNode.getDependencyInfo";
+        DependencyInfo dependencyInfo = new DependencyInfo();
+        FlowControlDBService dbservice = FlowControlDBService.initialise();
+        String dependencyData = dbservice.getDependencyInfo(ctx);
+        log.info(fn + "dependencyDataInput:" + dependencyData);
+
+        if (dependencyData != null) {
+            ObjectMapper mapper = new ObjectMapper();
+            mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,false);
+            mapper.enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
+            JsonNode dependencyInfoData = mapper.readTree(dependencyData).get("dependencyInfo");
+            JsonNode vnfcData = mapper.readTree(dependencyInfoData.toString()).get("vnfcs");
+            List<Vnfcs> vnfclist = Arrays.asList(mapper.readValue(vnfcData.toString(), Vnfcs[].class));
+            dependencyInfo.getVnfcs().addAll(vnfclist);
+            
+            log.info("Dependency Output:"+ dependencyInfo.toString());
+        }
+
+        return dependencyInfo;
+
+    }
+    
+    private Capabilities getCapabilitesData(SvcLogicContext ctx)throws Exception {
+
+        String fn = "FlowExecutorNode.getCapabilitesData";
+        Capabilities capabilities = new Capabilities();
+        FlowControlDBService dbservice = FlowControlDBService.initialise();
+        String capabilitiesData = dbservice.getCapabilitiesData(ctx);
+        log.info(fn + "capabilitiesDataInput:" + capabilitiesData);
+
+        if (capabilitiesData != null) {
+            ObjectMapper mapper = new ObjectMapper();
+            mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,false);
+            mapper.enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
+            JsonNode capabilitiesNode = mapper.readValue(capabilitiesData,JsonNode.class);
+            log.info("capabilitiesNode:" + capabilitiesNode.toString());
+
+            JsonNode vnfs = capabilitiesNode.findValue(FlowControllerConstants.VNF);
+            List<String> vnfsList = new ArrayList<String>();
+            if (vnfs != null) {
+                for (int i = 0; i < vnfs.size(); i++) {
+
+                    String vnf = vnfs.get(i).asText();
+                    vnfsList.add(vnf);
+                }
+            }
+
+            JsonNode vfModules = capabilitiesNode.findValue(FlowControllerConstants.VF_MODULE);
+            List<String> vfModulesList = new ArrayList<String>();
+            if (vfModules != null) {
+                for (int i = 0; i < vfModules.size(); i++) {
+
+                    String vfModule = vfModules.get(i).asText();
+                    vfModulesList.add(vfModule);
+                }
+            }
+
+            JsonNode vnfcs = capabilitiesNode.findValue(FlowControllerConstants.VNFC);
+            List<String> vnfcsList = new ArrayList<String>();
+            if (vnfcs != null) {
+                for (int i = 0; i < vnfcs.size(); i++) {
+
+                    String vnfc1 = vnfcs.get(i).asText();
+                    vnfcsList.add(vnfc1);
+                }
+            }
+
+            JsonNode vms = capabilitiesNode.findValue(FlowControllerConstants.VM);
+
+            List<String> vmList = new ArrayList<String>();
+            if (vms != null) {
+                for (int i = 0; i < vms.size(); i++) {
+
+                    String vm1 = vms.get(i).asText();
+                    vmList.add(vm1);
+                }
+            }
+
+            capabilities.getVnfc().addAll(vnfcsList);
+            capabilities.getVnf().addAll(vnfsList);
+            capabilities.getVfModule().addAll(vfModulesList);
+            capabilities.getVm().addAll(vmList);
+            
+            log.info("Capabilities Output:"+ capabilities.toString());
+
+        }
+
+        return capabilities;
+
+    }
+    
+    private InventoryInfo getInventoryInfo(SvcLogicContext ctx, String vnfId) throws Exception{
+        
+        String fn = "FlowExecutorNode.getInventoryInfo";
+        String vmcount = ctx.getAttribute("tmp.vnfInfo.vm-count");
+        int vmCount = Integer.parseInt(vmcount);
+        log.info(fn +"vmcount:"+ vmCount);
+
+        VnfInfo vnfInfo = new VnfInfo();
+        vnfInfo.setVnfId(vnfId);
+        vnfInfo.setVnfName(ctx.getAttribute("tmp.vnfInfo.vnf.vnf-name"));
+        vnfInfo.setVnfType(ctx.getAttribute("tmp.vnfInfo.vnf.vnf-type"));
+
+        Vm vm = new Vm();
+        Vnfcslist vnfc = new Vnfcslist();
+
+        if (vmCount > 0) {
+
+            for (int i = 0; i < vmCount; i++) {
+
+                vm.setVserverId(ctx.getAttribute("tmp.vnfInfo.vm[" + i + "].vserverId"));
+                String vnfccount = ctx.getAttribute("tmp.vnfInfo.vm[" + i + "].vnfc-count");
+                int vnfcCount = Integer.parseInt(vnfccount);
+
+                if (vnfcCount > 0) {
+                    vnfc.setVnfcName(ctx.getAttribute("tmp.vnfInfo.vm[" + i    + "].vnfc-name"));
+                    vnfc.setVnfcType(ctx.getAttribute("tmp.vnfInfo.vm[" + i    + "].vnfc-type"));
+                    vm.setVnfc(vnfc);
+                }
+                vnfInfo.getVm().add(vm);
+            }
+        }
+
+        InventoryInfo inventoryInfo = new InventoryInfo();
+        inventoryInfo.setVnfInfo(vnfInfo);
+        
+        return inventoryInfo;
+        
+    }
+        
+    private String getFlowSequence() throws IOException {
+
+        String sequenceModel = IOUtils.toString(FlowControlNode.class.getClassLoader().getResourceAsStream("sequence.json"), Charset.defaultCharset());
+
+        return null;
+    }
+
+    
+private static Properties loadProperties() throws Exception {
+    Properties props = new Properties();
+    String propDir = System.getenv(SDNC_CONFIG_DIR_VAR);
+    if (propDir == null)
+        throw new Exception("Cannot find Property file -" + SDNC_CONFIG_DIR_VAR);
+    String propFile = propDir + FlowControllerConstants.APPC_FLOW_CONTROLLER;
+    InputStream propStream = new FileInputStream(propFile);        
+    try
+    {
+        props.load(propStream);
+    }
+    catch (Exception e)
+    {
+        throw new Exception("Could not load properties file " + propFile, e);
+    }
+    finally
+    {
+        try
+        {
+            propStream.close();
+        }
+        catch (Exception e)
+        {
+            log.warn("Could not close FileInputStream", e);
+        }
+    }
+    return props;
+}
+
+}
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/node/FlowGenerator.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/node/FlowGenerator.java
new file mode 100644
index 0000000..8d81858
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/node/FlowGenerator.java
@@ -0,0 +1,80 @@
+/*-
+ * ============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.appc.flow.controller.node;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.openecomp.appc.flow.controller.data.Response;
+import org.openecomp.appc.flow.controller.data.ResponseAction;
+import org.openecomp.appc.flow.controller.data.Transaction;
+import org.openecomp.appc.flow.controller.data.Transactions;
+import org.openecomp.appc.flow.controller.utils.FlowControllerConstants;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+
+public class FlowGenerator {
+    
+    private static final  EELFLogger log = EELFManager.getInstance().getLogger(FlowGenerator.class);
+
+    public Transactions createSingleStepModel(Map<String, String> inParams, SvcLogicContext ctx) {
+
+        String fn = "FlowGenerator.createSingleStepModel";
+        log.debug("Starting generating single Step flow" );
+        
+        log.debug("Data in context"  + ctx.getAttributeKeySet() );
+        Transactions transactions  = new Transactions();
+        List<Transaction> transactionList = new ArrayList<Transaction>();            
+        Transaction singleTransaction = new Transaction();        
+        
+        singleTransaction.setTransactionId(1);
+        singleTransaction.setAction(ctx.getAttribute(FlowControllerConstants.REQUEST_ACTION));
+        singleTransaction.setActionLevel(FlowControllerConstants.VNF); //Need to discuss how to get action level if not in request
+        singleTransaction.setPayload(ctx.getAttribute(FlowControllerConstants.PAYLOAD));
+        singleTransaction.setActionLevel(ctx.getAttribute(FlowControllerConstants.ACTION_LEVEL));
+
+        
+        
+        
+        List<Response> responseList  = new ArrayList<Response>();                
+        Response response = new Response();
+                
+        ResponseAction ra = new ResponseAction();                    
+        ra.setStop(true);
+        response.setResponseAction(ra);
+        
+        responseList.add(response);
+        singleTransaction.setResponses(responseList);        
+        transactionList.add(singleTransaction);
+        
+        transactions.setTransactions(transactionList);
+
+        log.debug("Sequence String" + transactions.toString());
+        
+        return transactions;
+    }
+    
+    
+
+}
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/node/JsonParsingNode.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/node/JsonParsingNode.java
new file mode 100644
index 0000000..b1f3128
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/node/JsonParsingNode.java
@@ -0,0 +1,98 @@
+/*-
+ * ============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.appc.flow.controller.node;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+
+import org.apache.commons.lang3.StringUtils;
+import org.openecomp.appc.flow.controller.data.Transaction;
+import org.openecomp.appc.flow.controller.executorImpl.RestExecutor;
+import org.openecomp.appc.flow.controller.utils.FlowControllerConstants;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.openecomp.sdnc.sli.SvcLogicException;
+import org.openecomp.sdnc.sli.SvcLogicJavaPlugin;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public class JsonParsingNode implements SvcLogicJavaPlugin{
+
+
+    private static final  EELFLogger log = EELFManager.getInstance().getLogger(JsonParsingNode.class);
+    private static final String SDNC_CONFIG_DIR_VAR = "SDNC_CONFIG_DIR";
+
+    public void parse(Map<String, String> inParams, SvcLogicContext ctx) throws SvcLogicException {
+        String fn = "RestServiceNode.sendRequest";
+        log.info("Received processParamKeys call with params : " + inParams);
+        String responsePrefix = inParams.get(FlowControllerConstants.INPUT_PARAM_RESPONSE_PRIFIX);
+        try
+        {
+            responsePrefix = StringUtils.isNotBlank(responsePrefix) ? (responsePrefix+".") : "";        
+            //Remove below for Block
+            if(isValidJSON(inParams.get("data")) !=null){
+                JsonNode jnode = isValidJSON(inParams.get("data"));
+                ObjectMapper mapper = new ObjectMapper();
+                Map<String, Object> map = new HashMap<String, Object>();
+                map = mapper.readValue(jnode.toString(), new TypeReference<Map<String, String>>(){});                
+                for (Entry<String, Object> entry : map.entrySet())
+                {
+                    ctx.setAttribute(responsePrefix + entry.getKey(),(String) entry.getValue());
+                }
+            
+            }
+            ctx.setAttribute(responsePrefix + FlowControllerConstants.OUTPUT_PARAM_STATUS, FlowControllerConstants.OUTPUT_STATUS_SUCCESS);
+            
+        } catch (Exception e) {
+            ctx.setAttribute(responsePrefix + FlowControllerConstants.OUTPUT_PARAM_STATUS, FlowControllerConstants.OUTPUT_STATUS_FAILURE);
+            ctx.setAttribute(responsePrefix + FlowControllerConstants.OUTPUT_PARAM_ERROR_MESSAGE, e.getMessage());
+            e.printStackTrace();
+            log.error("Error Message : "  + e.getMessage());
+            throw new SvcLogicException(e.getMessage());
+        }
+    }
+
+    public JsonNode isValidJSON(String json) throws IOException {
+        JsonNode output = null;     
+        log.info("Received response from Interface " + json);
+        if(json ==null  || json.isEmpty())
+            return null;
+        try{ 
+            ObjectMapper objectMapper = new ObjectMapper();
+            output = objectMapper.readTree(json);
+        } catch(JsonProcessingException e){
+            log.warn("Response received from interface is not a valid JSON block" + json);
+            return null;
+        }    
+        
+        return output;
+    }
+}
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/node/RestServiceNode.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/node/RestServiceNode.java
new file mode 100644
index 0000000..246f7a4
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/node/RestServiceNode.java
@@ -0,0 +1,207 @@
+/*-
+ * ============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.appc.flow.controller.node;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import org.apache.commons.lang3.StringUtils;
+import org.openecomp.appc.flow.controller.data.Transaction;
+import org.openecomp.appc.flow.controller.executorImpl.RestExecutor;
+import org.openecomp.appc.flow.controller.utils.FlowControllerConstants;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.openecomp.sdnc.sli.SvcLogicException;
+import org.openecomp.sdnc.sli.SvcLogicJavaPlugin;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public class RestServiceNode implements SvcLogicJavaPlugin{
+
+
+    private static final  EELFLogger log = EELFManager.getInstance().getLogger(RestServiceNode.class);
+    private static final String SDNC_CONFIG_DIR_VAR = "SDNC_CONFIG_DIR";
+
+    public void sendRequest(Map<String, String> inParams, SvcLogicContext ctx) throws SvcLogicException {
+        String fn = "RestServiceNode.sendRequest";
+        log.info("Received processParamKeys call with params : " + inParams);
+        String responsePrefix = inParams.get(FlowControllerConstants.INPUT_PARAM_RESPONSE_PRIFIX);
+        try
+        {
+            responsePrefix = StringUtils.isNotBlank(responsePrefix) ? (responsePrefix+".") : "";        
+            //Remove below for Block
+            for (Object key : ctx.getAttributeKeySet()) {
+                String parmName = (String) key;
+                String parmValue = ctx.getAttribute(parmName);
+                log.info(fn  + "Getting Key = "  + parmName + "and Value = " +  parmValue);
+            }
+            
+            send(ctx, inParams);
+            ctx.setAttribute(responsePrefix + FlowControllerConstants.OUTPUT_PARAM_STATUS, FlowControllerConstants.OUTPUT_STATUS_SUCCESS);
+            
+        } catch (Exception e) {
+            ctx.setAttribute(responsePrefix + FlowControllerConstants.OUTPUT_PARAM_STATUS, FlowControllerConstants.OUTPUT_STATUS_FAILURE);
+            ctx.setAttribute(responsePrefix + FlowControllerConstants.OUTPUT_PARAM_ERROR_MESSAGE, e.getMessage());
+            e.printStackTrace();
+            log.error("Error Message : "  + e.getMessage());
+            throw new SvcLogicException(e.getMessage());
+        }
+    }
+
+    public void send(SvcLogicContext ctx, Map<String, String> inParams) throws Exception{        
+    try{
+            Properties prop = loadProperties();
+            log.info("Loaded Properties " + prop.toString());
+            String responsePrefix = inParams.get(FlowControllerConstants.INPUT_PARAM_RESPONSE_PRIFIX);    
+            RestExecutor restRequestExecutor = new RestExecutor();
+            String resourceUri = "";
+            if(ctx.getAttribute(FlowControllerConstants.INPUT_URL) != null && !(ctx.getAttribute(FlowControllerConstants.INPUT_URL).isEmpty()))
+                resourceUri = ctx.getAttribute(FlowControllerConstants.INPUT_URL);
+            else{
+                resourceUri = resourceUri.concat(FlowControllerConstants.HTTP);
+                log.info("resourceUri=  " + resourceUri );
+                resourceUri = resourceUri.concat(ctx.getAttribute(FlowControllerConstants.INPUT_HOST_IP_ADDRESS));
+                resourceUri = resourceUri.concat(":");
+                resourceUri = resourceUri.concat(ctx.getAttribute(FlowControllerConstants.INPUT_PORT_NUMBER));
+                
+                if(ctx.getAttribute(FlowControllerConstants.INPUT_CONTEXT) != null && !ctx.getAttribute(FlowControllerConstants.INPUT_CONTEXT).isEmpty()){
+                    resourceUri = resourceUri.concat("/").concat(ctx.getAttribute(FlowControllerConstants.INPUT_CONTEXT));
+                    log.info("resourceUri= " + resourceUri );
+                }
+                else if(prop.getProperty(ctx.getAttribute(FlowControllerConstants.INPUT_REQUEST_ACTION).concat(".context")) != null ){
+                    log.info("resourceUri = " + resourceUri );        
+                    resourceUri = resourceUri.concat("/").concat(prop.getProperty(ctx.getAttribute(FlowControllerConstants.INPUT_REQUEST_ACTION).concat(".context")));
+                }
+                else 
+                    throw new Exception("Could Not found the context for operation " + ctx.getAttribute(FlowControllerConstants.INPUT_REQUEST_ACTION));
+
+
+                if(ctx.getAttribute(FlowControllerConstants.INPUT_SUB_CONTEXT) != null && !ctx.getAttribute(FlowControllerConstants.INPUT_SUB_CONTEXT).isEmpty()){
+                    resourceUri = resourceUri.concat("/").concat(ctx.getAttribute(FlowControllerConstants.INPUT_SUB_CONTEXT)); 
+                    log.info("resourceUri" + resourceUri );        
+                }
+                else if(prop.getProperty(ctx.getAttribute(FlowControllerConstants.INPUT_REQUEST_ACTION).concat(".sub-context")) != null ){
+                    resourceUri = resourceUri.concat("/").concat(prop.getProperty(ctx.getAttribute(FlowControllerConstants.INPUT_REQUEST_ACTION).concat(".sub-context"))); 
+                    log.info("resourceUri" + resourceUri );        
+                }
+            }
+
+            log.info("Rest Constructed URL : " + resourceUri);
+            Transaction transaction = new Transaction();
+
+            transaction.setExecutionEndPoint(resourceUri);
+            transaction.setExecutionRPC(ctx.getAttribute(FlowControllerConstants.INPUT_REQUEST_ACTION_TYPE));
+            transaction.setAction(FlowControllerConstants.INPUT_REQUEST_ACTION);
+            if(ctx.getAttribute(FlowControllerConstants.INPUT_REQUEST_ACTION_TYPE) == null || ctx.getAttribute(FlowControllerConstants.INPUT_REQUEST_ACTION_TYPE).isEmpty())
+                throw new Exception("Dont know REST operation for Action " + transaction.getExecutionRPC());
+            if(ctx.getAttribute(FlowControllerConstants.INPUT_REQUEST_ACTION) == null || ctx.getAttribute(FlowControllerConstants.INPUT_REQUEST_ACTION).isEmpty())
+                throw new Exception("Dont know request-action " + transaction.getAction());
+
+            //This code need to get changed to get the UserID and pass from a common place.
+            if(transaction.getuId() == null )
+                transaction.setuId(prop.getProperty(ctx.getAttribute(FlowControllerConstants.INPUT_REQUEST_ACTION).concat(".default-rest-user")));
+            if(transaction.getPswd() == null)
+                transaction.setPswd(prop.getProperty(ctx.getAttribute(FlowControllerConstants.INPUT_REQUEST_ACTION).concat(".default-rest-pass")));    
+
+            HashMap<String, String> output = restRequestExecutor.execute(transaction, ctx);
+
+            if(output.get("restResponse") !=null && isValidJSON(output.get("restResponse")) != null)
+            {
+                    ctx.setAttribute(responsePrefix + "." + FlowControllerConstants.OUTPUT_STATUS_MESSAGE , output.get("restResponse"));
+//                JsonNode restResponse = isValidJSON(output.get("restResponse"));
+//                for (String key : inParams.keySet()) {
+//                    if(key !=null &&  key.startsWith("output-")){
+//                            log.info("Found Key = " + key);
+//                            log.info("Found Key in Params " + inParams.get(key) + ".");
+//                            JsonNode setValue =  restResponse.findValue(inParams.get(key));                            
+//                             log.info("Found value = " + setValue);
+//                             if(setValue !=null && setValue.textValue() !=null && !setValue.textValue().isEmpty())
+//                                 ctx.setAttribute(responsePrefix + "." + key, setValue.textValue());
+//                             else
+//                                 ctx.setAttribute(responsePrefix + "." + key, null);
+//                    }
+//                }                
+            }
+            log.info("Response from Rest :" );
+        }
+        catch(Exception e)
+        {
+            e.printStackTrace();
+            log.error("Error Message " + e.getMessage());
+            throw e;
+        }
+    }
+
+    private Properties loadProperties() throws Exception {
+        Properties props = new Properties();
+        String propDir = System.getenv(SDNC_CONFIG_DIR_VAR);
+        if (propDir == null)
+            throw new Exception("Cannot find Property file -" + SDNC_CONFIG_DIR_VAR);
+        String propFile = propDir + FlowControllerConstants.APPC_FLOW_CONTROLLER;
+        InputStream propStream = new FileInputStream(propFile);        
+        try
+        {
+            props.load(propStream);
+        }
+        catch (Exception e)
+        {
+            throw new Exception("Could not load properties file " + propFile, e);
+        }
+        finally
+        {
+            try
+            {
+                propStream.close();
+            }
+            catch (Exception e)
+            {
+                log.warn("Could not close FileInputStream", e);
+            }
+        }
+        // TODO Auto-generated method stub
+        return props;
+    }
+    
+    public JsonNode isValidJSON(String json) throws IOException {
+        JsonNode output = null;     
+        log.info("Received response from Interface " + json);
+        if(json ==null  || json.isEmpty())
+            return null;
+        try{ 
+            ObjectMapper objectMapper = new ObjectMapper();
+            output = objectMapper.readTree(json);
+        } catch(JsonProcessingException e){
+            log.warn("Response received from interface is not a valid JSON block" + json);
+            return null;
+        }    
+        log.info("state is " + output.findValue("state"));
+        
+        return output;
+    }
+}
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/utils/EscapeUtils.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/utils/EscapeUtils.java
new file mode 100644
index 0000000..6223fea
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/utils/EscapeUtils.java
@@ -0,0 +1,39 @@
+/*-
+ * ============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.appc.flow.controller.utils;
+
+import org.apache.commons.lang3.StringUtils;
+
+public class EscapeUtils {
+
+    public EscapeUtils() {
+    }
+
+    public static String escapeSql(String str) {
+        if (str == null) {
+            return null;
+        }
+        String searchList[] = new String[]{"'","\\", "\"" };
+        String replacementList[] = new String[]{ "''","\\\\" ,"\\\""};
+        return StringUtils.replaceEach(str,searchList, replacementList);
+    }
+    
+}
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/utils/FlowControllerConstants.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/utils/FlowControllerConstants.java
new file mode 100644
index 0000000..70500c4
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/utils/FlowControllerConstants.java
@@ -0,0 +1,117 @@
+/*-
+ * ============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.appc.flow.controller.utils;
+
+public class FlowControllerConstants {
+            
+        public static String STRING_ENCODING = "utf-8";
+        public static String Y = "Y";
+        public static String N = "N";
+        public static String DATA_TYPE_TEXT = "TEXT";
+        public static String DATA_TYPE_JSON = "JSON";
+        public static String DATA_TYPE_XML = "XML";
+        public static String DATA_TYPE_SQL = "SQL";
+    
+        public static String INPUT_PARAM_RESPONSE_PRIFIX = "responsePrefix";
+        
+        public static String OUTPUT_PARAM_STATUS = "status";
+        public static String OUTPUT_PARAM_ERROR_MESSAGE = "error-message";
+        public static String OUTPUT_STATUS_SUCCESS = "success";
+        public static String OUTPUT_STATUS_FAILURE = "failure";
+        
+        public static final String DESINGTIME = "DesignTime";
+        public static final String RUNTIME = "RunTime";
+        public static final String APPC_FLOW_CONTROLLER = "/appc-flow-controller.properties";
+        public static final String VNF_TYPE = "vnf-type";
+        public static final String ACTION = "action";
+        public static final String VNFC_TYPE = "vnfc-type";
+        public static final String VM_INSTANCE = "vm-instance";
+        public static final String VM = "vm";
+        public static final String VNFC = "vnfc";
+        public static final String REFERENCE = "reference";
+        public static final String VNFC_INSTANCE = "vnfc-instance";
+        public static final String DEVICE_PROTOCOL = "device-protocol";
+        public static final String DG_RPC = "dg-rpc";
+        public static final String MODULE = "module";
+        public static final String USER_NAME = "user-name";
+        public static final String PORT_NUMBER = "port-number";
+        public static final String DOWNLOAD_DG_REFERENCE = "download-dg-reference";
+        public static final String REQUEST_ACTION = "request-action";
+        public static final String VNF = "vnf";
+        public static final String EXTERNAL = "External";
+        public static final String ACTION_LEVEL = "action-level";
+        public static final String ARTIFACT_NAME = "artifact-name";
+                
+        public static enum endPointType {DG,REST,NODE};        
+        public static enum flowStatus {PENDING,IN_PROCESS,COMPLETED};
+        
+        public static final String GENERATION_NODE = "GENERATION-NODE";
+        public static final String SEQUENCE_TYPE = "SEQUENCE-TYPE";
+        public static final String CATEGORY = "CATEGORY";
+        public static final String EXECUTION_NODE = "EXECUTION-NODE";
+        
+
+        public static final String REQUEST_ID = "reqeust-id";
+        public static final String ARTIFACT_CONTENT = "artifact-content";
+        public static final String ARTIFACT_CONTENT_ESCAPED = "artifact-content-escaped";
+        public static final String FLOW_SEQUENCE = "flow-sequence";
+        public static final String EXECUTTION_MODULE = "execution-module";
+        public static final String EXECUTION_RPC = "execution-rpc";
+        public static final String EXECUTION_TYPE = "execution-type";
+        public static final String GRAPH = "graph";
+        public static final String NODE = "node";
+        public static final String REST = "rest";
+        
+        
+        public static final String DB_ASDC_ARTIFACTS = "ASDC_ARTIFACTS";
+        public static final String DB_ASDC_REFERENCE = "ASDC_REFERENCE";
+        public static final String DB_REQUEST_ARTIFACTS = "REQUEST_ARTIFACTS";
+        public static final String DB_MULTISTEP_FLOW_REFERENCE = "MULTISTEP_FLOW_REFERENCE";
+        public static final String DB_PROTOCOL_REFERENCE = "PROTOCOL_REFERENCE";
+        public static final String DB_PROCESS_FLOW_REFERENCE = "PROCESS_FLOW_REFERENCE";
+        public static final String MOCK_HEALTHCHECK = "mock-healthcheck";
+        public static final String ACTION_IDENTIFIER = "action-identifier";
+        public static final String PAYLOAD = "payload";
+        public static final String FAILURE = "failure";
+        public static final String SUCCESS = "success";
+        public static final String OTHERS = "Others";
+        public static final String RESPONSE_PREFIX = "response-prefix";
+        public static final String OUTPUT_STATUS_MESSAGE = "status-message";
+        public static final String HEALTHY = "healthy";
+        public static final String INPUT_URL = "input.url";
+        public static final String INPUT_HOST_IP_ADDRESS = "host-ip-address";
+        public static final String INPUT_PORT_NUMBER = "port-number";
+        public static final String INPUT_CONTEXT = "context";
+        public static final String INPUT_SUB_CONTEXT = "sub-context";
+        public static final String INPUT_REQUEST_ACTION_TYPE = "request-action-type";
+        public static final String INPUT_REQUEST_ACTION = "request-action";
+        public static final String HTTP = "http://";
+        
+        public static final String VNF_ID = "vnf-id";
+        public static final String VSERVER_ID = "vserver-id";
+        public static final String SEQ_GENERATOR_URL = "seq_generator_url";
+        public static final String SEQ_GENERATOR_UID = "seq_generator.uid";
+        public static final String SEQ_GENERATOR_PWD = "seq_generator.pwd";
+        public static final String CAPABILITY ="capability";
+        public static final String DEPENDENCYMODEL ="tosca_dependency_model";
+        public static final String VF_MODULE ="vf-module";
+        public static final String VNFC_NAME = "vnfc-name";
+    }
diff --git a/appc-config/appc-flow-controller/provider/src/main/resources/appc-flow-controller.properties b/appc-config/appc-flow-controller/provider/src/main/resources/appc-flow-controller.properties
new file mode 100644
index 0000000..505ab8f
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/resources/appc-flow-controller.properties
@@ -0,0 +1,23 @@
+###
+# ============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=========================================================
+###
+
+healthcheck.mock=false
+healthcheck.default-rest-user=User
+healthcheck.default-rest-pass=@#asd723%^
diff --git a/appc-config/appc-flow-controller/provider/src/main/resources/jaxby.properties b/appc-config/appc-flow-controller/provider/src/main/resources/jaxby.properties
new file mode 100644
index 0000000..6671e30
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/main/resources/jaxby.properties
@@ -0,0 +1,21 @@
+###
+# ============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=========================================================
+###
+
+javax.xml.bind.context.factory=org.eclipse.persistence.jaxb.JAXBContextFactory
diff --git a/appc-config/appc-flow-controller/provider/src/test/java/org/openecomp/appc/flow/executor/node/TestFlowExecutorNode.java b/appc-config/appc-flow-controller/provider/src/test/java/org/openecomp/appc/flow/executor/node/TestFlowExecutorNode.java
new file mode 100644
index 0000000..cdb9e2d
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/test/java/org/openecomp/appc/flow/executor/node/TestFlowExecutorNode.java
@@ -0,0 +1,89 @@
+/*-
+ * ============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.appc.flow.executor.node;
+
+import java.io.InputStream;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Properties;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.openecomp.appc.flow.controller.node.FlowControlNode;
+import org.openecomp.appc.flow.controller.utils.FlowControllerConstants;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TestFlowExecutorNode {
+    
+    private final Logger logger = LoggerFactory.getLogger(TestFlowExecutorNode.class);
+    
+            
+    //@Before
+            public void setUp() {
+                Properties props = new Properties();
+                InputStream propStr = getClass().getResourceAsStream("/svclogic.properties");
+                if (propStr == null) {
+                    System.err.println("src/test/resources/svclogic.properties missing");
+                }
+                try {
+                    System.out.println("Got Properties");
+                    props.load(propStr);
+                    propStr.close();
+                } catch (Exception e) {
+                    e.printStackTrace();
+                    System.err.println("Could not initialize properties");
+                }
+                // Add properties to global properties
+
+                Enumeration propNames = props.keys();
+
+                while (propNames.hasMoreElements()) {
+                    
+                    String propName = (String) propNames.nextElement();
+                    System.setProperty(propName, props.getProperty(propName));
+                    System.out.println("propName" + propName + " Value: " + props.getProperty(propName));
+                }
+
+                
+            }
+    
+    
+    //@Test
+    public void testFlowExecutorNode() throws Exception {
+        
+        SvcLogicContext ctx = new SvcLogicContext();
+        ctx.setAttribute(FlowControllerConstants.VNF_TYPE, "vUSP - vDBE-IPX HUB");
+        ctx.setAttribute(FlowControllerConstants.REQUEST_ACTION, "Configure");
+        ctx.setAttribute(FlowControllerConstants.VNFC_TYPE, "");;
+        ctx.setAttribute(FlowControllerConstants.REQUEST_ID,"TESTCOMMONFRMWK");
+        ;
+    //    ctx.setAttribute(FlowControllerConstants.ACTION_LEVEL,"VNF");
+        HashMap inParams = new HashMap();
+
+        FlowControlNode fen = new FlowControlNode();
+        fen.processFlow(inParams, ctx);
+                
+        System.out.println("Flow sequence" + ctx.getAttribute("transMap"));
+        
+    }
+}
diff --git a/appc-config/appc-flow-controller/provider/src/test/java/org/openecomp/appc/flow/executor/node/TestParsingNode.java b/appc-config/appc-flow-controller/provider/src/test/java/org/openecomp/appc/flow/executor/node/TestParsingNode.java
new file mode 100644
index 0000000..9f08424
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/test/java/org/openecomp/appc/flow/executor/node/TestParsingNode.java
@@ -0,0 +1,90 @@
+/*-
+ * ============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.appc.flow.executor.node;
+
+import java.io.InputStream;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Properties;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.openecomp.appc.flow.controller.node.FlowControlNode;
+import org.openecomp.appc.flow.controller.node.JsonParsingNode;
+import org.openecomp.appc.flow.controller.node.RestServiceNode;
+import org.openecomp.appc.flow.controller.utils.FlowControllerConstants;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+
+public class TestParsingNode {
+
+//    @Before
+            public void setUp() {
+                Properties props = new Properties();
+                InputStream propStr = getClass().getResourceAsStream("/svclogic.properties");
+                if (propStr == null) {
+                    System.err.println("src/test/resources/svclogic.properties missing");
+                }
+                try {
+                    System.out.println("Got Properties");
+                    props.load(propStr);
+                    propStr.close();
+                } catch (Exception e) {
+                    e.printStackTrace();
+                    System.err.println("Could not initialize properties");
+                }
+                // Add properties to global properties
+
+                Enumeration propNames = props.keys();
+
+                while (propNames.hasMoreElements()) {
+                    
+                    String propName = (String) propNames.nextElement();
+                    System.setProperty(propName, props.getProperty(propName));
+                    System.out.println("propName" + propName + " Value: " + props.getProperty(propName));
+                }
+                
+                
+                
+            }
+    
+    
+//    @Test
+    public void testRestServiceNode() throws Exception {
+        
+        SvcLogicContext ctx = new SvcLogicContext();
+        
+            
+        
+        HashMap<String, String> inParams = new HashMap<String, String>();
+        JsonParsingNode rsn = new JsonParsingNode();
+        inParams.put("data", "{\"identifier\": \"scope represented\",\"state\": \"healthy\",\"test\": \"passed\", \"time\": \"01-01-1000:0000\"}");
+        inParams.put("responsePrefix", "APPC.healthcheck");
+        rsn.parse(inParams, ctx);
+        
+        for (Object key : ctx.getAttributeKeySet()) {
+            String parmName = (String) key;
+            String parmValue = ctx.getAttribute(parmName);
+            System.out.println(parmName + "=" + parmValue);
+        }
+        
+        
+    }
+}
diff --git a/appc-config/appc-flow-controller/provider/src/test/java/org/openecomp/appc/flow/executor/node/TestRestServiceNode.java b/appc-config/appc-flow-controller/provider/src/test/java/org/openecomp/appc/flow/executor/node/TestRestServiceNode.java
new file mode 100644
index 0000000..6c3b432
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/test/java/org/openecomp/appc/flow/executor/node/TestRestServiceNode.java
@@ -0,0 +1,125 @@
+/*-
+ * ============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.appc.flow.executor.node;
+
+import java.io.InputStream;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Properties;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.openecomp.appc.flow.controller.data.Transaction;
+import org.openecomp.appc.flow.controller.executorImpl.RestExecutor;
+import org.openecomp.appc.flow.controller.interfaceData.ActionIdentifier;
+import org.openecomp.appc.flow.controller.interfaceData.InventoryInfo;
+import org.openecomp.appc.flow.controller.interfaceData.RequestInfo;
+import org.openecomp.appc.flow.controller.interfaceData.Vm;
+import org.openecomp.appc.flow.controller.interfaceData.VnfInfo;
+import org.openecomp.appc.flow.controller.interfaceData.Vnfcslist;
+import org.openecomp.appc.flow.controller.node.FlowControlNode;
+import org.openecomp.appc.flow.controller.node.RestServiceNode;
+import org.openecomp.appc.flow.controller.utils.FlowControllerConstants;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+
+public class TestRestServiceNode {
+
+//    @Before
+            public void setUp() {
+                Properties props = new Properties();
+                InputStream propStr = getClass().getResourceAsStream("/svclogic.properties");
+                if (propStr == null) {
+                    System.err.println("src/test/resources/svclogic.properties missing");
+                }
+                try {
+                    System.out.println("Got Properties");
+                    props.load(propStr);
+                    propStr.close();
+                } catch (Exception e) {
+                    e.printStackTrace();
+                    System.err.println("Could not initialize properties");
+                }
+                // Add properties to global properties
+
+                Enumeration propNames = props.keys();
+
+                while (propNames.hasMoreElements()) {
+                    
+                    String propName = (String) propNames.nextElement();
+                    System.setProperty(propName, props.getProperty(propName));
+                    System.out.println("propName" + propName + " Value: " + props.getProperty(propName));
+                }
+
+                
+            }
+    
+    
+//    @Test
+    public void testRestServiceNode() throws Exception {
+        
+        SvcLogicContext ctx = new SvcLogicContext();
+        ctx.setAttribute(FlowControllerConstants.VNF_TYPE, "vUSP - vDBE-IPX HUB");
+        ctx.setAttribute(FlowControllerConstants.REQUEST_ACTION, "healthcheck");
+        ctx.setAttribute(FlowControllerConstants.VNFC_TYPE, "TESTVNFC-CF");
+        ctx.setAttribute(FlowControllerConstants.REQUEST_ID,"TESTCOMMONFRMWK");
+        ctx.setAttribute("host-ip-address","127.0.0.1");
+        ctx.setAttribute("port-number","8888");
+        ctx.setAttribute("request-action-type","GET");
+        ctx.setAttribute("context", "loader/restconf/operations/appc-provider-lcm:health-check");
+        
+        HashMap<String, String> inParams = new HashMap<String, String>();
+        RestServiceNode rsn = new RestServiceNode();
+        inParams.put("output-state", "state");
+        inParams.put("responsePrefix", "healthcheck");
+        rsn.sendRequest(inParams, ctx);
+        
+        for (Object key : ctx.getAttributeKeySet()) {
+            String parmName = (String) key;
+            String parmValue = ctx.getAttribute(parmName);
+            System.out.println(parmName + "=" + parmValue);
+        }
+        
+        
+    }
+    
+    
+    //@Test
+    public void testInputParamsRestServiceNode() throws Exception {
+        SvcLogicContext ctx = new SvcLogicContext();
+        ctx.setAttribute("vnf-id", "test");
+        ctx.setAttribute("tmp.vnfInfo.vm-count", "1");
+        ctx.setAttribute("tmp.vnfInfo.vm[0].vnfc-count", "1");
+        RestExecutor restExe = new RestExecutor();
+        Transaction transaction = new Transaction();
+        
+        FlowControlNode node = new FlowControlNode();
+        //String output =node.collectInputParams(ctx, transaction);
+        
+//        Properties props = new Properties();
+//        props.setProperty("SEQ_GENERATOR_URL", "test");
+        //System.out.println(output);
+        //transaction.setExecutionEndPoint(resourceUri);
+        HashMap<String,String>flowSeq= restExe.execute(transaction, ctx);
+        String flowSequnce=flowSeq.get("restResponse");
+        System.out.println(flowSequnce);
+        
+    }
+}
diff --git a/appc-config/appc-flow-controller/provider/src/test/resources/Info.out.xml b/appc-config/appc-flow-controller/provider/src/test/resources/Info.out.xml
new file mode 100644
index 0000000..7877967
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/test/resources/Info.out.xml
@@ -0,0 +1,19 @@
+<!--
+  ============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=========================================================
+  -->
diff --git a/appc-config/appc-flow-controller/provider/src/test/resources/svclogic.properties b/appc-config/appc-flow-controller/provider/src/test/resources/svclogic.properties
new file mode 100644
index 0000000..f6b4241
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/test/resources/svclogic.properties
@@ -0,0 +1,33 @@
+###
+# ============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=========================================================
+###
+
+org.openecomp.sdnc.sli.dbtype=
+org.openecomp.sdnc.sli.jdbc.hosts=
+org.openecomp.sdnc.sli.jdbc.url=
+org.openecomp.sdnc.sli.jdbc.database=
+org.openecomp.sdnc.sli.jdbc.user=
+org.openecomp.sdnc.sli.jdbc.password=
+org.openecomp.sdnc.sli.jdbc.connection.name=
+
+org.openecomp.sdnc.sli.jdbc.connection.timeout=
+org.openecomp.sdnc.sli.jdbc.request.timeout=
+org.openecomp.sdnc.sli.jdbc.limit.init=
+org.openecomp.sdnc.sli.jdbc.limit.min=
+org.openecomp.sdnc.sli.jdbc.limit.max=
diff --git a/appc-config/appc-flow-controller/provider/src/test/resources/transactionModel.json b/appc-config/appc-flow-controller/provider/src/test/resources/transactionModel.json
new file mode 100644
index 0000000..b21f488
--- /dev/null
+++ b/appc-config/appc-flow-controller/provider/src/test/resources/transactionModel.json
@@ -0,0 +1,63 @@
+/*-
+ * ============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=========================================================
+ */
+
+{
+	"transactions": [{
+		"transactionId": 1,
+		"action": "configure",
+		"action-level": "vnf",
+		"action-identifier": {
+			"vnf-id": "dbgx0001v"
+		},
+		"payload": "This is my Payload",
+		"parameters": [{
+			"name": "value"
+		}],
+		"precheck": {
+			"precheck-operator": "all",
+			"precheck-options": [{
+				"pre-transactionID": "1",
+				"param-name": "state",
+				"param-value": "healthy",
+				"rule": "continue"
+			},
+			{
+				"pre-transactionID": "2",
+				"param-name": "state",
+				"param-value": "healthy",
+				"rule": "continue"
+			}]
+		},
+		"state": "healthy",
+		"responses": [{
+			"responseActionHanlder": null,
+			"responseCode": "401",
+			"responseMessage": null,
+			"responseAction": {
+				"wait": null,
+				"retry": null,
+				"jump": null,
+				"ignore": true,
+				"stop": false,
+				"intermediateMessage": null
+			}
+		}]
+	}]
+}
diff --git a/appc-config/jacoco.exec b/appc-config/jacoco.exec
deleted file mode 100644
index c1ac989..0000000
--- a/appc-config/jacoco.exec
+++ /dev/null
Binary files differ
diff --git a/appc-config/pom.xml b/appc-config/pom.xml
index 3aa0513..d90a3c8 100644
--- a/appc-config/pom.xml
+++ b/appc-config/pom.xml
@@ -1,96 +1,97 @@
 <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</groupId>
-		<artifactId>appc</artifactId>
-		<version>1.1.0-SNAPSHOT</version>
-	</parent>
+    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</groupId>
+        <artifactId>appc</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+    </parent>
 
-	<groupId>org.openecomp.appc</groupId>
-	<artifactId>appc-config</artifactId>
-	<packaging>pom</packaging>
-	<name>Application Controller Config</name>
-	<description>Application Controller Config</description>
+    <groupId>org.openecomp.appc</groupId>
+    <artifactId>appc-config</artifactId>
+    <packaging>pom</packaging>
+    <name>Application Controller Config</name>
+    <description>Application Controller Config</description>
 
-	<properties>
-		<odl.mdsal.version>2.1.1-Boron-SR1</odl.mdsal.version>
-		<jackson.version>2.3.2</jackson.version>
-		<snakeyaml.version>1.12</snakeyaml.version>
-		<velocity.version>1.7</velocity.version>
-		<jettison.version>1.3.7</jettison.version>
-		<common.collections.version>3.2.1</common.collections.version>
-		<common.io.version>2.5</common.io.version>
+    <properties>
+        <odl.mdsal.version>2.1.1-Boron-SR1</odl.mdsal.version>
+        <jackson.version>2.3.2</jackson.version>
+        <snakeyaml.version>1.12</snakeyaml.version>
+        <velocity.version>1.7</velocity.version>
+        <jettison.version>1.3.7</jettison.version>
+        <common.collections.version>3.2.1</common.collections.version>
+        <common.io.version>2.5</common.io.version>
 
-		<sdnc.sql.resource.version>1.1.0</sdnc.sql.resource.version>
-		<openecomp.sdnc.sql-resource.version>1.1.2</openecomp.sdnc.sql-resource.version>
-		<sdnc.sli.version>1.1.0</sdnc.sli.version>
-		<tosca.datatype.version>1.1.0</tosca.datatype.version>
-	</properties>
+        <sdnc.sql.resource.version>1.1.0</sdnc.sql.resource.version>
+        <openecomp.sdnc.sql-resource.version>1.1.2</openecomp.sdnc.sql-resource.version>
+        <sdnc.sli.version>1.1.0</sdnc.sli.version>
+        <tosca.datatype.version>1.1.0</tosca.datatype.version>
+    </properties>
 
-	<dependencyManagement>
-		<dependencies>
+    <dependencyManagement>
+        <dependencies>
 
-			<dependency>
-				<groupId>org.openecomp.sdnc.adaptors</groupId>
-				<artifactId>sql-resource-provider</artifactId>
-				<version>${openecomp.sdnc.sql-resource.version}</version>
-			</dependency>
+            <dependency>
+                <groupId>org.openecomp.sdnc.adaptors</groupId>
+                <artifactId>sql-resource-provider</artifactId>
+                <version>${openecomp.sdnc.sql-resource.version}</version>
+            </dependency>
 
-			<dependency>
-				<groupId>com.fasterxml.jackson.core</groupId>
-				<artifactId>jackson-databind</artifactId>
-				<version>${jackson.version}</version>
-			</dependency>
-			<dependency>
-				<groupId>com.fasterxml.jackson.core</groupId>
-				<artifactId>jackson-annotations</artifactId>
-				<version>${jackson.version}</version>
-			</dependency>
-			<dependency>
-				<groupId>com.fasterxml.jackson.core</groupId>
-				<artifactId>jackson-core</artifactId>
-				<version>${jackson.version}</version>
-			</dependency>
-			<dependency>
-				<groupId>com.fasterxml.jackson.dataformat</groupId>
-				<artifactId>jackson-dataformat-properties</artifactId>
-				<version>${jackson.version}</version>
-			</dependency>
-			<dependency>
-				<groupId>com.fasterxml.jackson.dataformat</groupId>
-				<artifactId>jackson-dataformat-yaml</artifactId>
-				<version>${jackson.version}</version>
-			</dependency>
-			<dependency>
-				<groupId>org.yaml</groupId>
-				<artifactId>snakeyaml</artifactId>
-				<version>${snakeyaml.version}</version>
-			</dependency>
-			<dependency>
-				<groupId>org.apache.velocity</groupId>
-				<artifactId>velocity</artifactId>
-				<version>${velocity.version}</version>
-			</dependency>
-			<dependency>
-				<groupId>commons-io</groupId>
-				<artifactId>commons-io</artifactId>
-				<version>${common.io.version}</version>
-			</dependency>
-			<dependency>
-				<groupId>org.codehaus.jettison</groupId>
-				<artifactId>jettison</artifactId>
-				<version>${jettison.version}</version>
-				<scope>provided</scope>
-			</dependency>
-		</dependencies>
+            <dependency>
+                <groupId>com.fasterxml.jackson.core</groupId>
+                <artifactId>jackson-databind</artifactId>
+                <version>${jackson.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>com.fasterxml.jackson.core</groupId>
+                <artifactId>jackson-annotations</artifactId>
+                <version>${jackson.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>com.fasterxml.jackson.core</groupId>
+                <artifactId>jackson-core</artifactId>
+                <version>${jackson.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>com.fasterxml.jackson.dataformat</groupId>
+                <artifactId>jackson-dataformat-properties</artifactId>
+                <version>${jackson.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>com.fasterxml.jackson.dataformat</groupId>
+                <artifactId>jackson-dataformat-yaml</artifactId>
+                <version>${jackson.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.yaml</groupId>
+                <artifactId>snakeyaml</artifactId>
+                <version>${snakeyaml.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.velocity</groupId>
+                <artifactId>velocity</artifactId>
+                <version>${velocity.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>commons-io</groupId>
+                <artifactId>commons-io</artifactId>
+                <version>${common.io.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.codehaus.jettison</groupId>
+                <artifactId>jettison</artifactId>
+                <version>${jettison.version}</version>
+                <scope>provided</scope>
+            </dependency>
+        </dependencies>
 
-	</dependencyManagement>
+    </dependencyManagement>
 
 	<modules>
 		<module>appc-config-params</module>
                 <module>appc-encryption-tool</module>
                 <module>appc-data-services</module>
+                <module>appc-flow-controller</module>
 	</modules>
 
 </project>
