Size: 1351
Comment:
|
← Revision 20 as of 2025-01-24 18:01:35 ⇥
Size: 4612
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
<<TableOfContents(2)>> | |
Line 3: | Line 4: |
https://en.wikipedia.org/wiki/PlantUML | * https://en.wikipedia.org/wiki/PlantUML * http://www.plantuml.com/plantuml |
Line 10: | Line 12: |
Graphviz for windows https://graphviz.gitlab.io/_pages/Download/windows/graphviz-2.38.msi == PlantUML web server == * https://github.com/plantuml/plantuml-server {{{ cd ~ cd tmp/ git clone https://github.com/plantuml/plantuml-server.git cd plantuml-server/ mvn jetty:run -Djetty.port=8080 mvn jetty:run -Djetty.port=8181 }}} * http://localhost:8080/plantuml * http://localhost:8181/plantuml |
|
Line 12: | Line 30: |
{{attachment:classDiag.png}} | |
Line 42: | Line 61: |
{{{ @startuml |
{{attachment:seqDiag.png}} {{{ @startuml autonumber |
Line 50: | Line 71: |
/' comment '/ | /' comment -> synch call --> response ->> asynch call '/ |
Line 61: | Line 86: |
{{attachment:seqDiag2.png}} {{{ @startuml Alice -> Bob: Authentication Request alt successful case Bob -> Alice: Authentication Accepted else some kind of failure Bob -> Alice: Authentication Failure group My own label Alice -> Log : Log attack start loop 1000 times Alice -> Bob: DNS Attack break ccc else ddd end end Alice -> Log : Log attack end end else Another type of failure Bob -> Alice: Please repeat end opt aaaa Alice -> Bob : llll else bbb Alice -> Log : kkk end @enduml }}} |
|
Line 62: | Line 124: |
{{attachment:useCaseDiag.png}} | |
Line 79: | Line 142: |
{{attachment:useCaseDiag2.png}} {{{ @startuml left to right direction skinparam packageStyle rectangle actor customer actor clerk actor a2 rectangle system{ customer -- (checkout) customer -- (ch1) customer -- (ch2) a2 -- (ch2) a2 -- (ch3) (checkout) .> (payment) : include (help) .> (checkout) : extends (checkout) -- clerk (checkout1) -- clerk (checkout2) -- clerk } @endum @enduml }}} == Activity example == {{attachment:activityDiag.png}} {{{ @startuml (*) --> "First Activity" "First Activity" --> [label] "Second Activity" "Second Activity" --> "Third Activity" if "Activities are complete?" then --> [true] (*) else --> [false] "Second Activity" endif @enduml }}} == State diagram == {{attachment:stateDiag.png}} {{{ @startuml [*] -> Created Created --> Waiting Waiting --> Processing : Received message Processing --> Waiting : Processed message Waiting --> [*] : Aborted @enduml }}} {{attachment:stateDiag2.png}} {{{ @startuml [*] -> SubmissionIncomplete SubmissionIncomplete --> Submitted : all submitted Submitted --> ReceivedPhotosNoXrays : photos uploaded ReceivedPhotosNoXrays --> ReceivedPhotosAndCast : cast uploaded ReceivedPhotosAndCast --> CreatingModel : model creation started ReceivedPhotosNoXrays --> ReceivedPhotosAndXrays : xrays uploaded Submitted --> ReceivedXraysNoPhotos : xrays uploaded ReceivedXraysNoPhotos-->ReceivedPhotosAndXrays : photos uploaded ReceivedPhotosAndXrays --> CreatingModel : model creation started CreatingModel --> ModelComplete : model is ready ModelComplete -> [*] : model shipped @enduml }}} == Salt wireframe == {{attachment:tabx.png}} {{{ @startsalt {+ {/ <b>TabX | TabY } { { LabelX: | "http://urlx" } [Press me] Other label } } @endsalt }}} {{attachment:taby.png}} {{{ @startsalt {+ {/ TabX | <b>TabY } { { LabelZ: | "aaabbb" } [Press me] URL z | http:// Other info | aaabbb Data W | aaaa } } @endsalt }}} |
Contents
PlantUML
wget http://vorboss.dl.sourceforge.net/project/plantuml/plantuml.jar
- java -Djava.awt.headless=true -jar ~/Downloads/plantuml.jar sequence1.txt
- requires graphviz (dot)
- java -Djava.awt.headless=true -jar ~/Downloads/plantuml.jar class1.txt
Graphviz for windows https://graphviz.gitlab.io/_pages/Download/windows/graphviz-2.38.msi
PlantUML web server
cd ~ cd tmp/ git clone https://github.com/plantuml/plantuml-server.git cd plantuml-server/ mvn jetty:run -Djetty.port=8080 mvn jetty:run -Djetty.port=8181
Class diagram
@startuml class Car interface ICar{ addWheel(Wheel w) } note "This is a floating note" as CarNote CarNote .. Car Driver - Car : drives > Car *- Wheel : have 4 > Car -- Person : < owns /' <|-- extends -- association ..> depends <|.. implements / realizes '/ Car ..|> ICar Car : engine : String Car : startEngine() @enduml
Sequence diagram example
@startuml autonumber actor Xyz1 boundary Xyz2 control Xyz3 entity Xyz4 database Xyz5 /' comment -> synch call --> response ->> asynch call '/ Xyz1 -> Xyz2 : To boundary Xyz1 -> Xyz3 : To control Xyz1 -> Xyz4 : To entity Xyz1 -> Xyz5 : To database Xyz5 --> Xyz1 : To Foo1 @enduml
@startuml Alice -> Bob: Authentication Request alt successful case Bob -> Alice: Authentication Accepted else some kind of failure Bob -> Alice: Authentication Failure group My own label Alice -> Log : Log attack start loop 1000 times Alice -> Bob: DNS Attack break ccc else ddd end end Alice -> Log : Log attack end end else Another type of failure Bob -> Alice: Please repeat end opt aaaa Alice -> Bob : llll else bbb Alice -> Log : kkk end @enduml
Use case diagram example
@startuml 'left to right direction 'skinparam packageStyle rect actor user actor admin rectangle System { user -- (search stuff) (search stuff) .> (show search fields) : include (help) .> (search stuff) : extends (search stuff) -- admin } @enduml
@startuml left to right direction skinparam packageStyle rectangle actor customer actor clerk actor a2 rectangle system{ customer -- (checkout) customer -- (ch1) customer -- (ch2) a2 -- (ch2) a2 -- (ch3) (checkout) .> (payment) : include (help) .> (checkout) : extends (checkout) -- clerk (checkout1) -- clerk (checkout2) -- clerk } @endum @enduml
Activity example
@startuml (*) --> "First Activity" "First Activity" --> [label] "Second Activity" "Second Activity" --> "Third Activity" if "Activities are complete?" then --> [true] (*) else --> [false] "Second Activity" endif @enduml
State diagram
@startuml [*] -> Created Created --> Waiting Waiting --> Processing : Received message Processing --> Waiting : Processed message Waiting --> [*] : Aborted @enduml
@startuml [*] -> SubmissionIncomplete SubmissionIncomplete --> Submitted : all submitted Submitted --> ReceivedPhotosNoXrays : photos uploaded ReceivedPhotosNoXrays --> ReceivedPhotosAndCast : cast uploaded ReceivedPhotosAndCast --> CreatingModel : model creation started ReceivedPhotosNoXrays --> ReceivedPhotosAndXrays : xrays uploaded Submitted --> ReceivedXraysNoPhotos : xrays uploaded ReceivedXraysNoPhotos-->ReceivedPhotosAndXrays : photos uploaded ReceivedPhotosAndXrays --> CreatingModel : model creation started CreatingModel --> ModelComplete : model is ready ModelComplete -> [*] : model shipped @enduml
Salt wireframe
@startsalt {+ {/ <b>TabX | TabY } { { LabelX: | "http://urlx" } [Press me] Other label } } @endsalt
@startsalt {+ {/ TabX | <b>TabY } { { LabelZ: | "aaabbb" } [Press me] URL z | http:// Other info | aaabbb Data W | aaaa } } @endsalt