[ATL] Sequence problem [message #771976] |
Wed, 28 December 2011 17:31 |
Fy Za Messages: 245 Registered: March 2010 |
Senior Member |
|
|
Hi All,
I have a problem with Sequence in an imperative block.
lazy rule TinaEvent2SynchronisationComponentEvent
{
from
tina_event : TinaScenarioMetaModel!Event
to
fiacre_event : FiacreScenarioMetaModel!SynchronisationComponentEvent
(
time_event <- if tina_event.time<>OclUndefined then tina_event.time else 0 endif--,
)
do
{
fiacre_event.followed <- fiacre_event.followed->union(tina_event.getFiacreLieTransitionFromTinaEvent().processID->collect(c| thisModule.FiacreTransition2SynchronisationProcessEvent(c,fiacre_event,tina_event)));
...
...
fiacre_event.followed->size().debug('intial size');
thisModule.sequence <- fiacre_event.followed->select(a|a.oclIsTypeOf(FiacreScenarioMetaModel!SynchronisationProcessEvent));
thisModule.sequence->size().debug('sequence size');
fiacre_event.followed <- fiacre_event.followed->union(thisModule.sequence);
fiacre_event.followed->size().debug('final size');
}
}
helper def : sequence : Sequence(FiacreScenario!Event) = Sequence{};
the Console shows
intial size: 4
sequence size: 2
final size: 4
I don't Understand why the final size is not 6 (4+2) after union operator
PLZ help me
Thanks
[Updated on: Wed, 28 December 2011 19:21] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03989 seconds