More information on Sequence Diagrams Sequence diagrams can

  • Slides: 2
Download presentation
More information on Sequence Diagrams. Sequence diagrams can be used in two forms: the

More information on Sequence Diagrams. Sequence diagrams can be used in two forms: the generic form and the instance form. The instance form describes a specific scenario in detail; it documents one possible interaction. The instance form does not have any conditions, branches, or loops; it shows the interaction for just the chosen scenario. The generic form describes all possible alternatives in a scenario; therefore, branches, loops, conditions may be identified. For example, the scenario “opening an account” in a sequence diagram using the generic form would be described with all possible alternatives; where money is immediately deposited in the account and so on. The same scenario documented with the instance form of a sequence diagram would have to choose one specific execution and stick to that case; for example, one diagram could show the successful opening of an account. If all cases must be shown using instance form diagrams, a number of them would have to be drawn. Here is one way to indicate a selection… Print (file) : Printer. Server : Printer Print (file) : Printer : Queue [Printer free] Print (file) [Printer busy] Store (file) The items in brackets are called guards. If true, proceed; if not, don’t. Just like the IFTHENELSE>

Can also say: (iteration) : someobject Some message Send message Op 2 until ….

Can also say: (iteration) : someobject Some message Send message Op 2 until …. Can also say: (performance message…) : someobject 2 : someobject 1 b-a< 5 sec b-a < 1 sec Som e m essa ge