One Star

running job multiple times

Hi,
I have a requirement where I need to run sub job job multiple times based on the value of a count. Say, if count is 4 then the subjob should run 4 times.
Is there any ways to run same sub job multiple times ?

Thanks and Regards,
Biswajit
3 REPLIES
One Star

Re: running job multiple times

Hi,
I simulate a job like
rowGenerator--Main-->JavaRow--OnComponentOk-->Loop--Iterate-->Runjob
In rowGenerator,I just set a int number "count" by random.
In JavaRow, I wrote code :globalMap.put("count", input_row.count).
In loop, I set ((Integer)globalMap.get("count")) for Max.
In Subjob, I just put a tsystem .
And this work fine.
Best regards
One Star

Re: running job multiple times

Hi ,
Thanks for the reply.It works.
Can you please tell me how I an pass different values using this. Say in TrunJob I need to pass different numeric value to tRunJOb on each loop. Is it possible to do that?

Thanks and Regards,
Biswajit
One Star

Re: running job multiple times

Hi,
Base on the first simulation,
I modify a job like.
Loop--Iterate-->rowGenerator--Main-->JavaRow--OnComponentOk-->Loop--Iterate-->Runjob
|
OnComponentOk
|
v
tSetEvn
In first loop: I set defaut.I just want to simulate that job runs.
In tSetEvn: I set Name: "count" and Value: (""+globalMap.get("count"))
In subjob , I still use tsystem,but with a new code: "cmd /c echo HELLO "+System.getProperty("count").
So, you can see that this job run several time and with different values.
I hope its useful
Best regards