plantuml教程:https://plantuml.com/zh/sequence-diagram
plantuml在线工具:https://www.planttext.com
FRLH主题:https://puml.littletools.ml/theme/frlh.style
时序图
@startuml
autonumber "0."
' 引入主题
!include https://puml.littletools.ml/theme/frlh.style
' 定义角色
actor User
participant "微服务A" as a
box "Internal Service" #LightBlue
participant "微服务B" as b $c1
participant "微服务C" as c
end box
' 开始流程
[->User: 开始
User-[#red]>a ++: 发出指令\n这是一个很长的指令
== 初始化 ==
a->b ++ #E1F5A9: 第一步
|||
|||
loop 3次
b->c --++: 第二步
end
c->c ++ : 第三步
alt#Gold #yellow 如果成功,则直接返回
c-->>a --
else #Pink 失败
c->c ++ : 重试一次
c-->>a --
end
deactivate c
a-->>User: bye
group 随便框一下 [哈哈哈]
User-->>]: 结束
end
note left of User #aqua
这是一个note
欢迎使用时序图
end note
@enduml
流程图
@startuml
'