From d9fdc75c0db6150363a3bd63055fe5f323ce1727 Mon Sep 17 00:00:00 2001 From: "Muthuramalingam, Brinda Santh(bs2796)" Date: Thu, 6 Dec 2018 13:25:36 -0500 Subject: Store step inputs to blueprint runtime service. Change-Id: Ib01edfc358625d25ac0625f88739c7c57f7f967c Issue-ID: CCSDK-670 Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) --- .../workflow/executor/ComponentExecuteNodeExecutor.kt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'ms/blueprintsprocessor/modules/services/workflow-service/src') diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/workflow/executor/ComponentExecuteNodeExecutor.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/workflow/executor/ComponentExecuteNodeExecutor.kt index 87c0c539..e514a1fb 100644 --- a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/workflow/executor/ComponentExecuteNodeExecutor.kt +++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/workflow/executor/ComponentExecuteNodeExecutor.kt @@ -21,6 +21,7 @@ import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInp import org.onap.ccsdk.apps.blueprintsprocessor.services.execution.AbstractComponentFunction import org.onap.ccsdk.apps.blueprintsprocessor.services.workflow.BlueprintSvcLogicContext import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants +import org.onap.ccsdk.apps.controllerblueprints.core.asJsonNode import org.onap.ccsdk.apps.controllerblueprints.core.putJsonElement import org.onap.ccsdk.sli.core.sli.SvcLogicContext import org.onap.ccsdk.sli.core.sli.SvcLogicException @@ -69,18 +70,18 @@ open class ComponentExecuteNodeExecutor : ExecuteNodeExecutor() { val plugin = this.getComponentFunction(componentName) // Set the Blueprint Service plugin.bluePrintRuntimeService = ctx.getBluePrintService() + plugin.stepName = nodeTemplateName val executionInput = ctx.getRequest() as ExecutionServiceInput - val metaData = executionInput.metadata - metaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_STEP, nodeTemplateName) // Populate Step Meta Data - val stepMetaData: MutableMap = hashMapOf() - stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE, nodeTemplateName) - stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_INTERFACE, interfaceName) - stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_OPERATION, operationName) + val stepInputs: MutableMap = hashMapOf() + stepInputs.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE, nodeTemplateName) + stepInputs.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_INTERFACE, interfaceName) + stepInputs.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_OPERATION, operationName) + + plugin.bluePrintRuntimeService!!.put("$nodeTemplateName-step-inputs", stepInputs.asJsonNode()) - metaData.putJsonElement("$nodeTemplateName-step-inputs", stepMetaData) // Get the Request from the Context and Set to the Function Input and Invoke the function val executionOutput = plugin.apply(executionInput) -- cgit 1.2.3-korg