Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I'm trying to check the return code on a tRunJob component to throw an error in my parent when the child job fails. Could anyone tell me how I can achieve this as right now even though my child is forced to fail the parent thinks it has worked.
I was initially using onSubJobOK as seen in the attached but as the parent thinks its ok it flows down the ok path.
Any help would be great!
D
Hi Dave,
Could you please verify whether the "Use an independent process to run SubJob" option has been unchecked in your job?
You can keep the Die on child error as either Yes or No based on your specific use case. But the above check box for independent job should be unchecked.
If the issue still persists, could you please share the component details screenshot for your tRunJob component for analysis?
If the answer has helped to resolve your query, could you please mark the topic as resolved? Kudos are also welcome 🙂
Warm Regards,
Nikhil Thampi
You can check the condition of die on child error for the trunjob component.
Then connect your trunjob with a tglobalvariable through onsubjoberror and assign error_message of trunjob (which you can find in its properties (clt+space) to a variable.
At last use in post job check in tmap if the error code>0,if yes use tdie to make it die.
Hi
I'm not following. So let me step through what you're saying...
This correct?
Only problem is I've tried this and get an error. See the 3 images attached....
D
Hi Dave,
Could you please verify whether the "Use an independent process to run SubJob" option has been unchecked in your job?
You can keep the Die on child error as either Yes or No based on your specific use case. But the above check box for independent job should be unchecked.
If the issue still persists, could you please share the component details screenshot for your tRunJob component for analysis?
If the answer has helped to resolve your query, could you please mark the topic as resolved? Kudos are also welcome 🙂
Warm Regards,
Nikhil Thampi
Hi Nikhil
Yes - this is all now working fine thanks. Sorry - should have responded earlier.
I ended up using tBufferOutput to return a code which I could then check in the parent job through a tMap and process accordingly as you will see in the attached.
Thanks for your help!
Dave