UML : Process and Activity diagram

戏子无情 提交于 2019-12-13 00:33:51

问题


Can I use bidirectional arrows in Process/Activity UML diagram? Any example? I am preparing a process diagram with swimlanes. what I encountered that many processes are cross referencing across the swim lanes. Not a good as-is design. Just want to know is it ok to use bidirectional arrows to represent such process diagram? What are the disadvantages?


回答1:


The UML specs is hard to digest here. Activities/actions are connected with ControlFlows (see p. 418 of the specs). A ControlFlow itself is an ActivityEdge (see p. 411):

An ActivityEdge is an abstract class for directed connections between two ActivityNodes.

There is no constraint (I could find) that forbids bi-directional use. All examples of ControlFlows are just directed with single arrow, though.

Using bi-directional flows will not let you specify guards/behavior easily as you can not detect which is for which direction. But if you have unconditional flow it should just be fine.

Edit On p. 22 it is stated

A DirectedRelationship represents a Relationship between a collection of source model elements and a collection of target model elements. A DirectedRelationship is said to be directed from the source elements to the target elements.

DirectedRelationship inherits from Relationship which inherits from Element. ActivityEdgein contrast inherits from RedefinableElement <- NamedElement <- Element. Likely they "mean" that ControlFlow has to be directed from source to target. But in fact it's not defined.

tl;dr It's up to you if you use only uni-directional connectors as shown in examples in the spec. But per definition it's not defined (sic!) and bi-directional connectors do not violate the specs.



来源:https://stackoverflow.com/questions/48467582/uml-process-and-activity-diagram

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!