You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Invoking a Business rule via Groovy

edited Jul 14, 2020 5:41PM in Planning 11 comments

Summary

Invoking a Business rule via Groovy

Content

Hi all,

I am trying to execute a business rule via groovy. However it does not run. Can you help me?

Below the code:

def body = new JSONObject()
.put("jobType","RULES")
.put("jobName","G.00. Process Control- Consol")
     .put("parameters",[["RTP_Account":"A_Consolidation_Adjustments_Submission","RTP_Consol_P_Status":"4","RTP_Entity":"No Entity"]])
     .toString()
 
 HttpResponse <String> jsonResponseRefresh = operation.application.getConnection("JOBS").post()
 .header("Content-Type", "application/json")
 .body(body)
 .asString()
 

Version

20.04.58

Code Snippet

def body = new JSONObject()
	 .put("jobType","RULES")
	 .put("jobName","G.00. Process Control- Consol")
     .put("parameters",[["RTP_Account":"A_Consolidation_Adjustments_Submission","RTP_Consol_P_Status":"4","RTP_Entity":"No Entity"]])
     .toString()
 
 HttpResponse <String> jsonResponseRefresh = operation.application.getConnection("JOBS").post()
 .header("Content-Type", "application/json")
 .body(body)
 .asString()
 

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!