Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL]Unable to access name on OclUndefined
[ATL]Unable to access name on OclUndefined [message #647263] Wed, 05 January 2011 13:11 Go to next message
Alexey is currently offline AlexeyFriend
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 Go to previous messageGo to next message
Vincent MAHE is currently offline Vincent MAHEFriend
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
Re: Unable to access name on OclUndefined [message #647277 is a reply to message #647275] Wed, 05 January 2011 14:21 Go to previous messageGo to next message
Alexey is currently offline AlexeyFriend
Messages: 61
Registered: January 2010
Member
I know, i tried it out already! This doesnt work, because then I have both nodes at the same level, and I have to have them one inside another.

[Updated on: Wed, 05 January 2011 14:21]

Report message to a moderator

Re: Unable to access name on OclUndefined [message #647279 is a reply to message #647277] Wed, 05 January 2011 14:28 Go to previous message
Alexey is currently offline AlexeyFriend
Messages: 61
Registered: January 2010
Member
Alexey wrote on Wed, 05 January 2011 09:21
I know, i tried it out already! This doesnt work, because then I have both nodes at the same level, and I have to have them one inside another.


Oh, now I see!

U did it with referencing this "attr", now it works.
Thanx a lot!
Previous Topic:[ATL] CDO model as an input
Next Topic:[ATL] Not updated transformation.
Goto Forum:
  


Current Time: Mon Jun 24 22:18:02 GMT 2019

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

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

Back to the top