Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » ATL - if then else(how to use if then else in an ATL rule)
ATL - if then else [message #559650] Fri, 17 September 2010 14:02 Go to next message
Kosala Yapa is currently offline Kosala YapaFriend
Messages: 159
Registered: September 2010
Senior Member

Can someone give me a simple example, how to use if then else structure in an ATL rule?

Re: ATL - if then else [message #560128 is a reply to message #559650] Tue, 21 September 2010 09:46 Go to previous message
Elhamlaoui Mahmoud is currently offline Elhamlaoui MahmoudFriend
Messages: 268
Registered: March 2010
Senior Member

you can do,

rule Family2Person {
from a : Family!Member
to p : Person!Person

fullName <- if (self.gender='Mr')
then 'Mr'+a.firstName
else 'Mme'+firstName

Good luck

Previous Topic:[ATL] Why my ATL query doesn't work?
Next Topic:[ATL] auto-completion
Goto Forum:

Current Time: Sat Jun 06 14:06:11 GMT 2020

Powered by FUDForum. Page generated in 0.06708 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top