|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
Registered: November 2012
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();
WorkflowContext ctx = new WorkflowContextDefaultImpl();
reader.invoke(ctx, new NullProgressMonitor(), new IssuesImpl());
Map<String, Object> slotContents = new HashMap<String, Object>();
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?
|Re: Executing a workflow (MWE) using a Model.xmi which is not part of a resource [message #986833 is a reply to message #976589]
||Wed, 21 November 2012 20:46
| Bhanu Pratap
Registered: April 2010
I am also having the same problem. Here is my scenario:
I have a xpand based generator which generates some Prolog code for a Model. So far I manually run the workflow by Run As-> MWE Workflow. Now I want to deploy this project as plugin/feature such that a user right clicks on .xmi or .ecore files and invokes this prolog code generator i.e. Xpand workflow file.
So, I need to invoke this workflow file programmatically from my UI plugin's context Menu Action class.
This problem sounds very similar to the one you are having. Did you solve it? If so, please share solution.
Thanks in advance.
Powered by FUDForum
. Page generated in 0.04464 seconds