How to run MWE2 workflow from my application [message #639044] |
Sun, 14 November 2010 23:09  |
Eclipse User |
|
|
|
I like to know how to run MWE2 workflow programmatically from my application.
I have used the xtext example mydsl to create a xtext project and want to use the default generator (xpand) project to generate the code with given xpand template.
when i run it manually the workflow generates the code in src-gen folder. In the generator, go to src->workflow->MyDslGenertor.mwe2, right click on that and Run As -> MWE2 workflow generates the code.
But when i try call the WorkflowRunner.run method() from my plugin project's sample action, its giving me the following error.
------------------------------------------------------------ ------------
SEVERE: Content is not allowed in prolog.
org.xml.sax.SAXParseException: Content is not allowed in prolog. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper. createSAXParseException(Unknown Source)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper. fatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.rep ortError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFat alError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$PrologDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.eclipse.emf.mwe.internal.core.ast.parser.WorkflowParser. parse(WorkflowParser.java:76)
at org.eclipse.emf.mwe.internal.core.ast.util.WorkflowFactory.p arseAndInitialize(WorkflowFactory.java:105)
at org.eclipse.emf.mwe.internal.core.ast.util.WorkflowFactory.p arseInitAndCreate(WorkflowFactory.java:59)
at org.eclipse.emf.mwe.internal.core.ast.util.WorkflowFactory.p arseInitAndCreate(WorkflowFactory.java:52)
at org.eclipse.emf.mwe.core.WorkflowRunner.prepare(WorkflowRunn er.java:332)
at org.eclipse.emf.mwe.core.WorkflowRunner.run(WorkflowRunner.j ava:290)
at com.ifx.dave.codegen.tmpt.gen.actions.Gen.run(Gen.java:81)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:251)
at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPl uginAction.java:229)
at org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$6.handleEven t(ActionContributionItem.java:452)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:4066)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3657)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2629)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:24 27)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670)
at org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:663)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:115)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
15 Nov, 2010 9:35:27 AM org.eclipse.emf.mwe.core.WorkflowRunner logIssues
SEVERE: [ERROR]: Content is not allowed in prolog.(Element: workflow\TmptGenerator.mwe2; Reported by: -UNKNOWN-)
15 Nov, 2010 9:35:27 AM org.eclipse.emf.mwe.core.WorkflowRunner prepare
SEVERE: Workflow interrupted because of configuration errors. ------------------------------------------------------------ --------------
Any idea to resolve this problem.
Thanks in advance
Raj
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03092 seconds