Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » how to overwrite workflow properties: headless code generation with mwe2
how to overwrite workflow properties: headless code generation with mwe2 [message #558844] Tue, 14 September 2010 15:03 Go to next message
Stefan Zeug is currently offline Stefan ZeugFriend
Messages: 2
Registered: July 2009
Junior Member
Hello,

I start an MWE2-workflow from the command line with the class
org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.

Everythings works fine, but...

The workflow contains some properties which I want to customize
(overwrite) whith model dependend values, e.g. a model path.

How can I replace the properties of the workflow with parameters from
the command line?

Any help is appreciated.

Thanks a lot,

Stefan
Re: how to overwrite workflow properties: headless code generation with mwe2 [message #558867 is a reply to message #558844] Tue, 14 September 2010 16:26 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14725
Registered: July 2009
Senior Member
Hi,

just use

-p variablename='Lala'


~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: how to overwrite workflow properties: headless code generation with mwe2 [message #559618 is a reply to message #558867] Fri, 17 September 2010 11:54 Go to previous messageGo to next message
Stefan Zeug is currently offline Stefan ZeugFriend
Messages: 2
Registered: July 2009
Junior Member
Hi,

thanks, but the class Mwe2Launcher does not allow more than the one
parameter for the name of the workflow module:

if (line.getArgs().length > 1)
throw new ParseException("Only one module name expected. But " +
line.getArgs().length
+ " were passed (" + line.getArgList() + ")");

I solved the problem by rewriting the Mwe2Launcher without this restriction.

Please let me know if there is a better solution.

Thanks,

Stefan

schrieb Christian Dietrich:
> Hi,
>
> just use
>
>
> -p variablename='Lala'
>
>
> ~Christian
Re: how to overwrite workflow properties: headless code generation with mwe2 [message #559674 is a reply to message #559618] Fri, 17 September 2010 14:41 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14725
Registered: July 2009
Senior Member
Hi,

a little hint:
Mwe2Launcher.main(new String[]{"src/workflow/test.mwe2","-p","variable=test"});


Works fine using Xtext / Mwe2 1.0.1

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Previous Topic:InstantiationException while assigning vaiables
Next Topic:[XPand/MWE] Error executing workflow - java.lang.NoSuchFieldError: ruleMemo
Goto Forum:
  


Current Time: Sun Oct 13 16:58:41 GMT 2024

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

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

Back to the top