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

View solution in original post


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.

View solution in original post

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 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog