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

Edson Tirelli tirelli at post.com
Wed Feb 6 07:34:59 EST 2008


   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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080206/7a5a9597/attachment.html 


More information about the rules-users mailing list