If I want to test for all ith element,
Like this
rule "Test"
when
e :
Especialista(retratoUser.lstCarac.get(i).codCarac != 0)
then
System.out.println ("test");
end
what should I do
From:
rules-users-bounces@lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On
Behalf Of Edson Tirelli
Sent: Wednesday, October 03, 2007
6:10 AM
To: Rules Users List
Subject: Re: [rules-users] Using
java.util.List in rules
You can't explicitly call methods in the field name. Use MVEL
special notation for lists:
e : Especialista(retratoUser.lstCarac[0].codCarac != 0)
[]s
Edson
2007/10/2, Anderson Pazza Mello <payakahn@gmail.com>:
Hi everyone,
I'm trying to use a java.util.List like this:
rule "Test"
when
e :
Especialista(retratoUser.lstCarac.get(0).codCarac != 0)
then
System.out.println ("test");
end
The property lstCarac is a java.util.List<Caracteristica>. I'm getting
this error :
org.drools.rule.InvalidRulePackage: [18,44]: unknown:18:44 Unexpected token
'0'[18,46]: unknown:18:46 Unexpected token '.'
at org.drools.rule.Package.checkValidity(Package.java:419)
Someone knows what i have to do to fix the problem??
--
Tecnologia em Informática - UFPR
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Edson Tirelli
Software Engineer - JBoss Rules Core Developer
Office: +55 11 3529-6000
JBoss, a division of Red Hat @ www.jboss.com