ATL - error getting some fields from UML model [message #870503] |
Tue, 08 May 2012 09:16  |
Eclipse User |
|
|
|
Hi,
I'm getting the follow error when I'm trying to read a UML file into ATL code:
org.eclipse.m2m.atl.engine.emfvm.VMException: The value of type 'class org.eclipse.emf.ecore.impl.DynamicEObjectImpl' must be of type 'class java.lang.String'
I've a UML sequence diagram as Input and it will generate a new UML file, however this error is appearing when I try to get the covered, or sendEvent, or receiveEvent or represents value from UML.
One rule is it:
rule msg {
from
y: UML!Message
to
w: input!mensagem (
name <- y.name,
sender <- y.sendEvent
)
}
I can get the name from tag "message" from UML (xmi) file.
Thanks in advance
[Updated on: Thu, 10 May 2012 13:17] by Moderator
|
|
|
|
|
|
|
|
|
Re: ATL - error getting some fields from UML model [message #884704 is a reply to message #883419] |
Mon, 11 June 2012 12:24  |
Eclipse User |
|
|
|
Sorry, I saw it just now. I used the following steps to solve it:
metamodel!Class->allInstances.asSequence().field1.asSequence().first().field2
So, as some fields in my xmi was pointing to another fields, for example, ownerId as being called into sendEvent, so I wanted the sendEvent from that message, because of it I couldn't get the ownerId from the beginning of the xmi, I needed to use allInstances and asSequences with different fields to get the id.
|
|
|
Powered by
FUDForum. Page generated in 0.25321 seconds