![]() Some clumsy approaches to model try-catch blocks are by utilizing combined fragments - alt (alternatives) and breaks, while adding stereotypes for reply messages representing thrown exceptions. It doesn't look exactly like the diagrams at the IBM link (label outside main box instead of inside, box border obstructed by lifeline, etc?), but I think this is the best we can do with Dia's stock UML objects. Sequence Diagrams UML Back To posts UML provides neither notation to model exception handling in sequence diagrams nor any reasoning why it is absent. Also I had to frequently use the View menu's Refresh command to check myself often the drawing would mess up the stacking order and overlapping, but the Refresh would put things right again. Look at the following diagram: Even more complex structures can be obtained by the use of if - elseif - elseif. I had to play with the Objects menu items Send to Back, Bring to Front, Send Backwards and Bring Forwards, to get it all to look right without things obstructing one another. if - else & structures A more complex form of the selection structures is given by if - else. Craig Larman's Applying UML with Patterns book has an example in Chapter 35 showing exceptions as asynchronous messages (stick arrowhead). It may not be sufficient to understand everything, however. The dotted line is just a Line object (from that same static toolbar pane), with the arrowhead set to a plain line, and with the body set to dotted (done at the bottom of the left tool pane, with those 3 arrow segments). 3 Answers Sorted by: 3 Different diagrams show different perspectives, so showing them in a sequence diagram has value. A sequence diagram consists of a group of objects that are represented by lifelines, and the messages that they exchange over time during the interaction. The condition labels are just Text objects (found on the upper pane in the left toolbar, marked with the T). A sequence diagram is a Unified Modeling Language (UML) diagram that illustrates the sequence of messages between objects in an interaction. If else condition, also called alternatives in UML terms can indeed be represented in sequence diagrams. The specs (17.6.2) just require that you have at least one operand per fragment (there are no additional constraints for alt kind). If any items fall into needsConfirmation condition the confirm message. 3 Answers Sorted by: 8 There is no need to include multiple operands. ![]() (The Small Package doesn't allow you to resize it.) This is a sequence diagram that shows the representation of selection and loop. The "alt" box was drawn with the UML Large Package object. Based on the "alt" box depicted in the IBM link given by I was able to replicate something similar in Dia:
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |