System Sequence Diagrams
• A system sequence diagram (SSD) is a fast and easily created
artifact that illustrates input and output events related to the
systems under discussion. They are input to operation contracts
and, most importantly, object design.
• We can relate SSDs to the other models we have seen so far
SSDs within the
• An SSD shows, for a particular course of events within a use
case, the external actors that interact directly with the system,
the system (as a black box), and the system events that the actors
generate. Time proceeds downward, and the ordering of events
should follow their order in the scenario.
• In use cases, actors generate system events requesting some
system operations to handle the events.
• We can draw an SSD for a main success scenario of each use
case, and frequent or complex alternative scenarios.
• SSDs help to validate, clarify and refine use cases.
• Interaction frames are used to show loops (and other constructs)
in sequence diagrams; common interaction frames operators
– alt : Alternative multiple fragments; only the one whose condition is true
– opt : Optional; the fragment executes only if the supplied condition is
– loop : The fragment may execute multiple times, and the guard indicates
the basis of iteration.
Illustrating Various Interaction Frames
3 Relationship Between SSDs and Use Cases
4 Conclusions on System Sequence Diagrams
• Don't create SSDs for all scenarios, rather draw them only for
the scenarios chosen for the next iteration. And, they shouldn't
take long to sketch, perhaps a few minutes or a half hour.
• SSDs are also very useful when you want to understand the
interface and collaborations of existing systems, or to document
the overall architecture of the application.
• SSDs represent visually the essential aspects of a use case.
• For each event that the system receives from an actor, the
system is expected to implement an operation, of the same
name, to perform something of value to the actors.
5 Sequence Diagrams for Design
• Whilst SSDs use sequence diagrams to illustrate
communications between actors and the system (define the
public interface of the system: high level analysis), sequence
diagrams are also used to show interactions between objects
(define algorithms: low level design)
• For example:
public class A
private B myB = new B();
public void doOne()
• Creation of instances :
– Typically we use the language independent create message:
Iteration Over a Collection Using Implicit Notation