Skip to main content



      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 05:56 Go to next message
Eclipse UserFriend
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 04:25 Go to previous messageGo to next message
Eclipse UserFriend
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 05:14 Go to previous messageGo to next message
Eclipse UserFriend
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] Mon, 26 November 2007 22:23 Go to previous message
Eclipse UserFriend
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: Sun May 04 11:46:31 EDT 2025

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

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

Back to the top