Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [ETL] [Solved] - model output empty
[ETL] [Solved] - model output empty [message #1652220] Thu, 05 March 2015 19:27 Go to next message
Catherine C. is currently offline Catherine C.Friend
Messages: 4
Registered: March 2015
Junior Member
Hello !

I am starting to write a M2M transformation with ETL but I encounter some trouble. (It's the first time that i'm working with Espilon)

The execution is ok, i see what i expect with the .println() for my target model but at the end, it leave my output model empty :

<?xml version="1.0" encoding="ASCII"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi=""http"://www.omg.org/XMI"/>


And i set the "store on disposal" to true for the target model on the run config.

Here's my only rule for now (very basic) :

rule Abstract2Compliant 
	transform s : Abstract!Abstract
	to t : Abstract!Compliant {
		
		t.activity=s.activity.select(a|a.task.isDefined());
	 	t.activity.println();
		t.compliantWith=s.mustBeCompliantWith.first;
		t.compliantWith.println();
}


And the console's output :
OrderedSet {Activity [name=activity1]}
Device [sizeX=20.0, sizeY=10.0, name=Name]


Any ideas? What am i doing wrong?

Thanks a lot in advance !

Cheers,

Catherine.

[Updated on: Wed, 11 March 2015 14:28]

Report message to a moderator

Re: ETL - model output empty [message #1656379 is a reply to message #1652220] Sat, 07 March 2015 13:34 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Catherine,

Could you please put together a minimal example [1] I can use to investigate?

Cheers,
Dimitris

[1] https://www.eclipse.org/epsilon/doc/articles/minimal-examples/
Re: ETL - model output empty [message #1656486 is a reply to message #1656379] Sat, 07 March 2015 14:39 Go to previous messageGo to next message
Catherine C. is currently offline Catherine C.Friend
Messages: 4
Registered: March 2015
Junior Member
Hi Dimitris,

I emailed the files to epsilon devs at gmail com adress.

For info, here's the context of the transformation : it's an endogenous transformation. It have to transform a 'abstract' to an 'compliant' (subclass). It's mostly a copy of the elements, only one type of element has to be split/divide when needed and some attribute filled with this info..

But I'm wondering if epsilon Flock is not a better option for this type of problem? What do you think about that?


Thanks a lot for your help.

Cheers,
Catherine.
Re: ETL - model output empty [message #1659114 is a reply to message #1656486] Sun, 08 March 2015 17:34 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Catherine,

Your transformation rule should read as follows:

rule AbstractProgram2Compliant 
	transform s : AbstractProgram!AbstractProgram
	to t : CompliantProgram!CompliantProgram // Note: CompliantProgram!CompliantProgram instead of AbstractProgram!CompliantProgram
{...}


You're right - Flock does sound like a better fit for this use case.

Cheers,
Dimitris
Re: ETL - model output empty [message #1666025 is a reply to message #1659114] Wed, 11 March 2015 14:02 Go to previous messageGo to next message
Catherine C. is currently offline Catherine C.Friend
Messages: 4
Registered: March 2015
Junior Member
Hi Dimitris,

Thank you for your answer.

I tried to replace the code like you said
t : CompliantProgram!CompliantProgram {
but I get this error :
Type 'CompliantProgram!CompliantProgram' not found
Sad

But it shouldn't be Model!Type? Like ATL? (I already used this .ecore file and code with ATL and it was ok).
I only have on .ecore file (AbstractProgram) containing the CompliantProgram type which is a subclass of AbstractProgram. That's why I was using the AbstractProgram!CompliantProgram.

Cheers,
Catherine

[Updated on: Wed, 11 March 2015 14:10]

Report message to a moderator

Re: ETL - model output empty [message #1666036 is a reply to message #1666025] Wed, 11 March 2015 14:07 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Catherine,

In ETL, X!Y refers to the Y type of the model named X in the Models tab of the transformation's launch configuration. The stored launch configuration you shared (AbstractProgram.launch) includes two models named AbstractProgram and CompliantProgram, so CompliantProgram!CompliantProgram should work. Could you please try with a copy of the project you shared a few days ago and let me know if this still doesn't work for you?

Cheers,
Dimitris
Re: ETL - model output empty [message #1666065 is a reply to message #1666036] Wed, 11 March 2015 14:21 Go to previous message
Catherine C. is currently offline Catherine C.Friend
Messages: 4
Registered: March 2015
Junior Member
Hi Dimitris,

My apologies, you're right. I get the project that I sent you and correct it like you said and it works fine now!
(I did some changes in my project, that's why the transformation failed I guess)

Thanks a lot for your quick answer and your explanation!

Cheers,
Catherine
Previous Topic:[EWL] How to order selected elements
Next Topic:Is there a CodeCoverage Tool for epsilon?
Goto Forum:
  


Current Time: Fri Apr 26 12:33:55 GMT 2024

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

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

Back to the top