Sequence Diagram   «Prev 

Drawing the sequence diagram

1)  Use one scenario as your source for the events and their order. Here we will use an activity diagram of the Choose Show use case to isolate one scenario.
Use one scenario as your source for the events and their order. Here we will use an activity diagram of the Choose Show use case to isolate one scenario. The red lines and activities identify one scenario (one logical path) in the activity diagram.

2) For the first event, choose the class from the class diagram that describes the object initiating the event.
For the first event, choose the class from the class diagram that describes the object initiating the event. The initiating object may be in a class that represents an actor, the system itself, or one of the problem domain resources. In this case the initiating object is a Customer.

3) Draw the object at the top of the diagram
Draw the object at the top of the diagram.

4) Draw a timeline vertically from the object downward.
Draw a timeline vertically from the object downward.

5) For each event, choose a class from the class diagram that describes the object best suited to receive and respond to the event.
For each event, choose a class from the class diagram that describes the object best suited to receive and respond to the event.

6) Draw the object at the top of the diagram.
Draw the object at the top of the diagram.

7) Draw a timeline vertically from the object downward.
Draw a timeline vertically from the object downward.

8) Draw a horizontal arrow from the sending object's timeline to the receiving object's timeline.
Draw a horizontal arrow from the sending object's timeline to the receiving object's timeline.

9) Label the event line with the description of the event from the scenario.
Label the event line with the description of the event from the scenario.

10) If the event requires a response, then add an event arrow from the receiving object's timeline back to the sending object's timeline
If the event requires a response, then add an event arrow from the receiving object's timeline back to the sending object's timeline.

11) Label the return with the information that is returned. If the event simply returns control it is common to simply label the event return.
Label the return with the information that is returned. If the event simply returns control it is common to simply label the event return.

12) Repeat this procedure for each event until all events in the scenario have been applied to the sequence diagram.
Repeat this procedure for each event until all events in the scenario have been applied to the sequence diagram.

13) Repeat this procedure for each event until all events in the scenario have been applied to the sequence diagram.
Repeat this procedure for each event until all events in the scenario have been applied to the sequence diagram.

14) Repeat this procedure for each event until all events in the scenario have been applied to the sequence diagram.
Repeat this procedure for each event until all events in the scenario have been applied to the sequence diagram.

15) Repeat this procedure for each event until all events in the scenario have been applied to the sequence diagram.
Repeat this procedure for each event until all events in the scenario have been applied to the sequence diagram.

16) Repeat this procedure for each event until all events in the scenario have been applied to the sequence diagram.
Repeat this procedure for each event until all events in the scenario have been applied to the sequence diagram.