[gme-users] How to use Guards with EnumAttributes

Anantha Narayanan Ananth at isis.vanderbilt.edu
Tue Nov 29 11:15:38 CST 2005

you can try the following in the guard code:
string temp;
person.GetStrValue("maritalStatus", temp);
return (temp == "single");

-----Original Message-----
From: gme-users-bounces at list.isis.vanderbilt.edu
[mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf Of Tobias
Sent: Tuesday, November 29, 2005 9:15 AM
To: gme-users
Subject: [gme-users] How to use Guards with EnumAttributes

Currently, Im trying to use GReAT in order to make a transformation.
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.
The rule should be executed if a certain EnumAttribute of a Class has a
specific value. I tried to use
return (<className>.<EnumAttributeName>() == <Value>);
e.g. return (person.martialStatus() == "single");
This does not function, I get an error message.
I wondered if someone could tell me, what I have to do in order to
achieve my aim.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.isis.vanderbilt.edu/pipermail/gme-users/attachments/20051129/0ca3fdc3/attachment.htm

More information about the gme-users mailing list