Sequence diagram show scenarios of messages exchanges between roles played by objects. This functionality can be used in numerous ways, including analysis and design scenarios, execution traces, expected behavior in test cases, and so on.
The vertical axis is the time dimension showing the exchange of messages between system objects. Messages represent the interactions between objects in the form of events or operation calls. They are depicted as arrows connecting the object lifelines.
The following sequence diagram shows the collaborations that take place within the HomeHeatingSystem once an inhabitant enters a room. The system objects are specified in the first row. Nested objects can be identified using their object path, starting from the top-level object and following the hierarchy. With arrays of objects, an index indicates the instance.

The complete behavior requirement of an object is a projection of all object lifelines from each scenario. The set of lifelines in a sequence diagram forms the complete lifecycle of an object as a statechart.
In this scenario, the following messages are passed between objects as events:
| Message | Sender | Receiver | Description |
|---|---|---|---|
| updateOcc() | <inhabitant> | OccSensor | Someone has entered the room. |
| occupied() | <system> | Room | Room receives a timer. |
| updateDtemp() | <inhabitant> | Room | Inhabitant sets a wanted temperature. |
| heatReq() | Room | Furnace | Room requests heat from Furnace. |
| motorReady() | <system> | Furnace | System checks whether the Furnace's motor is ready to operate. |
| Fstarted() | Furnace | Room | Furnace tells Room that it has started. |
| open() | Room | Valve | Room tells the heating Valve to open. |
| stopHeat() | Room | Furnace | When the temperature is warm enough, Room tells Furnace to stop generating heat. |
| close() | Room | Valve | Room tells the heating Valve to close. |
| Fstopped() | Furnace | Room | Furnace tells Room that it has stopped. |
Each of the events in the scenario is generated into an event structure in the package specification file. Because the HomeHeatingSystem example has only one package named Default, the event definitions are generated in the Default.h file.