|
Re: [ATL] Source pattern not executing on lazy rule [message #12180 is a reply to message #12175] |
Thu, 25 January 2007 20:52 |
Eclipse User |
|
|
|
Originally posted by: rchevrel.sodius.com
Hi Ronan,
I think your problem come from the call. A lazy rule is called on a
collection, not on an element. You can try to call your lazy rule on a
collection of MMa!Mappings without any change, or transform your lazy
rule on a called rule :
<- thisModule.MappingsToAssign(mp);
rule MappingsToAssign (mp : MMa!Mappings) {
to
ass : MMb!Assign()
}
But you have to check the condition (mp."from".message = 'Initial')
before calling.
Best regard,
Régis Chevrel (Sodius)
Ronan a écrit :
> Hi,
> I have the following issue (code is simplified). When I call a lazy rule
> the source pattern does not seem to execute. For example if I call the
> lazy rule below with the code activities <-
> thisModule.MappingsToAssign(mp);
>
> lazy rule MappingsToAssign{
> from mp : MMa!Mappings
> (
> mp."from".message.debug('fired') = 'Initial'
> )
> to
> ass : MMb!Assign()
> }
>
> If I try to access the properties of mp in the to section I have access
> to its properties. However, the dubug statement in the from clause never
> runs nor does the source get filtered.
>
> I have tried a similar source pattern in a "normal" matched rule and it
> executes fine, but I need to use a lazy rule for this particular match.
>
> Any ideas?
> Cheers,
> Ronan
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03045 seconds