And of course the current behaviour very likely is quite useful for many use cases. 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 To get started with PlantUML, follow these steps: Installation: PlantUML can be installed as a standalone tool or as a plugin for popular development environments like Visual Studio Code. 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' PlantUML is an open-source tool that allows you to create UML (Unified Modeling Language) diagrams, including sequence diagrams, using a simple text-based syntax. 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 ? Its ability to generate visual representations, such as deployment diagrams, class diagrams, and sequence diagrams, has made it a valuable asset in the world of software development. 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. PlantUML is an open-source tool that allows developers and architects to create diagrams using a simple and intuitive textual syntax. 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. I was helped in an earlier question with preprocessor functions - DRAW works without fault. Sequence Blocks setup as PART 1ifdef PART1. I am using parameters to drive conditional drawing of participants in box groups in a sequence diagram - I am running on. Unfortunately the size of these alt blocks seems to be determined as well by all arrows within an 'alt' and its closing 'end' statement. Plantuml Sequence Diagram Conditional Sentences. 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 |