[rules-users] How to validate boolean values..using Drools

manyasri.m manyasri.m at gmail.com
Wed Jun 18 07:29:37 EDT 2008


Thanks Alexander.
 
There was a question about Timestamp in my table.

Condtion is : compare to start_timestamp can not be less than or equal
Current Date.

i am trying to like this ,

EmployeEx(eval(startTimestamp.after(new
Timestamp(System.currentTimeMillis()))))
 
In This case No Rules to fired.Please review this condition sytex is correct
or not.

Thanks,
Manya....



Alexander Claus wrote:
> 
>> In My Employee Table column name HostVisible_YN. HostVisible_YN it's 
>> boolen
>> value.
>>
>> Condtion is: HostVisible_YN column value must be "Y" or "N".
>>
>>
>> How to validate this condition using drools..
> 
> Hi Manya,
> 
> feel free to experiment with the DRL language! A simple test gave, that
> the 
> most intuitive solution is possible:
> $value in ("Y", "N")
> Here you can read more: 
> http://downloads.jboss.com/drools/docs/4.0.7.19894.GA/html/ch06s05.html#d0e3166
> See section on Compound Value Restriction for details.
> 
> Alternatively you could use
> $value == "Y" || "N"
> which is the simplest solution which you should (!) have found even as a 
> beginner as I am.
> Again: experiment with the language!
> 
> Alexander Claus 
> 
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-validate-boolean-values..using-Drools-tp17882303p17980755.html
Sent from the drools - user mailing list archive at Nabble.com.




More information about the rules-users mailing list