

The lifeline is displayed as a vertical dashed line. Below the target, its lifeline extends for as long as the target exists. A target is displayed as a rectangle with some text in it. Objects as well as classes can be targets on a sequence diagram, which means that messages can be sent to them. To relate the comment to whatever diagram elements it is about, connect them with dashed lines.

Note that this highlight is not part of the diagram itself.Īs with all UML diagrams, comments are shown in a rectangle with a folded-over corner : To clarify how execution switches from one object to another, a blue highlight was added to represent the flow of control. The diagram above shows how objects interact in the "rent item" collaboration when the item is not available during the requested period. The UML sequence diagram gallery contains many examples, but here's a typical sequence diagram based on a system use case scenario : For each key collaboration, diagrams are created that show how objects interact in various representative scenarios for that collaboration. Lower equals Later).Ī popular use for them is to document the dynamics in an object-oriented system. An important characteristic of a sequence diagram is that time passes from top to bottom : the interaction starts near the top of the diagram and ends at the bottom (i.e. UML sequence diagrams are used to show how objects interact in a given situation.
