使用drools决策表与Enum冲突问题
|
tobato
2007-11-10
drools为我们提供了决策表这个东西,使用Excel表达可以有更好的可理解性。
问题是当定义了java1.5 中Enum对象后,使用Excel中的Condition不知道怎么去配置了。。。 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 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 Guess the decision table does not support java1.5 Enum?? |

