[rules-users] facts comparison
Edson Tirelli
tirelli at post.com
Tue Aug 28 10:41:12 EDT 2007
Sure:
$p1 : Person(...)
$p2 : Person( this == $p1, ... )
"this" is a special self reference field. You can use any operator,
obviously: ==, !=, memberOf, contains, etc, as appropriate.
[]s
Edson
2007/8/28, hypnosat7 <ablarbi at yahoo.fr>:
>
>
> Hi,
>
> I need to compare 2 facts for example :
> $p1:Person(age==30)
> $p2:Person(age==40)
> $p1==$p2
>
> can I do this comparison directly without usinfg the eval ?
> thanks
> --
> View this message in context:
> http://www.nabble.com/facts-comparison-tf4341918.html#a12368537
> Sent from the drools - user mailing list archive at Nabble.com.
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
--
Edson Tirelli
Software Engineer - JBoss Rules Core Developer
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070828/f4917129/attachment.html
More information about the rules-users
mailing list