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 ControlFlow
s (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 ControlFlow
s 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
. ActivityEdge
in 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.