[rules-users] having a little problem when using LHS variable in RHS

nemesis29 at free.fr nemesis29 at free.fr
Wed Feb 6 08:58:00 EST 2008


Effectivly you're right!! Changed to mvel-1.2.21-java1.5.jar and all is working
now!

Thank you very much for your help!

Nicolas

Selon Edson Tirelli <tirelli at post.com>:

>    I guess you are using the wrong mvel version. Please double check the
> MVEL jar to make sure it is the correct for the drools version you have.
>
>    []s
>    Edson
>
> 2008/2/6, nemesis29 at free.fr <nemesis29 at free.fr>:
> >
> > Hello All,
> >
> > Well i'm trying to create a rule witch need to get some infos in the RHS
> > that
> > are available in variables declared in the LHS part of the rule.
> >
> > To make it clear (as my english is not on top ;-) here is an exemple:
> >
> > the rule file :
> >
> >
> > rule "NODSLVIP"
> >         dialect "java"
> >         when
> >                 $rt : RuleTargetContainer()
> >                 $travellers : TravellerListType() from
> > $rt.metaDossier.travellers
> >                 $traveller : TravellerType() from $travellers.traveller
> >                 $user : UserType() from $traveller.user
> >                 $personalInfo : PersonalInfoType(isVIP == true) from
> > $user.personalInfo
> >         then
> >                 System.out.println("VIP");
> >                 System.out.println($user.getName());
> > end
> >
> > When i use it in my code i have the following exception trhown :
> >
> > org.mvel.CompileException: problem encountered at node [11] 5{172,191}:
> > unable
> > to resolve token: declr.identifier
> >
> > If i remove the line printing the user name all goes well (ie : i have VIP
> > in my
> > trace when user is vip ^^ ).
> >
> > What am i missing here? I have seen in the documentation that using LHS
> > variable
> > is possible bu can't make it work for my case :-( .
> >
> > Thant in advance for any help you can supply.
> >
> > N Beucler.
> > _______________________________________________
> > 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
>





More information about the rules-users mailing list