Skip to main content



      Home
Home » Archived » M2M (model-to-model transformation) » [Xtend] Workflow error at running(Error parsing property 'invoke')
[Xtend] Workflow error at running [message #524292] Wed, 31 March 2010 08:47 Go to next message
Eclipse UserFriend
Hi,

I want to do a m2m transformation, from an Object to a Relationnal model.
I'm trying to do it with Xtend, but I'm having trouble with the workflow.

I found that topic today
http://www.openarchitectureware.org/forum/viewtopic.php?show topic=15036
and decided to use it as inspiration.

so my .ext file is quite basic for now
import metamodel;
import relationnel;
extension metamodel::Extensions reexport;

create relationnel::Table transform (metamodel::Class c) :
	this.setName(c.name);


And my workflow
Quote:
<workflow>

<bean class="org.eclipse.emf.mwe.utils.StandaloneSetup">
<platformUri value=".." />
<!-- first ecore -->
<registerEcoreFile value="platform:/resource/genCPP/src/metamodel/metamodel.ecore " />
<!-- second ecore -->
<registerEcoreFile value="platform:/resource/genCPP/src/metamodel/relationnel.ecore " />
</bean>

<!--read the model -->
<component class="org.eclipse.emf.mwe.utils.Reader">
<uri value="src/Model.xmi" />
<modelSlot value="model" />
</component>

<!--transform the model -->
<component class="org.eclipse.xtend.XtendComponent">
<metaModel class="org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel " />
<invoke value="transform(model)"/>
<outputSlot value="newModel"/>
</component>

<!--write the new model -->
<component class="org.eclipse.emf.mwe.utils.Writer">
<modelSlot value="newModel" />
<uri value="src-gen/outmodel.xmi" />
</component>


</workflow>



When running the workflow, I get two things I don't understand (and an ERROR)

31 mars 2010 14:37:12 org.eclipse.emf.mwe.utils.StandaloneSetup registerPackage
INFO: Adding dynamic EPackage 'http://www.example.org/metamodel' from 'platform:/resource/genCPP/src/metamodel/metamodel.ecore'
31 mars 2010 14:37:12 org.eclipse.emf.mwe.utils.StandaloneSetup registerPackage
INFO: Adding dynamic EPackage 'http://relationnel/1.0' from 'platform:/resource/genCPP/src/metamodel/relationnel.ecore'
31 mars 2010 14:37:12 org.eclipse.emf.mwe.core.WorkflowRunner logIssues
GRAVE: [ERROR]: Error parsing property 'invoke': Could not extract name of the extension file.(Element: -UNKNOWN-; Reported by: -UNKNOWN-)
31 mars 2010 14:37:12 org.eclipse.emf.mwe.core.WorkflowRunner prepare
GRAVE: Workflow interrupted because of configuration errors.

What does the "Adding dynamix EPackage" mean ?
I guess my error means that I'm not pointing to the right file trying to invoke, but I don't know what to write (the workflow and the .ext file are in the same directory).


[Updated on: Wed, 31 March 2010 09:08] by Moderator

Re: [Xtend] Workflow error at running [message #524428 is a reply to message #524292] Wed, 31 March 2010 17:31 Go to previous messageGo to next message
Eclipse UserFriend
Hello Maxime,

the error should be gone if you use the following syntax for invoke:
// assuming .ext file is located in "src/subFolder/Test.ext" and "src" is configured as source folder
<invoke value="subFolder::Test::transform(model)"/>
// or maybe also
<invoke value="Test::transform(model)"/>


"adding dynamic package" means that the ecore metamodels that are loaded will be available in other workflow components.
This is for instance required if you try to create instances of metaclasses within your invoked Xtend function.

Kind regards
Ludwig
Re: [Xtend] Workflow error at running [message #524486 is a reply to message #524292] Thu, 01 April 2010 03:06 Go to previous message
Eclipse UserFriend
Thanks, workflow works perfectly now.
Previous Topic:Doing M2M with Xtend ?
Next Topic:[ATL] Consolidate multiple input elements into one output element
Goto Forum:
  


Current Time: Wed Jul 23 19:24:06 EDT 2025

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

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

Back to the top