<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2900.2769" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><SPAN class=905061217-29112005><FONT face=Arial color=#0000ff
size=2>Hi,</FONT></SPAN></DIV>
<DIV><SPAN class=905061217-29112005><FONT face=Arial color=#0000ff size=2>you
can try the following in the guard code:</FONT></SPAN></DIV>
<DIV><SPAN class=905061217-29112005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=905061217-29112005><FONT face=Arial color=#0000ff size=2>string
temp;</FONT></SPAN></DIV>
<DIV><SPAN class=905061217-29112005><FONT face=Arial color=#0000ff
size=2>person.GetStrValue("maritalStatus", temp);</FONT></SPAN></DIV>
<DIV><SPAN class=905061217-29112005><FONT face=Arial color=#0000ff size=2>return
(temp == "single");</FONT></SPAN></DIV>
<DIV><SPAN class=905061217-29112005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=905061217-29112005><FONT face=Arial color=#0000ff
size=2>Regards,</FONT></SPAN></DIV>
<DIV><SPAN class=905061217-29112005><FONT face=Arial color=#0000ff
size=2>Ananth</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
gme-users-bounces@list.isis.vanderbilt.edu
[mailto:gme-users-bounces@list.isis.vanderbilt.edu] <B>On Behalf Of </B>Tobias
Welp<BR><B>Sent:</B> Tuesday, November 29, 2005 9:15 AM<BR><B>To:</B>
gme-users<BR><B>Subject:</B> [gme-users] How to use Guards with
EnumAttributes<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>Hello,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Currently, Im trying to use GReAT in order
to make a transformation.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I want a rule only to be executed if
certain conditions are fulfilled. From the tutorial I learnt that
this can be done by a guard. Unfortunately, I have serious problems to
express the condition.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The rule should be executed if a
certain EnumAttribute of a Class has a specific value. I tried to
use</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>return
(<className>.<EnumAttributeName>() == <Value>);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>e.g. return (person.martialStatus()
== "single");</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>This does not function, I get an error
message.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I wondered if someone could tell me, what I have
to do in order to achieve my aim.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Regards,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Tobias</FONT></DIV>
<DIV> </DIV></BLOCKQUOTE></BODY></HTML>