<?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: tRestClient Only Run IF there the tLoop1 if there is an Response and Iterate if there is an error in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tRestClient-Only-Run-IF-there-the-tLoop1-if-there-is-an-Response/m-p/2363871#M127695</link>
    <description>&lt;P&gt;Thanks for the follow up on this. But yes I have proceeded to create a condition that breaks the loop if tRestClient response is an error. Thanks a lot!&lt;/P&gt;</description>
    <pubDate>Wed, 08 Nov 2023 09:51:37 GMT</pubDate>
    <dc:creator>cjiawei</dc:creator>
    <dc:date>2023-11-08T09:51:37Z</dc:date>
    <item>
      <title>tRestClient Only Run IF there the tLoop1 if there is an Response and Iterate if there is an error</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tRestClient-Only-Run-IF-there-the-tLoop1-if-there-is-an-Response/m-p/2363868#M127692</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to only run the tLoop_1 if there is a successful response from tRestClient5. &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000rdlJKAAY.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/151921i39B4BD3B9C30F6E2/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000rdlJKAAY.png" alt="0695b00000rdlJKAAY.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would kindly seek help in this. I have tried to search online for the solution and implemented the tJavaFlex but it seems to still not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tJavaFlex settings is as stated below : &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000rdlKwAAI.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/149655iFEC94E186C15B4D9/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000rdlKwAAI.png" alt="0695b00000rdlKwAAI.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have tried to put (Boolean.TRUE.equals(globalMap.get(&lt;/P&gt;&lt;P&gt;"RestFailure"&lt;/P&gt;))) as my Run If criteria but still failed. It ended up indicating  true even when the tRestClient_5 didn't manage to get any results. &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciate any help on this... thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 21:16:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tRestClient-Only-Run-IF-there-the-tLoop1-if-there-is-an-Response/m-p/2363868#M127692</guid>
      <dc:creator>cjiawei</dc:creator>
      <dc:date>2024-11-15T21:16:11Z</dc:date>
    </item>
    <item>
      <title>Re: tRestClient Only Run IF there the tLoop1 if there is an Response and Iterate if there is an error</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tRestClient-Only-Run-IF-there-the-tLoop1-if-there-is-an-Response/m-p/2363869#M127693</link>
      <description>&lt;P&gt;Hi  &lt;/P&gt;&lt;P&gt;Could you please explain this behavior? "when the tRestClient_5 didn't manage to get any results"&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;P&gt;tRestCliend fails to call the API and has an exception error or the API call is successfully, but no data is returned in response?&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, 08 Nov 2023 02:54:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tRestClient-Only-Run-IF-there-the-tLoop1-if-there-is-an-Response/m-p/2363869#M127693</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-11-08T02:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: tRestClient Only Run IF there the tLoop1 if there is an Response and Iterate if there is an error</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tRestClient-Only-Run-IF-there-the-tLoop1-if-there-is-an-Response/m-p/2363870#M127694</link>
      <description>&lt;P&gt;To achieve the desired behavior in Talend, where the tRestClient only runs if there is a tLoop1 response and iterates if there is an error, you can follow these steps:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Set up the tLoop1 component to iterate a certain number of times or until a certain condition is met. You can use a tJava component to set up the loop and define the exit condition based on the error/exit code of the tRestClient component[3].&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.uspayserv.me/" alt="https://www.uspayserv.me/" target="_blank"&gt;USPayServ Login&lt;/A&gt;n 2. Connect the tRestClient component to the tLoop1 component. This will ensure that the tRestClient only runs if there is a response from the tLoop1 component.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. Set up error handling for the tRestClient component using a tJava component. If the tRestClient component encounters an error, the tJava component will catch the error and allow the tLoop1 component to iterate again[2].&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4. If you want to log the error message, you can use a tLogCatcher component to catch the error message and send it to a log file or database[5].&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Overall, the key is to use the tLoop1 component to control the iteration and error handling, and to connect the tRestClient component to the tLoop1 component to ensure that it only runs when there is a response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2023 09:13:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tRestClient-Only-Run-IF-there-the-tLoop1-if-there-is-an-Response/m-p/2363870#M127694</guid>
      <dc:creator>OFlores1699434353</dc:creator>
      <dc:date>2023-11-08T09:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: tRestClient Only Run IF there the tLoop1 if there is an Response and Iterate if there is an error</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tRestClient-Only-Run-IF-there-the-tLoop1-if-there-is-an-Response/m-p/2363871#M127695</link>
      <description>&lt;P&gt;Thanks for the follow up on this. But yes I have proceeded to create a condition that breaks the loop if tRestClient response is an error. Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2023 09:51:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tRestClient-Only-Run-IF-there-the-tLoop1-if-there-is-an-Response/m-p/2363871#M127695</guid>
      <dc:creator>cjiawei</dc:creator>
      <dc:date>2023-11-08T09:51:37Z</dc:date>
    </item>
  </channel>
</rss>

