The method OMThread::execute is
responsible
for the event loop.
About this task
The
following sequence
diagram shows a
dispatched event.
This sequence diagram
shows the main sequence of events that are done inside this method.
The event loop is as follows:
Procedure
execute calls the get method
to get the first event from the event queue.
If the event is not a NULL event, execute calls
the getDestination method to determine the OMReactive destination
for the event.
execute calls
the takeEvent method to request that the reactive object
process the event. takeEvent calls the processEvent method,
which does the following:
It
calls isBusy to determine
whether the object is already consuming an event. If the object is
not busy, processEvent does the following:
processEvent calls shouldCompleteRun to
see if there are any null transitions to take after the event has
been consumed. If there are null transitions to be taken, the method
calls runToCompletion to take them.
processEvent calls undoBusy to
reset the sm_busy flag to FALSE.
execute calls
the isDeleteAfterConsume method
to determine whether the event is deleted. If the Attributes attribute
is TRUE, execute calls the Delete method
to delete the event.