In <font color="black" face="Courier New" size="2"><span style="font-size: 10pt; 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>
</span></font><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;"> ..., gameWinner == ( PARTICIPANTS.HOME.getId()</span></font> ), ...<br><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;"><br>
-W<br><br></span></font><br><div class="gmail_quote">2009/8/6 Zevenbergen, Alex <span dir="ltr"><<a href="mailto:azevenbergen@paddypower.com">azevenbergen@paddypower.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-GB">
<div>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Hi,</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">This is my where clause:</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p style=""><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(150, 0, 0); font-weight: bold;">when</span></font></b><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";"></span></font></p>
<p style=""><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;"> resultInfo : TennisResultInfo(endGame == </span></font><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(150, 0, 0); font-weight: bold;">true</span></font></b><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;"> , setNumber == 5,gameWinner == PARTICIPANTS.HOME.getId()
, gameLoseScore == 0)</span></font><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New";"></span></font></p>
<p><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(150, 0, 0); font-weight: bold;">then</span></font></b></p>
<p><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(150, 0, 0); font-weight: bold;"> </span></font></b></p>
<p><b><font color="#960000" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: rgb(150, 0, 0); font-weight: bold;"> </span></font></b></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">the rule falls over on </span></font><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;">PARTICIPANTS.HOME.getId()</span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;"> </span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;">PARTICIPANTS.HOME.getId()
is an enum and returns an integer.</span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;"> </span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;">If I replace
this line with the value that it would return the rule runs perfectly.</span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;"> </span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;">Do I have to
reference this in a certain way because it is an integer?</span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;"> </span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;">(Note all
imports are present and correct)</span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;"> </span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;">Thanks,</span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;"> </span></font></p>
<p><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; font-family: "Courier New"; color: black;">Alex</span></font><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"></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>
</div>
<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><br>
<br></blockquote></div><br>