gpt4 book ai didi

uml - PlantUML 事件图 返回

转载 作者:行者123 更新时间:2023-12-04 16:48:23 25 4
gpt4 key购买 nike

我正在使用 PlantUML 创建一个事件图。
我要从Modify Details出来的箭头返回 OP2而不是钻石。
我有这个图:

@startuml
|Swimlane1|
start
:OP1;
|Swimlane2|
:OP2;
if (Form Valid?) then (No)
|Swimlane1|
:Modify Details; /' <-- This should point _back_ to OP2 '/
|Swimlane2|

else (Yes)
:Add Detals to System;
endif
:OP3;
|Swimlane2|
:foo5;
stop
@enduml
这给出了这个图像:
graphviz diagram

最佳答案

你能用while来表达吗?或 repeat ?下面不是你的逻辑,因为 OP2 不会总是发生,但也许它会帮助你在图表约束内表达你的逻辑:

|Swimlane1|
start
:OP1;
|Swimlane2|
while (Form Valid) is (no)
:OP2;
|Swimlane1|
:Modify Details;
endwhile (yes)
|Swimlane2|
:Add Detals to System;
:OP3;
:foo5;
stop
@enduml
graphviz diagram

关于uml - PlantUML 事件图 返回,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33845514/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com