Símbolos de los diagramas UML
Todo el vocabulario de formas en una página: qué símbolo pertenece a cuál de los catorce diagramas, qué significa cada punta de flecha y cómo reconocer un diagrama por sus símbolos antes de leer una sola palabra.
8 min de lecturaUML 2.5.12 de 35
01The shapes, and what each one commits you to
UML has fewer symbols than its reputation suggests. Strip away the ones that appear on a single diagram type and about a dozen shapes carry the whole language. Each one is a claim about what kind of thing is in the box, and picking the wrong one is a statement, not a cosmetic slip - an ellipse where a rounded rectangle belongs says “goal the user has” where you meant “step the system runs”.
| Element | Notation | What it means |
|---|---|---|
| Rectangle | ▭ | A classifier: a class, an artifact, a participant. The default shape, and the one every other structure diagram builds on. |
| Rectangle, underlined name | o1: Order | An instance rather than a type - one specific order, on an object diagram. The underline is the whole difference. |
| Rectangle with component icon | ▭ ⊟ | A replaceable unit with interfaces, on a component diagram. The icon sits top-right and is the only thing distinguishing it from a class. |
| 3D box | ▱ | A node - hardware, a container, an execution environment - on a deployment diagram. |
| Tabbed folder | 🗀 | A namespace, on a package diagram. |
| Ellipse | ⬭ | A use case: something an actor wants to achieve, on a use case diagram. Never a step, never a screen. |
| Stick figure | ☺ | An actor: a role outside the system boundary. It can be a person, another system or a clock, which is why the figure is a role and not a portrait. |
| Rounded rectangle | ▢ | An action on an activity diagram, or a state on a state machine. The same shape, two meanings - the surrounding notation disambiguates. |
| Rhombus | ◇ | A decision, when one branch is taken, or a merge, when several come back together. Same glyph both ways; the arrow count tells you which. |
| Solid bar | ▬ | A fork, when everything downstream runs concurrently, or a join, when everything upstream must finish first. |
| Filled disc | ● | The initial node or initial pseudostate: where the flow starts. |
| Ringed disc | ◉ | Activity final or final state: the whole flow is over. |
| Crossed circle | ⊗ | Flow final. It ends this token, not the activity - the distinction that trips up most first drafts. |
| Folded corner | 🗒 | A note or a constraint, attached by a dashed line. Curly braces inside it make it a constraint that has to hold. |
The node shapes, and the diagrams that own them.
02The six lines every diagram shares
The relationship lines are the part of UML worth learning once, because they are drawn identically wherever they appear. A hollow triangle means the same thing between two classes, two components, two use cases and two nodes, so the investment amortises across all fourteen diagram types.
| Element | Notation | What it means |
|---|---|---|
| Association | A plain line. The two ends know about each other, and multiplicities at either end say how many. | |
| Generalization | Solid line, hollow triangle at the general end. “Is a kind of” - inheritance, specialization, subtype. | |
| Realization | Dashed line, hollow triangle. The source implements the contract the target declares. Interfaces, not inheritance. | |
| Composition | Filled diamond at the whole. The part belongs to one whole and dies with it. | |
| Aggregation | Hollow diamond at the whole. A whole/part reading with no ownership claim, and no formal semantics in UML 2.5.1. | |
| Dependency | Dashed, open arrow. The source uses the target - a parameter, a return type, a static call - without holding it. |
Two rules make these recoverable from memory rather than from a table. First, the decorated end is the end that matters: the triangle points at the more general thing, the diamond sits on the owning whole, the open arrow points at what is being used. Second, a dash weakens the solid claim: solid triangle is inheritance and dashed triangle is only a contract; a solid line is a structural link and a dashed one is mere usage.
03The lines, drawn against each other
Arrowheads are hard to tell apart in prose and easy to tell apart side by side. Below, the four most-confused lines are drawn between the same kind of boxes at the same scale, so the difference is the head and nothing else.
Left to right: Customer and Order are simply associated, one to many. CardPayment generalizes Payment - the hollow triangle points up at the more general classifier. Invoice realizes the Printable interface, and the dash is the entire difference between that and the line beside it. Basket depends on PriceService, using it without owning it.
04Symbols that only appear on one diagram
A handful of marks belong to exactly one diagram type. They are worth recognising precisely because they identify the diagram: seeing one tells you what you are reading.
| Element | Notation | What it means |
|---|---|---|
| Lifeline | ▭ + ┆ | A box with a dashed vertical line under it - sequence diagrams only. The thin rectangle on the line is an execution occurrence. |
| Combined fragment | alt / loop / opt | A box with a pentagon name tag in its corner, wrapping part of a sequence diagram to make it conditional or repeated. |
| Include / extend | «include» | A dashed open arrow with a keyword, on a use case diagram. The keyword is load-bearing: the two point in opposite directions. |
| Subject boundary | ▭ around | The rectangle drawn behind the use cases. Inside is the system; the actors stay outside it. |
| Deploy | «deploy» | A dashed arrow putting an artifact onto a node. Never the reverse. |
| Ball and socket | —○ ⊃— | A provided interface (lollipop) meeting a required one (socket), on a component diagram. The pair is a connector. |
| Swimlane | │ │ │ | A partition on an activity diagram. Which lane an action sits in says who is responsible for it. |
| Crow's foot | —‹ | Not UML at all. A three-pronged end means “many” in ER notation - if you see one, you are reading a data model, not a class diagram. |
05Decorations: guillemets, braces, brackets
Three kinds of punctuation appear on UML diagrams and each one means something specific. They are easy to skim past, and each carries more information per character than the shape it sits on.
| Element | Notation | What it means |
|---|---|---|
| Guillemets | «interface» | A stereotype: an extension of the standard vocabulary, defined by UML itself or by a profile. Written <<…>> where the character is unavailable. |
| Curly braces | { ordered } | A constraint that must hold - on an end, an attribute or in a note. Common ones are { ordered }, { unique } and { readOnly }. |
| Square brackets | [approved] | A guard on a transition or a flow. The edge is only taken when the condition holds, and the guards leaving one decision should be exhaustive. |
| Visibility markers | + - # ~ | Public, private, protected and package, before a member name. |
| Multiplicity | 0..* 1 2..5 | How many instances participate, written at the end of the line it applies to. A missing multiplicity means unspecified, not one. |
| Underline | static | Belongs to the classifier rather than an instance - or, on a whole box, that the box is an instance. |
06What to remember
In one line each
- 01Shapes identify the diagram; lines carry the meaning. Read them in that order.
- 02The decorated end of a line is the end that matters: triangle at the general, diamond at the whole, arrow at the used.
- 03A dash always weakens the solid claim - realization not inheritance, usage not structure, reply not call.
- 04The same rounded rectangle is an action on an activity diagram and a state on a state machine.
- 05Guillemets, braces and brackets are notation, not annotation. Dropping them changes what the diagram says.
07Preguntas frecuentes
¿Cuáles son los símbolos básicos de los diagramas UML?
Un rectángulo es un clasificador: clase, componente o artefacto. Una elipse es un caso de uso, un monigote es un actor, un rectángulo redondeado es una acción o un estado y un rombo es una decisión. Un disco relleno inicia un flujo y uno con anillo lo termina. El significado lo llevan las líneas: la punta indica la relación.
¿Cómo sé qué diagrama UML estoy viendo?
Lea las formas antes que las líneas. Monigotes y elipses indican diagrama de casos de uso; cajas redondeadas con disco de inicio relleno indican actividad o máquina de estados; líneas de vida verticales con flechas horizontales indican secuencia; y rectángulos simples con rombos y triángulos indican clases. Las cajas 3D indican despliegue.
¿Qué significa una línea discontinua en UML?
La discontinuidad siempre debilita lo que afirma la versión continua. Discontinua con flecha abierta es una dependencia: uso sin propiedad. Discontinua con triángulo hueco es realización, no herencia. Discontinua hacia una caja con esquina doblada adjunta una nota, y en un diagrama de secuencia significa respuesta y no llamada.
¿Los símbolos UML son iguales en los catorce tipos de diagrama?
Las líneas sí, las cajas no. Generalización, asociación, dependencia y realización se dibujan igual en todas partes, por eso compensa aprenderlas una vez. Las formas de los nodos son propias de cada diagrama, y es intencionado: es lo que permite reconocer un diagrama de un vistazo.
¿Qué significa un rectángulo con la esquina doblada en UML?
Es una nota: un comentario, una restricción o una aclaración, unida por una línea discontinua a lo que describe. El texto entre llaves es una restricción que debe cumplirse, por ejemplo { total > 0 }. Las notas no tienen semántica propia y pueden adjuntarse a cualquier cosa.
Lecturas relacionadas