On this page

UML State Machines provide a special mechanism for deferring Events in States. In every State, you can include a clause [Event list]/defer. If an Event in the current State’s deferred Event list occurs, the Event will be saved (deferred) for future processing until a State is entered that does not list the Event in its deferred Event list. Upon entry to such a State, the UML State Machine will automatically recall any saved Event(s) that are no longer deferred and will then either consume or discard these Events.

  • A deferred Event is activated as soon as it enters a State where it is not deferred. 
  • A deferred Event can only be added to a State Machine diagram at this time. 

Deferrable Trigger

A list of Triggers that are candidates to be retained by the State Machine if they trigger no transitions out of the State (not consumed). A deferred Trigger is retained until the State Machine reaches a State configuration where it is no longer deferred.


Deferable Trigger
The Specification window for Event State moving - showing the editable Deferrable Trigger tag.

As in the State Machine diagram in the following figure, the Elevator 'open' Event is deferred as long as the Elevator is moving. Only when the State transitions to 'stopped' State again, the 'open' Event will be executed because it is no longer deferred at this point.

Simulating deferred events
      A deferred clause added to Event moving which causes the Event to delay until it is no longer deferred. 


Important

This version of Cameo Simulation Toolkit does not support Deferred Events for Activity diagrams. They can now only be added to a State in a State Machine diagram.