Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Talendians,
I am trying to create a parent job which uses trunjob component to execute all the standard jobs in an sequential order and are dependent on previous execution success or failure.
I am trying to use trunjob--> on subok--> trunjob2-->onsubjob0k-->trunjob3.
Is this the right way to design the job? Should i check the " use an independent process to run the subjob" for each trunjobok component or not needed? What about context parameters? How should they look like in the parent job?
Please let me know your suggestions.
Use the tDie. Here's how it works
if "die on child error" is checked in the tRunJob then the job CAN continue with OnComponentError or OnSubjobError.
NOTE: The tdie return code doesn't matter. Even return code is 0, it returns a dump.
if you uncheck "die on child error" you ALWAYS go to "OK" path and the "Error" path is not considered, even if you have one. But you can send back and error code and check it do do something...
@lli Thanks for the reply. I have checked both die on error and transmit whole context in all trunjob components.
I am attaching my job design below. Can you please take a look and suggest?
I want to kill the job and print a message at which child job the process failed and record that as well. If a trunjob fails, can i use if conditon and connect it to tdie using global map ((Integer)globalMap.get("tRunJob_1_CHILD_RETURN_CODE"))==0?
Is this correct?