diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt
index c128234..335aea1 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/ResourceResolutionService.kt
@@ -59,14 +59,14 @@
 @Service(ResourceResolutionConstants.SERVICE_RESOURCE_RESOLUTION)
 open class ResourceResolutionServiceImpl(private var applicationContext: ApplicationContext,
                                          private var resolutionResultService: ResourceResolutionResultService) :
-    ResourceResolutionService {
+        ResourceResolutionService {
 
     private val log = LoggerFactory.getLogger(ResourceResolutionService::class.java)
 
     override fun registeredResourceSources(): List<String> {
         return applicationContext.getBeanNamesForType(ResourceAssignmentProcessor::class.java)
-            .filter { it.startsWith(ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR) }
-            .map { it.substringAfter(ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR) }
+                .filter { it.startsWith(ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR) }
+                .map { it.substringAfter(ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR) }
     }
 
     override fun resolveResources(bluePrintRuntimeService: BluePrintRuntimeService<*>, nodeTemplateName: String,
@@ -92,7 +92,7 @@
         val result = resolveResources(bluePrintRuntimeService, nodeTemplateName, artifactMapping, artifactTemplate)
 
         if (properties.containsKey(ResourceResolutionConstants.RESOURCE_RESOLUTION_INPUT_STORE_RESULT)
-            && properties[ResourceResolutionConstants.RESOURCE_RESOLUTION_INPUT_STORE_RESULT] as Boolean) {
+                && properties[ResourceResolutionConstants.RESOURCE_RESOLUTION_INPUT_STORE_RESULT] as Boolean) {
             resolutionResultService.write(properties, result, bluePrintRuntimeService, artifactPrefix)
         }
 
@@ -113,32 +113,32 @@
         val identifierName = artifactTemplate ?: "no-template"
 
         val resourceAssignmentContent =
-            bluePrintRuntimeService.resolveNodeTemplateArtifact(nodeTemplateName, artifactMapping)
+                bluePrintRuntimeService.resolveNodeTemplateArtifact(nodeTemplateName, artifactMapping)
 
         val resourceAssignments: MutableList<ResourceAssignment> =
-            JacksonUtils.getListFromJson(resourceAssignmentContent, ResourceAssignment::class.java)
-                    as? MutableList<ResourceAssignment>
-                ?: throw BluePrintProcessorException("couldn't get Dictionary Definitions")
+                JacksonUtils.getListFromJson(resourceAssignmentContent, ResourceAssignment::class.java)
+                        as? MutableList<ResourceAssignment>
+                        ?: throw BluePrintProcessorException("couldn't get Dictionary Definitions")
 
         // Get the Resource Dictionary Name
         val dictionaryFile = bluePrintRuntimeService.bluePrintContext().rootPath.plus(File.separator)
-            .plus(BluePrintConstants.TOSCA_DEFINITIONS_DIR).plus(File.separator)
-            .plus(ResourceResolutionConstants.FILE_NAME_RESOURCE_DEFINITION_TYPES)
+                .plus(BluePrintConstants.TOSCA_DEFINITIONS_DIR).plus(File.separator)
+                .plus(ResourceResolutionConstants.FILE_NAME_RESOURCE_DEFINITION_TYPES)
 
         val resourceDictionaries: MutableMap<String, ResourceDefinition> =
-            JacksonUtils.getMapFromFile(dictionaryFile, ResourceDefinition::class.java)
-                ?: throw BluePrintProcessorException("couldn't get Dictionary Definitions")
+                JacksonUtils.getMapFromFile(dictionaryFile, ResourceDefinition::class.java)
+                        ?: throw BluePrintProcessorException("couldn't get Dictionary Definitions")
 
         // Resolve resources
         resolveResourceAssignments(bluePrintRuntimeService, resourceDictionaries, resourceAssignments, identifierName)
 
         val resolvedParamJsonContent =
-            ResourceAssignmentUtils.generateResourceDataForAssignments(resourceAssignments.toList())
+                ResourceAssignmentUtils.generateResourceDataForAssignments(resourceAssignments.toList())
 
         // Check Template is there
         if (artifactTemplate != null) {
             val templateContent =
-                bluePrintRuntimeService.resolveNodeTemplateArtifact(nodeTemplateName, artifactTemplate)
+                    bluePrintRuntimeService.resolveNodeTemplateArtifact(nodeTemplateName, artifactTemplate)
             resolvedContent = BluePrintTemplateService.generateContent(templateContent, resolvedParamJsonContent)
         } else {
             resolvedContent = resolvedParamJsonContent
@@ -159,35 +159,33 @@
 
         val bulkSequenced = BulkResourceSequencingUtils.process(resourceAssignments)
         val resourceAssignmentRuntimeService =
-            ResourceAssignmentUtils.transformToRARuntimeService(blueprintRuntimeService, identifierName)
+                ResourceAssignmentUtils.transformToRARuntimeService(blueprintRuntimeService, identifierName)
 
         bulkSequenced.map { batchResourceAssignments ->
             batchResourceAssignments.filter { it.name != "*" && it.name != "start" }
-                .forEach { resourceAssignment ->
-                    val dictionaryName = resourceAssignment.dictionaryName
-                    val dictionarySource = resourceAssignment.dictionarySource
-                    /**
-                     * Get the Processor name
-                     */
-                    val processorName = processorName(dictionaryName!!, dictionarySource!!,
-                        resourceDictionaries)
+                    .forEach { resourceAssignment ->
+                        val dictionaryName = resourceAssignment.dictionaryName
+                        val dictionarySource = resourceAssignment.dictionarySource
+                        /**
+                         * Get the Processor name
+                         */
+                        val processorName = processorName(dictionaryName!!, dictionarySource!!, resourceDictionaries)
 
-                    val resourceAssignmentProcessor =
-                        applicationContext.getBean(processorName) as? ResourceAssignmentProcessor
-                            ?: throw BluePrintProcessorException("failed to get resource processor for name($processorName) " +
-                                    "for resource assignment(${resourceAssignment.name})")
-                    try {
-                        // Set BluePrint Runtime Service
-                        resourceAssignmentProcessor.raRuntimeService = resourceAssignmentRuntimeService
-                        // Set Resource Dictionaries
-                        resourceAssignmentProcessor.resourceDictionaries = resourceDictionaries
-                        // Invoke Apply Method
-                        resourceAssignmentProcessor.apply(resourceAssignment)
-                    } catch (e: RuntimeException) {
-                        resourceAssignmentProcessor.recover(e, resourceAssignment)
-                        throw BluePrintProcessorException(e)
+                        val resourceAssignmentProcessor =
+                                applicationContext.getBean(processorName) as? ResourceAssignmentProcessor
+                                        ?: throw BluePrintProcessorException("failed to get resource processor for name($processorName) " +
+                                                "for resource assignment(${resourceAssignment.name})")
+                        try {
+                            // Set BluePrint Runtime Service
+                            resourceAssignmentProcessor.raRuntimeService = resourceAssignmentRuntimeService
+                            // Set Resource Dictionaries
+                            resourceAssignmentProcessor.resourceDictionaries = resourceDictionaries
+                            // Invoke Apply Method
+                            resourceAssignmentProcessor.apply(resourceAssignment)
+                        } catch (e: RuntimeException) {
+                            throw BluePrintProcessorException(e)
+                        }
                     }
-                }
         }
     }
 
@@ -208,18 +206,18 @@
             }
             else -> {
                 val resourceDefinition = resourceDictionaries[dictionaryName]
-                    ?: throw BluePrintProcessorException("couldn't get resource dictionary definition for $dictionaryName")
+                        ?: throw BluePrintProcessorException("couldn't get resource dictionary definition for $dictionaryName")
 
                 val resourceSource = resourceDefinition.sources[dictionarySource]
-                    ?: throw BluePrintProcessorException("couldn't get resource definition $dictionaryName source($dictionarySource)")
+                        ?: throw BluePrintProcessorException("couldn't get resource definition $dictionaryName source($dictionarySource)")
 
                 processorName = ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR
-                    .plus(resourceSource.type)
+                        .plus(resourceSource.type)
             }
         }
         checkNotEmptyOrThrow(processorName,
-            "couldn't get processor name for resource dictionary definition($dictionaryName) source" +
-                    "($dictionarySource)")
+                "couldn't get processor name for resource dictionary definition($dictionaryName) source" +
+                        "($dictionarySource)")
 
         return processorName
 
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessor.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessor.kt
index c2dbd73..6469e78 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessor.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessor.kt
@@ -20,10 +20,8 @@
 
 import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.CapabilityResourceSource
 import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.ResourceResolutionConstants.PREFIX_RESOURCE_RESOLUTION_PROCESSOR
-import org.onap.ccsdk.apps.blueprintsprocessor.services.execution.scripts.BlueprintJythonService
-import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.apps.blueprintsprocessor.services.execution.ComponentFunctionScriptingService
 import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
-import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintScriptsService
 import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
 import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment
 import org.slf4j.LoggerFactory
@@ -31,14 +29,16 @@
 import org.springframework.context.ApplicationContext
 import org.springframework.context.annotation.Scope
 import org.springframework.stereotype.Service
-import java.io.File
 
 @Service("${PREFIX_RESOURCE_RESOLUTION_PROCESSOR}source-capability")
 @Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-open class CapabilityResourceResolutionProcessor(private var applicationContext: ApplicationContext,
-                                                 private val bluePrintScriptsService: BluePrintScriptsService,
-                                                 private val bluePrintJythonService: BlueprintJythonService) :
-        ResourceAssignmentProcessor() {
+open class CapabilityResourceResolutionProcessor(private val applicationContext: ApplicationContext,
+                                                 private var componentFunctionScriptingService: ComponentFunctionScriptingService)
+    : ResourceAssignmentProcessor() {
+
+    private val log = LoggerFactory.getLogger(CapabilityResourceResolutionProcessor::class.java)
+
+    var componentResourceAssignmentProcessor: ResourceAssignmentProcessor? = null
 
     override fun getName(): String {
         return "${PREFIX_RESOURCE_RESOLUTION_PROCESSOR}source-capability"
@@ -62,118 +62,43 @@
 
         val scriptType = capabilityResourceSourceProperty.scriptType
         val scriptClassReference = capabilityResourceSourceProperty.scriptClassReference
+        val instanceDependencies = capabilityResourceSourceProperty.instanceDependencies ?: listOf()
 
-        var componentResourceAssignmentProcessor: ResourceAssignmentProcessor? = null
+        componentResourceAssignmentProcessor = scriptInstance(scriptType, scriptClassReference, instanceDependencies)
 
-        when (scriptType) {
-            BluePrintConstants.SCRIPT_KOTLIN -> {
-                componentResourceAssignmentProcessor = getKotlinResourceAssignmentProcessorInstance(scriptClassReference,
-                        capabilityResourceSourceProperty.instanceDependencies)
-            }
-            BluePrintConstants.SCRIPT_INTERNAL -> {
-                // Initialize Capability Resource Assignment Processor
-                componentResourceAssignmentProcessor = applicationContext.getBean(scriptClassReference, ResourceAssignmentProcessor::class.java)
-            }
-            BluePrintConstants.SCRIPT_JYTHON -> {
-                val content = getJythonContent(scriptClassReference)
-                componentResourceAssignmentProcessor = getJythonResourceAssignmentProcessorInstance(scriptClassReference,
-                        content, capabilityResourceSourceProperty.instanceDependencies)
-            }
+        checkNotNull(componentResourceAssignmentProcessor) {
+            "failed to get capability resource assignment processor($scriptClassReference)"
         }
 
-        checkNotNull(componentResourceAssignmentProcessor) { "failed to get capability resource assignment processor($scriptClassReference)" }
-
         // Assign Current Blueprint runtime and ResourceDictionaries
-        componentResourceAssignmentProcessor.raRuntimeService = raRuntimeService
-        componentResourceAssignmentProcessor.resourceDictionaries = resourceDictionaries
+        componentResourceAssignmentProcessor!!.raRuntimeService = raRuntimeService
+        componentResourceAssignmentProcessor!!.resourceDictionaries = resourceDictionaries
 
         // Invoke componentResourceAssignmentProcessor
-        componentResourceAssignmentProcessor.apply(resourceAssignment)
+        componentResourceAssignmentProcessor!!.apply(resourceAssignment)
     }
 
     override fun recover(runtimeException: RuntimeException, resourceAssignment: ResourceAssignment) {
-
-        TODO("To Implement")
-    }
-
-    private fun getKotlinResourceAssignmentProcessorInstance(scriptClassName: String,
-                                                             instanceNames: List<String>? = null): ResourceAssignmentProcessor {
-        var scriptPropertyInstances: MutableMap<String, Any>? = null
-
-        if (instanceNames != null && instanceNames.isNotEmpty()) {
-            scriptPropertyInstances = hashMapOf()
-            instanceNames.forEach {
-                scriptPropertyInstances[it] = applicationContext.getBean(it)
-                        ?: throw BluePrintProcessorException("couldn't get the dependency instance($it)")
-            }
+        log.info("Recovering for : ${resourceAssignment.name} : ${runtimeException.toString()}")
+        if (componentResourceAssignmentProcessor != null) {
+            componentResourceAssignmentProcessor!!.recover(runtimeException, resourceAssignment)
         }
-
-        return getKotlinResourceAssignmentProcessorInstance(scriptClassName, scriptPropertyInstances)
-
     }
 
-    fun getKotlinResourceAssignmentProcessorInstance(scriptClassName: String,
-                                                     scriptPropertyInstances: MutableMap<String, Any>? = null):
-            ResourceAssignmentProcessor {
+    fun scriptInstance(scriptType: String, scriptClassReference: String, instanceDependencies: List<String>)
+            : ResourceAssignmentProcessor {
 
-        val resourceAssignmentProcessor = bluePrintScriptsService
-                .scriptInstance<ResourceAssignmentProcessor>(raRuntimeService.bluePrintContext(),
-                        scriptClassName, false)
+        log.info("creating resource resolution of script type($scriptType), reference name($scriptClassReference) and" +
+                "instanceDependencies($instanceDependencies)")
 
-        // Add additional Instance
-        if (scriptPropertyInstances != null) {
-            resourceAssignmentProcessor.scriptPropertyInstances = scriptPropertyInstances
+        val scriptComponent = componentFunctionScriptingService
+                .scriptInstance<ResourceAssignmentProcessor>(raRuntimeService.bluePrintContext(), scriptType,
+                        scriptClassReference)
+
+        instanceDependencies.forEach { instanceDependency ->
+            scriptPropertyInstances[instanceDependency] = applicationContext
+                    .getBean(instanceDependency)
         }
-
-        return resourceAssignmentProcessor
-    }
-
-    private fun getJythonContent(instanceName: String): String {
-        val absolutePath = raRuntimeService.bluePrintContext().rootPath
-                .plus(File.separator)
-                .plus(BluePrintConstants.TOSCA_SCRIPTS_JYTHON_DIR)
-                .plus(File.separator)
-                .plus("$instanceName.py")
-
-        return JacksonUtils.getContent(absolutePath)
-
-    }
-
-    /**
-     * getJythonResourceAssignmentProcessorInstance Purpose: prepare the jython
-     * executor component as a resource assignment processor
-     *
-     * @param pythonClassName String
-     * @param content String
-     * @param dependencyInstances List<String>
-     * @return resourceAssignmentProcessor ResourceAssignmentProcessor
-     */
-    private fun getJythonResourceAssignmentProcessorInstance(pythonClassName: String, content: String,
-                                                             dependencyInstances: List<String>?):
-            ResourceAssignmentProcessor {
-        val jythonContextInstance: MutableMap<String, Any> = hashMapOf()
-        jythonContextInstance["log"] = LoggerFactory.getLogger(pythonClassName)
-        jythonContextInstance["raRuntimeService"] = raRuntimeService
-        dependencyInstances?.forEach { instanceName ->
-            jythonContextInstance[instanceName] = applicationContext.getBean(instanceName)
-        }
-
-        return getJythonResourceAssignmentProcessorInstance(pythonClassName, content, jythonContextInstance)
-    }
-
-    fun getJythonResourceAssignmentProcessorInstance(pythonClassName: String, content: String,
-                                                     dependencyInstances: MutableMap<String, Any>):
-            ResourceAssignmentProcessor {
-
-        val resourceAssignmentProcessor = bluePrintJythonService
-                .jythonInstance<ResourceAssignmentProcessor>(raRuntimeService.bluePrintContext(), pythonClassName,
-                        content, dependencyInstances)
-
-        // Add additional Instance
-        if (dependencyInstances != null) {
-            resourceAssignmentProcessor.scriptPropertyInstances = dependencyInstances
-        }
-
-        return resourceAssignmentProcessor
+        return scriptComponent
     }
 }
\ No newline at end of file
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/processor/ResourceAssignmentProcessor.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/processor/ResourceAssignmentProcessor.kt
index 64cc1d2..8e9606c 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/processor/ResourceAssignmentProcessor.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/processor/ResourceAssignmentProcessor.kt
@@ -37,7 +37,7 @@
     lateinit var raRuntimeService: ResourceAssignmentRuntimeService
     lateinit var resourceDictionaries: MutableMap<String, ResourceDefinition>
 
-    var scriptPropertyInstances: Map<String, Any> = hashMapOf()
+    var scriptPropertyInstances: MutableMap<String, Any> = hashMapOf()
 
     /**
      * This will be called from the scripts to serve instance from runtime to scripts.
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessorTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessorTest.kt
index f779054..6da3fd7 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessorTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessorTest.kt
@@ -21,6 +21,7 @@
 import org.junit.Test
 import org.junit.runner.RunWith
 import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.ResourceAssignmentRuntimeService
+import org.onap.ccsdk.apps.blueprintsprocessor.services.execution.ComponentFunctionScriptingService
 import org.onap.ccsdk.apps.blueprintsprocessor.services.execution.scripts.BlueprintJythonService
 import org.onap.ccsdk.apps.blueprintsprocessor.services.execution.scripts.PythonExecutorProperty
 import org.onap.ccsdk.apps.controllerblueprints.core.data.PropertyDefinition
@@ -36,7 +37,8 @@
 import kotlin.test.assertNotNull
 
 @RunWith(SpringRunner::class)
-@ContextConfiguration(classes = [CapabilityResourceResolutionProcessor::class, BluePrintScriptsServiceImpl::class,
+@ContextConfiguration(classes = [CapabilityResourceResolutionProcessor::class, ComponentFunctionScriptingService::class,
+    BluePrintScriptsServiceImpl::class,
     BlueprintJythonService::class, PythonExecutorProperty::class, MockCapabilityService::class])
 @TestPropertySource(properties =
 ["blueprints.processor.functions.python.executor.modulePaths=./../../../../components/scripts/python/ccsdk_blueprints",
@@ -62,9 +64,11 @@
         scriptPropertyInstances["mock-service1"] = MockCapabilityService()
         scriptPropertyInstances["mock-service2"] = MockCapabilityService()
 
+        val instanceDependencies: List<String> = listOf()
+
         val resourceAssignmentProcessor = capabilityResourceResolutionProcessor
-                .getKotlinResourceAssignmentProcessorInstance(
-                        "ResourceAssignmentProcessor_cba\$ScriptResourceAssignmentProcessor", scriptPropertyInstances)
+                .scriptInstance("kotlin",
+                        "ResourceAssignmentProcessor_cba\$ScriptResourceAssignmentProcessor", instanceDependencies)
 
         assertNotNull(resourceAssignmentProcessor, "couldn't get kotlin script resource assignment processor")
 
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/capability/jython-resource-definitions.json b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/capability/jython-resource-definitions.json
index fe89291..b565eec 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/capability/jython-resource-definitions.json
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/capability/jython-resource-definitions.json
@@ -11,7 +11,7 @@
       "type": "source-capability",
       "properties": {
         "script-type": "jython",
-        "script-class-reference": "SampleRAProcessor",
+        "script-class-reference": "Scripts/python/SampleRAProcessor.py",
         "instance-dependencies": []
       }
     }
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/execution/ComponentFunctionScriptingService.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/execution/ComponentFunctionScriptingService.kt
index ecdd454..9bae4eb 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/execution/ComponentFunctionScriptingService.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/execution/ComponentFunctionScriptingService.kt
@@ -20,6 +20,7 @@
 import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
 import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
 import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BluePrintScriptsService
+import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BlueprintFunctionNode
 import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext
 import org.slf4j.LoggerFactory
 import org.springframework.context.ApplicationContext
@@ -34,19 +35,24 @@
 
     fun <T : AbstractComponentFunction> scriptInstance(componentFunction: AbstractComponentFunction, scriptType: String,
                                                        scriptClassReference: String,
-                                                       instanceDependencies: MutableList<String>): T {
+                                                       instanceDependencies: List<String>): T {
+
         log.info("creating component function of script type($scriptType), reference name($scriptClassReference) and " +
                 "instanceDependencies($instanceDependencies)")
 
         val scriptComponent: T = scriptInstance(componentFunction.bluePrintRuntimeService.bluePrintContext(),
                 scriptType, scriptClassReference)
-        populateScriptDependencies(scriptComponent, instanceDependencies)
+       // Populate Instance Properties
+        instanceDependencies.forEach { instanceDependency ->
+            componentFunction.functionDependencyInstances[instanceDependency] = applicationContext
+                    .getBean(instanceDependency)
+        }
         return scriptComponent
     }
 
 
-    fun <T : AbstractComponentFunction> scriptInstance(bluePrintContext: BluePrintContext, scriptType: String,
-                                                       scriptClassReference: String): T {
+    fun <T : BlueprintFunctionNode<*, *>> scriptInstance(bluePrintContext: BluePrintContext, scriptType: String,
+                                                         scriptClassReference: String): T {
         var scriptComponent: T? = null
 
         when (scriptType) {
@@ -66,12 +72,4 @@
         return scriptComponent
     }
 
-
-    private fun populateScriptDependencies(componentFunction: AbstractComponentFunction,
-                                   instanceDependencies: MutableList<String>) {
-        instanceDependencies.forEach { instanceDependency ->
-            componentFunction.functionDependencyInstances[instanceDependency] = applicationContext
-                    .getBean(instanceDependency)
-        }
-    }
 }
\ No newline at end of file
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/execution/scripts/BlueprintJythonService.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/execution/scripts/BlueprintJythonService.kt
index 9c03901..3937f27 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/execution/scripts/BlueprintJythonService.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/execution/scripts/BlueprintJythonService.kt
@@ -22,6 +22,7 @@
 import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException
 import org.onap.ccsdk.apps.controllerblueprints.core.checkNotEmptyOrThrow
 import org.onap.ccsdk.apps.controllerblueprints.core.data.OperationAssignment
+import org.onap.ccsdk.apps.controllerblueprints.core.interfaces.BlueprintFunctionNode
 import org.onap.ccsdk.apps.controllerblueprints.core.service.BluePrintContext
 import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils
 import org.slf4j.Logger
@@ -55,7 +56,7 @@
     }
 
     fun jythonComponentInstance(bluePrintContext: BluePrintContext, scriptClassReference: String):
-            AbstractComponentFunction {
+            BlueprintFunctionNode<*, *> {
         val blueprintBasePath: String = bluePrintContext.rootPath
 
         val pythonFileName = bluePrintContext.rootPath
@@ -74,7 +75,7 @@
         val jythonInstances: MutableMap<String, Any> = hashMapOf()
         jythonInstances["log"] = LoggerFactory.getLogger(pythonClassName)
 
-        return jythonInstance<AbstractComponentFunction>(bluePrintContext, pythonClassName,
+        return jythonInstance<BlueprintFunctionNode<*, *>>(bluePrintContext, pythonClassName,
                 content, jythonInstances)
     }
 
