<?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 Re: Using tDie in a subJob for handling a flow in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Using-tDie-in-a-subJob-for-handling-a-flow/m-p/2299209#M71578</link>
    <description>Thanks Jan, 
&lt;BR /&gt;Your prodecure sounds like the way we must handle this. 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MA9p.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138034i5F552429DA646D6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MA9p.png" alt="0683p000009MA9p.png" /&gt;&lt;/span&gt;</description>
    <pubDate>Thu, 25 Aug 2016 15:31:24 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-08-25T15:31:24Z</dc:date>
    <item>
      <title>Using tDie in a subJob for handling a flow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-tDie-in-a-subJob-for-handling-a-flow/m-p/2299203#M71572</link>
      <description>Hi everyone, 
&lt;BR /&gt;I'm new in Talend, and I'm working with a Main Job and Sub Jobs... in the Sub Jobs I'm using tDie to exit in specific events, and I want to use that to redirect the execution in the Main Job as an IF sentence. 
&lt;BR /&gt;An example: 
&lt;BR /&gt;Main Job:&amp;nbsp; 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Run subJob1:&amp;nbsp; 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp;-(on subjobOK)-&amp;gt; Run subJob2 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp;-(on subJobError)-&amp;gt; tDie 
&lt;BR /&gt;subJob1: 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp;- CheckFileOnFTP: 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; -(IF Exist)-&amp;gt; Load into DB 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; -(IF Not Exist)-&amp;gt; tDie 
&lt;BR /&gt;So, when I run de Main Job and the file in the FTP doesn't exist, I get a Java Error... even when I handle the existance of the file with tDie. And if I run only the subJob, the error-handle works fine. 
&lt;BR /&gt;How can I handle this kind of 'exceptions' with Talend?&amp;nbsp; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MAzD.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/156823i0F5B34116F288175/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MAzD.png" alt="0683p000009MAzD.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MB7L.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/151816i7072BE10ED616CD0/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MB7L.png" alt="0683p000009MB7L.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MBOu.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133179i9E2CD3042D9654BF/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MBOu.png" alt="0683p000009MBOu.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Wed, 24 Aug 2016 17:58:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-tDie-in-a-subJob-for-handling-a-flow/m-p/2299203#M71572</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-24T17:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using tDie in a subJob for handling a flow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-tDie-in-a-subJob-for-handling-a-flow/m-p/2299204#M71573</link>
      <description>If you do want to steer the job chain based on the return code:&lt;BR /&gt;1. uncheck the option in the tRunJob Die On Error.&lt;BR /&gt;2. If the if-trigger and use here the tRunJob return value CHILD_RETURNCODE (Integer) to decide which tRunJob should called next.</description>
      <pubDate>Wed, 24 Aug 2016 21:54:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-tDie-in-a-subJob-for-handling-a-flow/m-p/2299204#M71573</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-24T21:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using tDie in a subJob for handling a flow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-tDie-in-a-subJob-for-handling-a-flow/m-p/2299205#M71574</link>
      <description>Thank you Jan, 
&lt;BR /&gt;Works fine 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MA9p.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138034i5F552429DA646D6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MA9p.png" alt="0683p000009MA9p.png" /&gt;&lt;/span&gt;, now I can handle our own return codes in order to be more specific about the messages of ending jobs. 
&lt;BR /&gt;But if I use a tPostjob, it will override the Return Code of any tDie and return 1, even when I put a tLogCatcher on the tPostjob. 
&lt;BR /&gt;So, how can I get my return codes from a Child Job who have tPostjob?</description>
      <pubDate>Thu, 25 Aug 2016 14:01:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-tDie-in-a-subJob-for-handling-a-flow/m-p/2299205#M71574</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-25T14:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: Using tDie in a subJob for handling a flow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-tDie-in-a-subJob-for-handling-a-flow/m-p/2299206#M71575</link>
      <description>Hi JSeverino, 
&lt;BR /&gt;I raised a Talend Jira about this bug and they claimed it is not a bug. Apparently it is perfectly acceptable for a tDie error code not to be returned to the parent job IF the child job uses a tPostJob. My reaction to that is.....probably not appropriate to be written here. However, I wrote some code which provides a workaround to this. It is described in the Jira which is here:&amp;nbsp; 
&lt;A href="https://jira.talendforge.org/browse/TDI-36963" rel="nofollow noopener noreferrer"&gt;https://jira.talendforge.org/browse/TDI-36963&lt;/A&gt; 
&lt;BR /&gt;If you agree that this needs fixing, please comment on the Jira.</description>
      <pubDate>Thu, 25 Aug 2016 14:19:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-tDie-in-a-subJob-for-handling-a-flow/m-p/2299206#M71575</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-25T14:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using tDie in a subJob for handling a flow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-tDie-in-a-subJob-for-handling-a-flow/m-p/2299207#M71576</link>
      <description>Hi, indeed it is a bit weird behaviour the error code does not survive a tPostJob processing. Because if that, I usually have following procedure:
&lt;BR /&gt;I always inspect the globalMap for keys ending with ERROR_MESSAGE and DIE_CODE and take this value as real exist code by setting the member variable this.errorCode.</description>
      <pubDate>Thu, 25 Aug 2016 15:08:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-tDie-in-a-subJob-for-handling-a-flow/m-p/2299207#M71576</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-25T15:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: Using tDie in a subJob for handling a flow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-tDie-in-a-subJob-for-handling-a-flow/m-p/2299208#M71577</link>
      <description>Hi Richard. 
&lt;BR /&gt;Thanks for answer.&amp;nbsp; 
&lt;BR /&gt;I'm agree. I use tPostjob for logging status, so I need to keep the final status (in this case given by the tDie component)... 
&lt;BR /&gt;By the moment I'll avoid the use of tPostjob.. that's sad because I think is a very useful component 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MPcz.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157233iD1A564EF62DE3BC2/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MPcz.png" alt="0683p000009MPcz.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Thu, 25 Aug 2016 15:17:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-tDie-in-a-subJob-for-handling-a-flow/m-p/2299208#M71577</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-25T15:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using tDie in a subJob for handling a flow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-tDie-in-a-subJob-for-handling-a-flow/m-p/2299209#M71578</link>
      <description>Thanks Jan, 
&lt;BR /&gt;Your prodecure sounds like the way we must handle this. 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MA9p.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138034i5F552429DA646D6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MA9p.png" alt="0683p000009MA9p.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Thu, 25 Aug 2016 15:31:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-tDie-in-a-subJob-for-handling-a-flow/m-p/2299209#M71578</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-25T15:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: Using tDie in a subJob for handling a flow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-tDie-in-a-subJob-for-handling-a-flow/m-p/2299210#M71579</link>
      <description>That is what the code I posted in the Jira does.</description>
      <pubDate>Thu, 25 Aug 2016 15:43:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-tDie-in-a-subJob-for-handling-a-flow/m-p/2299210#M71579</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-25T15:43:22Z</dc:date>
    </item>
  </channel>
</rss>

