Execute FCCS pre-seeded Business Rules Using Groovy
Summary
This article describes approaches to execute FCCS pre-seeded Business Rules Using GroovyContent
Approach – Using Other Web Service Provider Named Connection
Named Connection Creation
- Create a new Other Web Service Provider based connection named "Consolidation Application"
- Provide full URL ending with /HyperionPlanning
- Provide User credentials to be used to execute Groovy Rule
- Save and Close
Groovy Script
/*RTPS: {Scenario} {Years} {Period} {Entity}*/ String sScenario = rtps.Scenario.toString() String sYears = rtps.Years.toString() String sPeriod = rtps.Period.toString() String sEntity = rtps.Entity.toString()
def uri = "/rest/v3/applications/" + operation.application.getName() + "/jobs" HttpResponse<String> jsonResponse = operation.application.getConnection("Consolidation Application").post(uri) .header("Content-Type", "application/json") .body(json(["jobType" : "Rules", "jobName" : "Translate", "parameters": [ "Currency":"USD_Reporting", "Scenario":"${sScenario}", "Entity":"${sEntity}", "Year":"${sYears}", "Period":"${sPeriod}" ] ])).asString()
Tagged:
4