Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drawing Sequence Diagrams [closed]

I'm looking for an easy language/command line utility to draw sequence and timing diagrams (could be 2 different tools). I've already found Mscgen for sequence diagram drawing and looks pretty good, but I'm studying other possibilities.

Thanks

like image 694
rnunes Avatar asked Jun 15 '11 21:06

rnunes


People also ask

What does dotted line mean in sequence diagram?

Under each actor or system there are long dotted lines called lifelines, which are attached to them. Actions are performed with lines that extend between these lifelines. When an action line is connected to a lifeline it shows the interaction between the actor or system.

What is lifeline in sequence diagram?

In UML diagrams, such as sequence or communication diagrams, lifelines represent the objects that participate in an interaction. For example, in a banking scenario, lifelines can represent objects such as a bank system or customer. Each instance in an interaction is represented by a lifeline.

What is opt in sequence diagram?

opt is used to describe optional step in workflow. For example, for online shop purchase sequence diagram you may use opt to describe how user can add gift wrapping if she wishes. alt may be used to describe two variants of payment: using credit card or wire money transfer.


1 Answers

PlantUML. http://plantuml.sourceforge.net/sequence.html

PlantUML is used to draw UML diagram, using a simple and human readable text description.

The generated images can then be used without any reference to the GPL/LGPL/ASL/EPL/MIT license. It is not even necessary to stipulate that they have been generated with PlantUML, although this will be appreciate by PlantUML team.

In my experience it has been easy to use and it produces nice looking diagrams. I can't recommend it more highly.

Output file types:

-tsvg     To generate images using SVG format -teps     To generate images using EPS format -txmi     To generate XMI file for class diagram -thtml    To generate HTML files for class diagram -ttxt     To generate images with ASCII art -tutxt    To generate images with ASCII art using Unicode characters 

Here is an example showing how to create a simple sequence diagram. enter image description here

@startuml Alice -> Bob: Authentication Request Bob --> Alice: Authentication Response  Alice -> Bob: Another authentication Request Alice <-- Bob: another authentication Response @enduml 

You can also create more detailed diagrams by using lifeline activation and destruction: enter image description here

@startuml participant User  User -> A: DoWork activate A  A -> B: << createRequest >> activate B  B -> C: DoWork activate C C --> B: WorkDone destroy C  B --> A: RequestCreated deactivate B  A -> User: Done deactivate A  @enduml 
like image 142
user3226306 Avatar answered Sep 29 '22 11:09

user3226306