<?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: How to Retry Salesforce Connection n times on Error in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-Retry-Salesforce-Connection-n-times-on-Error/m-p/2327243#M96636</link>
    <description>Hi Ravi 
&lt;BR /&gt;Here is an scenario base on your requirement, it retry 5 times with tLoop component if the connection is failed. 
&lt;BR /&gt;Code on tJavaRow: 
&lt;BR /&gt; 
&lt;PRE&gt;if(input_row.errorCode==0){&lt;BR /&gt;context.isContinue=false;&lt;BR /&gt;}else if(input_row.errorCode==1&amp;amp;&amp;amp;&lt;BR /&gt;((Integer)globalMap.get("tLoop_1_CURRENT_ITERATION"))&amp;lt;5){&lt;BR /&gt;context.isContinue=true;&lt;BR /&gt;}else{&lt;BR /&gt;context.isContinue=false;&lt;BR /&gt;}&lt;/PRE&gt; 
&lt;BR /&gt;For more information, please my screenshots. 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong</description>
    <pubDate>Mon, 28 Nov 2011 01:45:57 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-11-28T01:45:57Z</dc:date>
    <item>
      <title>How to Retry Salesforce Connection n times on Error</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Retry-Salesforce-Connection-n-times-on-Error/m-p/2327242#M96635</link>
      <description>Hello Talend Users/Team,
&lt;BR /&gt;I have a requirement to try n number of times to connect to Salesforce.
&lt;BR /&gt;If the connection fails first time then try 5 time( n times) to see if connection works. If not let the Job Error out.
&lt;BR /&gt;Here is the description...
&lt;BR /&gt;I have couple of Salesforce Input and output component. I want to use just 1 Salesforce connection instance and use that for all the salesforce input/output component.
&lt;BR /&gt;I am able to do this by using a Salesforce connection Component first and then use the same connection in all the salesforce input/output component.
&lt;BR /&gt;But I have another requirement " If the connection fails for the first time I need to retry for 5 times and see if it connect.
&lt;BR /&gt;I am not able to find out how this can be implemented.
&lt;BR /&gt;I saw TLoop, tforloop. - but all these does not seem to help in this scenario.
&lt;BR /&gt;Please can any one guide me if you have come across such scenario..
&lt;BR /&gt;Thanks,
&lt;BR /&gt;Ravi</description>
      <pubDate>Sat, 16 Nov 2024 12:32:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Retry-Salesforce-Connection-n-times-on-Error/m-p/2327242#M96635</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T12:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to Retry Salesforce Connection n times on Error</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Retry-Salesforce-Connection-n-times-on-Error/m-p/2327243#M96636</link>
      <description>Hi Ravi 
&lt;BR /&gt;Here is an scenario base on your requirement, it retry 5 times with tLoop component if the connection is failed. 
&lt;BR /&gt;Code on tJavaRow: 
&lt;BR /&gt; 
&lt;PRE&gt;if(input_row.errorCode==0){&lt;BR /&gt;context.isContinue=false;&lt;BR /&gt;}else if(input_row.errorCode==1&amp;amp;&amp;amp;&lt;BR /&gt;((Integer)globalMap.get("tLoop_1_CURRENT_ITERATION"))&amp;lt;5){&lt;BR /&gt;context.isContinue=true;&lt;BR /&gt;}else{&lt;BR /&gt;context.isContinue=false;&lt;BR /&gt;}&lt;/PRE&gt; 
&lt;BR /&gt;For more information, please my screenshots. 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Mon, 28 Nov 2011 01:45:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Retry-Salesforce-Connection-n-times-on-Error/m-p/2327243#M96636</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-11-28T01:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to Retry Salesforce Connection n times on Error</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Retry-Salesforce-Connection-n-times-on-Error/m-p/2327244#M96637</link>
      <description>Can you load the screenshots and clarify how components are set-up? Pushing a job to a server where tSalesforceConnection timeouts out consistently, so need this loop to ensure job completes.
&lt;BR /&gt;Many thanks</description>
      <pubDate>Thu, 29 Oct 2015 17:43:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Retry-Salesforce-Connection-n-times-on-Error/m-p/2327244#M96637</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2015-10-29T17:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to Retry Salesforce Connection n times on Error</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Retry-Salesforce-Connection-n-times-on-Error/m-p/2327245#M96638</link>
      <description>Hi frank.conroy1223
&lt;BR /&gt;This topic was a little old, and I did't save the job. However, the job design looks like:
&lt;BR /&gt;main job;
&lt;BR /&gt;tloop--iterate--tRunjob--main--tJavaRow
&lt;BR /&gt;tRunJob: call the child job, uncheck the 'die on child job error' box.&amp;nbsp;
&lt;BR /&gt;on tJavaRow:
&lt;BR /&gt;
&lt;PRE&gt;if(input_row.errorCode==0){&lt;BR /&gt;context.isContinue=false;&lt;BR /&gt;}else if(input_row.errorCode==1&amp;amp;&amp;amp;&lt;BR /&gt;((Integer)globalMap.get("tLoop_1_CURRENT_ITERATION"))&amp;lt;5){&lt;BR /&gt;context.isContinue=true;&lt;BR /&gt;}else{&lt;BR /&gt;context.isContinue=false;&lt;BR /&gt;}&lt;/PRE&gt;
&lt;BR /&gt;child job:
&lt;BR /&gt;tSalesforceConnectiion--oncomponenterror--tFixedFlowInput1--main--tBufferOutput1
&lt;BR /&gt;&amp;nbsp; &amp;nbsp;|
&lt;BR /&gt;onsubjobok
&lt;BR /&gt;&amp;nbsp; &amp;nbsp;|
&lt;BR /&gt;your main business processing
&lt;BR /&gt;&amp;nbsp; |
&lt;BR /&gt;onsubjobok
&lt;BR /&gt;&amp;nbsp; |
&lt;BR /&gt;tFixedFlowInput2--main--tBufferOutput2
&lt;BR /&gt;on tFixedFlowInput1: define one column called errorCode, int/Integer type, set its value as 1.
&lt;BR /&gt;on tFixedFlowInput2: define one column called errorCode, int/Integer type, set its value as 0.
&lt;BR /&gt;Hope this helps you!
&lt;BR /&gt;Best regards
&lt;BR /&gt;Shong</description>
      <pubDate>Mon, 02 Nov 2015 08:05:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Retry-Salesforce-Connection-n-times-on-Error/m-p/2327245#M96638</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-02T08:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to Retry Salesforce Connection n times on Error</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Retry-Salesforce-Connection-n-times-on-Error/m-p/2327246#M96639</link>
      <description>&lt;FONT size="2"&gt;&lt;FONT face="consolas, monaco,"&gt;hi ,&lt;/FONT&gt;&lt;/FONT&gt;
&lt;BR /&gt;
&lt;FONT size="2"&gt;&lt;FONT face="consolas, monaco,"&gt;where is context.isContinue being used??&lt;/FONT&gt;&lt;/FONT&gt;</description>
      <pubDate>Tue, 01 Nov 2016 10:40:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Retry-Salesforce-Connection-n-times-on-Error/m-p/2327246#M96639</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-01T10:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to Retry Salesforce Connection n times on Error</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Retry-Salesforce-Connection-n-times-on-Error/m-p/2327247#M96640</link>
      <description>&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;&lt;FONT size="2"&gt;&lt;FONT face="consolas, monaco,"&gt;hi ,&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;FONT face="consolas, monaco,"&gt;where is context.isContinue being used??&lt;/FONT&gt;&lt;/FONT&gt;&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;isContinue is a context variable with boolean type, it is used in Condition filed on tLoop component (While type).</description>
      <pubDate>Wed, 02 Nov 2016 02:03:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Retry-Salesforce-Connection-n-times-on-Error/m-p/2327247#M96640</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-02T02:03:50Z</dc:date>
    </item>
  </channel>
</rss>

