Perhaps this question has been beforehand answered, but I was not able to find it.
I'm developing some Java snippet to call to an ATL transformation which the following header:
create OUT : Maude from IN : Behavior, INATL : ATL;
I'm currently using the ATL API under the org.eclipse.m2m.atl.core and org.eclipse.m2m.atl.engine.emfvm libraries, as it is explained at the ATL Developer Guide. For example, the Behavior model is loaded as follow:
/* Load Behavior Metamodel */
IReferenceModel behMM = mF.newReferenceModel();
/* Load Behavior Model */
IModel behModel = mF.newModel(behMM);
However, one of the input models, specifically the Behavior model has several cross-references to other file in the file system (in this case in the same folder):
<els xsi:type="behavior:Object" id="A">
Thus, I have added to the options map the "allowInterModelReferences" option:
Map<String, Object> options = new HashMap<String, Object>();
Although the transformation works fine when it is launched with an ATL Launch Configuration, when it is fired from the Java code, the typical exception meaning that the cross-refs and its eProxyURI did not work correctly is raised.
The call to the AtlLauncher is:
transformationLauncher.launch(ILauncher.RUN_MODE, null, options,
I am wondering if the problem is with the Behavior IModel instance, since the input model is an IModel instance and the referenced one (the default.gcs) is not at the object level - it is just a file in the file system. I mean, do I have to load the referenced model as an IModel instance? In this case, how are the cross-references resolved? I know that Resources and ResourceSet of EMF API may resolve this. How can an IModel be created from a Resource instance?
ATL Version: 3.5.0RC2 (2014/05/26)
Eclipse Kepler RPC Version
SO: Mac OS X Mavericks
Thank you in advance!