ETL Transformations: Types Not Found [message #1847108] |
Thu, 14 October 2021 22:33 |
Miguel Fernandes Messages: 7 Registered: July 2021 |
Junior Member |
|
|
Hello!
I'm trying to transform Sequence Diagrams (UML models) into another kind of model (a xmi representation of Colored Petri Nets) using ETL, from a Java application (via the org.eclipse.epsilon libraries)
I have this problem when trying to transform the models using ETL, where the object types (e.g. uml!Lifeline or cpn!Place) are not recognized, as in "type ... not found". I have the ecore metamodel for both UML and the CPNs.
This happens, I would say, because the program, when running the ETL file, does not find the metamodel or does not access it correctly. But I cannot figure out why.
This is how I load the models:
EmfModel modelcpn = new EmfModel();
modelcpn.setModelFile("src/cpnModel.model");
modelcpn.setMetamodelFile("src/cpnmeta.ecore");
modelcpn.load();
I have tried to create a minimal example, which I have attached to this post, and which also includes the libraries that I'm using.
Thank you in advance for your help
Best regards
Miguel
-
Attachment: MinEx.zip
(Size: 6.29MB, Downloaded 90 times)
|
|
|
|
|
|
Re: ETL Transformations: Types Not Found [message #1847188 is a reply to message #1847112] |
Mon, 18 October 2021 16:33 |
Miguel Fernandes Messages: 7 Registered: July 2021 |
Junior Member |
|
|
Hello (again) Dimitris!
With the solution you promptly provided, I managed to finally test my ETL, which (as I expected) had some mistakes, as well as things missing.
I managed to remove these problems from the ETL code, but still my output model (.model) turns out to be empty. This is strange because when I print the variables that I create in my target model (from the ETL code), the target model elements seem to be there.
I attached a revised version of the Minimal Example I previously sent, which also includes in the code some prints to the console, in order to show that the model elements are actually being created in the ETL code.
I was hoping you could help me with this issue.
Again, I thank you for your help and availability.
Best regards.
Miguel
-
Attachment: MinEx.zip
(Size: 6.29MB, Downloaded 99 times)
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04405 seconds