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

Groovy to get all the jobid's running under pipeline

Summary:

Hi Experts,

We are exploring how to get all job's under running parent pipeline job For example

  1. Pipeline has 4 dlrs , want to get job'id of each process using Json loop then print subsequently dat files and log files
    abcplan_rtg_1233.dat
    abcplan_rtg_1234.dat
    /outbox/log/abcplan_rtg_1234.log

Currently , able to get pipeline Job id using groovy get method but unable to get all jobids under pipeline

Sample script

for(long delay = 50; status == IN_PROGRESS; delay = Math.min(1000, delay * 2)) {

                  sleep(delay)
xxxxResponse = operation.application.getConnection("xxxxxxx").get("/aif/rest/V1/xxxxxxx/" + jobId).asString()
status = JsonPath.parse(xxxxxResponse.body).read('$.status')

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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