project: blog
target: plant-uml-instances.md
date: 2015-12-24
status: publish
tags:
- PlantUML
- UML
categories:
- UML


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


actor Foo1
boundary Foo2
control Foo3
entity Foo4
database Foo5
Foo1 -> Foo2 : To boundary
Foo1 -> Foo3 : To control
Foo1 -> Foo4 : To entity
Foo1 -> Foo5 : To database


actor Bob #red
' The only difference between actor
'and participant is the drawing
participant Alice
participant "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 Request
Bob->Alice: Authentication Response
Bob->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 Alice
Bob -> Alice
Bob ->> Alice
Bob -\ Alice
Bob \\- Alice
Bob //-- Alice Bob ->o Alice
Bob o\\-- Alice Bob <-> Alice
Bob <->o Alice


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


title Simple communication example Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response Alice -> Bob : Hello
legend right
Short
legend
endlegend



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


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


Alice->Bob : hello
note left: this is a first note Bob->Alice : ok
note right: this is another note Bob->Bob : I am thinking
note left
a note
can also be defined
on several lines
end note


participant Alice
participant Bob
note 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 : conReq
hnote over caller : idle
caller <- server : conConf
rnote over server
"r" as rectangle
"h" as hexagon
endrnote


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



== Initialization ==

Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response == Repetition == Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response


participant Alice
actor Bob ref over Alice, Bob : init Alice -> Bob : hello ref over Bob
This can be on
several lines
end ref


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


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


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


participant User User -> A: DoWork
activate A #FFBBBB A -> A: Internal call
activate A #DarkSalmon A -> B: << createRequest >>
activate B B --> A: RequestCreated
deactivate B
deactivate A
A -> User: Done
deactivate A


Bob -> Alice : hello create Other
Alice -> Other : new create control String
Alice -> String
note right : You can also put notes! Alice --> Bob : ok


[-> A: DoWork activate A A -> A: Internal call
activate A A ->] : << createRequest >> A<--] : RequestCreated
deactivate A
[<- A: Done
deactivate A


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

@startuml

/'
This is an example Sequence diagram
Showing a fictional web feature flow
It is easy to see roles & responsibilities for each component
and easy to change them too...
'/ title "Story Feature Example - Sequence Diagram" 'This is a single line comment /'
This is a multi-line comment
One another line
'/ actor User
'boundary Proxy
participant UIServer as UI
participant API User -> UI: LINK: goto /account page
activate UI
UI -> User:
deactivate UI activate User
note over User
Requirments:
UI: Setting Page
Click delete button
end note ' user requests account/delete page
User -> UI: /account/delete
deactivate User
activate UI
UI -> User:
deactivate UI ' confirmation form
activate User
note over User
UI: Form
Are you sure?
end note User -> UI: POST /account/delete
deactivate User
activate UI note over UI: Verify: user has confirmed
UI -> API: /account/delete
activate API
API -> API: delete
API -> UI: done
deactivate API
UI -> User: success
deactivate UI @enduml

PlantUML的实例参考的更多相关文章

  1. SQL/T-SQL实例参考

    ,D.[Score] B_Score ,'Distince'= CASE WHEN C.Score > D.Score THEN C.[Score] - D.[Score] WHEN C.Sco ...

  2. [AS3]as3用ByteArray来对SWF文件编码加密实例参考

    [AS3]as3用ByteArray来对SWF文件编码加密实例参考,简单来说,就是将 swf 以 binary 的方式读入,并对 ByteArray 做些改变,再重新存成 swf 档.这个作业当然也可 ...

  3. SQL/T-SQL实例参考-2

    对多关联查询,查询多中的记录,但是返回一的结果集 子查询语法 --一对多关联查询,查询多中的记录,但是返回一的结果集 SELECT C.* FROM ( SELECT A.BasicID FROM [ ...

  4. SQL/T-SQL实例参考-1

    CASE ,D.[Score] B_Score ,'Distince'= CASE WHEN C.Score > D.Score THEN C.[Score] - D.[Score] WHEN ...

  5. Centos7 Firewall 防火墙配置应用实例参考(转)

    时间:2016-06-02 02:40来源:linux.it.net.cn 作者:IT   简单的配置,参考学习:--permanent  当设定永久状态时 在命令开头或者结尾处加入此参数,否则重载或 ...

  6. ncl 实例参考

    NCL中绘制中国任意省份的精确地图 NCL学习笔记(实战篇) 用NCL画垂直风场剖面图实例 NCL学习笔记(天气分析图)

  7. R语言画图实例-参考R语言实战

    dose <- c(, , , ,) drugA <- c(, , , , ) drugB <- c(, , , , ) # 数据准备 opar <- par(no.reado ...

  8. PlantUML——4.实例演示1

    给自己发消息 @startuml Alice -> Alice : This is a signal to self.\nIt also demonstrates \nmultiline tex ...

  9. python搭建简易服务器实例参考

    有关python搭建简易服务器的方法. 需求分析: 省油宝用户数 已经破了6000,原有的静态报表 已经变得臃肿不堪, 每次打开都要缓上半天,甚至浏览器直接挂掉 采用python搭建一个最最简易的 w ...

随机推荐

  1. Web API应用支持HTTPS的经验总结

    在我前面介绍的WebAPI文章里面,介绍了WebAPI的架构设计方面的内容,其中提出了现在流行的WebAPI优先的路线,这种也是我们开发多应用(APP.微信.微网站.商城.以及Winform等方面的整 ...

  2. ASP.NET Core实现OAuth2.0的ResourceOwnerPassword和ClientCredentials模式

    前言 开发授权服务框架一般使用OAuth2.0授权框架,而开发Webapi的授权更应该使用OAuth2.0授权标准,OAuth2.0授权框架文档说明参考:https://tools.ietf.org/ ...

  3. MySQL 复制介绍及搭建

    MySQL复制介绍 MySQL复制就是一台MySQL服务器(slave)从另一台MySQL服务器(master)进行日志的复制然后再解析日志并应用到自身,类似Oracle中的Data Guard. M ...

  4. 分享几个原生javascript面向对象设计小游戏

    一.序言 不知大家是不是和我一样,当初都有个梦想.学编程,就是想开发游戏.结果进入大学学习之后,才知道搞的是数据库应用程序开发!在此,本人就分享下业余时间做的几个小游戏吧!本打算想用winform或w ...

  5. .net微信公众号开发——消息与事件

    作者:王先荣    本文介绍如何处理微信公众号开发中的消息与事件,包括:(1)消息(事件)概况:(2)验证消息的真实性:(3)解析消息:(4)被动回复消息:(5)发送其他消息.    开源项目地址:h ...

  6. 驱动开发利器Microsoft Windows Driver Kit 7.1.0下载

    在Windows 2000 与Windows XP 系统采用是WINDDK来开发WINDOWS驱动程序,我手头也有WINDDK,可是从Windows Vista开始之后,一般采用Microsoft W ...

  7. 图说hibernate注释--java里配置参数(一.1)

    **************************************************************[来自我另一博文]

  8. PHP storm快捷键

    左边文件路径看不到了,按alt+1就出来了 ctrl+j 插入活动代码提示 ctrl+alt+t 当前位置插入环绕代码 alt+insert 生成代码菜单 ctrl+q 查看代码注释 ctrl+d 复 ...

  9. Samba Server 配置

    1.Issue:Server requested plaintext password but 'client plaintext auth' is disabled   session setup ...

  10. selenium启动firefox时加载扩展

    有些时候,我们测试需要用到插件或者已经导入的证书(比如金融和安全加密行业),而selenium启动firefox时会打开一个新的,不含有任何插件和个人证书的firefox(等同于全新安装后第一次打开的 ...