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: 
Alpha549
Creator II
Creator II

Get exact child job return code

Hello World !

I'm in a case where a master job runs several child jobs using tRunJob component.

The case here is that these child jobs must end with specific status, enabling master job to execute specific things according to this end status.

Child job return code :

0 : everything is ok

1 : error

2 : ok but with a specific state

I tried to use tDie component to end child jobs with the return code I want. However, I can't get this exact value in master job, using CHILD_RETURN_CODE tRunJob global variable. Either I get 0, or 1........

I've found a solution : end the child job using a tJava with the code "System.exit(theReturnCodeIWant)"

This works, I get the exact return code with the global var CHILD_RETURN_CODE.

HOWEVER, this brusquely end the child job, and its tPostJob part is not executed. I have to duplicate it before the tJava running System.exit(...)

Is using System.exit a correct method or don't I use tDie correctly.... ?

Labels (2)
1 Reply
Anonymous
Not applicable

Hello,

You could manage the log in the job, to do:

Try to add a tLogCatcher to capture the Java exception once the job throws an error, it also has a column called code populates the return error of job execution.

After that, please pass a value with a tBufferOutput component from a child Job to the parent Job.

Best regards

Sabrina