| Setup Xpand workflow: No Definition 'MyTemplate::main ...' found! [message #777597] |
Tue, 10 January 2012 14:43  |
Julian Lettner Messages: 2 Registered: January 2012 |
Junior Member |
|
|
Hello!
I am trying to set up an Xpand workflow but the following exception is raised instead.
0 ERROR AbstractExpressionsUsingWorkflowComponent - Error in Component of type org.eclipse.xpand2.Generator:
EvaluationException : No Definition 'MyTemplate::main for pointPath::Model' found!
[23,35] on line 1 'EXPAND MyTemplate::main FOREACH xxx'
0 ERROR Mwe2Launcher - Problems running workflow blub: No Definition 'MyTemplate::main for pointPath::Model' found!
java.lang.RuntimeException: Problems running workflow blub: No Definition 'MyTemplate::main for pointPath::Model' found!
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:99)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:73)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:64)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:55)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:74)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:35)
Caused by: org.eclipse.emf.mwe.core.WorkflowInterruptedException: No Definition 'MyTemplate::main for pointPath::Model' found!
at org.eclipse.xtend.expression.AbstractExpressionsUsingWorkflowComponent.invokeInternal(AbstractExpressionsUsingWorkflowComponent.java:247)
at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:126)
at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.invoke(Mwe2Bridge.java:34)
at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:201)
at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.invoke(AbstractCompositeWorkflowComponent.java:35)
at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:19)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:97)
... 5 more
I reduced my setup to the following files (paths are relative from workspace root '/'), but the problem still persists.
(Assume that I am stupid and don't know anything.)
[/CodeGenerators/src/blub.mwe2]
module blub
Workflow {
component = org.eclipse.xtext.mwe.Reader {
path = "../LegoExamples/input"
register = tue.glt.lego.points.PointPathStandaloneSetup {}
load = {
slot = "xxx"
type = "Model"
}
}
component = org.eclipse.xpand2.Generator {
metaModel = org.eclipse.xtend.typesystem.emf.EmfMetaModel {
metaModelPackage = "tue.glt.lego.points.pointPath.PointPathPackage"
}
expand = "MyTemplate::main FOREACH xxx"
outlet = {
path = "../LegoExamples/output"
}
}
}
[/CodeGenerators/src/MyTemplate.xpt]
«IMPORT tue::glt::lego::points::pointPath»
«DEFINE main FOR Model»
«ENDDEFINE»
[/DslProject/src/tue/glt/lego/points/PointPath.xtext]
grammar tue.glt.lego.points.PointPath with org.eclipse.xtext.common.Terminals
generate pointPath "h t t p ://www.glt.tue/lego/points/PointPath" // (cannot post links)
Model:
name = ID
;
I would really appreciate your help because I am fighting this for almost a whole day now (Google was not much help either) and getting quite desperate.
Thanks for your time!
[Updated on: Tue, 10 January 2012 14:44] Report message to a moderator
|
|
|
|
|
|
|
| Re: Setup Xpand workflow: No Definition 'MyTemplate::main ...' found! [message #780636 is a reply to message #780631] |
Wed, 18 January 2012 15:32   |
Edin - Messages: 7 Registered: January 2012 |
Junior Member |
|
|
Hi Christian,
Thank you for your very fast reply!
This is the problem
0 INFO AbstractExpressionsUsingWorkflowComponent - No meta models configured, using JavaBeans as default.
165 WARN SlotEntry - Could not find any exported element of type 'Model' -> Slot 'someslot' is empty.
248 ERROR AbstractExpressionsUsingWorkflowComponent - Error in Component of type org.eclipse.xpand2.Generator:
EvaluationException : No Definition 'templates::commands2txtnxt::generateFile for List' found!
[23,60] on line 1 'EXPAND templates::commands2txtnxt::generateFile FOR someslot'
248 ERROR Mwe2Launcher - Problems running workflow run: No Definition 'templates::commands2txtnxt::generateFile for List' found!
java.lang.RuntimeException: Problems running workflow run: No Definition 'templates::commands2txtnxt::generateFile for List' found!
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:99)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:73)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:64)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:55)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:74)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:35)
Caused by: org.eclipse.emf.mwe.core.WorkflowInterruptedException: No Definition 'templates::commands2txtnxt::generateFile for List' found!
at org.eclipse.xtend.expression.AbstractExpressionsUsingWorkflowComponent.invokeInternal(AbstractExpressionsUsingWorkflowComponent.java:247)
at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:126)
at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.invoke(Mwe2Bridge.java:34)
at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.invoke(AbstractWorkflowComponent.java:201)
at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.invoke(AbstractCompositeWorkflowComponent.java:35)
at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:19)
at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:97)
... 5 more
My workflow file:
module run
import org.eclipse.emf.mwe.utils
var inputDir = "src/instances"
var targetDir = "src/output"
Workflow {
component = org.eclipse.xtext.mwe.Reader {
path = inputDir
register = org.xtext.CommandsStandaloneSetup {}
load = {
slot = "someslot"
type = "Model"
name = "outputa"
}
}
component = org.eclipse.xpand2.Generator {
expand = "templates::commands2txtnxt::generateFile FOR someslot"
outlet = {
path = targetDir
}
}
}
and this is my template
«IMPORT org::xtext::commands»
«DEFINE generateFile FOR Model»
«ENDDEFINE»
Very basic stuff, but I have no idea how to fix this. I have exported the xtext as a plugin, so the import in the template file is ok.
[Updated on: Wed, 18 January 2012 15:33] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Re: Setup Xpand workflow: No Definition 'MyTemplate::main ...' found! [message #870001 is a reply to message #870000] |
Sat, 05 May 2012 11:48   |
Christian Dietrich Messages: 4426 Registered: July 2009 |
Senior Member |
|
|
And:
i do the following
(1) create a new xtext project using the wizard
(2) paste your grammar
(3) Generate the language
(4) adapt the workflow in the generator project
(5) drop following Example.mydsl file into the src/model dir
<definitions name="test" targetNamespace="test">
<binding name="test" type="test" >
<soap:binding style="style" transport="test"
/>
<operation name="test" >
<soap:operation soapAction="test" />
<input>
<soap:body use="test" encodingStyle="test"
/>
</input>
<output>
<soap:body use="test"
encodingStyle="test"
/>
</output>
</operation>
</binding>
</definitions>
(6) run the workflow.
an hey: it works without any complaints
[Updated on: Sat, 05 May 2012 11:49] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04012 seconds