why don&#39;t you check the condition in the then clause ?<br><br><p><font face="Courier New" size="2"><span style="font-size: 10pt;">rule</span></font><font face="Courier New" size="2"><span style="font-size: 10pt;"> &quot;Rule1&quot; 
</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;when</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
message1 : Message( message == &quot;Hello&quot; ) || <br></span></font></p><p><font face="Courier New" size="2"><span style="font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; message2 : Message( status == 0 )</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;then</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (message2.getStatus == 0) {</span></font></p><p><font face="Courier New" size="2"><span style="font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
System.out.println(&quot;status is 0.&quot;);</span></font></p><p><font face="Courier New" size="2"><span style="font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span></font></p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (message1.getMessage
().equals(&quot;Hello&quot;) <font face="Courier New" size="2"><span style="font-size: 10pt;">{</span></font>
</p><p><font face="Courier New" size="2"><span style="font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println(&quot;message is hello.&quot;);</span></font></p>
<p><font face="Courier New" size="2"><span style="font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span></font></p><p><font face="Courier New" size="2"><span style="font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
System.out.println(&quot;then executed&quot;);</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt;">End</span></font></p>-Krishnan. <br><br><table style="width: 100%;" cellpadding="0" cellspacing="0"><tbody><tr><td class="cbln"><div class="mb"><div id="mb_0">









<div link="blue" vlink="purple" lang="EN-US">

<div>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Hi,</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">&nbsp;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">&nbsp;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">I have also sent this problem before. But did not get any
reply. It is urgent. Does anyone know about this?</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">&nbsp;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">&nbsp;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Suppose I have a rule as </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">&nbsp;</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt;">rule</span></font><font face="Courier New" size="2"><span style="font-size: 10pt;"> &quot;Rule1&quot; </span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;when</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Message( message == &quot;Hello&quot; ) || Message( status == 0 )</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;then</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
System.out.println(&quot;then executed&quot;);</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt;">End</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt;">&nbsp;</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt;">&nbsp;</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt;">Is there a way to find out which condition is
satisfied? I.e. whether message was equal to "Hello" or status was
0.</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt;">We are generating alerts using rules engine, and in
the alert we need to specify that which clause generated the alert. </span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt;">We are having multiple clauses in a single rule. So
what is the correct way to find the clause because of which alert is generated.
We cannot keep them in separate rule because we need to consider and\or
conditions between these clauses.</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt;">&nbsp;</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt;">Thanks,</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt;">Ashwini</span></font></p>

</div>

<p>DISCLAIMER
==========
This e-mail may contain privileged and confidential information which
is the property of Persistent Systems Pvt. Ltd. It is intended only for
the use of the individual or entity to which it is addressed. If you
are not the intended recipient, you are not authorized to read, retain,
copy, print, distribute or use this message. If you have received this
communication in error, please notify the sender and delete all copies
of this message. Persistent Systems Pvt. Ltd. does not accept any
liability for virus infected mails.</p>
</div>


<br>_______________________________________________<br>rules-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">
https://lists.jboss.org/mailman/listinfo/rules-users</a><br><br></div><br style="font-size: 8px;" clear="all"></div></td></tr></tbody></table><br><br><div><span class="gmail_quote">On 6/11/07, <b class="gmail_sendername">
Ashwini Joshi</b> &lt;<a href="mailto:ashwini_joshi@persistent.co.in">ashwini_joshi@persistent.co.in</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">









<div link="blue" vlink="purple" lang="EN-US">

<div>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Hi,</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">&nbsp;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">&nbsp;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">I have also sent this problem before. But did not get any
reply. It is urgent. Does anyone know about this?</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">&nbsp;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">&nbsp;</span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Suppose I have a rule as </span></font></p>

<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">&nbsp;</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt;">rule</span></font><font face="Courier New" size="2"><span style="font-size: 10pt;"> &quot;Rule1&quot; </span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;when</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Message( message == &quot;Hello&quot; ) || Message( status == 0 )</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;then</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
System.out.println(&quot;then executed&quot;);</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt;">End</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt;">&nbsp;</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt;">&nbsp;</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt;">Is there a way to find out which condition is
satisfied? I.e. whether message was equal to "Hello" or status was
0.</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt;">We are generating alerts using rules engine, and in
the alert we need to specify that which clause generated the alert. </span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt;">We are having multiple clauses in a single rule. So
what is the correct way to find the clause because of which alert is generated.
We cannot keep them in separate rule because we need to consider and\or
conditions between these clauses.</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt;">&nbsp;</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt;">Thanks,</span></font></p>

<p><font face="Courier New" size="2"><span style="font-size: 10pt;">Ashwini</span></font></p>

</div>

<p>DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Pvt. Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Pvt. Ltd. does not accept any liability for virus infected mails.
</p>
</div>


<br>_______________________________________________<br>rules-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">
https://lists.jboss.org/mailman/listinfo/rules-users</a><br><br></blockquote></div><br><br clear="all"><br>-- <br>Sivaramakrishna Iyer Krishnan (Anand) <br><br>Never assume the obvious is true. <br>- William Safire