Professional Documents
Culture Documents
2
3
ReportEmergency Use Case.. cont.
4
Figure1: Sequence diagram for the ReportEmergency Use Case
5
Figure 1: Sequence diagram for the ReportEmergency Use Case.. cont.
6
Figure 1: Sequence diagram for the ReportEmergency Use Case.. cont.
7
Drawing Sequence Diagram
• Objects represent the participants (objects and actors), actors may be outside
the system, represented by rectangles
- written as Instance Name : Class Name or written as Class Name
- The left-most one is the actor who initiates the use case
Figure 2: Object
representation
8
Drawing Sequence Diagram
Objects that are created during the interaction are given a «create» message pointing to the
created object.
Figure 4:
Destroying of
Object
11
Drawing Sequence Diagram
• Object lifelines: arrange the messages in the proper relative sequence
- represented by columns (dashed then as a vertical rectangle when active)
- length of vertical rectangles represents the time the operation is active to
show its lifetime
12
Drawing Sequence Diagram
• Messages (stimuli) represent the communication sent between objects
- represented by horizontal arrows across objects
- solid arrow line represents a message that requires a response and
dashed arrows are the responses.
- messages are placed horizontally onto the timelines ordered
- use the square condition brackets to indicate either the number of times
or the condition for repetitions,
Ex: .[for each product]: additem (product)
- same condition brackets may be used to control whether a message is
even sent
13
Drawing Sequence Diagram
Messages
16
Figure 7: Notations
in Sequence diagram
17
Drawing Sequence Diagram-- notations
1. Activation: The start of the vertical rectangle, the activation bar
2. Deactivation: The end of the vertical rectangle, the activation bar
3. Timeout event: Typically signified by a full arrowhead with a small clock face
or circle on the line
4. Asynchronous event: Typically signified by a stick arrowhead
5. Object termination symbolized by an X
18
Drawing Sequence Diagram-- notations
• Reference #1 shows when the object becomes active at the top of the rectangle.
Note that the object becomes active when it begins to do work.
• Reference #2 shows when the object is deactivated or finishes its work and waits for
the next request
• Reference #3 points to a message with a circle on the line and the stereotype
<<timeout>>. This is called a timed event.
• There is also a condition or a constraint on the message that expresses the timing
parameters for the event, for example: if we don’t get a response from inventory
within 2 seconds we will bypass the item and check later.
19
Drawing Sequence Diagram-- notations
Reference #4: An asynchronous message uses a stick arrowhead instead of the solid
arrowhead. Messages may be synchronous (requiring a response) or asynchronous (not
requiring a response).
20