admin 管理员组

文章数量: 887021

UML

什么是顺序图?

UML序列图总结
感觉就是给定的业务场景下有一个时间轴的概念的时候会用到,一种二维图形,各个实体有很明显的生命周期

用什么画顺序图?

语雀,好像还可以画其他流程图之类的,在线的,planUML有点类似于markdown,还挺好看的,语法也简单
依样画葫芦,按照模板画了一个,应付作业

@startumlautonumber
hide footbox
title **在线订房系统**actor "顾客" as user
participant "订房系统" as reserve
participant "支付系统系统" as payment
participant "中国银行(可能是建设银行)" as bank #orange
participant "打印系统" as printer== 订房流程 ==
user -> reserve: 输入(房间套数、房间类型、入住时间、入住天数)
activate reserve
deactivate reserve
reserve --> user: 返回(房间号/无房间)
user -> payment: 确认订房号
activate payment
deactivate payment
payment --> user: 定金信息
user -> bank: 信用卡号和密码 
activate bank
deactivate bank
bank --> user: 发送验证消息
activate user
deactivate user
user -> bank: 确认验证消息
activate bank
deactivate bank
bank --> reserve: 支付成功,预订房间
activate reserve
deactivate reserve
reserve --> user: 预订成功
note right of user: 可选择打印
user -> printer: 请求打印
activate printer
deactivate printer
printer --> user: 返回订单信息
== 订房结束 ==
@enduml

效果:

本文标签: UML