Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » Arguments with called rules
Arguments with called rules [message #724266] Sun, 11 September 2011 20:38 Go to next message
fafanellu  is currently offline fafanellu Friend
Messages: 37
Registered: July 2011
Member
Hi,
I'd like to know what sort of parameters I can use when calling a called rule from another rule (only the basic types, or also the types from my source metamodel?).

I have a called rule of this form :

rule createREF (s : A!A1) {
	to
		d:B!B2(
 	              attribute <- s.something
			)
}


which takes as a parameter an instance of A1 type, and a classic matched rule of this form :

rule createDeltaIntRule{
	from
		s:A!A1
	to
		d:B!B1(
			a1<-thisModule.createREF(s)
			)
}


As I said before, I'd like to call createREF, giving to it s (A!A1) as a parameter. Is it possible to do so ?

Thanks for your help
Re: Arguments with called rules [message #724361 is a reply to message #724266] Mon, 12 September 2011 07:32 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
This is possible but in a called rule you have to specify in the "do" code the variable the rule returns.
Here you'd do :
do{
d;
}
Re: Arguments with called rules [message #724366 is a reply to message #724361] Mon, 12 September 2011 08:01 Go to previous message
fafanellu  is currently offline fafanellu Friend
Messages: 37
Registered: July 2011
Member
yes, thanks !
That's why I got an error !
Previous Topic:[QVTo] factoryEntries in class EclipseRegistry/ interface UnitResolverFactory are empty
Next Topic:How to handle references?
Goto Forum:
  


Current Time: Sat Apr 20 01:14:33 GMT 2024

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

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

Back to the top