E9.2 Manipulate Outputs - Groovy

PavelK

Member
Hello,
In goovy "Manipulate Outputs" i would like print variables what was defined before (Input, dataselections or from forms)
Are you know how to do?
I found only how to add print "Thanks for using Weather Forecast".
For example how to print variable DOC, KCO, ICU etc?
-----------------------------
import groovy.json.JsonSlurper;
import groovy.json.JsonBuilder;
import com.oracle.e1.common.OrchestrationAttributes;
String main(OrchestrationAttributes orchAttr, String input)
{
def jsonIn = new JsonSlurper().parseText(input);
jsonIn["groovy"] = "Thanks for using Weather Forecast";


// modify jsonIn;
def jsonOut = new JsonBuilder(jsonIn).toString();
// orchAttr.writeWarn("custom log entry - warning");
// orchAttr.writeDebug("custom log entry - debug");
return jsonOut;
}
 
I don't think you need to use Manipulate Outputs to return the Inputs, depending on the version of Orch Studio, it should just be something that you can select.
 

Attachments

  • Example Screen.png
    Example Screen.png
    51.3 KB · Views: 149
yes, but is there a way to simplify this output. Say if we want to add a Flag = Success / Failure based on record is inserted ?
 
Hello,
In goovy "Manipulate Outputs" i would like print variables what was defined before (Input, dataselections or from forms)
Are you know how to do?
I found only how to add print "Thanks for using Weather Forecast".
For example how to print variable DOC, KCO, ICU etc?
-----------------------------
import groovy.json.JsonSlurper;
import groovy.json.JsonBuilder;
import com.oracle.e1.common.OrchestrationAttributes;
String main(OrchestrationAttributes orchAttr, String input)
{
def jsonIn = new JsonSlurper().parseText(input);
jsonIn["groovy"] = "Thanks for using Weather Forecast";


// modify jsonIn;
def jsonOut = new JsonBuilder(jsonIn).toString();
// orchAttr.writeWarn("custom log entry - warning");
// orchAttr.writeDebug("custom log entry - debug");
return jsonOut;
}
You just want some debug logging of the variablevalues? If so just use some orchAttr.writeWarn() statements then view the AIS log using the JDE Server Manager.
 
Hello everyone, i need change the outputs add any tags and other Array. Any ideas?
 
Back
Top