I believe that this happens because of the usage of x.y.z (nested accessors). When using nested accessors, I think the engine is assuming the result is a single object and not an array.
Can you please open a jira for it and attach a test case?
I will fix that for 4.0.2.
Thanks.
[]s
Edson
2007/9/6, vamshidhar reddy chitti <chvreddy2001@yahoo.de
>:Hello Mr Edson,
I tried using memberOf , but i get
java.lang.ClassCastException
: Can't check if an attribute is member of an object of class class [Ljava.lang.String;
here is my code
MyFact($arraystore : x.y.z)
MyAnotherFact(a memberOf $arraystore)
where z is an string of array
and MyAnotherFact.a is a string
waiting for ur reply
thank you
vamshi
Edson Tirelli <
tirelli@post.com> schrieb:
Yes, but use "memberOf" instead of "in":
rule XYZ
when
MyFact( $array : arrayAttr )
AnotherFact( attr memberOf $array )
then
...
end
[]s
Edson
--
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 _______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
Yahoo! Clever: Stellen Sie Fragen und finden Sie Antworten. Teilen Sie Ihr Wissen.
_______________________________________________
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
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @
www.jboss.com