[ATL]Unable to access name on OclUndefined [message #647263] |
Wed, 05 January 2011 13:11 |
Alexey Messages: 61 Registered: January 2010 |
Member |
|
|
Hello, ATL-Community!
Happy New Year 2011 for all!
May I ask you some question about ATL?
I try to perform this ATL-transformation-chain xml2PLM, PLM2ISyFMU, as you advised me for some time.
Now I have some difficulties with the PLM2ISyFMU part.
In my mapping I have to map the same source-class (PLM!Item) to two different target-classes (ISyFMU!Element and ISyFMU!Attribute, whereby Attribute has to be put inside the Element).
Here is the snplet of the ATL-Code, where I tried to do that:
rule Item2Element
{
from s: PLM!Item
to t: ISyFMU!Element(
name<-'item',
attributes<-thisModule.Item2Attribute()
)
}
lazy rule Item2Attribute
{
from s: PLM!Item
to t: ISyFMU!Attribute
(
name<-s.name,
id<-s.id -- Hier Fehlermeldung: Unable to access names on OclUndefined
)
}
For some reason it doesn't work, because of this error message:
org.eclipse.m2m.atl.engine.emfvm.VMException: Unable to access name on OclUndefined (at line name<-s.name)
Do you have an idea, why I get the message?
Thanx a lot,
Greetings,
Alexey
[Updated on: Wed, 05 January 2011 13:25] Report message to a moderator
|
|
|
Re: Unable to access name on OclUndefined [message #647275 is a reply to message #647263] |
Wed, 05 January 2011 13:44 |
Vincent MAHE Messages: 129 Registered: July 2009 |
Senior Member |
|
|
Le 05/01/2011 14:11, Alexey a écrit :
> Hello, ATL-Community!
> Happy New Year 2021 for all!
>
>
> May I ask you some question about ATL?
> I try to perform this ATL-transformation-chain xml2PLM, PLM2ISyFMU, as
> you advised me for some time.
> Now I have some difficulties with the PLM2ISyFMU part.
>
>
> In my mapping I have to map the same source-class (PLM!Item) to two
> different target-classes (ISyFMU!Element and ISyFMU!Attribute, whereby
> Attribute has to be put inside the Element).
>
>
> Here is the snplet of the ATL-Code, where I tried to do that:
>
>
You can create more than one element in a rule:
>
> rule Item2Element
>
> {
> from s: PLM!Item
> to t: ISyFMU!Element(
> name<-'item',
> attributes<-attr
> ),
> attr: ISyFMU!Attribute (
> name<-s.name,
> id<-s.id
> )
--
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
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04927 seconds