PlantUML活动图如何直接连接两个动作节点实现指定流程跳转
这个需求完全可以实现,利用PlantUML活动图的节点标签标记+显式跳转语法就能实现跨泳道的节点直接连接。
具体改动逻辑
- 给最终的归档节点添加自定义标签,作为跳转的目标锚点
- 修改
repeat while的判断逻辑,当满足「已完成(Yes)」条件时,直接指向归档节点的标签 - 移除循环结束后多余的Registrar泳道切换语句,避免生成冗余路径
修改后的完整源码
@startuml skinparam rectangleBorderThickness 1 |#orange|Registrar| #lightgray:**Introduce document to the system**; :Register Document; if (Work on the document is required?) then (Yes) repeat :Work on incoming documents; |#green|Performer| :**Perform tasks for the document**; repeat while (Completed?) is (No) not (Yes) -> archive_label else #lightgray:**Archive document**:archive_label; end @enduml
修改后当Performer侧的任务完成、选择「Completed? = Yes」时,流程会直接跳转到Registrar泳道的归档节点,完成流程闭环。
内容的提问来源于stack exchange,提问作者Vladimir Markiev
相关产品推荐
相关产品推荐

