Quantcast
Channel: SCN : Unanswered Discussions - SAP Business Process Automation by Redwood
Viewing all articles
Browse latest Browse all 646

Running the jobs sequentially instead of parallel

$
0
0

Hi All,

My script runs multiple jobs by iterating in a loop one by one. They are getting executed in parallel where as i want them to run sequentially one only after another has finished execution. For ensuring this i have added this logic in my code:

 

[Code for Job name reading, parameters setting goes here]

jcsSession.persist();

while (((infoJob.getStatus().toString().matches("Scheduled")) || (infoJob.getStatus().toString().matches("Running"))) {

  jcsOut.println("infojob still running"+infoJob.getStatus().toString());

}

 

This should run after each job's persist statement.

 

Ideally the loop should end as soon as the job attains 'Error' or 'Completed' state i.e. the job ends but when i am running the script

this while loop is running infinitely thus causing an infinite loop.

Because of which the first job ends but the script does not move forward to next job.

Please help me what i am doing wrong here or if there is any other way to make the jobs run sequentially through Redwood.

 

Thanks,

Archana


Viewing all articles
Browse latest Browse all 646

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>