ATLLauncher and ATL Virtual Machine [message #869701] |
Thu, 03 May 2012 22:01  |
Eclipse User |
|
|
|
Hi everybody,
I'm not ATL expert, but I have a couple of ATL transformations that I need to use within the plugin I'm developing. After some research, I found out how to launch ATL transformations from Java with the following code
AtlLauncher.getDefault().launch(transformationUrl,
Collections.EMPTY_MAP, models, Collections.EMPTY_MAP,
Collections.EMPTY_LIST, Collections.EMPTY_MAP);
With appropiate values for transformationUrl and models. This has been working fine but I found and example where it failed with
The 'no null' constraint is violated
The thing is that the same transformation launched from Eclipse (with an ATL launch configuration) works correctly. After some try & error I found out that I received the same error from ATL launch configuration if I selected, in "Advanced parameters", "Regular VM" as ATL virtual machine instead of the default "EMF-specific VM".
I don't understand what it exactly means, but I guess that AtlLauncher uses this configuration and there is no way to use that "EMF-specific VM", am I right?
My second discovery was that the line that was causing the error is something like this (real names are a little bit different, just to simplify):
rule SimpleOper {
from
input : mast!Simple_Operation
to
output1 : xml!Element (
name <- 'mast_mdl:Simple_Operation',
-- if I comment the next line everything works
children <- if not input.Parameters.oclIsUndefined() then input.Parameters else OclUndefined endif,
children <- output2
-- parent <-
),
output2 : xml!Attribute (
name <- 'Name',
value <- input.Name,
parent <- output1
)
do {
-- stuff...
}
}
So maybe this "Regular VM" is raising an error because I'm trying to use an operation (oclIsUndefined) with an object that does not exist? Even if the operation aims to check if it exists?
I know it's all a bit confusing, but any insight would be really appreciated.
Thanks.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03723 seconds