<?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: trigger tDie for ERROR_MESSAGE in tRest in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/trigger-tDie-for-ERROR-MESSAGE-in-tRest/m-p/2367021#M130444</link>
    <description>&lt;P&gt;I tried using another approach suggested with tJava component but it fails with error:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.screencast.com/t/zg78o2hmIfY" target="_blank" rel="nofollow noopener noreferrer"&gt;tJava_1 null&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Oct 2017 10:13:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-10-05T10:13:04Z</dc:date>
    <item>
      <title>trigger tDie for ERROR_MESSAGE in tRest</title>
      <link>https://community.qlik.com/t5/Talend-Studio/trigger-tDie-for-ERROR-MESSAGE-in-tRest/m-p/2367018#M130441</link>
      <description>&lt;P&gt;Could you guys help me understand how do I abort my job when tRest return an error. &amp;nbsp;I tried doing Run IF --&amp;gt;tDie directly from tRest&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;((String)globalMap.get("tREST_1_ERROR_MESSAGE")).length() &amp;gt;0&lt;/PRE&gt; 
&lt;P&gt;but that results in NPE&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;Error on line 1 of document  : Premature end of file. Nested exception: Premature end of file.
Exception in component tREST_1
java.lang.NullPointerException&lt;/PRE&gt; 
&lt;P&gt;So now I'm using tMap to separate Body from ERROR_MESSAGE. I can't figure out what to do with error row though. I can't use "Run If" trigger directly with tMap:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2017-10-03_2134.png" style="width: 793px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lr1x.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/139362i3B8DBF62E8789E7B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lr1x.png" alt="0683p000009Lr1x.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;What is the typical way of handling error from REST call?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks,&lt;/P&gt; 
&lt;P&gt;Dima&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 20:02:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/trigger-tDie-for-ERROR-MESSAGE-in-tRest/m-p/2367018#M130441</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-03T20:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: trigger tDie for ERROR_MESSAGE in tRest</title>
      <link>https://community.qlik.com/t5/Talend-Studio/trigger-tDie-for-ERROR-MESSAGE-in-tRest/m-p/2367019#M130442</link>
      <description>&lt;P&gt;There's a few ways to do what you want. The reason you're getting a NPE is because Talend will evaluate the "if" links when the component they are attached to runs their "end" section -- since the subjob with your tREST component has not even initialized at this point, the globalMap key will not be populated and the get will return null.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Here's a quick example of two ways to do what you want:&lt;/P&gt; 
&lt;P&gt;1) use onSubJobError off the tREST subjob&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;or&lt;/P&gt; 
&lt;P&gt;2) use a stub component to ensure the tREST subjob is complete before evaluating your if statement&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 835px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LrEL.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/140068i9BB8684F4B3BF0FA/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LrEL.png" alt="0683p000009LrEL.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 22:08:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/trigger-tDie-for-ERROR-MESSAGE-in-tRest/m-p/2367019#M130442</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-03T22:08:09Z</dc:date>
    </item>
    <item>
      <title>Re: trigger tDie for ERROR_MESSAGE in tRest</title>
      <link>https://community.qlik.com/t5/Talend-Studio/trigger-tDie-for-ERROR-MESSAGE-in-tRest/m-p/2367020#M130443</link>
      <description>&lt;P&gt;I tried doing a OnSubjobError but tDie is not triggered. I can catch ERROR_CODE though&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2017-10-04_0035.png" style="width: 937px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LrEV.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/137609iF313141BF9BE52C3/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LrEV.png" alt="0683p000009LrEV.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Here's my tMap just in case&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2017-10-04_0038.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lr7a.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/141266i62986044EBB5A76D/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lr7a.png" alt="0683p000009Lr7a.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 22:42:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/trigger-tDie-for-ERROR-MESSAGE-in-tRest/m-p/2367020#M130443</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-03T22:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: trigger tDie for ERROR_MESSAGE in tRest</title>
      <link>https://community.qlik.com/t5/Talend-Studio/trigger-tDie-for-ERROR-MESSAGE-in-tRest/m-p/2367021#M130444</link>
      <description>&lt;P&gt;I tried using another approach suggested with tJava component but it fails with error:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.screencast.com/t/zg78o2hmIfY" target="_blank" rel="nofollow noopener noreferrer"&gt;tJava_1 null&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2017 10:13:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/trigger-tDie-for-ERROR-MESSAGE-in-tRest/m-p/2367021#M130444</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-05T10:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: trigger tDie for ERROR_MESSAGE in tRest</title>
      <link>https://community.qlik.com/t5/Talend-Studio/trigger-tDie-for-ERROR-MESSAGE-in-tRest/m-p/2367022#M130445</link>
      <description>&lt;P&gt;I'm having the same issue. Is there a solution for this? &lt;/P&gt;</description>
      <pubDate>Mon, 03 Aug 2020 18:35:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/trigger-tDie-for-ERROR-MESSAGE-in-tRest/m-p/2367022#M130445</guid>
      <dc:creator>Edith1</dc:creator>
      <dc:date>2020-08-03T18:35:17Z</dc:date>
    </item>
  </channel>
</rss>

