@startuml participant Participant as Foo #red actor Actor as Foo1 #blue boundary Boundary as Foo2 control Control as Foo3 entity Entity as Foo4 database Database as Foo5 collections Collections as Foo6 queue Queue as Foo7 Foo -> Foo1 : To actor Foo --> Foo2 : To boundary Foo -> Foo3 : To control Foo -> Foo4 : To entity Foo -> Foo5 : To database Foo -> Foo6 : To collections Foo -> Foo7: To queue @enduml
->:实线连接,-->:虚线连接
可通过关键字声明参与者,并改变参与者的表示形状
用例图
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
@startuml left to right direction actor Guest as g package Professional { actor Chef as c actor "Food Critic" as fc } package Restaurant { usecase "Eat Food" as UC1 usecase "Pay for Food" as UC2 usecase "Drink" as UC3 usecase "Review" as UC4 } fc --> UC4 g --> UC1 g --> UC2 g --> UC3 @enduml
@startuml Actor foo 1 Actor foo 2 foo 1 <-0-> foo 2 foo 1 <-(0)-> foo 2 (ac 1) -le (0)-> left 1 Ac 1 -ri (0)-> right 1 Ac 1 .up (0).> up 1 Ac 1 ~up (0)~> up 2 Ac 1 -do (0)-> down 1 Ac 1 -do (0)-> down 2 Actor 1 -0)- actor 2 Component comp 1 Component comp 2 Comp 1 *-0)-+ comp 2 [comp 3] <-->> [comp 4]
@startuml [*] -> State 1 State 1 --> State 2 : Succeeded State 1 --> [*] : Aborted State 2 --> State 3 : Succeeded State 2 --> [*] : Aborted State State 3 { State "Accumulate Enough Data" as long 1 Long 1 : Just a test [*] --> long 1 Long 1 --> long 1 : New Data Long 1 --> ProcessData : Enough Data State 2 --> [H]: Resume } State 3 --> State 2 : Pause State 2 --> State 3[H*]: DeepResume State 3 --> State 3 : Failed State 3 --> [*] : Succeeded / Save Result State 3 --> [*] : Aborted @enduml
@startuml Clock "Clock_0" as C 0 with period 50 Clock "Clock_1" as C 1 with period 50 pulse 15 offset 10 Binary "Binary" as B Concise "Concise" as C Robust "Robust" as R Analog "Analog" as A
@0 C is Idle R is Idle A is 0
@100 B is high C is Waiting R is Processing A is 3