Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] How to execute many rules in the same atl file
[ATL] How to execute many rules in the same atl file [message #538459] Mon, 07 June 2010 16:40 Go to next message
Ton Tu is currently offline Ton TuFriend
Messages: 16
Registered: June 2010
Junior Member
I intend to execute many rules which applied to one input model and one output model. Each rule will transform each different element ( The destination model has many elements needed to be transformed ) . I intend to use helper but every helper must return a value while a rule doesn't return anything. Could you recommend me a solution please.
Re: [ATL] How to execute many rules in the same atl file [message #538602 is a reply to message #538459] Tue, 08 June 2010 07:35 Go to previous messageGo to next message
Vincent MAHE is currently offline Vincent MAHEFriend
Messages: 129
Registered: July 2009
Senior Member
Le 07/06/2010 18:40, Ton Tu a écrit :
> I intend to execute many rules which applied to one input model and one
> output model. Each rule will transform each different element ( The
> destination model has many elements needed to be transformed ) . I
> intend to use helper but every helper must return a value while a rule
> doesn't return anything. Could you recommend me a solution please.

I do not understand where is the problem.
Each ATL rule applies on the elements matching this rule "from" section.
You can have as many rules as you like (unitl their "from" sections do
overlap).
--
Cordialement

Vincent MAHÉ

Ingénieur Expert - Projet IDM++ - Équipe AtlanMod
École des Mines de Nantes
La Chantrerie - 4, rue Alfred Kastler
B.P. 20722 - F-44307 NANTES Cedex 3
Tel: (33)2 51 85 81 00
Re: [ATL] How to execute many rules in the same atl file [message #538640 is a reply to message #538602] Tue, 08 June 2010 09:57 Go to previous messageGo to next message
Ton Tu is currently offline Ton TuFriend
Messages: 16
Registered: June 2010
Junior Member
Actually I'm dealing with the problem of hierachial elements in the target model. To be more specific, I'll illustrate by an example to see if you can help me solve this.
I have 2 metamodel :
http://i854.photobucket.com/albums/ab109/capint/AMetaModel.jpg

And
http://i854.photobucket.com/albums/ab109/capint/BMetaModel.jpg

I want to transform all information from model A.xmi which conforms to A.ecore :
http://i854.photobucket.com/albums/ab109/capint/AModel.jpg

to model B.xmi which conforms to B.ecore.

I tried by this atl file :
http://i854.photobucket.com/albums/ab109/capint/A2BRule.jpg

And the result is :
http://i854.photobucket.com/albums/ab109/capint/BModel.jpg

which is not what I want.

Could you recommend me a solution ? It will be appreciated.

[Updated on: Tue, 08 June 2010 10:07]

Report message to a moderator

Re: [ATL] How to execute many rules in the same atl file [message #538643 is a reply to message #538459] Tue, 08 June 2010 10:14 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
This is a meta-model related problem, not an ATL one, modify your EReferences in B.ecore so set containment to true.
Re: [ATL] How to execute many rules in the same atl file [message #538648 is a reply to message #538643] Tue, 08 June 2010 10:31 Go to previous message
Ton Tu is currently offline Ton TuFriend
Messages: 16
Registered: June 2010
Junior Member
I see Smile. Thanks a lot for your help

[Updated on: Tue, 08 June 2010 10:35]

Report message to a moderator

Previous Topic:[ATL] Cannot handle Associations between UML Stereotypes
Next Topic:[QVTo] Mapping 1 to many objects results in output object appearing as siblings
Goto Forum:
  


Current Time: Tue Apr 23 06:44:07 GMT 2024

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

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

Back to the top