Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tRunJob Returning an Error

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

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

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.

0683p000009M0eK.png

 

 

 

       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

View solution in original post

4 Replies
Anonymous
Not applicable
Author

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.

Anonymous
Not applicable
Author

Hi

 

I'm not following.  So let me step through what you're saying...

  1. In the child job - set a global variable when the onSubJobError is thrown.
  2. In the parent - get the value of the global variable as an output from the tRunJob
  3. Use the value of the error in a tMap to then decide whether to throw a tDie or not?

This correct?

 

Only problem is I've tried this and get an error.  See the 3 images attached....

 

D

 


Screen Shot 2018-10-24 at 18.40.44.png
Screen Shot 2018-10-24 at 18.40.24.png
Screen Shot 2018-10-24 at 18.39.54.png
Anonymous
Not applicable
Author

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.

0683p000009M0eK.png

 

 

 

       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

Anonymous
Not applicable
Author

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


Screen Shot 2018-11-06 at 22.14.41.png
Screen Shot 2018-11-06 at 22.14.11.png