<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.5945" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=568371416-19052010><FONT face=Tahoma color=#000080 size=2>Hi 
All,</FONT></SPAN></DIV>
<DIV><SPAN class=568371416-19052010><FONT face=Tahoma color=#000080 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=568371416-19052010><FONT face=Tahoma color=#000080 size=2>I've 
recently started using Drools and Guvnor, and so far really like 
it!</FONT></SPAN></DIV>
<DIV><SPAN class=568371416-19052010><FONT face=Tahoma color=#000080 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=568371416-19052010><FONT face=Tahoma color=#000080 size=2>I 
have one problem however, to do with Java enums in Guvnor. </FONT></SPAN></DIV>
<DIV><SPAN class=568371416-19052010><FONT face=Tahoma color=#000080 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=568371416-19052010><FONT face=Tahoma color=#000080 size=2>I 
have a simple enum as follows:</FONT></SPAN></DIV><B><FONT color=#7f0055><FONT 
color=#7f0055>
<P align=left><FONT face="Courier New" 
size=2>public</FONT></B></FONT></FONT><FONT face="Courier New"><FONT size=2> 
<B><FONT color=#7f0055><FONT 
color=#7f0055>enum</B></FONT></FONT></FONT></FONT><FONT face="Courier New"><FONT 
size=2> STPRuleAction<BR>{<BR><I><FONT color=#0000c0><SPAN 
class=568371416-19052010>&nbsp;&nbsp;&nbsp; </SPAN>UNKNOWN</FONT></I>, <I><FONT 
color=#0000c0><FONT color=#0000c0>ACCEPT</I></FONT></FONT></FONT></FONT><FONT 
face="Courier New"><FONT size=2>, <I><FONT color=#0000c0><FONT 
color=#0000c0>REJECT</I></FONT></FONT></FONT></FONT><I><FONT color=#0000c0><FONT 
color=#0000c0><FONT face="Courier New" size=2><BR></FONT></I></FONT></FONT><FONT 
face="Courier New" size=2>}</FONT></P>
<DIV><SPAN class=568371416-19052010><FONT face=Tahoma color=#000080 size=2>I can 
hand write a rule that works fine with this enum as 
follows:</FONT></SPAN></DIV><B><FONT color=#960000><FONT color=#960000>
<P align=left><FONT face="Courier New" size=2>rule</FONT></B></FONT></FONT><FONT 
face="Courier New" size=2> </FONT><FONT face="Courier New"><FONT size=2><FONT 
color=#008000><FONT color=#008000>"Retract rejected"<BR></FONT></FONT><B><FONT 
color=#960000><SPAN class=568371416-19052010>&nbsp;&nbsp;&nbsp; 
</SPAN>dialect</FONT></B> </FONT></FONT><FONT color=#008000><FONT 
face="Courier New" color=#008000 size=2>"mvel"<BR></FONT></FONT><FONT 
face="Courier New"><FONT size=2><B><FONT color=#960000><SPAN 
class=568371416-19052010>&nbsp;&nbsp;&nbsp; </SPAN>when<BR></FONT></B><SPAN 
class=568371416-19052010>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>o : CtasOrder( stpRuleAction == STPRuleAction.REJECT 
)<BR></FONT></FONT><FONT face="Courier New"><FONT size=2><B><FONT 
color=#960000><SPAN class=568371416-19052010>&nbsp;&nbsp;&nbsp; 
</SPAN>then<BR></FONT></B><SPAN 
class=568371416-19052010>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>o.setStatus( 1 );<BR><B><FONT color=#960000><SPAN 
class=568371416-19052010>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>retract</FONT></B>( o );<BR><B><FONT color=#960000><FONT 
color=#960000>end</P></B></FONT></FONT></FONT></FONT>
<DIV><SPAN class=568371416-19052010><FONT face=Tahoma color=#000080 
size=2>However, if I create a rule with Guvnor, it always puts quotes around the 
condition, so seems to treat it as a string and it is never triggered.&nbsp;I 
have created a Guvnor&nbsp;enumeration as follows:</FONT></SPAN></DIV>
<DIV><SPAN class=568371416-19052010><FONT face=Tahoma color=#000080 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=568371416-19052010><FONT face="Courier New" 
size=2>'CtasOrder.stpRuleAction' : ['STPRuleAction.UNKNOWN=UNKNOWN', 
'STPRuleAction.ACCEPT=ACCEPT', 
'STPRuleAction.REJECT=REJECT']</FONT></SPAN></DIV>
<DIV><SPAN class=568371416-19052010><FONT face=Tahoma color=#000080 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=568371416-19052010><FONT face=Tahoma color=#000080 size=2>Which 
gives me the correct drop down values in the Business Rule editor, but the 
source of the rule looks like:</FONT></SPAN></DIV>
<DIV><SPAN class=568371416-19052010><FONT face=Tahoma color=#000080>
<P align=left><FONT size=2><FONT face="Courier New" 
color=#800000><STRONG>rule</STRONG></FONT><FONT face="Courier New" 
color=#000000> </FONT></FONT><FONT face="Courier New"><FONT size=2><FONT 
color=#008000><FONT color=#008000>"Retract rejected"<BR></FONT></FONT><B><FONT 
color=#960000><SPAN class=568371416-19052010>&nbsp;&nbsp;&nbsp; 
</SPAN>dialect</FONT></B><FONT color=#000000> </FONT></FONT></FONT><FONT 
color=#008000><FONT face="Courier New" color=#008000 
size=2>"mvel"<BR></FONT></FONT><B><FONT color=#960000><FONT 
face="Courier New"><FONT size=2><SPAN 
class=568371416-19052010>&nbsp;&nbsp;&nbsp; 
</SPAN>when<BR></FONT></FONT></FONT></B><FONT color=#000000><FONT 
face="Courier New"><FONT size=2><SPAN 
class=568371416-19052010>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>o : CtasOrder( stpRuleAction == <FONT color=#008000><FONT 
color=#008000><STRONG>"STPRuleAction.REJECT"</STRONG></FONT></FONT>)<BR></FONT></FONT></FONT><B><FONT 
color=#960000><FONT face="Courier New"><FONT size=2><SPAN 
class=568371416-19052010>&nbsp;&nbsp;&nbsp; 
</SPAN>then<BR></FONT></FONT></FONT></B><FONT face="Courier New"><FONT 
size=2><FONT color=#000000><SPAN 
class=568371416-19052010>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>o.setStatus( 1 );<BR></FONT><B><FONT color=#960000><SPAN 
class=568371416-19052010>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>retract</FONT></B></FONT></FONT><FONT face="Courier New"><FONT 
size=2><FONT color=#000000>( o );<BR></FONT><B><FONT color=#960000><FONT 
color=#960000>end</P></B></FONT></FONT></FONT></FONT></FONT></SPAN></DIV>
<DIV><FONT size=2><SPAN class=568371416-19052010><FONT face=Tahoma 
color=#000080>I've tried without the mapping in the enumeration (e.g <FONT 
face="Courier New" color=#000000>... : ['STPRuleAction.UNKNOWN', 
...</FONT></FONT></SPAN><SPAN class=568371416-19052010><FONT face=Tahoma 
color=#000080>) and even removing the enumeration and adding the text manually 
as a literal value. I can't see any way to specfy a enum/qualifiedIdentifier as 
a condition in Guvnor. It works fine as a consequence and produces a rule 
without quotes around (e.g. <FONT face="Courier New" 
color=#000000>o.setStpRuleAction( STPRuleAction.REJECT 
)...</FONT></FONT></SPAN><SPAN class=568371416-19052010><FONT face=Tahoma 
color=#000080>)</FONT></SPAN></FONT></DIV>
<DIV><FONT face=Tahoma color=#000080 size=2><SPAN 
class=568371416-19052010></SPAN></FONT>&nbsp;</DIV>
<DIV><SPAN class=568371416-19052010><FONT face=Tahoma color=#000080 size=2>Many 
thanks for any assistance you can give.</FONT></SPAN></DIV>
<DIV><SPAN class=568371416-19052010><FONT face=Tahoma color=#000080 
size=2>Regards,</FONT></SPAN></DIV>
<DIV><SPAN class=568371416-19052010><FONT face=Tahoma color=#000080 
size=2>Ian</FONT></SPAN></DIV></BODY></HTML>