Hi, I think you should create a Parent job for your First Subjob and then create a Child job for only two parallel sub jobs(use multithread execution in Child job ). So that the scenario when First Subjob completes then only two parallel sub jobs can start can be achieved. Please see the component reference with related scenario tRunjob. It will be helpful for your job design. Best regards Sabrina
Hi Sabrina, Thanks for the reply. But the issue with tRunJOb is that if in PArent job I am setting any global variable then how I can get it in my child job? Please let me know how I can pass global variable values from Parent Job to Child jobs? Thanks and Regards, Biswajit
Hi, The effective scope of a variable is limited to a specific Job, meaning that the variables defined in one Job can't be accessed from other Jobs. If you want to share the same value between different Jobs, you must define context variables in each Job and then pass the value between them. See the related reference Passing a value from a parent Job to a child Job Best regards Sabrina
It proved a Great help to me :-)
I need one more help like Now I want to pass the value from child to parent . How I can do that?
Is there any other approach?
Thanks Again for such a quick reply.
The link which u gave shows how I can pass the variables from Runjob1 to Run job 2. but my issue is how I can get back the status if the sub job run successfully? I want to catch value from my sub job to my Parent Job.
Hi,
Returning a value from child job to parent job
We will read data from a text file as below in a child job. And populate the total number of rows and pass it to the parent job.
in.txt:
id;name
1;Shong
2;Ross
3;Patrick
First Step
Create a job: let's call it 'ChildJob'. The job design looks like
pic1)
The components' settings are as below(pic2,3,4)
Second Step
Create a job: let's call it 'ParentJob'. The job design (as below) is called the child job 'ChildJob' on tRunJob_1(pic5)
tJavaRow's setting(pic6)
code on tJavaRow:
System.out.println("The total number of rows is:"+input_row.nb_line);
Third Step
Execute the job; The console has the following output result:
1|Shong
2|Ross
3|Patrick
The total number of rows is:3
Summary
Through the example above, we can see that the most important technical point is using a tBufferOutput component in child job to buffer the records. tRunJob will read the records from the buffer and transfer them to the next component.
Hope it will be helpful for you!
Best regards
Sabrina
Hi Sabrina,
Thanks again for quick reply.
Can you please share me the bigger images . They are smaller so they are not clearly visible.
anyways Thanks again.