summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/main/groovy/org
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main/groovy/org')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy21
1 files changed, 21 insertions, 0 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy
index 606b97bec2..34cbb00735 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy
@@ -22,6 +22,7 @@
package org.onap.so.bpmn.common.scripts
+import com.fasterxml.jackson.databind.ObjectMapper
import org.camunda.bpm.engine.delegate.DelegateExecution
import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
import org.onap.so.bpmn.common.scripts.ExceptionUtil
@@ -529,4 +530,24 @@ class OofUtils {
return UriBuilder.fromPath("").host(msbHost).port(msbPort).scheme("http").build().toString()
}
+
+ public String buildSelectNSTRequest(String requestId, Map<String, Object> profileInfo) {
+ def transactionId = requestId
+ logger.debug( "transactionId is: " + transactionId)
+ ObjectMapper objectMapper = new ObjectMapper()
+ String json = objectMapper.writeValueAsString(profileInfo)
+ StringBuilder response = new StringBuilder()
+ response.append(
+ "{\n" +
+ " \"requestInfo\": {\n" +
+ " \"transactionId\": \"${transactionId}\",\n" +
+ " \"requestId\": \"${requestId}\",\n" +
+ " \"sourceId\": \"so\",\n" +
+ " \"timeout\": 600\n" +
+ " },\n")
+ response.append(",\n \"serviceInfo\": \n")
+ response.append(json);
+ response.append("\n }\n")
+ return response.toString()
+ }
}