<?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: Workarounds for tSalesforceOutputBulkExec NPE in case of empty flow in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Workarounds-for-tSalesforceOutputBulkExec-NPE-in-case-of-empty/m-p/2268993#M47393</link>
    <description>&lt;P&gt;really not only tSaleForce have problems with empty flow, many components have similar "issue"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use second way - count records (or check file exists in some cases) + runIf trigger&lt;/P&gt;</description>
    <pubDate>Sun, 11 Jun 2017 22:31:25 GMT</pubDate>
    <dc:creator>vapukov</dc:creator>
    <dc:date>2017-06-11T22:31:25Z</dc:date>
    <item>
      <title>Workarounds for tSalesforceOutputBulkExec NPE in case of empty flow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Workarounds-for-tSalesforceOutputBulkExec-NPE-in-case-of-empty/m-p/2268992#M47392</link>
      <description>&lt;DIV class="adn ads"&gt; 
 &lt;DIV class="gs"&gt; 
  &lt;DIV class="ii gt adP adO"&gt; 
   &lt;DIV class="a3s aXjCH m15c93c4e8ed528ac"&gt; 
    &lt;DIV&gt; 
     &lt;DIV&gt;
       With TDI 6.3.1, having an empty flow as input cause tSalesforceOutputBulkExec to fail with a null pointer exception. 
     &lt;/DIV&gt; 
     &lt;DIV&gt;
       It was not the case with 6.2.x and previous versions. 
     &lt;/DIV&gt; 
     &lt;DIV&gt;
       &amp;nbsp; 
     &lt;/DIV&gt; 
     &lt;DIV&gt;
       Fortunately, there is at least 2 workarounds I want to share with anyone concerned by Salesforce integration. 
     &lt;/DIV&gt; 
     &lt;DIV&gt;
       &amp;nbsp; 
     &lt;/DIV&gt; 
     &lt;DIV&gt;
       1- 
      &lt;STRONG&gt;store the flow in a tHashOutput&lt;/STRONG&gt;, then link it to a&amp;nbsp; 
      &lt;SPAN&gt;tHashInput with a conditional link and finally, link the&amp;nbsp;tHashInput &amp;nbsp;to&amp;nbsp;tSalesforceOutputBulkExec:&lt;/SPAN&gt; 
     &lt;/DIV&gt; 
     &lt;DIV&gt;
       &amp;nbsp; 
      &lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 640px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LuTr.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/144003i96AF12D9FE0DAE04/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LuTr.png" alt="0683p000009LuTr.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt; 
     &lt;/DIV&gt; 
     &lt;DIV&gt; 
      &lt;SPAN&gt;The conditional expression is the following:&lt;/SPAN&gt; 
     &lt;/DIV&gt; 
     &lt;DIV&gt; 
      &lt;PRE&gt;((Integer)globalMap.get("tHashOutput_12_NB_LINE")) &amp;gt; 0&lt;/PRE&gt; 
     &lt;/DIV&gt; 
     &lt;DIV&gt;
       Use this workaround&amp;nbsp;for a flow of limited size else you risk to encounter a memory exception. 
     &lt;/DIV&gt; 
     &lt;DIV&gt;
       Also tick the "Clear cache after reading" option for tHashInput component if you don't need to reuse the content anymore after this operation. 
     &lt;/DIV&gt; 
     &lt;DIV&gt;
       &amp;nbsp; 
     &lt;/DIV&gt; 
     &lt;DIV&gt; 
      &lt;SPAN&gt;2- &lt;STRONG&gt;replace the tSalesforceOutputBulkExec&lt;/STRONG&gt; component by a tSalesforceOutputBulk linked to a&amp;nbsp;tSalesforceOutputExec&amp;nbsp;with a conditional link:&lt;/SPAN&gt; 
     &lt;/DIV&gt; 
     &lt;DIV&gt; 
      &lt;SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 609px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LuQ3.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/136114i9AC5C4ED290D9456/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LuQ3.png" alt="0683p000009LuQ3.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; 
     &lt;/DIV&gt; 
     &lt;DIV&gt;
       &amp;nbsp; 
     &lt;/DIV&gt; 
     &lt;DIV&gt; 
      &lt;DIV&gt; 
       &lt;SPAN&gt;In this case, the conditional expression is:&lt;/SPAN&gt; 
       &lt;BR /&gt; 
       &lt;PRE&gt;((Integer)globalMap.get("tSalesforceOutputBulk_1_NB_LINE")) &amp;gt; 0&lt;/PRE&gt; 
      &lt;/DIV&gt; 
     &lt;/DIV&gt; 
     &lt;DIV&gt; 
      &lt;SPAN&gt;No limitation regarding the flow size with this solution as&amp;nbsp;tSalesforceOutputBulk use a file (the same as for tSalesforceOutputBulkExec), so you may prefer it if you&amp;nbsp;have to manage huge flows.&lt;/SPAN&gt; 
     &lt;/DIV&gt; 
     &lt;DIV&gt;
       &amp;nbsp; 
     &lt;/DIV&gt; 
     &lt;DIV&gt; 
      &lt;SPAN&gt;Advantage, for these 2 solutions compared to tSalesforceOutputBulkExec is you have fewer&amp;nbsp;calls to the Salesforce Bulk API (because you will not make calls for empty flows anymore).&lt;/SPAN&gt; 
     &lt;/DIV&gt; 
     &lt;DIV&gt;
       &amp;nbsp; 
     &lt;/DIV&gt; 
     &lt;DIV&gt; 
      &lt;SPAN&gt;Hope this will help you.&lt;/SPAN&gt; 
     &lt;/DIV&gt; 
    &lt;/DIV&gt; 
   &lt;/DIV&gt; 
  &lt;/DIV&gt; 
 &lt;/DIV&gt; 
&lt;/DIV&gt;</description>
      <pubDate>Sat, 16 Nov 2024 09:39:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Workarounds-for-tSalesforceOutputBulkExec-NPE-in-case-of-empty/m-p/2268992#M47392</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2024-11-16T09:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: Workarounds for tSalesforceOutputBulkExec NPE in case of empty flow</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Workarounds-for-tSalesforceOutputBulkExec-NPE-in-case-of-empty/m-p/2268993#M47393</link>
      <description>&lt;P&gt;really not only tSaleForce have problems with empty flow, many components have similar "issue"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use second way - count records (or check file exists in some cases) + runIf trigger&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2017 22:31:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Workarounds-for-tSalesforceOutputBulkExec-NPE-in-case-of-empty/m-p/2268993#M47393</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2017-06-11T22:31:25Z</dc:date>
    </item>
  </channel>
</rss>

