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
Hi,

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

Cheers,
Kosala
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
Hi,

you can do,

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

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


Good luck
Mahmoud

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


Current Time: Wed Apr 24 19:19:59 GMT 2024

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

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

Back to the top