summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/services/workflow-service
diff options
context:
space:
mode:
authorMuthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>2018-12-06 13:25:36 -0500
committerMuthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>2018-12-06 13:25:36 -0500
commitd9fdc75c0db6150363a3bd63055fe5f323ce1727 (patch)
treeb6d53ece4032c946e847ea056b8e6f6cb402dd13 /ms/blueprintsprocessor/modules/services/workflow-service
parent399d095989a019d3d172a3deb3e25f100a48510a (diff)
Store step inputs to blueprint runtime service.
Change-Id: Ib01edfc358625d25ac0625f88739c7c57f7f967c Issue-ID: CCSDK-670 Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>
Diffstat (limited to 'ms/blueprintsprocessor/modules/services/workflow-service')
-rw-r--r--ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/workflow/executor/ComponentExecuteNodeExecutor.kt15
1 files changed, 8 insertions, 7 deletions
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<String, JsonNode> = 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<String, JsonNode> = 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)