我正在尝试制作一个 plantuml 图,将一些激活与组注释进行分组。 它看起来像这样:
actor User as U
box SBCP
participant "First" as F
participant "Second" as S
U -> F : "start"
group firstgroup
note over firstgroup
a first note
end note
F -> S ++ : first
S -> F -- : end first
end group
group secondgroup
note over secondgroup
a second note
end note
F -> S ++ : second
S -> F -- : end second
end group
它工作得很好,除了它生成奇怪的伪 Actor :
是否可以删除这条生命线?
得到类似的东西(用paint.net编辑):
谢谢,
奥利维尔
最佳答案
在询问 plantuml 论坛后,正确的解决方法是添加关于参与而不是群组的注释:
@startuml
actor User as U
box SBCP
participant "First" as F
participant "Second" as S
U -> F : "start"
group firstgroup
F -> S ++ : first
S -> F -- : end first
' add the note to the right
note right: a note
end group
group secondgroup
F -> S ++ : second
' add the note to the right
note right: another note
S -> F -- : end second
end group
@enduml
关于plantuml : grouping sequence makes actor appears,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67565518/