Refactoring to enable on_failure for imperative workflow
[ccsdk/cds.git] / ms / blueprintsprocessor / modules / services / workflow-service / src / main / kotlin / org / onap / ccsdk / cds / blueprintsprocessor / services / workflow / executor / ComponentExecuteNodeExecutor.kt
index 2ff0606..2e3f78a 100644 (file)
@@ -48,10 +48,11 @@ open class ComponentExecuteNodeExecutor(private val nodeTemplateExecutionService
 
             val executionInput = ctx.getRequest() as ExecutionServiceInput
 
+            val stepName = executionInput.stepData?.name ?: nodeTemplateName
+
             try { // Get the Request from the Context and Set to the Function Input and Invoke the function
                 val executionOutput = nodeTemplateExecutionService.executeNodeTemplate(
-                    ctx.getBluePrintService(),
-                    nodeTemplateName, executionInput
+                    ctx.getBlueprintService(), stepName, nodeTemplateName, executionInput
                 )
 
                 ctx.setResponse(executionOutput)