Hi Daniel,<br><br>Put the reference in a comment and be careful where you put your commas!<br><br>$current:Claim(historic= false, ...)<br>$historic:Claim(historic==true, ...<br>                      , $current.doc == $history.doc // @{CHECK_DOCTOR}<br>
                      )<br><br>If you&#39;re trying to do what I think you&#39;re trying to do, the above should work :)<br>When there is no value in the CHECK_DOCTOR field, the entire line:<br>    <br>                           , $current.doc == $history.doc // @{CHECK_DOCTOR}<br>

<br>will not be included and the rule will look like the following:<br><br>$current:Claim(historic= false, ...)<br>
$historic:Claim(historic==true, ...<br>
                      )<br><br>
Which is fine.<br><br>Hope it helps,<br><br>Enda<br><br><div class="gmail_quote">On Tue, Mar 2, 2010 at 12:36 PM, djb <span dir="ltr">&lt;<a href="mailto:dbrownell83@hotmail.com">dbrownell83@hotmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><br>
Hi,<br>
<br>
My rule template project is finally working, more-or-less.<br>
<br>
I&#39;ve got 5 lines of conditions, the last 2 of which are evals.  One of them<br>
compares dates, and has to be an eval().  The other though, I think I should<br>
be able to convert to non-eval DRL, but I am not sure how, because it is an<br>
optional condition.<br>
<br>
So, I&#39;ve got<br>
$current:Claim(historic==false, ...)<br>
$historic:Claim(historic==true, ...)<br>
eval($current.hasSameDoctor($historic,&quot;@{CHECK_DOCTOR}&quot;));<br>
<br>
so, the line disappears if @{CHECK_DOCTOR} is blank, which is what I want.<br>
I want something like, eval($current.doc == $historic.doc)<br>
but i only want to check this if @{CHECK_DOCTOR} is &quot;Y&quot;.<br>
<br>
Is there any way to do this check without an eval?<br>
<br>
Regards,<br>
Daniel<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://n3.nabble.com/Adding-an-optional-condition-without-using-eval-tp423886p423886.html" target="_blank">http://n3.nabble.com/Adding-an-optional-condition-without-using-eval-tp423886p423886.html</a><br>

Sent from the Drools - User mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Enda J Diggins<br>