Groovy script to pass subvariable in DLR
Summary:
Hi Experts,
Im trying to pass subvariable for start period and end period on the Json payload , it shows the method is invalid, it might be an easy one for you guys, where Im missing, pls correct me
def strsPeriod = operation.application.getSubstitutionVariableValue("CurPeriod")
if (strsPeriod == null)
throwVetoException("Substitution Variable CurPeriod not present or set.")
print strsperiod
HttpResponse<String> jsonResponse = operation.application.getConnection("MQ").post()
.body(json(["jobType":"INTEGRATION", "jobName":"SRULE", "startPeriod":"Feb-23", "endPeriod":"Feb-23", "importMode":"REPLACE", "exportMode":"STORE_DATA"]))
.asString();
Content (please ensure you mask any confidential information):
Version (include the version you are using, if applicable):
Code Snippet (add any code snippets that support your topic, if applicable):