Programming Self-Study Notebook

勉強したことを忘れないように! 思い出せるように!!

PlantUMLでシーケンス図を書いてみた




Markdownファイル内で、PlantUMLの図を挿入することが増えそうなので自分用のチートシートを作成しておくこのにしました。

参考:配置図の構文と機能

見た目

記述内容

 ``` plantuml

@startuml

skinparam backgroundColor #eeffff
scale 600 width

title シーケンス図のサンプル

participant User

box "Internal Service" #LightBlue
participant A
participant B
end box

User -> A: DoWork
activate A #FFdddd

A -> A: Internal call
activate A #ffffbb

A -> B: << createRequest >>
activate B

B --> A: RequestCreated
deactivate B
deactivate A

== 待機 ==

group My own label
    A -> B : Log attack start
        loop 1000 times
            A -> B: Request
            activate B
            B -> B: 内部処理
            B -> A: Responce
            deactivate B
        end
    A -> B : Log attack end
end

...

alt successful case
A -> User: Done
else error case
A --> User: Error
end
deactivate A

@enduml

 ```