Terms and Concepts
An event is the specification of a significant occurrence that has a location in time and space. In the context of state machines, an event is an occurrence of a stimulus that can trigger a state transition. A signal is a kind of event that represents the specification of an asynchronous message communicated between instances.
Kinds of Events
Events may be external or internal. External events are those that pass between the system and its actors. For example, the pushing of a button and an interrupt from a collision sensor are both examples of external events. Internal events are those that pass among the objects that live inside the system. An overflow exception is an example of an internal event.
Actors are discussed in Chapter 17; systems are discussed in Chapter 32 . |
The creation and destruction of objects are also kinds of signals, as discussed in Chapter 16 . |
Signals
A message is a named object that is sent asynchronously by one object and then received by another. A signal is a classifier for messages; it is a message type.
Classes are discussed in Chapters 4 and 9; generalization is discussed in Chapters 5 and 10 . |
State machines are discussed in Chapter 22; interactions are discussed in Chapter 16; interfaces are discussed in Chapter 11; dependencies are discussed in Chapter 5; stereotypes are discussed in Chapter 6 . |
Figure 21-2. Signals

Call Events
Just as a signal event represents the occurrence of a signal, a call event represents the receipt by an object of a call request for an operation on the object. A call event may trigger a state transition in a state machine or it may invoke a method on the target object. The choice is specified in the class definition for the operation.
State machines are discussed in Chapter 22 . |
Figure 21-3. Call Events

Time and Change Events
A time event is an event that represents the passage of time. As Figure 21-4 shows, in the UML you model a time event by using the keyword after followed by some expression that evaluates to a period of time. Such expressions can be simple (for example, after 2 seconds) or complex (for example, after 1 ms since exiting Idle). Unless you specify it explicitly, the starting time of such an expression is the time since entering the current state. To indicate a time event that occurs at an absolute time, use the keyword at. For example, the time event at (1 Jan 2005, 1200 UT) specifies an event that occurs on noon Universal Time on New Year's Day 2005.
Figure 21-4. Time and Change Events

Sending and Receiving Events
Signal events and call events involve at least two objects: the object that sends the signal or invokes the operation and the object to which the event is directed. Because signals are asynchronous, and because asynchronous calls are themselves signals, the semantics of events interact with the semantics of active objects and passive objects.
Processes and threads are discussed in Chapter 23 . |
Instances are discussed in Chapter 13 . |
State machines are discussed in Chapter 22; active objects are discussed in Chapter 23 . |
Figure 21-5. Signals and Active Classes

Operations are discussed in Chapter 4; extra class compartments are discussed in Chapter 4 . |