[rules-users] comparison of two variables on same object, JBoss Rules 3.0.6
Edson Tirelli
tirelli at post.com
Thu Jun 7 16:02:14 EDT 2007
Unfortunately, in 3.0.6, the only way is using eval in a subsequent
pattern:
when
Tree( $old : old, $new : new )
eval( $old.intValue() > $new.intValue() )
then
// do something
end
Also, remember that 3.0.6 auto-wraps any primitive value, so the need to
use the .intValue() method calls as you see in the eval() above.
4.0 shall be released later this month, so, hopefully we will not have
to deal with 3.0.x limitations for much longer.
[]s
Edson
2007/6/7, Wagner Rick - rwagne <Rick.Wagner at acxiom.com>:
>
> Edson,
>
> Thanks much, but regrettably I'm a 3.0.6 user for now. Can you offer
> any tips for that version?
>
> (Sorry to be backward looking-- I'll upgrade!)
>
> Thanks,
>
> Rick
>
>
> >Assuming you are using 4.0, just bind one and compare to the other:
> >
> >rule XXX
> >when
> > Tree( $new : newNumberLeaves, oldNumberLeaves > $new )
> >then
> > // do something
> >end
> *************************************************************************
> The information contained in this communication is confidential, is
> intended only for the use of the recipient named above, and may be
> legally privileged.
>
> If the reader of this message is not the intended recipient, you are
> hereby notified that any dissemination, distribution or copying of this
> communication is strictly prohibited.
>
> If you have received this communication in error, please resend this
> communication to the sender and delete the original message or any copy
> of it from your computer system.
>
> Thank you.
> *************************************************************************
>
> _______________________________________________
> 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/20070607/43d8ac7c/attachment.html
More information about the rules-users
mailing list