-
Notifications
You must be signed in to change notification settings - Fork 13
Description
When an active object has multiple types with classifier behaviors, then a start object behavior action with no specific classifier given will cause all of them to start. This is realized in ObjectActivation::startBehavior
by having that operation call itself recursively for each object type that has a classifier behavior. This, then, results (as of fUML 1.2) in the placing of an invocation event occurrence for each classifier behavior in the object activation event pool and a sending of a new arrival signal for each event occurrence.
Now, each time the startBehavior
operation is called, it calls _startObjectBehavior
for the object activation. This should not be a problem, since starting the object activation behavior when it is already started should have no effect. However, in the reference implementation, ObjectActivation::_startObjectBehavior
is implemented by calling the similar operation on the ObjectActivation_Behavior
instance for the object activation. And the ObjectActivation_Behavior::_startObjectBehavior
operation is currently coded to enqueue an execution for the object activation on the ExecutionQueue
if there is a pending arrival signal. But this means that, in the case of multiple classifier behaviors being started for an object activation, after the first one is started, there will be a pending arrival signal, causing the spurious enqueuing of the execution multiple times, once each time a further classifier behavior is started.
Instead, the ObjectActivation_Behavior::_startObjectBehavior
operation should not do any enqueuing, and an execution should only be enqueued the first time an arrival signal is received.