summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/inbounds
diff options
context:
space:
mode:
Diffstat (limited to 'ms/blueprintsprocessor/modules/inbounds')
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/enhancer/BlueprintEnhancerServiceImpl.kt4
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandler.kt6
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/KafkaPublishAuditService.kt4
3 files changed, 5 insertions, 9 deletions
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."
diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandler.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandler.kt
index 3d8cc04ef..8c958c4b4 100644
--- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandler.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/ExecutionServiceHandler.kt
@@ -42,7 +42,6 @@ import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintDependencyS
import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
import org.slf4j.LoggerFactory
import org.springframework.stereotype.Service
-import java.util.stream.Collectors
@Service
class ExecutionServiceHandler(
@@ -119,10 +118,9 @@ class ExecutionServiceHandler(
executionServiceInput, hashMapOf()
)
- val errors = blueprintRuntimeService.getBlueprintError().errors
+ val errors = blueprintRuntimeService.getBlueprintError().allErrors()
if (errors.isNotEmpty()) {
- val errorMessage = errors.stream().map { it.toString() }.collect(Collectors.joining(", "))
- setErrorStatus(errorMessage, executionServiceOutput.status)
+ setErrorStatus(errors.joinToString(", "), executionServiceOutput.status)
}
}
} catch (e: Exception) {
diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/KafkaPublishAuditService.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/KafkaPublishAuditService.kt
index 8be43cc94..46befee8a 100644
--- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/KafkaPublishAuditService.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/KafkaPublishAuditService.kt
@@ -169,9 +169,7 @@ class KafkaPublishAuditService(
val blueprintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(requestId, basePath.toString())
val blueprintContext = blueprintRuntimeService.bluePrintContext()
- val workflowSteps = blueprintContext.workflowByName(workflowName).steps
- checkNotNull(workflowSteps) { "Failed to get step(s) for workflow($workflowName)" }
- workflowSteps.forEach { step ->
+ blueprintContext.workflowSteps(workflowName).forEach { step ->
val nodeTemplateName = step.value.target
checkNotNull(nodeTemplateName) { "Failed to get node template target for workflow($workflowName), step($step)" }
val nodeTemplate = blueprintContext.nodeTemplateByName(nodeTemplateName)