Sequence diagrams have traditionally been used to model interactions between computer systems, but they are increasingly used to document interactions between business objects. Make your own UML sequence diagram with Gleek. Messages can go back and forth from left and right, with the sequence moving from top to bottom as the time period progresses. During this period it is said to have focus of control. An activation bar is a thin rectangular box that is shown on an object’s lifeline when it is active and processing a task. Horizontal arrows show the messages exchanged between the objects. This lifeline represents the object’s existence in the time period being captured. The diagram shows how objects in the system exchange messages and which objects are active at any particular time.Įach object is shown at the top of the diagram and each has a lifeline that descends vertically from its center. Sequence diagrams can also be called event diagrams or event scenarios. UML diagrams are generally used when designing software and databases to make sure that the system will work as required and to reveal potential problems before building the final product.Ī sequence diagram models the interactions between objects in a system in sequential order over time. Sequence diagrams are one of the 14 diagram types that can be created using the Unified Modeling Language (UML). And of course the current behaviour very likely is quite useful for many use cases.What are sequence diagrams and what are they used for? Seen as a 2-dimensional document such rendering appears more confusing to me than if logic ('alt' statements) was rendered close to those objects it actually belongs to. The (still simplified) example below renders all 'alt' statements as horizontally global. In complex documentations as well as in complex source code I'd like to see related artifacts show up as close as possible (as long as useful). Programming books and articles such as the linked one rarely present examples of a complexity where documentation gets its relevance just because of the complexity. Note over C: proposal: allow 'dashed' arrows to cross for the reply. Note over C: How could I let those arrows *cross* the border\nof that 'alt' block instead of enlarging it ? 7 participants all calling each other\nconditioned by 'alt' conditions:\nall 'alt' blocks become 'global': what a mess ! Note over C: this simplified example still looks pretty\nnow think of e.g. Note over C: reason (my guess): the arrows between B,C and D Note over C: but the logic appears all over B,C and D Note over B: the alt block visually includes B\nbut B is not part of the logic\n -> bad!Īlt this alt logic is coded exclusively in 'C' Note over C: some if-else logic in C should be horizontally limited to its scope: 'C' Is there any way to control the horizontal size of such 'alt' blocks ? I now kind of adapt the logic I want to document just in order to get my diagrams, which is of course not what documentation should do. Unfortunately that makes the diagram unreadable. Since routines may have multiple calls to other participants and as well have more than one return statement my 'alt' blocks are printed much bigger than I'd like to see: they include all participants called from within the 'alt' and all callers being returned to from within the 'alt' block. Unfortunately the size of these alt blocks seems to be determined as well by all arrows within an 'alt' and its closing 'end' statement. It appears essential that within 'participants' some logic needs to be expressed.Ĭurrently I am using 'alt'. I am about to document quite some procedures using sequence diagrams.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |