[rules-users] LHS with combined "from" condition

Edson Tirelli tirelli at post.com
Wed Dec 26 07:00:03 EST 2007


   Martin,

   I'm not sure I completely understood your problem. An easier way
(although not necessarily faster way) of doing it is:

when
    A( $session : oA.session )
    B( oB.session == $session )
then

    Hope it helps.

     Edson

2007/12/24, Martin Book <m.book at web.de>:
>
>  Hello,
>
>
>
> i have following problem with defining a rule:
>
> - Object type A contains object OA with attribute session(long).
>
> - Object type B contains object OB with attribute session(long).
>
>
>
> I would like to get any object of type B that contains object OB with
> OB.session==OA.session
>
>
>
> My LHS looks like this:
>
>
>
> When
>
>             $a:A()
>
>             OA($sess : session) from $a.getOA()
>
>             $b:B()
>
>             OB(session==$sess) from $b.getOB()
>
> Then
>
>>
>
>
> The problem is that condition two matches before condition three and
> condition three could not be set before condition two. Is it possible to
> group the conditions?
>
>
>
>
>
> kind regards and merry Christmas
>
>
>
> Martin
>
>
>
>
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>


-- 
  Edson Tirelli
  JBoss Drools Core Development
  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/20071226/f1063a69/attachment.html 


More information about the rules-users mailing list