[resolved] get the exit code returned by a subjob in a Run If trigger

One Star

[resolved] get the exit code returned by a subjob in a Run If trigger

Hy,
I need some help with the following scenario.
I have 4 jobs that I am running with tRunJob.
One of those jobs is created to do some action in case one of the other jobs are failling.
Because I can not link the other 3 jobs with the fourth one using a trigger OnSubjobError, I thought that it would be ok to link them using a trigger Run If.
All is good until now, but the question is how do I get the exit code returned from the other subjobs to see if the child job should run or not.
Is there a method? I searched in all the documents that I have and a lot of posts from this forum, but I could not find an answer to my question.
Thanks for help!

Accepted Solutions
One Star

Re: [resolved] get the exit code returned by a subjob in a Run If trigger

After further reading and searching, I found it.
((Integer)globalMap.get("tRunJob_1_CHILD_RETURN_CODE"))

This line of code can be used to retreive the exit status from a child job.

All Replies
One Star

Re: [resolved] get the exit code returned by a subjob in a Run If trigger

After further reading and searching, I found it.
((Integer)globalMap.get("tRunJob_1_CHILD_RETURN_CODE"))

This line of code can be used to retreive the exit status from a child job.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch