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

Fernando Meyer (JIRA) jira-events at lists.jboss.org
Fri Feb 15 16:01:29 EST 2008


    [ http://jira.jboss.com/jira/browse/JBRULES-1333?page=comments#action_12399632 ] 
            
Fernando Meyer commented on JBRULES-1333:
-----------------------------------------

drools 4.0.x doesn't support java 1.5 language features. 

> 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
>         Assigned To: Fernando Meyer
>
> 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