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 12:40 Go to next message
Ton Tu is currently offline Ton Tu
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 03:35 Go to previous messageGo to next message
Vincent MAHE is currently offline Vincent MAHE
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 05:57 Go to previous messageGo to next message
Ton Tu is currently offline Ton Tu
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 06: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 06:14 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARD
Messages: 511
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 06:31 Go to previous message
Ton Tu is currently offline Ton Tu
Messages: 16
Registered: June 2010
Junior Member
I see Smile. Thanks a lot for your help

[Updated on: Tue, 08 June 2010 06: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: Thu Apr 17 08:41:55 EDT 2014

Powered by FUDForum. Page generated in 0.02498 seconds