Fix the transform-templating for referenced complex types
[ccsdk/cds.git] / ms / blueprintsprocessor / functions / resource-resolution / src / main / kotlin / org / onap / ccsdk / cds / blueprintsprocessor / functions / resource / resolution / utils / ResourceAssignmentUtils.kt
index 7ab3126..8bc78dd 100644 (file)
@@ -136,7 +136,7 @@ class ResourceAssignmentUtils {
                 ?.let { if (it.contains("$")) it else null }
                 ?.let { template ->
                     val resolutionStore = raRuntimeService.getResolutionStore()
-                        .mapValues { e -> e.value.asText() } as MutableMap<String, Any>
+                        .mapValues { e -> if (e.value.isTextual) e.value.asText() else JacksonUtils.getJson(e.value) } as MutableMap<String, Any>
                     val newValue: JsonNode
                     try {
                         newValue = BluePrintVelocityTemplateService