[jboss-jira] [JBoss JIRA] Created: (JBRULES-3001) Free form expression constraints: unexpected execution result; unexpected failure to compile

Wolfgang Laun (JIRA) jira-events at lists.jboss.org
Thu Apr 28 02:50:18 EDT 2011


Free form expression constraints: unexpected execution result; unexpected failure to compile 
---------------------------------------------------------------------------------------------

                 Key: JBRULES-3001
                 URL: https://issues.jboss.org/browse/JBRULES-3001
             Project: Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: drools-compiler (expert)
    Affects Versions: 5.2.0.CR1
            Reporter: Wolfgang Laun
            Assignee: Mark Proctor


Given 
public class Customer {
	int custid;
	//...
}

The following rule always fires, for any value of custid.

rule "articles of a customer"
when
    $c: Customer( 150 <= custid <= 250 ) returns true
then
    System.out.println( "Customer1 " + $c.getCustid() );
end

But the constraint
     $c: Customer(  100 <= custid ) 
is refused by the compiler:
     Unable to build constraint as  '100' is invalid : [Rule name='articles of a customer']




--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list