Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] references between in and out models
[ATL] references between in and out models [message #78856] Fri, 11 April 2008 08:20 Go to next message
Miguel Llàcer San Fernando is currently offline Miguel Llàcer San FernandoFriend
Messages: 63
Registered: July 2009
Member
Hi,

my problem is:

I have 2 metamodels (catalogMM and configurationMM) and I want to
transform a model of first one to the second one. Problem is that I have a
reference in second metamodel to an object of first one:

CatalogMM has an element Catalog.
ConfigurationMM has an element Configuration which has a reference
(catalog) to the element Catalog of CatalogMM.

The transformation between elements could be like this:

rule Catalog2Configuration {
from
i : CATALOG!Catalog
to
o : CONFIGURATION!Configuration (
name <- 'Transformation UML2DB',
catalog <- i
)
}

It transforms without problems but when I open out model, the reference
hasn't value.
I have done 2 models as example and I have realized that this reference is
represented with href that contains a ref to the first model.

How can I solve this ?¿

Thanks.
Re: [ATL] references between in and out models [message #78869 is a reply to message #78856] Fri, 11 April 2008 08:39 Go to previous messageGo to next message
urs zeidler is currently offline urs zeidlerFriend
Messages: 91
Registered: July 2009
Member
Miguel Llácer schrieb:
First you need to switch allowInterModelReferences on.
Also if you have a rule transforming A -> B, and you want to set B.a to
A you need to do this in the imperative part of your rule, because the
engine will know that it has transform A to B and will set B.a to B.

> rule Catalog2Configuration {
> from
> i : CATALOG!Catalog
> to
> o : CONFIGURATION!Configuration (
> name <- 'Transformation UML2DB',
-- catalog <- i
> )
do{
catalog <- i;
}
> }

greetings, urs.
Re: [ATL] references between in and out models [message #78881 is a reply to message #78869] Fri, 11 April 2008 09:31 Go to previous message
Miguel Llàcer San Fernando is currently offline Miguel Llàcer San FernandoFriend
Messages: 63
Registered: July 2009
Member
Ok, thanks ! ! !
Previous Topic:aggregation relationship?
Next Topic:[QVTO]Aggregation Relationship?
Goto Forum:
  


Current Time: Fri Apr 26 02:43:47 GMT 2024

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

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

Back to the top