[rules-users] storing array in variable!

Edson Tirelli tirelli at post.com
Wed Sep 5 12:37:39 EDT 2007


    Yes, but use "memberOf" instead of "in":

rule XYZ
when
    MyFact( $array : arrayAttr )
    AnotherFact( attr memberOf $array )
then
    ...
end

    []s
    Edson

2007/9/5, vamshidhar reddy chitti <chvreddy2001 at yahoo.de>:
>
> hi
> how to store array of string values in a variable and later checking for
> some value to be in that array..
> for example
> String[] str = new String[] { "Spouse", "Annuitant", "Nominee" };
>
> am trying to store like this
> $test1 : Object($example : str)
> is it right?
>
> and i need to compare like Object2 ( x in ($example) )
>
> my rule doesnt fire..
>
> please help me..
>
> tnx
> vamshi
>
> ------------------------------
> Beginnen Sie den Tag mit den neuesten Nachrichten. Machen Sie Yahoo! zu
> Ihrer Startseite!<http://de.rd.yahoo.com/evt=41213/*http://de.yahoo.com/set>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070905/16a5b1a8/attachment.html 


More information about the rules-users mailing list