The sequence diagram example below shows the interactions between a user and a ticket booking system in booking a seat. Draw a set of corresponding sequence diagrams for the exception or alternative scenarios.Repeat each of the point of the scenario (or flow of event) and until you complete all the points in the scenario.By this way, you will identify the candidate objects and operations of the target application for that particular scenario and you can also use these information as a basis to derive the class diagram incrementally.Guess, what will to be handled inside the ADM by a set of objects at the "back" of the system? Something like, read and verify the ATM card (card reader), read the card information of the card holder (by the bank) and ask for the pin, or, return "invalid card type, insert another card", and etc.A customer inserted an ATM card to the machine, the system will display "input pin number" in the normal scenario, right? What the system need to be handled before the return message response back from the system?.Consider what the system need to be done in order to response to the actor, when the actor send the message to the system.Consider the first point of the scenario (or if you get it from the first point of the flow of event of a use case).You should know the primary actor(s) who activates the use case.If you derive the sequence diagram based on a scenario of a use case, select the normal scenarios first.Identify a set of objects that will participate in the general collaboration (or use case scenario).Either model generic interactions (showing all possible paths through the interaction) or specific instances of a interaction (showing just one path through the interaction).Model the interaction between objects within a collaboration that realizes an operation.Model the interaction between object instances within a collaboration that realizes a use case.Model high-level interaction between active objects in a system.A comment carries no semantic force, but may contain information that is useful to a modeler. NoteĪ note (comment) gives the ability to attach various remarks to elements. Duration MessageĪ duration message defines a particular communication between lifelines of an interaction, which shows the distance between two time instants for a message invocation. Destroy MessageĪ destroy message defines a particular communication between lifelines of an interaction, which represents the request of destroying the lifecycle of target lifeline.
Create MessageĪ create message defines a particular communication between lifelines of an interaction, which represents the instantiation of (target) lifeline. It's target points to an activation on top of the activation where the message was invoked from. Recursive MessageĪ recursive message defines a particular communication between lifelines of an interaction, which represents the invocation of message of the same lifeline. Self MessageĪ self message defines a particular communication between lifelines of an interaction, which represents the invocation of message of the same lifeline. Return MessageĪ return message defines a particular communication between lifelines of an interaction, which represents the pass of information back to the caller of a corresponded former message.
UML Sequence diagrams are interaction diagrams that detail how operations are carried out. A sequence diagram describes an interaction among a set of objects participated in a collaboration (or scenario), arranged in a chronological order it shows the objects participating in the interaction by their "lifelines" and the messages that they send to each other.