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. C语言学习001:让程序跑起来

    编译工具下载 MinGW - Minimalist GNU for Windows 编译运行 #include <stdio.h> int main(){ puts("C roc ...

  2. 发布网站ASP.NET(ASPX)

    Insus.NET平时是怎样发布自己的开发网站,今天分享给大家.或许你的做法就是跟Insus.NET一样. 这篇还是先在VS创建一个站点,然后再部署至IIS中去. 一般情况之下,Insus.NET创建 ...

  3. 电脑Windows使用中遇到的那些问题

    Win64位注册表导入方法 64位Windows操作系统注册表不同于32位Windows操作系统,Win64 位版本分为 32 位注册表项和 64 位注册表项.默认 64 位版本注册表编辑器 (Reg ...

  4. ajaxfileupload asp.net 的简单使用

    本人菜鸟,第一次写博客,不会排版,只是记录工作中常用的东西 ajaxfileupload.js源码: http://www.rczjp.cn/HTML/110420/20113620053635.ht ...

  5. spring笔记1 spring MVC的基础知识1

    1,spring MVC的流程 优秀的展现层框架-Spring MVC,它最出彩的地方是注解驱动和支持REST风格的url.   流程编号 完成的主要任务 补充 1 用户访问web页面,发送一个htt ...

  6. Android使用SAX解析XML(5)

    parse_handler.java文件: package com.hzhi.my_sax; import org.xml.sax.Attributes; import org.xml.sax.SAX ...

  7. myeclipse中导入的js文件报错(出现红叉叉,提示语法错误)

    为了做一个页面特效,导入了一个jquery文件,怎想,myeclipse竟然报错说是语法错误,但是这个js文件我是从官网上下载的,不应该出错才对,百度谷歌之后终于找到了解决办法: 选中报错的js文件, ...

  8. ThinkCMF-幻灯片制作

    在后台的扩展工具 -> 幻灯片分类 添加分类标识为"portal_index"的分类,然后在此分类添加幻灯片. 个人认为,此处可以用于: 1. 门户网站的首页幻灯片播放功能: ...

  9. Java集合源码分析(七)HashMap<K, V>

    一.HashMap概述 HashMap基于哈希表的 Map 接口的实现.此实现提供所有可选的映射操作,并允许使用 null 值和 null 键.(除了不同步和允许使用 null 之外,HashMap  ...

  10. 【FOL】第二周

    一直在忙其他事情,停了好久了.终于又可以开始做点东西了. 这周主要工作: 1.整理客户端代码,加入网络模块:fol.client.net. 2.写了个简单的版本服务端程序. 3.初步完成了自动更新功能 ...