diff options
2 files changed, 6 insertions, 2 deletions
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponent.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponent.kt index b38ebb1b0..df7e0482c 100644 --- a/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponent.kt +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponent.kt @@ -51,6 +51,9 @@ open class ResourceResolutionComponent(private val resourceResolutionService: Re properties[ResourceResolutionConstants.RESOURCE_RESOLUTION_INPUT_OCCURRENCE] = occurrence val jsonResponse = JsonNodeFactory.instance.objectNode() + // Initialize Output Attribute to empty JSON + bluePrintRuntimeService.setNodeTemplateAttributeValue(nodeTemplateName, + ResourceResolutionConstants.OUTPUT_ASSIGNMENT_PARAMS, jsonResponse) // validate inputs if we need to store the resource and template resolution. if (storeResult) { @@ -84,7 +87,7 @@ open class ResourceResolutionComponent(private val resourceResolutionService: Re } - // Set Output Attributes + // Set Output Attributes with resolved value bluePrintRuntimeService.setNodeTemplateAttributeValue(nodeTemplateName, ResourceResolutionConstants.OUTPUT_ASSIGNMENT_PARAMS, jsonResponse) } diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentTest.kt index 560bc4142..b63fa6798 100644 --- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentTest.kt +++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/resource/resolution/ResourceResolutionComponentTest.kt @@ -71,6 +71,8 @@ class ResourceResolutionComponentTest { resourceResolutionComponent.stepName = "step" resourceResolutionComponent.interfaceName = "interfaceName" resourceResolutionComponent.operationName = "operationName" + + every { bluePrintRuntimeService.setNodeTemplateAttributeValue(any(), any(), any()) } returns Unit } @Test @@ -139,7 +141,6 @@ class ResourceResolutionComponentTest { any<List<String>>(), any<MutableMap<String, Any>>()) } returns mutableMapOf() - every { bluePrintRuntimeService.setNodeTemplateAttributeValue(any(), any(), any()) } returns Unit runBlocking { |