Standards: Sequence
Diagrams
Sequence Diagram |
A sequence diagram is an interaction diagram that emphasizes the time
ordering of messages. |
Related Information: |
|
Topics
Background
Sequence Diagrams are one of the two forms of object interaction diagram used in the
UML. The other is the Collaboration Diagram (See Standards:
Collaboration Diagrams). These diagrams present the same information but with
different perspectives. In Rose a sequence diagram can be converted into a
collaboration diagram by using the menu option Browse: Create Collaboration Diagram
(F5). The two diagrams are than automatically kept synchronized by Rose.
A sequence diagram shows a set of objects and the messages sent and received by the
objects. For the standards applicable to the items appearing on a sequence diagram
see Standards: Instances Overview.
In most cases, you use a sequence diagram to show how objects interact to perform the
behavior of a particular use case, or part of a use case (See Standards: Use Case Realizations).
They may also be used to demonstrate / explore how particular classes or packages
fulfill their responsibilities (See Standards: Design
Packages).
Naming Standards
Sequence Diagram names should begin with an upper case letter. The naming standards for
specific sequence diagrams are defined for their containing model items (See Standards: Design Packages and Standards: Use Case Realizations).
Documentation
Where necessary the purpose of the diagram can be described in its documentation field.
This is optional for standard diagrams but mandatory for any additional (non-standard)
collaboration diagrams added to packages or use case realizations (See Standards: Design Packages and Standards: Use Case Realizations).
Documentation in Rose
Although diagrams do not have a specification they do have a documentation field.
If you select the diagram in the Browser then you will see the diagram's documentation in
the documentation window. This can be edited directly in the documentation field.
All sequence diagrams should have an associated "script" (shown on the left
hand side of the diagram). This is added in the form of text NOT notes. The scripts
can be linked to the message using "Edit - Attach Script" menu option.
Scripts
Scripts describe the flow of events textually in a sequence diagram.
All use case related sequence diagrams must have a script describing the flow being
explored. This script will run down the left-hand side of the sequence diagram.
In Rose you can attach the individual sections of the scripts to the applicable
message, thus ensuring that the script moves with the message. Use Edit: Attach
Script to relate a script to a message.
Actors on Interaction Diagrams
Normally an Actor instance is represented by the first (left-most) lifeline in the
sequence diagram, as the invoker of the interaction. If you have several actor
instances in the same diagram, try keeping them in the periphery of the diagram.
All other standards and documentation for Actors on interaction diagrams is the same as
for Objects (See Standards: Object).
|