[rules-users] Adding an optional condition without using eval()
djb
dbrownell83 at hotmail.com
Tue Mar 2 07:36:52 EST 2010
Hi,
My rule template project is finally working, more-or-less.
I've got 5 lines of conditions, the last 2 of which are evals. One of them
compares dates, and has to be an eval(). The other though, I think I should
be able to convert to non-eval DRL, but I am not sure how, because it is an
optional condition.
So, I've got
$current:Claim(historic==false, ...)
$historic:Claim(historic==true, ...)
eval($current.hasSameDoctor($historic,"@{CHECK_DOCTOR}"));
so, the line disappears if @{CHECK_DOCTOR} is blank, which is what I want.
I want something like, eval($current.doc == $historic.doc)
but i only want to check this if @{CHECK_DOCTOR} is "Y".
Is there any way to do this check without an eval?
Regards,
Daniel
--
View this message in context: http://n3.nabble.com/Adding-an-optional-condition-without-using-eval-tp423886p423886.html
Sent from the Drools - User mailing list archive at Nabble.com.
More information about the rules-users
mailing list