<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Get exact child job return code in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Get-exact-child-job-return-code/m-p/2330226#M99322</link>
    <description>&lt;P&gt;Hello World !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm in a case where a master job runs several child jobs using tRunJob component.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;Child job return code :&lt;/P&gt;&lt;P&gt;0 : everything is ok&lt;/P&gt;&lt;P&gt;1 : error&lt;/P&gt;&lt;P&gt;2 : ok but with a specific state&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've found a solution : end the child job using a tJava with the code "System.exit(theReturnCodeIWant)"&lt;/P&gt;&lt;P&gt;This works, I get the exact return code with the global var CHILD_RETURN_CODE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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(...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is using System.exit a correct method or don't I use tDie correctly.... ?&lt;/P&gt;</description>
    <pubDate>Sun, 07 Mar 2021 02:17:47 GMT</pubDate>
    <dc:creator>Alpha549</dc:creator>
    <dc:date>2021-03-07T02:17:47Z</dc:date>
    <item>
      <title>Get exact child job return code</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Get-exact-child-job-return-code/m-p/2330226#M99322</link>
      <description>&lt;P&gt;Hello World !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm in a case where a master job runs several child jobs using tRunJob component.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;Child job return code :&lt;/P&gt;&lt;P&gt;0 : everything is ok&lt;/P&gt;&lt;P&gt;1 : error&lt;/P&gt;&lt;P&gt;2 : ok but with a specific state&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've found a solution : end the child job using a tJava with the code "System.exit(theReturnCodeIWant)"&lt;/P&gt;&lt;P&gt;This works, I get the exact return code with the global var CHILD_RETURN_CODE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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(...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is using System.exit a correct method or don't I use tDie correctly.... ?&lt;/P&gt;</description>
      <pubDate>Sun, 07 Mar 2021 02:17:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Get-exact-child-job-return-code/m-p/2330226#M99322</guid>
      <dc:creator>Alpha549</dc:creator>
      <dc:date>2021-03-07T02:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: Get exact child job return code</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Get-exact-child-job-return-code/m-p/2330227#M99323</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;You could manage the log in the job, to do:&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;After that, please pass a value with a tBufferOutput component from a child Job to the parent Job.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Sabrina&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Mar 2021 04:14:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Get-exact-child-job-return-code/m-p/2330227#M99323</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-03-08T04:14:17Z</dc:date>
    </item>
  </channel>
</rss>

