Thank you for supporting the Cloud Customer Connect Community in 2024. It's a gift to work with you!

Look back
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

Using groovy to promote a planning unit - syntax

We are building a groovy rule that will allow users to promote a planning unit.

However, our json response and body is returning

201

{"links":null,"type":"HP"}

Do we have syntax issue?

We've compared to the documented example, but we are not able to identify any differences

body='actionID=6&pmMembers="Entity1: Project1"&comments="promoting"'

    println("HardCoded body:\n$body") 
    HttpResponse<String> jsonResponse = connection.post("/planningunits/OEP_Plan::OEP_Working/actions")
     .header("Content-type", "application/x-www-form-urlencoded")
     .body(body)
     .asString();
      println (jsonResponse.status);
	  println (jsonResponse.body);

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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