<?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: Need help with tLoop on tRestClient - Getting error on tJavaFlex in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Need-help-with-tLoop-on-tRestClient-Getting-error-on-tJavaFlex/m-p/2287816#M61363</link>
    <description>&lt;P&gt;Hi @Shicong Hong​, it's just printing the error codes. Here's what I have in tJavaFlex&lt;/P&gt;&lt;P&gt;System.err.println("ErrorCode: " + row28.errorCode + " ErrorMessage: " + row28.errorMessage);&lt;/P&gt;</description>
    <pubDate>Tue, 25 Aug 2020 15:07:45 GMT</pubDate>
    <dc:creator>Edith1</dc:creator>
    <dc:date>2020-08-25T15:07:45Z</dc:date>
    <item>
      <title>Need help with tLoop on tRestClient - Getting error on tJavaFlex</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Need-help-with-tLoop-on-tRestClient-Getting-error-on-tJavaFlex/m-p/2287814#M61361</link>
      <description>&lt;P&gt;I’ve tried numerous ways to make this work and I’m still lost : ( &lt;/P&gt;&lt;P&gt;The 1st subjob hashes out a table that I need the 4th subjob to iterate on each row to call the tRestClient. &lt;/P&gt;&lt;P&gt;The 2nd subjob is just to get the total # of rows from the 1st subjob. &lt;/P&gt;&lt;P&gt;The 3rd subjob just sets the varaible for the loop with the total # of rows.   context.rowCount = (Integer)globalMap.get("tHashInput_2_NB_LINE");&lt;/P&gt;&lt;P&gt;I am having errors on the 4th subjob.&amp;nbsp;The loop is ‘For ‘ each rowCount – I want this job to run through every row from the previous job. In this example 678 rows or times. &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0693p000009JU0RAAW.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/136516i3D9E95FD8B6745D6/image-size/large?v=v2&amp;amp;px=999" role="button" title="0693p000009JU0RAAW.jpg" alt="0693p000009JU0RAAW.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0693p000009JU1AAAW.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/129669iFA39A82912F54550/image-size/large?v=v2&amp;amp;px=999" role="button" title="0693p000009JU1AAAW.jpg" alt="0693p000009JU1AAAW.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have an IF condition for tDie of&amp;nbsp;row28.errorCode&amp;gt;400 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It runs 13 times, which is great because those 13 times are errors of 400, but then when I get a good rows of 200, I get error&amp;nbsp;java.lang.NullPointerException: null for tJavaFlex_2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why is the 200 or successful, going through the error channel?&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I doing wrong? Please help...I don't know how to make this work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0693p000009JU1eAAG.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157066i1FC42A4A383564B2/image-size/large?v=v2&amp;amp;px=999" role="button" title="0693p000009JU1eAAG.jpg" alt="0693p000009JU1eAAG.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Aug 2020 23:23:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Need-help-with-tLoop-on-tRestClient-Getting-error-on-tJavaFlex/m-p/2287814#M61361</guid>
      <dc:creator>Edith1</dc:creator>
      <dc:date>2020-08-24T23:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with tLoop on tRestClient - Getting error on tJavaFlex</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Need-help-with-tLoop-on-tRestClient-Getting-error-on-tJavaFlex/m-p/2287815#M61362</link>
      <description>&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;Can you show us the Java code on tJavaFlex?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shong&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2020 02:01:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Need-help-with-tLoop-on-tRestClient-Getting-error-on-tJavaFlex/m-p/2287815#M61362</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-25T02:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with tLoop on tRestClient - Getting error on tJavaFlex</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Need-help-with-tLoop-on-tRestClient-Getting-error-on-tJavaFlex/m-p/2287816#M61363</link>
      <description>&lt;P&gt;Hi @Shicong Hong​, it's just printing the error codes. Here's what I have in tJavaFlex&lt;/P&gt;&lt;P&gt;System.err.println("ErrorCode: " + row28.errorCode + " ErrorMessage: " + row28.errorMessage);&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2020 15:07:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Need-help-with-tLoop-on-tRestClient-Getting-error-on-tJavaFlex/m-p/2287816#M61363</guid>
      <dc:creator>Edith1</dc:creator>
      <dc:date>2020-08-25T15:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with tLoop on tRestClient - Getting error on tJavaFlex</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Need-help-with-tLoop-on-tRestClient-Getting-error-on-tJavaFlex/m-p/2287817#M61364</link>
      <description>&lt;P&gt;Hi  &lt;/P&gt;&lt;P&gt;The cause is row28.errorCode is null when you get a good row, the condition expression row28.errorCode&amp;gt;400 throws the error. To solve it,  change the code on tJavaFlex as below:&lt;/P&gt;&lt;P&gt;System.err.println("ErrorCode: " + row28.errorCode + " ErrorMessage: " + row28.errorMessage);&lt;/P&gt;&lt;P&gt;if(row28.errorCode&amp;gt;400){&lt;/P&gt;&lt;P&gt;context.condition=true;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;}else{&lt;/P&gt;&lt;P&gt;context.condition=false;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Define a context variable called condition and use it as condition expression of RunIf.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shong&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 08:37:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Need-help-with-tLoop-on-tRestClient-Getting-error-on-tJavaFlex/m-p/2287817#M61364</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-26T08:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with tLoop on tRestClient - Getting error on tJavaFlex</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Need-help-with-tLoop-on-tRestClient-Getting-error-on-tJavaFlex/m-p/2287818#M61365</link>
      <description>&lt;P&gt;Thank you @Shicong Hong​&amp;nbsp;for the solution. You are the best &lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 22:48:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Need-help-with-tLoop-on-tRestClient-Getting-error-on-tJavaFlex/m-p/2287818#M61365</guid>
      <dc:creator>Edith1</dc:creator>
      <dc:date>2020-08-26T22:48:53Z</dc:date>
    </item>
  </channel>
</rss>

