Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » ETL problem
ETL problem [message #532977] 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 #532981 is a reply to message #532977] 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 #533645 is a reply to message #532981] Fri, 14 May 2010 21:44 Go to previous messageGo to next message
José Miguel P. is currently offline José Miguel P.Friend
Messages: 66
Registered: March 2010
Member

There was a bug:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=312517

and it has been fixed by Dimitrios Kolovos.

Thank you very much!! Wink
Re: ETL problem [message #589214 is a reply to message #532981] Fri, 14 May 2010 21:44 Go to previous message
José Miguel P. is currently offline José Miguel P.Friend
Messages: 66
Registered: March 2010
Member

There was a bug:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=312517

and it has been fixed by Dimitrios Kolovos.

Thank you very much!! ;)
Previous Topic:[EuGENia] How to change icon in palette and popup menu
Next Topic:[EuGENia] Is it possible to have gmf.node with without label attribute?
Goto Forum:
  


Current Time: Thu Apr 25 06:55:25 GMT 2024

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

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

Back to the top