From f8ef6b32ba67831c485330f6349ea773be566183 Mon Sep 17 00:00:00 2001 From: Eric Multanen Date: Thu, 30 May 2019 07:35:13 -0700 Subject: [PATCH] Remove oof_directives from user_directives Oof_directives - when populated with a json string, breaks the parsing of the user_directives. Since it is not needed in the user_directives, remove it. Change-Id: I0e2c3deef8266df52ac73b95209843ac31f986ef Issue-ID: SO-1939 Signed-off-by: Eric Multanen --- .../org/onap/so/bpmn/common/scripts/VfModuleBase.groovy | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VfModuleBase.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VfModuleBase.groovy index 07d8ec9b8e..e261fb9fdd 100644 --- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VfModuleBase.groovy +++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/VfModuleBase.groovy @@ -519,12 +519,14 @@ public abstract class VfModuleBase extends AbstractServiceTaskProcessor { String vnfKey = entry.getKey() String vnfValue = entry.getValue() paramsMap.put("$vnfKey", "$vnfValue") - if (pcnt > 0) { - userDirectivesBuilder.append(",") + if (!"oof_directives".equals(vnfKey)) { + if (pcnt > 0) { + userDirectivesBuilder.append(",") + } + pcnt++ + userDirectivesBuilder.append("{\"attribute_name\":\"${vnfKey}\",") + userDirectivesBuilder.append("\"attribute_value\":\"${vnfValue}\"}") } - pcnt++ - userDirectivesBuilder.append("{\"attribute_name\":\"${vnfKey}\",") - userDirectivesBuilder.append("\"attribute_value\":\"${vnfValue}\"}") } if (pcnt > 0) { userDirectives = userDirectivesBuilder.append("]}").toString() -- 2.16.6