aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/services
diff options
context:
space:
mode:
Diffstat (limited to 'ms/blueprintsprocessor/modules/services')
-rw-r--r--ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractComponentFunction.kt7
1 files changed, 6 insertions, 1 deletions
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractComponentFunction.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractComponentFunction.kt
index e2a594b08..3e329d7f5 100644
--- a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractComponentFunction.kt
+++ b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/services/execution/AbstractComponentFunction.kt
@@ -184,10 +184,15 @@ abstract class AbstractComponentFunction : BlueprintFunctionNode<ExecutionServic
return executionServiceInput.payload.jsonPathParse(".$requestExpression")
}
- fun artifactContent(artifactName: String): String {
+ suspend fun artifactContent(artifactName: String): String {
return bluePrintRuntimeService.resolveNodeTemplateArtifact(nodeTemplateName, artifactName)
}
+ suspend fun relationshipProperty(relationshipName: String, propertyName: String): JsonNode {
+ return bluePrintRuntimeService.resolveRelationshipTemplateProperties(relationshipName).get(propertyName)
+ ?: throw BluePrintProcessorException("failed to get relationship($relationshipName) property($propertyName)")
+ }
+
suspend fun mashTemplateNData(artifactName: String, json: String): String {
val content = artifactContent(artifactName)
return BluePrintVelocityTemplateService.generateContent(content, json)