Seems the engine does not know your list is composed by Integers and so, does not convert your 921 constant into an integer.

    Not sure if we will be able to change that while keeping java 1.4 compatibility, but you can add a JIRA for investigating that.

    Meanwhile, best way is probably to set your constant as a global or something.


2007/4/19, Bynum, Joe <>:
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: [] On Behalf Of Bynum, Joe
Sent: Thursday, April 19, 2007 8:53 AM
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:
"751845 - Check Stages"


        order : Order( stages excludes 921 )


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



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.


ArrayList<Integer> stages;

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

Any ideas what I'm doing wrong here?


rules-users mailing list

  Edson Tirelli
  Software Engineer - JBoss Rules Core Developer
  Office: +55 11 3124-6000
  Mobile: +55 11 9218-4151
  JBoss, a division of Red Hat @