summaryrefslogtreecommitdiffstats
path: root/examples/examples-grpc/src/main/resources/logic/CreateSubscriptionPayloadTask.js
diff options
context:
space:
mode:
Diffstat (limited to 'examples/examples-grpc/src/main/resources/logic/CreateSubscriptionPayloadTask.js')
-rw-r--r--examples/examples-grpc/src/main/resources/logic/CreateSubscriptionPayloadTask.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/examples-grpc/src/main/resources/logic/CreateSubscriptionPayloadTask.js b/examples/examples-grpc/src/main/resources/logic/CreateSubscriptionPayloadTask.js
index 85e7ae2e9..4cacf81e0 100644
--- a/examples/examples-grpc/src/main/resources/logic/CreateSubscriptionPayloadTask.js
+++ b/examples/examples-grpc/src/main/resources/logic/CreateSubscriptionPayloadTask.js
@@ -1,6 +1,7 @@
/*
* ============LICENSE_START=======================================================
* Copyright (C) 2020 Nordix. All rights reserved.
+ * Modifications Copyright (C) 2022 Bell Canada. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,7 +23,7 @@ executor.logger.info(executor.subject.id);
var pmSubscriptionInfo = executor.getContextAlbum("PMSubscriptionAlbum").get(executor.inFields.get("albumID").toString())
-var payloadProperties = executor.subject.getOutFieldSchemaHelper("payload").createNewSubInstance("create_DasH_subscription_DasH_properties_record");
+var payloadProperties = new java.util.HashMap();
payloadProperties.put("nfName", pmSubscriptionInfo.get("nfName"))
payloadProperties.put("subscriptionName", pmSubscriptionInfo.get("subscription").get("subscriptionName"))
@@ -31,12 +32,12 @@ payloadProperties.put("fileBasedGP", pmSubscriptionInfo.get("subscription").get
payloadProperties.put("fileLocation", pmSubscriptionInfo.get("subscription").get("fileLocation"))
payloadProperties.put("measurementGroups", pmSubscriptionInfo.get("subscription").get("measurementGroups"))
-var payloadEntry = executor.subject.getOutFieldSchemaHelper("payload").createNewSubInstance("CDSRequestPayloadEntry");
-payloadEntry.put("create_DasH_subscription_DasH_properties", payloadProperties)
+var payloadEntry = new java.util.HashMap();
+payloadEntry.put("create-subscription-properties", payloadProperties)
-var payload = executor.subject.getOutFieldSchemaHelper("payload").createNewInstance();
+var payload = new java.util.HashMap();
var payloadSchemaHelper = executor.subject.getOutFieldSchemaHelper("payload");
-payload.put("create_DasH_subscription_DasH_request", payloadEntry);
+payload.put("create-subscription-request", payloadEntry);
executor.logger.info("CDS payload - " + executor.stringify2Json( payload, payloadSchemaHelper));