Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] uml inter-model references problems
[ATL] uml inter-model references problems [message #66010] Wed, 14 November 2007 10:56 Go to next message
José Carlos Herrero is currently offline José Carlos HerreroFriend
Messages: 5
Registered: July 2009
Junior Member
Hello,

I am trying to implement basic data types transformation between UML2
class model and datatools SQLModel. My first option is make that by
means of matched rules but in this case no rule is executed.

This is an example:

rule test {
from
i : UML!DataType
to
.........
}

This rule is never triggered even though my model looks like this:

.........
<type xmi:type="uml:DataType"
href="BasicTypes.uml#_T2J54JEqEdy2scAHXnZ0kg"/>
.........

In the other hand if I make an explicit access to the property "type" of
element property I manage to retrieve data from his type correctly.

I am using ATL 2.0.0 with Eclipse Europa fall maintenance and I have
checked the "allow inter-model references" option in the configuration
launcher.

In spite of being able to solve this problem using called rules I rather
use matched rules.

Any idea?

Thanks
JC
Re: [ATL] uml inter-model references problems [message #66183 is a reply to message #66010] Thu, 15 November 2007 09:25 Go to previous messageGo to next message
William Piers is currently offline William PiersFriend
Messages: 301
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040206030600010406040708
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hello,

Jos
Re: [ATL] uml inter-model references problems [message #66228 is a reply to message #66183] Thu, 15 November 2007 10:14 Go to previous messageGo to next message
José Carlos Herrero is currently offline José Carlos HerreroFriend
Messages: 5
Registered: July 2009
Junior Member
Thank you,

As you said I solved it using called rules. I just wanted to know if it
was possible to use matched rules instead of called rules.

JC

William Piers escribió:
> Hello,
>
> José Carlos Herrero a écrit :
>> Hello,
>>
>> I am trying to implement basic data types transformation between UML2
>> class model and datatools SQLModel. My first option is make that by
>> means of matched rules but in this case no rule is executed.
>>
>> This is an example:
>>
>> rule test { from
>> i : UML!DataType
>> to
>> ........
>> }
>>
>> This rule is never triggered even though my model looks like this:
>>
>> ........
>> <type xmi:type="uml:DataType"
>> href="BasicTypes.uml#_T2J54JEqEdy2scAHXnZ0kg"/>
>> ........
>>
>
> The problem is that the type is only referenced in the model, and the
> target points to the metamodel. So no inputs elements of this kind are
> matching the "test" rule.
>
>> In the other hand if I make an explicit access to the property "type"
>> of element property I manage to retrieve data from his type correctly.
>>
>> I am using ATL 2.0.0 with Eclipse Europa fall maintenance and I have
>> checked the "allow inter-model references" option in the configuration
>> launcher.
>>
>> In spite of being able to solve this problem using called rules I
>> rather use matched rules.
>>
>
> The best solution (in my mind) is to use called rules.
>
>> Any idea?
>>
>
> You can find an example in this use case :
> http://www.eclipse.org/m2m/atl/usecases/UML2MOF/
> (download the "source" package, and look at the
> UML2ClassDiagram_to_KM3\Transformations\UML2KM3.atl file).
>
>> Thanks
>> JC
>>
>>
>
> Regards,
>
> William
Re: [ATL] uml inter-model references problems [message #66830 is a reply to message #66228] Tue, 27 November 2007 03:23 Go to previous message
Frédéric Jouault is currently offline Frédéric JouaultFriend
Messages: 572
Registered: July 2009
Senior Member
Hello,

Did you add BasicTypes.uml to the source models of your transformation?


Regards,

Frédéric Jouault



José Carlos Herrero wrote:
> Thank you,
>
> As you said I solved it using called rules. I just wanted to know if it
> was possible to use matched rules instead of called rules.
>
> JC
>
> William Piers escribió:
>> Hello,
>>
>> José Carlos Herrero a écrit :
>>> Hello,
>>>
>>> I am trying to implement basic data types transformation between UML2
>>> class model and datatools SQLModel. My first option is make that by
>>> means of matched rules but in this case no rule is executed.
>>>
>>> This is an example:
>>>
>>> rule test { from
>>> i : UML!DataType
>>> to
>>> ........
>>> }
>>>
>>> This rule is never triggered even though my model looks like this:
>>>
>>> ........
>>> <type xmi:type="uml:DataType"
>>> href="BasicTypes.uml#_T2J54JEqEdy2scAHXnZ0kg"/>
>>> ........
>>>
>>
>> The problem is that the type is only referenced in the model, and the
>> target points to the metamodel. So no inputs elements of this kind are
>> matching the "test" rule.
>>
>>> In the other hand if I make an explicit access to the property "type"
>>> of element property I manage to retrieve data from his type correctly.
>>>
>>> I am using ATL 2.0.0 with Eclipse Europa fall maintenance and I have
>>> checked the "allow inter-model references" option in the
>>> configuration launcher.
>>>
>>> In spite of being able to solve this problem using called rules I
>>> rather use matched rules.
>>>
>>
>> The best solution (in my mind) is to use called rules.
>>
>>> Any idea?
>>>
>>
>> You can find an example in this use case :
>> http://www.eclipse.org/m2m/atl/usecases/UML2MOF/
>> (download the "source" package, and look at the
>> UML2ClassDiagram_to_KM3\Transformations\UML2KM3.atl file).
>>
>>> Thanks
>>> JC
>>>
>>>
>>
>> Regards,
>>
>> William
Previous Topic:[ATL] Launch programmatically + 2.0 bundle
Next Topic:[ATL] Writing to helpers in model element context
Goto Forum:
  


Current Time: Fri Apr 19 11:26:46 GMT 2024

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

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

Back to the top