<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="country-region"
downloadurl="http://www.5iantlavalamp.com/"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="place" downloadurl="http://www.5iantlavalamp.com/"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="City" downloadurl="http://www.5iamas-microsoft-com:office:smarttags"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="address" downloadurl="http://www.5iamas-microsoft-com:office:smarttags"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="Street" downloadurl="http://www.5iantlavalampft-com:office:smarttags"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-GB link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Thanking you – much appreciated<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span lang=EN-US style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span lang=EN-US
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>
rules-users-bounces@lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] <b><span style='font-weight:bold'>On
Behalf Of </span></b>Wolfgang Laun<br>
<b><span style='font-weight:bold'>Sent:</span></b> 07 August 2009 06:48<br>
<b><span style='font-weight:bold'>To:</span></b> Rules Users List<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [rules-users] Using
Enums in when clause</span></font><span lang=EN-US><o:p></o:p></span></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>In </span></font><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New";color:black'>gameWinner == PARTICIPANTS.HOME.getId(), the second
operand isn't an enum, it's a method call on an enum object. Hence, it must be
written as a "Return Value Restriction" (cf. Expert doc on a Rule's
LHS), thus<br>
..., gameWinner == ( PARTICIPANTS.HOME.getId()</span></font> ),
...<br>
<font size=2 color=black face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:black'><br>
-W<br>
<br>
</span></font><o:p></o:p></p>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>2009/8/6 Zevenbergen, Alex <<a
href="mailto:azevenbergen@paddypower.com">azevenbergen@paddypower.com</a>><o:p></o:p></span></font></p>
<div link=blue vlink=purple>
<div>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Hi,</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> </span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>This
is my where clause:</span></font><o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> </span></font><o:p></o:p></p>
<p><b><font size=2 color="#960000" face="Courier New"><span style='font-size:
10.0pt;font-family:"Courier New";color:#960000;font-weight:bold'>when</span></font></b><o:p></o:p></p>
<p><font size=2 color=black face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:black'> resultInfo :
TennisResultInfo(endGame == </span></font><b><font size=2 color="#960000"
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:#960000;font-weight:bold'>true</span></font></b><font size=2 color=black
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:black'> , setNumber == 5,gameWinner == PARTICIPANTS.HOME.getId() ,
gameLoseScore == 0)</span></font><o:p></o:p></p>
<p><b><font size=2 color="#960000" face="Courier New"><span style='font-size:
10.0pt;font-family:"Courier New";color:#960000;font-weight:bold'>then</span></font></b><o:p></o:p></p>
<p><b><font size=2 color="#960000" face="Courier New"><span style='font-size:
10.0pt;font-family:"Courier New";color:#960000;font-weight:bold'> </span></font></b><o:p></o:p></p>
<p><b><font size=2 color="#960000" face="Courier New"><span style='font-size:
10.0pt;font-family:"Courier New";color:#960000;font-weight:bold'> </span></font></b><o:p></o:p></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>the
rule falls over on </span></font><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>PARTICIPANTS.HOME.getId()</span></font><o:p></o:p></p>
<p><font size=2 color=black face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:black'> </span></font><o:p></o:p></p>
<p><font size=2 color=black face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>PARTICIPANTS.HOME.getId() is an enum and
returns an integer.</span></font><o:p></o:p></p>
<p><font size=2 color=black face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:black'> </span></font><o:p></o:p></p>
<p><font size=2 color=black face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>If I replace this line with the value
that it would return the rule runs perfectly.</span></font><o:p></o:p></p>
<p><font size=2 color=black face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:black'> </span></font><o:p></o:p></p>
<p><font size=2 color=black face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>Do I have to reference this in a certain
way because it is an integer?</span></font><o:p></o:p></p>
<p><font size=2 color=black face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:black'> </span></font><o:p></o:p></p>
<p><font size=2 color=black face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>(Note all imports are present and
correct)</span></font><o:p></o:p></p>
<p><font size=2 color=black face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:black'> </span></font><o:p></o:p></p>
<p><font size=2 color=black face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>Thanks,</span></font><o:p></o:p></p>
<p><font size=2 color=black face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:black'> </span></font><o:p></o:p></p>
<p><font size=2 color=black face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:black'>Alex</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
________________________________________________________________________<br>
Privileged, confidential and/or copyright information may be contained in this
communication. This e-mail and any files transmitted with it are confidential
and intended solely for the use of the individual or entity to whom they are
addressed. If you are not the intended addressee, you may not copy, forward,
disclose or otherwise use this e-mail or any part of it in any way whatsoever.
To do so is prohibited and may be unlawful. If you have received this email in
error <br>
please notify the sender immediately.<br>
<br>
Paddy Power PLC may monitor the content of e-mail sent and received for the
purpose of ensuring compliance with its policies and procedures.<br>
<br>
Paddy Power plc, Airton House, <st1:Street w:st="on"><st1:address w:st="on">Airton
Road</st1:address></st1:Street>, Tallaght, <st1:City w:st="on">Dublin</st1:City>
24 Registered in <st1:country-region w:st="on"><st1:place w:st="on">Ireland</st1:place></st1:country-region>:
16956<br>
________________________________________________________________________<o:p></o:p></span></font></p>
</div>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><o:p></o:p></span></font></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
<BR>
________________________________________________________________________<BR>
Privileged, confidential and/or copyright information may be contained in this communication. This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended addressee, you may not copy, forward, disclose or otherwise use this e-mail or any part of it in any way whatsoever. To do so is prohibited and may be unlawful. If you have received this email in error <BR>
please notify the sender immediately.<BR>
<BR>
Paddy Power PLC may monitor the content of e-mail sent and received for the purpose of ensuring compliance with its policies and procedures.<BR>
<BR>
Paddy Power plc, Airton House, Airton Road, Tallaght, Dublin 24 Registered in Ireland: 16956<BR>
________________________________________________________________________<BR>
</body>
</html>