效果如图
代码示例
@startuml
participant "上游" as BEGIN
participant "SFTP" as SFTP
control "文件系统" as FILE
participant "业务系统" as BUS
activate BEGIN
BEGIN ->SFTP: 上传文件
activate SFTP
autonumber 1.0
FILE -> SFTP: 下载文件
activate FILE
autonumber 2.0
FILE -> BUS: 调用服务
activate BUS
BUS --> FILE: 受理响应
deactivate FILE
autonumber 3.0
BUS -> BUS: 查询更新数据
deactivate BUS
deactivate SFTP
@enduml
代码说明:
@startuml @enduml
==》开始节点~结束节点
participant ,control
==》声明参与者,同理还有
- actor(角色)
- boundary(边界)
- control(控制)
- entity(实体)
- database(数据库)
- collections(集合)
- queue(队列)
activate,deactivate
==>声明周期
autonumber
==》编号序号,不加的话默认+1
“->”为实线指向箭头
“-->”为虚线指向箭头