[rules-users] RE: rules-users Digest, Vol 7, Issue 15

Edson Tirelli tirelli at post.com
Thu Jun 7 14:07:15 EDT 2007


   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

   []s
   Edson

2007/6/7, Wagner Rick - rwagne <Rick.Wagner at acxiom.com>:
>
> Hi all,
>
> I'd like to make a comparison of two attributes on the same object, but
> would like to do it in one line to facilitate easy DSL.
>
> Example:
>
> Class Tree{
>         int oldNumberLeaves;
>         int newNumberLeaves;
> }
>
> What I'd like to say is "when the oldNumberLeaves > newNumberLeaves
> then...."
>
> Can anyone give me a tip on this one?
>
> Thanks much,
>
> Rick
> *************************************************************************
> 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/ad673d85/attachment.html 


More information about the rules-users mailing list