project: blogtarget: plant-uml-instances.mddate: 2015-12-24status: publishtags: - PlantUML - UMLcategories: - UMLAlice -> Bob: Authen ...
project: blogtarget: plant-uml-instances.mddate: 2015-12-24status: publishtags: - PlantUML - UMLcategories: - UML

Alice -> Bob: Authentication RequestBob --> Alice: Authentication ResponseAlice -> Bob: Another authentication RequestAlice <-- Bob: another authentication Response

actor Foo1boundary Foo2control Foo3entity Foo4database Foo5Foo1 -> Foo2 : To boundaryFoo1 -> Foo3 : To controlFoo1 -> Foo4 : To entityFoo1 -> Foo5 : To database

actor Bob #red' The only difference between actor'and participant is the drawingparticipant Aliceparticipant "I have a really\nlong name" as L #99FF99/' You can also declare: participant L as "I have a really\nlong name" #99FF99 '/Alice->Bob: Authentication RequestBob->Alice: Authentication ResponseBob->L: Log transaction

Alice -> "Bob()" : Hello"Bob()" -> "This is very\nlong" as Long' You can also declare:' "Bob()" -> Long as "This is very\nlong"Long --> "Bob()" : ok

Alice->Alice: This is a signal to self.\nIt also demonstrates\nmultiline \ntext

Bob ->x AliceBob -> AliceBob ->> AliceBob -\ AliceBob \\- AliceBob //-- AliceBob ->o AliceBob o\\-- AliceBob <-> AliceBob <->o Alice

Bob -[#red]> Alice : helloAlice -[#0000FF]->Bob : okautonumberBob -> Alice : Authentication RequestBob <- Alice : Authentication Responseautonumber 15Bob -> Alice : Another authentication RequestBob <- Alice : Another authentication Responseautonumber 40 10Bob -> Alice : Yet another authentication RequestBob <- Alice : Yet another authentication Responseautonumber "<b>[000]"Bob -> Alice : Authentication RequestBob <- Alice : Authentication Responseautonumber 15 "<b>(<u>##</u>)"Bob -> Alice : Another authentication RequestBob <- Alice : Another authentication Responseautonumber 40 10 "<font color=red><b>Message 0 "Bob -> Alice : Yet another authentication RequestBob <- Alice : Yet another authentication Response

title Simple communication exampleAlice -> Bob: Authentication RequestBob --> Alice: Authentication ResponseAlice -> Bob : Hellolegend right Short legendendlegend

Alice -> Bob : message 1Alice -> Bob : message 2newpageAlice -> Bob : message 3Alice -> Bob : message 4newpage A title for the\nlast pageAlice -> Bob : message 5Alice -> Bob : message 6

Alice -> Bob: Authentication Requestalt 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 end Alice -> Log : Log attack end end else Another type of failure Bob -> Alice: Please repeat end

Alice->Bob : hellonote left: this is a first noteBob->Alice : oknote right: this is another noteBob->Bob : I am thinkingnote left a note can also be defined on several linesend note

participant Aliceparticipant Bobnote left of Alice #aqua This is displayed left of Alice. end note note right of Alice: This is displayed right of Alice.note over Alice: This is displayed over Alice.note over Alice, Bob #FFAAAA: This is displayed\n over Bob and Alice.note over Bob, Alice This is yet another example of a long note.end note

caller -> server : conReqhnote over caller : idlecaller <- server : conConfrnote over server "r" as rectangle "h" as hexagonendrnote

participant Aliceparticipant "The **Famous** Bob" as BobAlice -> Bob : hello --there--... Some ~~long delay~~ ...Bob -> Alice : oknote left This is **bold** This is //italics// This is ""monospaced"" This is --stroked-- This is __underlined__ This is ~~waved~~end noteAlice -> Bob : A //well formatted// messagenote right of Alice This is <back:cadetblue><size:18>displayed</size></back> __left of__ Alice. end notenote left of Bob <u:red>This</u> is <color #118888>displayed</color> **<color purple>left of</color> <s:red>Alice</strike> Bob**. end notenote over Alice, Bob <w:#FF33FF>This is hosted</w> by <img sourceforge.jpg>end note

== Initialization ==Alice -> Bob: Authentication RequestBob --> Alice: Authentication Response== Repetition ==Alice -> Bob: Another authentication RequestAlice <-- Bob: another authentication Response

participant Aliceactor Bobref over Alice, Bob : initAlice -> Bob : helloref over Bob This can be on several linesend ref

Alice -> Bob: Authentication Request...Bob --> Alice: Authentication Response...5 minutes latter...Bob --> Alice: Bye !

Alice -> Bob: message 1Bob --> Alice: ok|||Alice -> Bob: message 2Bob --> Alice: ok||45||Alice -> Bob: message 3Bob --> Alice: ok

participant UserUser -> A: DoWorkactivate AA -> B: << createRequest >>activate BB -> C: DoWorkactivate CC --> B: WorkDonedestroy CB --> A: RequestCreateddeactivate BA -> User: Donedeactivate A

participant UserUser -> A: DoWorkactivate A #FFBBBBA -> A: Internal callactivate A #DarkSalmonA -> B: << createRequest >>activate BB --> A: RequestCreateddeactivate Bdeactivate AA -> User: Donedeactivate A

Bob -> Alice : hellocreate OtherAlice -> Other : newcreate control StringAlice -> Stringnote right : You can also put notes!Alice --> Bob : ok

[-> A: DoWorkactivate AA -> A: Internal callactivate AA ->] : << createRequest >>A<--] : RequestCreateddeactivate A[<- A: Donedeactivate A

[-> Bob[o-> Bob[o->o Bob[x-> Bob[<- Bob[x<- BobBob ->]Bob ->o]Bob o->o]Bob ->x]Bob <-]Bob x<-]

@startuml/'This is an example Sequence diagramShowing a fictional web feature flowIt is easy to see roles & responsibilities for each componentand easy to change them too...'/title "Story Feature Example - Sequence Diagram"'This is a single line comment/'This is a multi-line commentOne another line'/actor User'boundary Proxyparticipant UIServer as UIparticipant APIUser -> UI: LINK: goto /account pageactivate UIUI -> User:deactivate UIactivate Usernote over User Requirments: UI: Setting Page Click delete buttonend note' user requests account/delete pageUser -> UI: /account/deletedeactivate Useractivate UIUI -> User:deactivate UI' confirmation formactivate Usernote over User UI: Form Are you sure?end noteUser -> UI: POST /account/deletedeactivate Useractivate UInote over UI: Verify: user has confirmedUI -> API: /account/deleteactivate APIAPI -> API: deleteAPI -> UI: donedeactivate APIUI -> User: successdeactivate UI@enduml
海外公司注册、海外银行开户、跨境平台代入驻、VAT、EPR等知识和在线办理:https://www.xlkjsw.com
原标题:PlantUML的实例参考
关键词:
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。