<?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 Die if file doesn't exist - multiple files but only one not exist in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Die-if-file-doesn-t-exist-multiple-files-but-only-one-not-exist/m-p/2251192#M35226</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please advise me below problem. Thank you!&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I attached multiple files in tSendmail and have three situations when I run the job&lt;/P&gt;&lt;P&gt;1. one file doesn't exist but other files contains data&lt;/P&gt;&lt;P&gt;2. no files exist&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. All files contain data&lt;/P&gt;&lt;P&gt;What I am trying to achieve is below -&amp;nbsp;&lt;/P&gt;&lt;P&gt;When 1st situation - I still want to send receiver email&lt;/P&gt;&lt;P&gt;When 2nd situation - I don't want my receiver receive any email&lt;/P&gt;&lt;P&gt;When 3rd situation - I want to send receiver email&lt;/P&gt;&lt;P&gt;For now I can't achieve above results flexibly&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 09 Oct 2018 21:51:36 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-10-09T21:51:36Z</dc:date>
    <item>
      <title>Die if file doesn't exist - multiple files but only one not exist</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Die-if-file-doesn-t-exist-multiple-files-but-only-one-not-exist/m-p/2251192#M35226</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please advise me below problem. Thank you!&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I attached multiple files in tSendmail and have three situations when I run the job&lt;/P&gt;&lt;P&gt;1. one file doesn't exist but other files contains data&lt;/P&gt;&lt;P&gt;2. no files exist&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. All files contain data&lt;/P&gt;&lt;P&gt;What I am trying to achieve is below -&amp;nbsp;&lt;/P&gt;&lt;P&gt;When 1st situation - I still want to send receiver email&lt;/P&gt;&lt;P&gt;When 2nd situation - I don't want my receiver receive any email&lt;/P&gt;&lt;P&gt;When 3rd situation - I want to send receiver email&lt;/P&gt;&lt;P&gt;For now I can't achieve above results flexibly&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 21:51:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Die-if-file-doesn-t-exist-multiple-files-but-only-one-not-exist/m-p/2251192#M35226</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-09T21:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: Die if file doesn't exist - multiple files but only one not exist</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Die-if-file-doesn-t-exist-multiple-files-but-only-one-not-exist/m-p/2251193#M35227</link>
      <description>Hi 
&lt;BR /&gt;Using tfileExist to check each file if they exist, parse the checking result and determine to trigger tsendMail or not using runIf connector. eg:
&lt;BR /&gt;tfileExist1-oncomponentok-tfileExist2-oncomponentok-tfileExist3--tJava--runIf--tSendMail.
&lt;BR /&gt;
&lt;BR /&gt;On tjava: get the checking results and parse them.
&lt;BR /&gt;boolean file1=((Boolean)globalMap.get("tFileExist_1_EXISTS"));
&lt;BR /&gt;boolean file2=((Boolean)globalMap.get("tFileExist_1_EXISTS"));
&lt;BR /&gt;boolean file3=((Boolean)globalMap.get("tFileExist_1_EXISTS"));
&lt;BR /&gt;
&lt;BR /&gt;if(file1==true||file2==true||file3==true){
&lt;BR /&gt;globalMap.put("isContineue",true);
&lt;BR /&gt;}else{
&lt;BR /&gt;globalMap.put("isContinue",false);
&lt;BR /&gt;}
&lt;BR /&gt;
&lt;BR /&gt;set the condition of runIf as:
&lt;BR /&gt;(Boolean)globalMap.get("isContinue")
&lt;BR /&gt;
&lt;BR /&gt;Regards
&lt;BR /&gt;Shong</description>
      <pubDate>Wed, 10 Oct 2018 03:24:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Die-if-file-doesn-t-exist-multiple-files-but-only-one-not-exist/m-p/2251193#M35227</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-10T03:24:05Z</dc:date>
    </item>
  </channel>
</rss>

