In your rule this line:
msg : Message(type == "XML", payload : payload)
is incorrect. You're trying to match an enum, not a String.
Try this:
msg : Message(type == Type.XML, payload : payload)
-Allen
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On
Behalf Of Thierry B
Sent: Monday, December 01, 2008 8:03 AM
To: Rules Users List
Subject: RE: [rules-users] drools 4.0 and enum in java 1.5
Maybe you will have to import Message.Type.XML in the drl file and
then use it.
Hello,
I've these imports :
import com.pv.rules.beans.Message;
import com.pv.rules.beans.Message.Type.XML;
but it tell me :
Unable to create restriction '[QualifiedIndentifierRestr: ==
com.pv.rules.beans.Message.Type.XML ]' for field 'type' in the rule
'Contexte1' : [Rule name=Contexte1, agendaGroup=MAIN, salience=0, no-loop=false]
Rule Compilation error : [Rule name=Contexte1, agendaGroup=MAIN, salience=0,
no-loop=false]
com/pv/rules/Rule_Contexte1_0.java (2:63) : The import
com.pv.rules.beans.Message.Type.XML cannot be resolved
com.pv.rules.beans.Message.Type.XML
Maybe, it's not possible to use enum in drl :-(
Thanks :-)
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users