Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 12:47 Go to next message
MaximeLecourt  is currently offline MaximeLecourt Friend
Messages: 108
Registered: February 2010
Location: France
Senior Member
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).




One day I shall master M2T, but that day has yet to come...

[Updated on: Wed, 31 March 2010 13:08]

Report message to a moderator

Re: [Xtend] Workflow error at running [message #524428 is a reply to message #524292] Wed, 31 March 2010 21:31 Go to previous messageGo to next message
Ludwig Straub is currently offline Ludwig StraubFriend
Messages: 14
Registered: July 2009
Junior Member
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 07:06 Go to previous message
MaximeLecourt  is currently offline MaximeLecourt Friend
Messages: 108
Registered: February 2010
Location: France
Senior Member
Thanks, workflow works perfectly now.

One day I shall master M2T, but that day has yet to come...
Previous Topic:Doing M2M with Xtend ?
Next Topic:[ATL] Consolidate multiple input elements into one output element
Goto Forum:
  


Current Time: Thu Aug 22 16:34:00 GMT 2019

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

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

Back to the top