Community
Participate
Working Groups
Build Identifier: Version: 3.5.2 Build id: M20100211-1343, ATL 3.0.2 I have an ATL transformation where all the classes have an xmi:ID that I need to be kept. So every transformation rule starts with __xmiID__ <- s.__xmiID__, the problem is that the first rule in the ATL file does not get to copy the xmi:id whereas all other rules work fine. The more strange thing is that if I move the rule at the bottom of the file the xmi:ID is copyed but then all the previous rules do not get their ID copied ????? The workaround I found is move around the rules to find the correct order in to have all my xmi::id(s) copied. It seems that container rules needs to be placed first. Reproducible: Always Steps to Reproduce: 1.unzip the attached eclipse project and run the included launchers to demonstrate the woring script and the non working script
Created attachment 174947 [details] Eclipse project for ATL xmiid copy error
Thanks for the test project. I investigated and it appears that the VM reorganizes some EObjects in the resource and loses the id. The elements creation order causes this reorganization, that's why your workaround works. I do not have the correction for the moment, so the workaround is the best solution at this time. Please comment this bug if it becomes insufficient.
It seems that like UML profile operation calls, XMI ID initialization should be delayed by the VM until the end of the transformation (i.e., until model structure does not change).