Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [MWE2] Help executing mwe2 workflows from java(Error in executing mwe2 workflows from java)
[MWE2] Help executing mwe2 workflows from java [message #668418] Thu, 05 May 2011 15:29 Go to next message
Marie-Pierre Oudot is currently offline Marie-Pierre OudotFriend
Messages: 3
Registered: May 2011
Junior Member
We have 2 MWE2 files.
Thanks to an XpandComponent, the first one generates an Xtend file inside the Eclipse project.

The second MWE2 file uses the previously generated Xtend file to transform a model.

If we execute the 2 MWE2 workflows in Eclipse, it works.
Now, we try to write a Java code to call the 2 MWE2 files sequentially.

Injector injector = new Mwe2StandaloneSetup().createInjectorAndDoEMFRegistration();
Mwe2Runner mr = injector.getInstance(Mwe2Runner.class);
mr.run("mwe_1",params);
mr.run("mwe_2",params);


We have the following error : the second MWE2 workflow doesn't find the generated Xtend file. It seems like a refresh problem ?

Exception in thread "main" java.lang.RuntimeException: Problems running workflow :
[ERROR]: Property 'invoke' not specified properly. AbstractExtension file 'gen::foo' not found.


Thanks for help
Re: [MWE2] Help executing mwe2 workflows from java [message #676341 is a reply to message #668418] Fri, 03 June 2011 19:48 Go to previous messageGo to next message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
Sounds quite complicated...
Do you generate the Xtend file into a class folder or a source folder?
It has to be on the classpath in order to be found.

Sven

Am 5/5/11 5:29 PM, schrieb marie-pierre.oudot@cea.fr:
> We have 2 MWE2 files.
> Thanks to an XpandComponent, the first one generates an Xtend file
> inside the Eclipse project.
>
> The second MWE2 file uses the previously generated Xtend file to
> transform a model.
>
> If we execute the 2 MWE2 workflows in Eclipse, it works.
> Now, we try to write a Java code to call the 2 MWE2 files sequentially.
>
> Injector injector = new
> Mwe2StandaloneSetup().createInjectorAndDoEMFRegistration();
> Mwe2Runner mr = injector.getInstance(Mwe2Runner.class);
> mr.run("mwe_1",params);
> mr.run("mwe_2",params);
>
> We have the following error : the second MWE2 workflow doesn't find the
> generated Xtend file. It seems like a refresh problem ?
>
>
> Exception in thread "main" java.lang.RuntimeException: Problems running
> workflow :
> [ERROR]: Property 'invoke' not specified properly. AbstractExtension
> file 'gen::foo' not found.
>
>
> Thanks for help
>


--
Need professional support for Xtext or other Eclipse Modeling technologies?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : http://blog.efftinge.de
Re: [MWE2] Help executing mwe2 workflows from java [message #1053095 is a reply to message #668418] Thu, 02 May 2013 12:25 Go to previous message
Edwin Tuzar is currently offline Edwin TuzarFriend
Messages: 33
Registered: April 2013
Location: Kaiserslautern
Member

Hi,
in
mr.run("mwe_1",params);
the "mwe_1" is the .mwe2 file? if so for the params can I use this to initialize some var in the .mwe2 file ?
Thanks!


Edwin W.T.
Previous Topic:teneo dynamic emf example
Next Topic:[Texo] Issue with FeatureId's
Goto Forum:
  


Current Time: Fri Apr 19 23:59:42 GMT 2024

Powered by FUDForum. Page generated in 0.02709 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top