[rules-users] Issue with "contains" keyword

Bynum, Joe jbynum at onecommunications.com
Thu Apr 19 09:08:56 EDT 2007


I switched the type to a String, slapped some quotes around 921 and it
works as expected.  Any ideas about why it's not working with an
Integer?

________________________________

From: rules-users-bounces at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Bynum, Joe
Sent: Thursday, April 19, 2007 8:53 AM
To: rules-users at lists.jboss.org
Subject: [rules-users] Issue with "contains" keyword


I'm doing some simple evaluation of jrules and I ran into a problem.
Here's the rule I'm having problems with:
 
rule "751845 - Check Stages"

    when

        order : Order( stages excludes 921 )

    then

        System.out.println( "This order contains " + order.getStages()
);

end

OUTPUT:

This order contains [804, 921]

I'm actually trying to do the opposite using 'stages contains 921'.
stages is defined as follows in the Order object.

private ArrayList<Integer> stages;

I'm using the 3.0.6 binaries on W2K w/Eclipse.

Any ideas what I'm doing wrong here?

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070419/5354d369/attachment.html 


More information about the rules-users mailing list