Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » ETL problem
ETL problem [message #589163] Tue, 11 May 2010 18:11 Go to next message
José Miguel P. is currently offline José Miguel P.Friend
Messages: 66
Registered: March 2010
Member

Hello.

I'm trying do a transformation using ETL.

I have this model, created by a other previous transformation:

<?xml version="1.0" encoding="ASCII"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:pimnat="afpl.nat.pim">
<pimnat:Policy id="fw2">
<rule>
<filter interface="eth1" direction="out" action="deny">
<matches ipsrc="10.1.1.0/24" ipdst="10.10.10.2" protocol="*" prtsrc="*" prtdst="*"/>
</filter>
</rule>
<rule>
<filter interface="eth2" direction="in" action="deny">
<matches ipsrc="10.1.1.0/24" ipdst="10.1.1.3" protocol="tcp" prtsrc="*" prtdst="23"/>
</filter>
</rule>
</pimnat:Policy>
</xmi:XMI>


And two rules for try. This is the first one:
rule trasnform_policie
transform f: Source!Policy
to p : Target!Policy{

"policy".println();
}
and it's working ok.

And the second one:

rule trasnform_policie2
transform f: Source!Rule
to p : Target!Filter_Rule{

f.println();
"hello".println();
}

But when I executed this rule, nothing hapen

The problem is that ETL is not taking <rule> like Source!Rule, but I don't know why. I have checked the metamodel and I think every is ok.

Any idea?

Thank you very very much for your help!!!
Re: ETL problem [message #589167 is a reply to message #589163] Tue, 11 May 2010 18:19 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Jose Miguel,

Is perhaps Rule an abstract class? If so, you should add a @greedy
annotation to your second rule:

@greedy
rule trasnform_policie2
transform f: Source!Rule
to p : Target!Filter_Rule{

f.println();
"hello".println();
}

If this is not the case, could you please send me your metamodels, ETL
and a sample model so that I can have a look at this?

Cheers,
Dimitris

Jose Miguel wrote:
> Hello.
>
> I'm trying do a transformation using ETL.
>
> I have this model, created by a other previous transformation:
>
> <?xml version="1.0" encoding="ASCII"?>
> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns:pimnat="afpl.nat.pim">
> <pimnat:Policy id="fw2">
> <rule>
> <filter interface="eth1" direction="out" action="deny">
> <matches ipsrc="10.1.1.0/24" ipdst="10.10.10.2" protocol="*"
> prtsrc="*" prtdst="*"/>
> </filter>
> </rule>
> <rule>
> <filter interface="eth2" direction="in" action="deny">
> <matches ipsrc="10.1.1.0/24" ipdst="10.1.1.3" protocol="tcp"
> prtsrc="*" prtdst="23"/>
> </filter>
> </rule>
> </pimnat:Policy>
> </xmi:XMI>
>
>
> And two rules for try. This is the first one:
> rule trasnform_policie
> transform f: Source!Policy
> to p : Target!Policy{
>
> "policy".println();
> }
> and it's working ok.
>
> And the second one:
>
> rule trasnform_policie2
> transform f: Source!Rule
> to p : Target!Filter_Rule{
>
> f.println();
> "hello".println();
> }
>
> But when I executed this rule, nothing hapen
>
> The problem is that ETL is not taking <rule> like Source!Rule, but I
> don't know why. I have checked the metamodel and I think every is ok.
> Any idea?
>
> Thank you very very much for your help!!!
Re: ETL problem [message #659250 is a reply to message #589167] Fri, 11 March 2011 16:49 Go to previous message
As Sa is currently offline As SaFriend
Messages: 5
Registered: February 2010
Junior Member
Hi Dimitris,

I've got the same problem with some of my rules. everything looks fine in my .ecore model.
I have tried the @greedy, but it doesn't work either.
Can you please help me ?

Asieh
Previous Topic:[EVL] Validation on EMF editor
Next Topic:Epsilon, Eugenia with GMF
Goto Forum:
  


Current Time: Thu Apr 25 06:13:53 GMT 2024

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

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

Back to the top