diff --git a/.gitignore b/.gitignore
index fdde5eb..53cb42d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -83,6 +83,39 @@
 # DynamoDB Local files
 .dynamodb/
 
+# Microservices
+
+.classpath
+.settings/
+
+# Target dirs in all projects
+**/target-ide/*
+**/target/*
+**/logs/*
+**/tokens/*
+
+# Added for Intellij IDEA IDE
+**/*.ipr
+**/*.iws
+**/debug-logs/*
+**/.idea/*
+**/*.iml
+**/*.project
+**/.springBeans
+
+**/*versionsBackup
+**/blackDuckHub*
+**/*.jsonld
+**/.checkstyle
+**/.gitignore
+
+**/*.log
+**/*py.class
+**/.DS_Store
+
+# To Remove Kotlin Script Generated Jars
+**/*cba-kts.jar
+
 # Added for Intellij IDEA IDE
 **/*.ipr
 **/*.iws
diff --git a/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintNodeTemplateValidatorImpl.kt b/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintNodeTemplateValidatorImpl.kt
index 7e70a76..fb466f7 100644
--- a/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintNodeTemplateValidatorImpl.kt
+++ b/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintNodeTemplateValidatorImpl.kt
@@ -1,6 +1,6 @@
 /*
  * Copyright © 2017-2018 AT&T Intellectual Property.
- * Modifications Copyright © 2018 IBM.
+ * Modifications Copyright © 2018-2019 IBM.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -19,17 +19,14 @@
 
 import com.att.eelf.configuration.EELFLogger
 import com.att.eelf.configuration.EELFManager
-import com.fasterxml.jackson.databind.JsonNode
+import org.onap.ccsdk.cds.controllerblueprints.validation.utils.PropertyAssignmentValidationUtils
 import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
 import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
 import org.onap.ccsdk.cds.controllerblueprints.core.data.*
-import org.onap.ccsdk.cds.controllerblueprints.core.format
 import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintNodeTemplateValidator
 import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
 import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintExpressionService
 import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintRuntimeService
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
 import org.springframework.beans.factory.config.ConfigurableBeanFactory
 import org.springframework.context.annotation.Scope
 import org.springframework.stereotype.Service
@@ -43,6 +40,7 @@
 
     lateinit var bluePrintRuntimeService: BluePrintRuntimeService<*>
     lateinit var bluePrintContext: BluePrintContext
+    lateinit var propertyAssignmentValidationUtils: PropertyAssignmentValidationUtils
     var paths: MutableList<String> = arrayListOf()
 
     override fun validate(bluePrintRuntimeService: BluePrintRuntimeService<*>, name: String, nodeTemplate: NodeTemplate) {
@@ -51,6 +49,8 @@
         this.bluePrintRuntimeService = bluePrintRuntimeService
         this.bluePrintContext = bluePrintRuntimeService.bluePrintContext()
 
+        propertyAssignmentValidationUtils = PropertyAssignmentValidationUtils(bluePrintContext)
+
         paths.add(name)
 
         val type: String = nodeTemplate.type
@@ -58,7 +58,10 @@
         val nodeType: NodeType = bluePrintContext.serviceTemplate.nodeTypes?.get(type)
                 ?: throw BluePrintException("Failed to get NodeType($type) definition for NodeTemplate($name)")
 
-        nodeTemplate.properties?.let { validatePropertyAssignments(nodeType.properties!!, nodeTemplate.properties!!) }
+        nodeTemplate.properties?.let {
+            propertyAssignmentValidationUtils
+                    .validatePropertyAssignments(nodeType.properties!!, nodeTemplate.properties!!)
+        }
         nodeTemplate.capabilities?.let { validateCapabilityAssignments(nodeType, name, nodeTemplate) }
         nodeTemplate.requirements?.let { validateRequirementAssignments(nodeType, name, nodeTemplate) }
         nodeTemplate.interfaces?.let { validateInterfaceAssignments(nodeType, name, nodeTemplate) }
@@ -80,29 +83,6 @@
         paths.removeAt(paths.lastIndex)
     }
 
-
-    @Throws(BluePrintException::class)
-    open fun validatePropertyAssignments(nodeTypeProperties: MutableMap<String, PropertyDefinition>,
-                                         properties: MutableMap<String, JsonNode>) {
-        properties.forEach { propertyName, propertyAssignment ->
-            val propertyDefinition: PropertyDefinition = nodeTypeProperties[propertyName]
-                    ?: throw BluePrintException("failed to get definition for the property ($propertyName)")
-
-            validatePropertyAssignment(propertyName, propertyDefinition, propertyAssignment)
-
-        }
-    }
-
-    @Throws(BluePrintException::class)
-    open fun validatePropertyAssignment(propertyName: String, propertyDefinition: PropertyDefinition,
-                                        propertyAssignment: JsonNode) {
-        // Check and Validate if Expression Node
-        val expressionData = BluePrintExpressionService.getExpressionData(propertyAssignment)
-        if (!expressionData.isExpression) {
-            checkPropertyValue(propertyName, propertyDefinition, propertyAssignment)
-        }
-    }
-
     @Throws(BluePrintException::class)
     open fun validateCapabilityAssignments(nodeType: NodeType, nodeTemplateName: String, nodeTemplate: NodeTemplate) {
         val capabilities = nodeTemplate.capabilities
@@ -125,7 +105,10 @@
     open fun validateCapabilityAssignment(nodeTemplateName: String, capabilityName: String,
                                           capabilityDefinition: CapabilityDefinition, capabilityAssignment: CapabilityAssignment) {
 
-        capabilityAssignment.properties?.let { validatePropertyAssignments(capabilityDefinition.properties!!, capabilityAssignment.properties!!) }
+        capabilityAssignment.properties?.let {
+            propertyAssignmentValidationUtils
+                    .validatePropertyAssignments(capabilityDefinition.properties!!, capabilityAssignment.properties!!)
+        }
 
     }
 
@@ -224,7 +207,8 @@
                             ?: throw BluePrintException("Failed to get NodeTemplate($nodeTemplateName) operation " +
                                     "definition ($operationAssignmentName) property definition($propertyName)")
                     // Check the property values with property definition
-                    validatePropertyAssignment(propertyName, propertyDefinition, propertyAssignment)
+                    propertyAssignmentValidationUtils
+                            .validatePropertyAssignment(propertyName, propertyDefinition, propertyAssignment)
                 }
 
                 outputs?.forEach { propertyName, propertyAssignment ->
@@ -232,7 +216,8 @@
                             ?: throw BluePrintException("Failed to get NodeTemplate($nodeTemplateName) operation definition ($operationAssignmentName) " +
                                     "output property definition($propertyName)")
                     // Check the property values with property definition
-                    validatePropertyAssignment(propertyName, propertyDefinition, propertyAssignment)
+                    propertyAssignmentValidationUtils
+                            .validatePropertyAssignment(propertyName, propertyDefinition, propertyAssignment)
                 }
 
             }
@@ -240,48 +225,6 @@
 
     }
 
-    open fun checkPropertyValue(propertyName: String, propertyDefinition: PropertyDefinition, propertyAssignment: JsonNode) {
-        val propertyType = propertyDefinition.type
-        val isValid: Boolean
-
-        if (BluePrintTypes.validPrimitiveTypes().contains(propertyType)) {
-            isValid = JacksonUtils.checkJsonNodeValueOfPrimitiveType(propertyType, propertyAssignment)
-
-        } else if (BluePrintTypes.validComplexTypes().contains(propertyType)) {
-            isValid = true
-        } else if (BluePrintTypes.validCollectionTypes().contains(propertyType)) {
-
-            val entrySchemaType = propertyDefinition.entrySchema?.type
-                    ?: throw BluePrintException(format("Failed to get EntrySchema type for the collection property ({})", propertyName))
-
-            if (!BluePrintTypes.validPropertyTypes().contains(entrySchemaType)) {
-                checkPropertyDataType(entrySchemaType, propertyName)
-            }
-            isValid = JacksonUtils.checkJsonNodeValueOfCollectionType(propertyType, propertyAssignment)
-        } else {
-            checkPropertyDataType(propertyType, propertyName)
-            isValid = true
-        }
-
-        check(isValid) {
-            throw BluePrintException("property(propertyName) defined of type(propertyType) is not comptable with the value (propertyAssignment)")
-        }
-    }
-
-    private fun checkPropertyDataType(dataTypeName: String, propertyName: String) {
-
-        val dataType = bluePrintContext.serviceTemplate.dataTypes?.get(dataTypeName)
-                ?: throw BluePrintException("DataType ($dataTypeName) for the property ($propertyName) not found")
-
-        checkValidDataTypeDerivedFrom(propertyName, dataType.derivedFrom)
-
-    }
-
-    private fun checkValidDataTypeDerivedFrom(dataTypeName: String, derivedFrom: String) {
-        check(BluePrintTypes.validDataTypeDerivedFroms.contains(derivedFrom)) {
-            throw BluePrintException("Failed to get DataType($dataTypeName)'s  derivedFrom($derivedFrom) definition ")
-        }
-    }
 
     private fun validateExtension(referencePrefix: String, name: String, nodeTemplate: NodeTemplate) {
         val customValidator = bluePrintTypeValidatorService
diff --git a/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintWorkflowValidatorImpl.kt b/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintWorkflowValidatorImpl.kt
index 3062031..a7dbbf8 100644
--- a/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintWorkflowValidatorImpl.kt
+++ b/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BluePrintWorkflowValidatorImpl.kt
@@ -1,5 +1,6 @@
 /*
  * Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2019 IBM.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,6 +19,7 @@
 
 import com.att.eelf.configuration.EELFLogger
 import com.att.eelf.configuration.EELFManager
+import org.onap.ccsdk.cds.controllerblueprints.validation.utils.PropertyAssignmentValidationUtils
 import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
 import org.onap.ccsdk.cds.controllerblueprints.core.data.Workflow
 import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintTypeValidatorService
@@ -45,6 +47,12 @@
         paths.add(workflowName)
         paths.joinToString(BluePrintConstants.PATH_DIVIDER)
 
+        // Validate Workflow Inputs
+        validateInputs(workflow)
+
+        // Validate Workflow outputs
+        validateOutputs(workflow)
+
         // Step Validation Start
         paths.add("steps")
         workflow.steps?.forEach { stepName, step ->
@@ -69,14 +77,33 @@
                                     "definition", paths.joinToString(BluePrintConstants.PATH_DIVIDER), e.message!!)
                 }
             }
-            paths.removeAt(paths.lastIndex)
+
         }
         paths.removeAt(paths.lastIndex)
         // Step Validation Ends
         paths.removeAt(paths.lastIndex)
 
+        paths.removeAt(paths.lastIndex)
+    }
+
+    private fun validateInputs(workflow: Workflow) {
         workflow.inputs?.let {
             bluePrintTypeValidatorService.validatePropertyDefinitions(bluePrintRuntimeService, workflow.inputs!!)
         }
     }
+
+    private fun validateOutputs(workflow: Workflow) {
+        workflow.outputs?.let {
+
+            bluePrintTypeValidatorService.validatePropertyDefinitions(bluePrintRuntimeService, workflow.outputs!!)
+
+            PropertyAssignmentValidationUtils(bluePrintRuntimeService.bluePrintContext())
+                    .validatePropertyDefinitionNAssignments(workflow.outputs!!)
+        }
+        // Validate Value or Expression
+        workflow.outputs?.forEach { propertyName, propertyDefinition ->
+
+        }
+    }
+
 }
\ No newline at end of file
diff --git a/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/utils/PropertyAssignmentValidationUtils.kt b/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/utils/PropertyAssignmentValidationUtils.kt
new file mode 100644
index 0000000..35ddc5b
--- /dev/null
+++ b/ms/controllerblueprints/modules/blueprint-validation/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/utils/PropertyAssignmentValidationUtils.kt
@@ -0,0 +1,112 @@
+/*
+ *  Copyright © 2019 IBM.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.onap.ccsdk.cds.controllerblueprints.validation.utils
+
+import com.fasterxml.jackson.databind.JsonNode
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintException
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.data.PropertyDefinition
+import org.onap.ccsdk.cds.controllerblueprints.core.format
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintExpressionService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
+
+open class PropertyAssignmentValidationUtils(private val bluePrintContext: BluePrintContext) {
+
+    // Property Definition holds both Definitons and Expression in same construct
+    open fun validatePropertyDefinitionNAssignments(propertyDefinitions: MutableMap<String, PropertyDefinition>) {
+        propertyDefinitions.forEach { propertyName, propertyDefinition ->
+            validatePropertyDefinitionNAssignment(propertyName, propertyDefinition)
+        }
+    }
+
+    // Property Definition holds both Definitons and Expression in same construct
+    open fun validatePropertyDefinitionNAssignment(propertyName: String, propertyDefinition: PropertyDefinition) {
+        // Check and Validate if Expression Node
+        checkNotNull(propertyDefinition.value) {
+            throw BluePrintException("couldn't get 'value' property from PropertyDefinition($propertyName)")
+        }
+        val propertyAssignment = propertyDefinition.value!!
+        val expressionData = BluePrintExpressionService.getExpressionData(propertyAssignment)
+        if (!expressionData.isExpression) {
+            checkPropertyValue(propertyName, propertyDefinition, propertyAssignment)
+        }
+    }
+
+    open fun validatePropertyAssignments(nodeTypeProperties: MutableMap<String, PropertyDefinition>,
+                                         properties: MutableMap<String, JsonNode>) {
+        properties.forEach { propertyName, propertyAssignment ->
+            val propertyDefinition: PropertyDefinition = nodeTypeProperties[propertyName]
+                    ?: throw BluePrintException("failed to get definition for the property ($propertyName)")
+
+            validatePropertyAssignment(propertyName, propertyDefinition, propertyAssignment)
+
+        }
+    }
+
+    open fun validatePropertyAssignment(propertyName: String, propertyDefinition: PropertyDefinition,
+                                        propertyAssignment: JsonNode) {
+        // Check and Validate if Expression Node
+        val expressionData = BluePrintExpressionService.getExpressionData(propertyAssignment)
+        if (!expressionData.isExpression) {
+            checkPropertyValue(propertyName, propertyDefinition, propertyAssignment)
+        }
+    }
+
+    open fun checkPropertyValue(propertyName: String, propertyDefinition: PropertyDefinition, propertyAssignment: JsonNode) {
+        val propertyType = propertyDefinition.type
+        val isValid: Boolean
+
+        if (BluePrintTypes.validPrimitiveTypes().contains(propertyType)) {
+            isValid = JacksonUtils.checkJsonNodeValueOfPrimitiveType(propertyType, propertyAssignment)
+
+        } else if (BluePrintTypes.validComplexTypes().contains(propertyType)) {
+            isValid = true
+        } else if (BluePrintTypes.validCollectionTypes().contains(propertyType)) {
+
+            val entrySchemaType = propertyDefinition.entrySchema?.type
+                    ?: throw BluePrintException(format("Failed to get EntrySchema type for the collection property ({})", propertyName))
+
+            if (!BluePrintTypes.validPropertyTypes().contains(entrySchemaType)) {
+                checkPropertyDataType(entrySchemaType, propertyName)
+            }
+            isValid = JacksonUtils.checkJsonNodeValueOfCollectionType(propertyType, propertyAssignment)
+        } else {
+            checkPropertyDataType(propertyType, propertyName)
+            isValid = true
+        }
+
+        check(isValid) {
+            throw BluePrintException("property(propertyName) defined of type(propertyType) is not comptable with the value (propertyAssignment)")
+        }
+    }
+
+    open fun checkPropertyDataType(dataTypeName: String, propertyName: String) {
+
+        val dataType = bluePrintContext.serviceTemplate.dataTypes?.get(dataTypeName)
+                ?: throw BluePrintException("DataType ($dataTypeName) for the property ($propertyName) not found")
+
+        checkValidDataTypeDerivedFrom(propertyName, dataType.derivedFrom)
+
+    }
+
+    open fun checkValidDataTypeDerivedFrom(dataTypeName: String, derivedFrom: String) {
+        check(BluePrintTypes.validDataTypeDerivedFroms.contains(derivedFrom)) {
+            throw BluePrintException("Failed to get DataType($dataTypeName)'s  derivedFrom($derivedFrom) definition ")
+        }
+    }
+}
diff --git a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintWorkflowEnhancerImpl.kt b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintWorkflowEnhancerImpl.kt
index 091dfda..8379e50 100644
--- a/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintWorkflowEnhancerImpl.kt
+++ b/ms/controllerblueprints/modules/service/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintWorkflowEnhancerImpl.kt
@@ -1,5 +1,6 @@
 /*
  * Copyright © 2017-2018 AT&T Intellectual Property.
+ * Modifications Copyright © 2019 IBM.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -66,11 +67,16 @@
         // Clean Dynamic Property Field, If present
         workflow.inputs?.remove(dynamicPropertyName)
 
+        // Enrich Workflow Inputs
+        enhanceWorkflowInputs(name, workflow)
+
+        // Enrich Workflow Outputs
+        enhanceWorkflowOutputs(name, workflow)
+
         // Enrich Only for Resource Assignment and Dynamic Input Properties if any
         enhanceStepTargets(name, workflow)
 
-        // Enrich Workflow Inputs
-        enhanceWorkflowInputs(name, workflow)
+
     }
 
     open fun enhanceWorkflowInputs(name: String, workflow: Workflow) {
@@ -80,6 +86,12 @@
         }
     }
 
+    open fun enhanceWorkflowOutputs(name: String, workflow: Workflow) {
+        workflow.outputs?.let { outputs ->
+            bluePrintTypeEnhancerService.enhancePropertyDefinitions(bluePrintRuntimeService, outputs)
+        }
+    }
+
     private fun enhanceStepTargets(name: String, workflow: Workflow) {
 
         // Get the first Step Target NodeTemplate name( It may be Component or DG Node Template)
