summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules
diff options
context:
space:
mode:
Diffstat (limited to 'ms/blueprintsprocessor/modules')
-rw-r--r--ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintError.kt2
-rw-r--r--ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionService.kt3
2 files changed, 3 insertions, 2 deletions
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintError.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintError.kt
index 1ac49d6fe..18dcd16f7 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintError.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/main/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BluePrintError.kt
@@ -35,4 +35,6 @@ class BluePrintError {
fun allErrors(): List<String> = errors.values.flatten()
fun stepErrors(stepName: String): MutableList<String>? = errors[stepName]
+
+ fun clearAll() = errors.clear();
}
diff --git a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionService.kt b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionService.kt
index b8350f4f1..fbe51acae 100644
--- a/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionService.kt
+++ b/ms/blueprintsprocessor/modules/services/workflow-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/workflow/ImperativeWorkflowExecutionService.kt
@@ -119,6 +119,7 @@ open class ImperativeBluePrintWorkflowService(private val nodeTemplateExecutionS
}
message = BluePrintConstants.STATUS_FAILURE
} else {
+ bluePrintRuntimeService.getBluePrintError().clearAll()
message = BluePrintConstants.STATUS_SUCCESS
}
eventType = EventType.EVENT_COMPONENT_EXECUTED.name
@@ -163,8 +164,6 @@ open class ImperativeBluePrintWorkflowService(private val nodeTemplateExecutionS
.executeNodeTemplate(bluePrintRuntimeService, node.id, nodeTemplateName, nodeInput)
if (executionServiceOutput.status.message == BluePrintConstants.STATUS_FAILURE) {
- // Clear step errors so that the workflow does not fail
- bluePrintRuntimeService.getBluePrintError().stepErrors(node.id)?.clear()
return EdgeLabel.FAILURE
}