Thanking you – much appreciated
From:
rules-users-bounces@lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On
Behalf Of Wolfgang Laun
Sent: 07 August 2009 06:48
To: Rules Users List
Subject: Re: [rules-users] Using
Enums in when clause
In 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
..., gameWinner == ( PARTICIPANTS.HOME.getId() ),
...
-W
2009/8/6 Zevenbergen, Alex <azevenbergen@paddypower.com>
Hi,
This
is my where clause:
when
resultInfo :
TennisResultInfo(endGame == true , setNumber == 5,gameWinner == PARTICIPANTS.HOME.getId() ,
gameLoseScore == 0)
then
the
rule falls over on PARTICIPANTS.HOME.getId()
PARTICIPANTS.HOME.getId() is an enum and
returns an integer.
If I replace this line with the value
that it would return the rule runs perfectly.
Do I have to reference this in a certain
way because it is an integer?
(Note all imports are present and
correct)
Thanks,
Alex
________________________________________________________________________
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
please notify the sender immediately.
Paddy Power PLC may monitor the content of e-mail sent and received for the
purpose of ensuring compliance with its policies and procedures.
Paddy Power plc, Airton House,
________________________________________________________________________
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users