Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
What's best practice?
I have a groovy program that operates on STDIN, do I have to create a file first and pass the file name into tGroovy or can the file be fed (from tHttpRequest) and read from STDIN?
jji
Hello,
If I understand your requirement very well, do you want to use a tGroovy component to process rows?
Here is a tFlowtoIterate component which reads data line by line from the input flow and stores the data entries in iterative global variables.
The workflow looks like;
Input-->tflowtoiterate-->tGroovy(write your Groovy script).
Best regards
Sabrina
It's actually a json file that I want to parse in the Groovy script.
Right now I have to set an ENV var for fileIn and fileOut, and have the Groovy script use those vars to read and write the results. I was hoping for a cleaner script that would just read the json from STDIN and write the results to STDOUT.
jji