diff options
Diffstat (limited to 'ms/blueprintsprocessor/modules/services/workflow-service/src/main')
-rw-r--r-- | ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BluePrintWorkflowExecutionServiceImpl.kt | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BluePrintWorkflowExecutionServiceImpl.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BluePrintWorkflowExecutionServiceImpl.kt index 8a699d8d2..240348081 100644 --- a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BluePrintWorkflowExecutionServiceImpl.kt +++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/BluePrintWorkflowExecutionServiceImpl.kt @@ -90,12 +90,22 @@ open class BluePrintWorkflowExecutionServiceImpl( } executionServiceOutput.commonHeader = executionServiceInput.commonHeader executionServiceOutput.actionIdentifiers = executionServiceInput.actionIdentifiers + // Resolve Workflow Outputs - val workflowOutputs = bluePrintRuntimeService.resolveWorkflowOutputs(workflowName) + var workflowOutputs: MutableMap<String, JsonNode>? = null + try { + workflowOutputs = bluePrintRuntimeService.resolveWorkflowOutputs(workflowName) + } catch (e: RuntimeException) { + log.error("Failed to resolve outputs for workflow: $workflowName", e) + e.message?.let { bluePrintRuntimeService.getBluePrintError().errors.add(it) } + } // Set the Response Payload executionServiceOutput.payload = JacksonUtils.objectMapper.createObjectNode() - executionServiceOutput.payload.set<JsonNode>("$workflowName-response", workflowOutputs.asObjectNode()) + executionServiceOutput.payload.set<JsonNode>( + "$workflowName-response", + workflowOutputs?.asObjectNode() ?: JacksonUtils.objectMapper.createObjectNode() + ) return executionServiceOutput } } |