
The notation for a synchronous message is a solid arrowhead an open arrowhead is used for asynchronous events.

They can refer to the sending of events from one object to another (and consumed by the target object's state machine) or to synchronous invocation (or calling) of methods defined by the target object. Stimuli are the arrowed lines on the sequence diagrams. However, if two different messages occur on different lifelines, the sequence diagram really doesn't say anything about the relative timing of those particular messages. Second, all events along a single lifeline are fully ordered in time. Because instance lifelines may be running in different threads, the relative order of messages is only fully-ordered in two senses: first, a message-receive event always occurs after that message is sent (no surprise there). Well, almost explicitly-sequence diagrams specify what is called partial ordering. When a use case is found on a sequence diagram, it represents the part of the system that executes to realize that use case (in other words, the realizing collaboration).Įach sequence diagram explicitly shows a legal sequence of messages in the order in which they occur. They are commonly things like objects (instances of classes), actors (objects of interest outside the system), systems, subsystems, components, or even use cases. The lifelines represent instances (or roles that instances play) of any classifier in the UML. The object lifelines represent objects playing roles in a collaboration and the stimuli show the messages sent between the lifelines over time. The most important elements are the object lifelines and the stimuli (or messages). Callouts identify the different elements of the sequence diagram.

And finally, during testing, sequence diagrams can be used to specify expected behavior (given a set of preconditions and an ordered set of stimuli) and validate output.įigure 1 shows a sequence diagram depicting the interaction of instances of the elements from the class diagram in the article mentioned earlier.

During system modeling, sequence diagrams are used to demonstrate how internal structural elements interact to provide higher level behavior, such as to “realize” a use case. During requirements capture, they can help define messages sent between the actors and the system, their allowable sequences (sometimes called the “protocol of interaction”), and quality of service constraints.
#Message sequence diagram software#
Sequence diagrams can be used in a number of ways during the software development process.
