Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Setting up mwe workflow file contents?(Problem with setting up workflow file for xpand generator)
icon9.gif  Setting up mwe workflow file contents? [message #645640] Sun, 19 December 2010 10:46 Go to next message
Stefan Mijatov is currently offline Stefan MijatovFriend
Messages: 59
Registered: March 2010
Location: Vienna, Austria
Member
I have been trying for few days now to set up the mwe workflow file for xpand generator I am trying to build.

The problem is the i have separated my:
1. metamodels
2. m2t qvt transformations
3. output instances of m2m transformations
4. xpand templates and workflows

into 4 separate projects (respectively).

I managed to reference them all, and the editor for xpand template file is properly reading metamodels (e.g. ctrl-space in template editor gives me list of metamodel elements).
However, when I run my generator.mwe file, it gives me following error:

Dec 19, 2010 11:43:51 AM org.eclipse.emf.mwe.core.WorkflowRunner prepare
INFO: --------------------------------------------------------------------------------------
Dec 19, 2010 11:43:51 AM org.eclipse.emf.mwe.core.WorkflowRunner prepare
INFO: EMF Modeling Workflow Engine 0.7.2, Build v200908120417
Dec 19, 2010 11:43:51 AM org.eclipse.emf.mwe.core.WorkflowRunner prepare
INFO: (c) 2005-2009 openarchitectureware.org and contributors
Dec 19, 2010 11:43:51 AM org.eclipse.emf.mwe.core.WorkflowRunner prepare
INFO: --------------------------------------------------------------------------------------
Dec 19, 2010 11:43:51 AM org.eclipse.emf.mwe.core.WorkflowRunner prepare
INFO: running workflow: C:/eclipse_modeling/ado_generator/generatorM2TTransformations/workflows/entityWorkflow.mwe
Dec 19, 2010 11:43:51 AM org.eclipse.emf.mwe.core.WorkflowRunner prepare
INFO: 
Dec 19, 2010 11:43:51 AM org.eclipse.emf.mwe.utils.StandaloneSetup setPlatformUri
INFO: Registering platform uri 'C:\eclipse_modeling\ado_generator'
Dec 19, 2010 11:43:51 AM org.eclipse.emf.mwe.utils.StandaloneSetup registerPackage
INFO: Adding dynamic EPackage 'http://www.dorius-soft.com/ejb3' from 'platform:/resource/generatorMetamodels/model/ejb3.ecore'
Dec 19, 2010 11:43:51 AM org.eclipse.emf.mwe.core.container.CompositeComponent internalInvoke
INFO: Reader: Loading model from platform:/resource/generatorOutput/model/OrganizacijaEntities.xmi
Dec 19, 2010 11:43:52 AM org.eclipse.emf.mwe.core.container.CompositeComponent internalInvoke
INFO: Generator(generate): generating 'EntityBeanTemplate::entityTemplate FOR EntityBean' => src-gen
Dec 19, 2010 11:43:52 AM org.eclipse.xtend.expression.AbstractExpressionsUsingWorkflowComponent invokeInternal
SEVERE: Error in Component generate of type org.eclipse.xpand2.Generator: 
	EvaluationException : Couldn't find type or property 'EntityBean'
	[69,10] on line 1 'EntityBean'

Dec 19, 2010 11:43:52 AM org.eclipse.emf.mwe.core.WorkflowRunner executeWorkflow
SEVERE: Workflow interrupted. Reason: Couldn't find type or property 'EntityBean'
Dec 19, 2010 11:43:52 AM org.eclipse.emf.mwe.core.WorkflowRunner logIssues
SEVERE: [ERROR]: Couldn't find type or property 'EntityBean'(Element: EntityBean; Reported by: Generator(generate): generating 'EntityBeanTemplate::entityTemplate FOR EntityBean' => src-gen)
Dec 19, 2010 11:43:52 AM org.eclipse.emf.mwe.core.WorkflowRunner logIssues
SEVERE: [ERROR]: Couldn't find type or property 'EntityBean'(Element: EXPAND EntityBeanTemplate::entityTemplate FOR EntityBean; Reported by: Generator(generate): generating 'EntityBeanTemplate::entityTemplate FOR EntityBean' => src-gen)


Here is the source for generator.mwe file:

<?xml version="1.0"?>
<workflow>
	<property name="model" value="platform:/resource/generatorOutput/model/OrganizacijaEntities.xmi"/>
	<property name="out" value="src-gen" />
	
	<!-- set up EMF for standalone execution -->
	<bean class="org.eclipse.emf.mwe.utils.StandaloneSetup">
		<platformUri value=".."/>
		<RegisterEcoreFile value="platform:/resource/generatorMetamodels/model/ejb3.ecore"/>
	</bean>

	<!-- load model and store it in slot 'model' -->
	<component class="org.eclipse.emf.mwe.utils.Reader">
		<uri value="${model}" />
		<modelSlot value="model" />
	</component>
	
	<!--  generate code -->
	<component class="org.eclipse.xpand2.Generator" id="generate">
		<metaModel id="mm" class="org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel"/>
		<expand value="EntityBeanTemplate::entityTemplate FOR EntityBean" />
		<outlet path="${out}"/>
	</component>
</workflow>


Can anyone help me, please? Sad
Re: Setting up mwe workflow file contents? [message #645668 is a reply to message #645640] Sun, 19 December 2010 17:46 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14729
Registered: July 2009
Senior Member
Hi,

<expand value="EntityBeanTemplate::entityTemplate FOR EntityBean" />


should be

<expand value="EntityBeanTemplate::entityTemplate FOR model" />


since yiu stored the model in a slot named "model" in the reader

<modelSlot value="model" />


~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: Setting up mwe workflow file contents? [message #645721 is a reply to message #645668] Mon, 20 December 2010 08:38 Go to previous message
Stefan Mijatov is currently offline Stefan MijatovFriend
Messages: 59
Registered: March 2010
Location: Vienna, Austria
Member
Thank you so so much, it works!!!
Previous Topic:Re: Regarding XPand template file(contd..)
Next Topic:[Acceleo 3] Internal Error - installBundle - NullPointerException
Goto Forum:
  


Current Time: Sat Nov 09 05:04:21 GMT 2024

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

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

Back to the top