<?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 Check two conditions, send email to different lists? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Check-two-conditions-send-email-to-different-lists/m-p/2311840#M82847</link>
    <description>&lt;P&gt;I have two different databases that I want to monitor for low free space.&lt;BR /&gt;&lt;BR /&gt;Currently, I check both and send a single email to a list. There are people who only want to be on the email notice list for one of the databases.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;How can I check database 1 and send an email to list 1 and check database 2 and send an email to list 2 in the same job?&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;The way I was only sending an email if the size was too low was checking using an if statement in a tJavaFlex. &lt;BR /&gt;If the size was ok for both then I did System.exit(0); to end the job else the email was sent.&lt;BR /&gt;&lt;BR /&gt;If I make a tSendMail_1 and a tSendMail_2 how can I continue to the next tJavaFlex after checking the first database without sending an email if the size is ok?&amp;nbsp; &lt;STRONG&gt;Is there something like System.nextStep so the job goes to the next subjob in the job?&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tJavaFlex_2&amp;nbsp; &amp;gt; tSendMail_2&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ^&lt;BR /&gt;tJavaFlex &amp;gt; tSendMail_1&lt;/P&gt;</description>
    <pubDate>Fri, 22 Jul 2016 20:09:25 GMT</pubDate>
    <dc:creator>talendtester</dc:creator>
    <dc:date>2016-07-22T20:09:25Z</dc:date>
    <item>
      <title>Check two conditions, send email to different lists?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Check-two-conditions-send-email-to-different-lists/m-p/2311840#M82847</link>
      <description>&lt;P&gt;I have two different databases that I want to monitor for low free space.&lt;BR /&gt;&lt;BR /&gt;Currently, I check both and send a single email to a list. There are people who only want to be on the email notice list for one of the databases.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;How can I check database 1 and send an email to list 1 and check database 2 and send an email to list 2 in the same job?&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;The way I was only sending an email if the size was too low was checking using an if statement in a tJavaFlex. &lt;BR /&gt;If the size was ok for both then I did System.exit(0); to end the job else the email was sent.&lt;BR /&gt;&lt;BR /&gt;If I make a tSendMail_1 and a tSendMail_2 how can I continue to the next tJavaFlex after checking the first database without sending an email if the size is ok?&amp;nbsp; &lt;STRONG&gt;Is there something like System.nextStep so the job goes to the next subjob in the job?&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tJavaFlex_2&amp;nbsp; &amp;gt; tSendMail_2&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ^&lt;BR /&gt;tJavaFlex &amp;gt; tSendMail_1&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jul 2016 20:09:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Check-two-conditions-send-email-to-different-lists/m-p/2311840#M82847</guid>
      <dc:creator>talendtester</dc:creator>
      <dc:date>2016-07-22T20:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: Check two conditions, send email to different lists?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Check-two-conditions-send-email-to-different-lists/m-p/2311841#M82848</link>
      <description>Hi
&lt;BR /&gt;Using runIf connector to fire tsendMail component based on the checking result? For example:
&lt;BR /&gt;tJavaFlex1--runIf1--tsendmail1
&lt;BR /&gt; |
&lt;BR /&gt;onsubjobok
&lt;BR /&gt; |
&lt;BR /&gt;tJavaFlex2--runIf2--maintsendmail2
&lt;BR /&gt;
&lt;BR /&gt;on tJavaFlex1:
&lt;BR /&gt;
&lt;BR /&gt;check first database and put the result to a boolean global variable, eg:
&lt;BR /&gt;if(size&amp;gt;0){
&lt;BR /&gt;globalMap.put("isOK", true);
&lt;BR /&gt;}else{
&lt;BR /&gt;globalMap.put("isOK", false);
&lt;BR /&gt;}
&lt;BR /&gt;
&lt;BR /&gt;Set the condition of runIf1 as:
&lt;BR /&gt;!(Boolean)globalMap.get("isOK")
&lt;BR /&gt;
&lt;BR /&gt;Regards
&lt;BR /&gt;Shong</description>
      <pubDate>Sun, 31 Jul 2016 10:48:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Check-two-conditions-send-email-to-different-lists/m-p/2311841#M82848</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-31T10:48:43Z</dc:date>
    </item>
  </channel>
</rss>

