[ATL] uml inter-model references problems [message #66010] |
Wed, 14 November 2007 05:56  |
Eclipse User |
|
|
|
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 #66830 is a reply to message #66228] |
Mon, 26 November 2007 22:23  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03151 seconds