From b96b44d6d7ca11dbbc3ad4bd2194df31fba5efb6 Mon Sep 17 00:00:00 2001 From: Jozsef Csongvai Date: Wed, 9 Dec 2020 19:49:48 -0500 Subject: Refactoring to enable on_failure for imperative workflow BlueprintError needs to associate errors with the steps in which they occurred in order for imperative workflow to handle on_failure properly. Made stepName more accessible and corrected places where stepName was assigned to nodeTemplateName. Issue-ID: CCSDK-3219 Change-Id: I7e5805745c63558cff6be533e1b99c32ad06c3db Signed-off-by: Jozsef Csongvai --- .../designer/api/enhancer/BlueprintEnhancerServiceImpl.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ms/blueprintsprocessor/modules/inbounds/designer-api/src') diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintEnhancerServiceImpl.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintEnhancerServiceImpl.kt index aa8b77a17..7603963a1 100644 --- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintEnhancerServiceImpl.kt +++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintEnhancerServiceImpl.kt @@ -78,8 +78,8 @@ open class BlueprintEnhancerServiceImpl( // Write the Enhanced Blueprint Resource Definitions ResourceDictionaryUtils.writeResourceDefinitionTypes(basePath, resourceDefinitions) - if (blueprintRuntimeService.getBlueprintError().errors.isNotEmpty()) { - throw BlueprintException(blueprintRuntimeService.getBlueprintError().errors.toString()) + if (blueprintRuntimeService.getBlueprintError().allErrors().isNotEmpty()) { + throw BlueprintException(blueprintRuntimeService.getBlueprintError().allErrors().toString()) } } catch (e: BlueprintProcessorException) { val errorMsg = "Error while enriching the CBA package." -- cgit 1.2.3-korg