Skip to content

Latest commit

 

History

History
101 lines (75 loc) · 1.92 KB

PlantUML.md

File metadata and controls

101 lines (75 loc) · 1.92 KB

PlantUML

PlantUML is an open-source tool allowing users to create diagrams from a plain text language. It also supports various other Software development related formats, as well as visualisation of JSON and YAML files.

Official Documentation

Creating Diagrams

We can use the online server provided by plantuml.com. We can also download the runnable JAR to run locally using our preferred text editor while editing any file with a compatible extension, or use the command line.

Example:

java -jar plantuml.jar sequenceDiagram.txt

To create a diagram we use these start and end tags:

@startuml
...
@enduml

Following are rules specific to different diagrams and their use.

Sequence Diagram

Used to draw a message between two participants.

Arrows

participant1 -> participant2: message
-> Arrow  
--> Dotted arrow  
->> Thin arrow  
-->> Thin dotted arrow  
-\ Half top arrow  
-/ Half bottom arrow  
-\\ Thin half top arrow  
-// Thin half bottom arrow  
--\\ Thin dotted half top arrow  
--// Thin dotted half bottom arrow  

Any of these arrows can go in either or both directions and can end or start with 'x' or 'o'.

->o
->x

Participants

(type) (name) as (alias) order (number) (hex color)
(type) "(name)" as (alias) order (number) (hex color)
(type) (alias) as "(name)" order (number) (hex color)

Types:

  • participant
  • actor
  • boundary
  • control
  • entity
  • database
  • collections
  • queue

Comments

' Single line
/' Multiple lines '/

Auto Numbering

autonumber (base) (increment) "(format)"

Auto numbering can be stopped or resumed (with another increment and/or format)

autonumber stop
autonumber resume (increment) "(format)"

Styling



Work in progress...