Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Executing a workflow (MWE) using a Model.xmi which is not part of a resource(Reading a Model which is not part of a resource)
Executing a workflow (MWE) using a Model.xmi which is not part of a resource [message #968471] Fri, 02 November 2012 13:39
vikas yadav is currently offline vikas yadavFriend
Messages: 3
Registered: November 2012
Junior Member
I am trying to execute a workflow using a standalone JAVA program. I want it to dynamically pick up a Model.xmi and generate code based on templates and workflows defined in my plug-in.

However, the only example I found using the following code:

StandaloneSetup setup = new StandaloneSetup();
Reader reader = new Reader();
reader.setUri("platform:/resource/<<project name>>/src/Model.xmi");
WorkflowContext ctx = new WorkflowContextDefaultImpl();
reader.invoke(ctx, new NullProgressMonitor(), new IssuesImpl());
Map<String, Object> slotContents = new HashMap<String, Object>();
slotContents.put("model", ctx.get("model"));
Map<String, String> properties = new HashMap<String, String>();

String wfFile = "D:/src/workflow/generateAll.mwe";
new WorkflowRunner().run(wfFile, new NullProgressMonitor(), properties,

With this I understand that Model.xmi should always be part of some resource. Is it possible for me to read a standalone Model.xmi and execute my workflow?
Previous Topic:[Acceleo] Error launching main module as Acceleo Application
Next Topic:JET2 Tools broken in Juno and Keppler
Goto Forum:

Current Time: Fri Jul 01 05:53:22 GMT 2022

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

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

Back to the top