180 likes | 334 Views
Introduction to the Sequence Diagrams with stereotypes. Department of Information Systems and Computation (DSIC) Valencia Polytechnic University. Requirements Analysis Process Sequence Diagram.
E N D
Introduction to the Sequence Diagrams with stereotypes Department of Information Systems and Computation (DSIC) Valencia Polytechnic University
Requirements Analysis ProcessSequence Diagram • A Use Case functionality is specified identifying interacting classes and messages that they interchange • Structure and Notation
Requirements Analysis ProcessSequence Diagram • Blocks: they are used to specify conditions or iterations that affect to one or many messages • NOT ALL the messages are of the same nature… • An UML extension is introduced (stereotypes) to classify messages according to its nature:«signal», «service», «query», «connect»
Sequence DiagramStereotypes extension • «Signal» stereotype
Sequence DiagramStereotypes extension • «Service» stereotype
Sequence DiagramStereotypes extension • «Query» stereotype
Sequence DiagramStereotypes extension • «Connect» stereotype
Sequence DiagramStereotypes extension • «Connect» stereotype example
Sale items Cashier An example 1- Use Case is identified and its actor(s) specified 2- Functionality is specified identifying object classes and interactions
Sale items Cashier RAP – Sequence Diagram (1/8)(Relevant actors are identified)
Sale items Cashier RAP – Sequence Diagram (2/8)(Messages between actors and the system)
RAP – Sequence Diagram (3/8)(Internal messages, Sale and Sale-line are identified)
until end of lines RAP – Sequence Diagram (4/8)(To create a sale-line it’s necessary an item)
RAP – Sequence Diagram (5/8)(the cashier finishes the data entry) until end of lines
RAP – Sequence Diagram (6/8)(Subtotal has to be calculated and also the item stock has to be updated) until end of lines
until end of lines RAP – Sequence Diagram (7/8)(Final information about the sale is shown)
RAP – Sequence Diagram (8/8)(Messages are stereotyped) <<signal>> <<signal>> <<service/new>> until end of lines <<service/new>> <<connect/1,1>> <<query>> <<signal>> <<query>> <<service>> <<signal>>
Summary • Sequence Diagrams (SD) are used to specify functionality in terms of object interactions (they are not algorithm specifications!) • Objects from classes communicate each other by sending messages • A SD is structured in three regions: • External:actors outside of the system – users • Interface: user interface (boundary class) to receive information from actors or to show information produced by the system • Internal: classes in which the system is structured • Depending on the nature of messages they are classified in: • Signal: messages to get information into the system or to show information from the system • Service: messages that change the state of the system (create, destroy, update) • Query: messages to query the state of an object or a set of objects • Connect: messages that relates objects to each other (when an object needs to be “connected” to other objects)