Decision and merge node
A diamond in a UML activity diagram is a decision or a merge. With one arrow in and several out it is a decision node, which sends the flow down one path; with several arrows in and one out it is a merge node, where alternative paths come back together.
Easily confused with
- RelationshipA relationship: how two or more entities are related, such as a customer who places an order. In Chen notation it is a diamond with the relationship’s name inside, joined by lines to the entities it relates.
- DecisionA point where the flow branches. The decision symbol is a diamond holding a question or condition, with one path leaving it for each possible answer, often labelled Yes and No.
- AggregationA line with a hollow (white) diamond at one end is aggregation: a whole-part relationship in a UML class diagram. The diamond sits against the class that is the whole.
How to read it
UML 2.5.1 uses the same diamond for both, and the arrows tell them apart. At a decision, each outgoing arrow can carry a guard, a condition in square brackets such as [paid], and the flow takes only one of the outgoing arrows. The guard [else] is taken only when no other arrow is. A merge brings alternative flows together without waiting for them: whatever arrives on any incoming arrow passes straight on. One diamond can do both jobs at once, with several arrows in and several out. The University of Pretoria's course notes compare decisions to if and while statements in a program, and point out that only one of the alternative flows runs at a time. In a state machine diagram, a diamond is a choice pseudostate, where the guards are checked when the transition reaches it.
Also searched as: decision and merge node symbol, decision node uml, uml decision and merge node.
Merge or join?
A merge doesn't wait. The specification's example has Buy Item and Make Item both leading into a merge before Ship Item: if only one of them happens, Ship Item happens once, and if both do, it happens twice. A join bar waits for all its incoming flows before going on. Scott Ambler, in The Object Primer, points to a join in one of his own diagrams that should have been a merge: the flow could enter the join but not get out of it, because only one of its incoming paths would ever run.
Look-alikes
The decision diamond in activity diagrams has a counterpart on flowcharts, the decision symbol; Ambler calls activity diagrams the object-oriented equivalent of flowcharts. In a Chen entity-relationship diagram a diamond is a relationship. In a UML class diagram, a small diamond at the end of a line is Aggregation or Composition, and a large diamond with lines to three or more classes is an association between them.
Read next
- Next in UML diagram symbolsFork and joinA thick bar in a UML activity diagram is a fork or a join. With one arrow in and several out it is a fork, which splits the flow into parallel flows; with several arrows in and one out it is a join, which waits for all of them before the flow goes on.
- In BPMN symbolsExclusive gatewayA point where the process takes exactly one of several paths. The exclusive gateway is a diamond, often with an X inside.
More UML diagram symbols
The same shape elsewhere
Browse symbols drawn with arrows or diamonds.
Sources
- OMG Unified Modeling Language (OMG UML), Version 2.5.1, OMG document formal/17-12-05, December 2017, Object Management Group, 15.2.4 ActivityEdge notation; 15.3.3.5–6; 15.3.4.3; 15.3.5.3; 14.2.3.7; 14.2.4.6
- UML Activity Diagrams: An Agile Introduction, Scott W. Ambler, excerpted from The Object Primer, 3rd edition, chapter 9, Agile Modeling (Ambysoft)
- COS121 Lecture Notes, Chapter 16: UML Activity Diagrams, Linda Marshall and Vreda Pieterse, 2015, University of Pretoria, Department of Computer Science, 16.2.4 Alternate flows; 16.3.2
Researched, edited and approved by Rory Hansen before publishing. Last reviewed October 9, 2026. How we research
Added .