4

我正在使用 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

这给出了这个图像:

图形可视化图

4

1 回答 1

3

你能用whileor来表达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

图形可视化图

于 2015-11-21T16:49:49.350 回答