[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.

What’s New for Talend Spring ’19

Join us live for a sneak peek!

Sign up now

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads