170 likes | 180 Views
This chapter explains how to identify system events, create system sequence diagrams (SSD), and draw SSDs for different use case scenarios.
E N D
Chapter 8: System Sequence Diagrams Chapter 9 in Applying UML and Patterns Book.
Identify System Events. • Create System Sequence Diagrams “SSD” for the events. Overview
It is useful to investigate and define the behavior of the software as a “black box”. • System behavior is a description of what the system does (without an explanation of how it does it). • Use cases describe how external actors interact with the software system. During this interaction, an actor generates events. • A request event initiates an operation upon the system. • System event are external input event generated by an external actor and indicates an operation that should be performed. System Behavior
A sequence diagram is a picture that shows, for a particular scenario of a use case, the events that external actors generate, their order, and possible inter-system events. • All systems are treated as a black box; the diagram places emphasis on events that cross the system boundary from actors to systems. • A SSD should be done for typical course of events of a use case and for the most interesting alternative courses. • System Sequence Diagrams provide a way to visually step through invocation of the operations defined by Use-Cases. • It is not necessary to create SSDs for all scenarios of all use-cases, at least not at the same time. System Sequence Diagram - SSD
Alternatives: Line 4. If the Patron card is invalid, do not allow borrowing. Line 5. If the Resource is missing a call number, set it aside for repair and do not allow borrowing. Example: Borrow Resource Use CaseTypical course of events (cont.)
Draw a line representing the system as a black box. Identify each actor that directly operates on the system. Draw a line for each such actor. From the use case, typical course of events text, identify the system (external) events that each actor generates. They will correspond to an entry in the right hand side of the typical use case. Illustrate them on the diagram. Optionally, include the use case text to the left of the diagram. How to draw System Sequence Diagram ?
System events and their associated system operations should be expressed at the level of intent rather than in terms of the physical input medium or widget. • In order to improve the clarity, it is appropriate to start the name of the system event with a verb (for example: add…., enter…., end…., make…, etc.). It also emphasizes the command origination of these events. Naming System Events and Operations
The set of all required system operations is determined by identifying the system events. • makeNewSale() • addLineItem(itemID, quantity) • endSale() • makePayment(amount) Example: Buy Item Use CaseNaming System Events and Operations
Example: Buy Item Use CaseNaming System Events and Operations (cont.)
Example: Buy Item Use CaseTypical course of events for Pay By Credit Section
Class Activity:Draw the SSD for the “Enroll in course” Use Case