[jboss-jira] [JBoss JIRA] Created: (JBRULES-1333) Enum doesn't work in the decision table

tobato king (JIRA) jira-events at lists.jboss.org
Tue Nov 20 12:33:19 EST 2007


Enum doesn't work in the decision table
---------------------------------------

                 Key: JBRULES-1333
                 URL: http://jira.jboss.com/jira/browse/JBRULES-1333
             Project: JBoss Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: Decision tables
    Affects Versions: 4.0.3
            Reporter: tobato king


I have a enum like this:
public enum JobStatus {
	UNEMPLOYED,EMPLOYED,RETIRED
}

I know i have to get a rule like this:

rule "EMPLOYED test"
	no-loop true
when
	    $moneys:List()
		$person:Person(jobstatus == JobStatus.EMPLOYED)	    
	then
		System.out.println( "EMPLOYED"+$person.getName()); 
		$moneys.add(new Money(2));
		retract($person);
end

I have imported the enum class and tryed define condition like JobStatus.EMPLOYED, EMPLOYED,"EMPLOYED", but nothing work!

I found JobStatus.EMPLOYED was convert to  
    $person:Person(jobstatus == "JobStatus.EMPLOYED")
buy the SpreadsheetCompiler

So, I  think it seems have a bug.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list