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 14:21] by Moderator