Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » Cannot call a CalledRule on a Seqeunce()
Cannot call a CalledRule on a Seqeunce() [message #43448] Thu, 31 May 2007 14:38 Go to next message
Guillaume Hillairet is currently offline Guillaume HillairetFriend
Messages: 95
Registered: July 2009
Member
Hi all,

I've got a problem with the called rules.
I want to call one of these rules like this :

rule A {
from
a : MMa!A
to
b : MMb!B (
truc <- a.getAllIWant()->collect( e | thisModule.myCalledRule( e,
a ) )
)
}

rule myCalledRule( e,a) { ... }

Where the helper getAllIWant() returns a collection.
During execution I've got this error :
message: ERROR: could not find operation including on Module having
supertypes: [OclAny]

But seems to work when we call the rule on a reference like this :

b : MMb!B (
truc <- a.refs->collect( e | thisModule.myCalledRule( e, a ) )
)
where refs is a reference of A in MMa.

So where i'm wrong ?
What i got to do for calling a called rule on a calculated sequence
Any idea
Re: Cannot call a CalledRule on a Seqeunce() [message #43508 is a reply to message #43448] Thu, 31 May 2007 14:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tristan.faure.c-s.fr

hi
I'm not a specialist but there is some points strange

Why do you have 2 parameters in you called rule when you call it ?

if you use a call rule I think you have to use a rule of this kind :

rule
to b : MMb!B (
truc <- a.refs->collect( e | thisModule.myCalledRule( e, a ) )
)
do {
b ;
}

or maybe you want to use a lazy rule and in that case you have to do

lazy rule
Re: Cannot call a CalledRule on a Seqeunce() [message #43539 is a reply to message #43448] Thu, 31 May 2007 14:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tristan.faure.c-s.fr

sorry for the double post . . . :(

hi
I'm not a specialist but there is some points strange

Why do you have 2 parameters in you called rule when you call it ?

if you use a call rule I think you have to use a rule of this kind :

rule
to b : MMb!B (
truc <- a.refs->collect( e | thisModule.myCalledRule( e, a ) )
)
do {
b ;
}

or maybe you want to use a lazy rule ? and in that case you have to do

lazy rule
from
....
to
...
[ATL]Re: Cannot call a CalledRule on a Seqeunce() [message #43569 is a reply to message #43448] Thu, 31 May 2007 15:11 Go to previous message
Guillaume Hillairet is currently offline Guillaume HillairetFriend
Messages: 95
Registered: July 2009
Member
With the [ATL] ;)

Apologizes to all

I've made a mistake, I've forgot that we've cannot call a called rules
from the declarative part. I have to use lazy rule instead.

Good day
Previous Topic:[ATL] An internal error occurred during: "Launching".
Next Topic:[ATL] problem with programmatically transformation output model
Goto Forum:
  


Current Time: Mon Jan 25 12:58:14 GMT 2021

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

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

Back to the top