Executing a workflow (MWE) using a Model.xmi which is not part of a resource [message #973729] |
Tue, 06 November 2012 15:23 |
vikas yadav 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();
setup.setPlatformUri("D:/workspace/experimental/");
Reader reader = new Reader();
reader.setModelSlot("model");
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,
slotContents);
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?
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03874 seconds