New! Render PlantUML diagrams directly inside GitHub
with our official browser extension —
No server. No tokens. No tracking. Zero permissions but clipboard. —
Try it out and let us know what you think!
Diagrama de actividad
Un diagrama de actividad describe un flujo de trabajo o proceso: los pasos, el orden en que ocurren, así como las decisiones y los caminos paralelos que aparecen en el recorrido. Es adecuado para procesos de negocio, algoritmos y todo lo que fluye de un inicio a un fin. En PlantUML, usted escribe cada actividad en su propia línea, usando flechas y palabras clave comoif, repeat y fork para expresar el flujo de control. El diagrama se genera automáticamente.
- Texto entra, diagrama sale. Describa el flujo de arriba abajo, ramas y bucles incluidos.
- Se lee de arriba abajo. El orden en el texto es el orden en el diagrama.
- Fácil de reestructurar. Reordenar pasos o añadir una rama es editar texto, no redibujar.
Una Actividad simple
Las etiquetas de las actividades inician con un dos puntos (:) y terminan con un punto y coma (;).
Se puede aplicar formato a un texto usando sintaxis de WikiCreole.
Están implícitamente enlazados en el orden de su definición.
Other simple action (defined as a list)
Simple action list separated by -
Simple action list separated by *
With one level
With several levels
Inicio/Parada/Fin
Puede utilizar las palabras clave start y stop para indicar el
inicio y el final de un diagrama.
end.
Condicional
Puede utilizar las palabras clave if, then, else y endif para colocar pruebas en su diagrama.
Las etiquetas pueden proporcionarse utilizando paréntesis.
Las 3 sintaxis son posibles:
if (...) then (...) ... [else (...) ...] endif
if (...) is (...) then ... [else (...) ...] endif
if (...) equals (...) then ... [else (...) ...] endif
Condicionales anidadas (modo horizontal)
Puede utilizar la palabra claveelseif para tener varias condicionales anidadas (por defecto, es el modo horizontal):
Condicionales anidadas (modo vertical)
Puede utilizar el comando!pragma useVerticalIf on para tener las condicionales anidadas en modo vertical:
-P para especificar el pragma:
java -jar plantuml.jar -PuseVerticalIf=on
[Refs. QA-3931, GH-582]
WARNING
This translation need to be updated. WARNING
Switch case [switch, case, endswitch]
Puedes usar las palabras clave switch, case y endswitch para hacer un switch en tu diagrama.
Puedes colocar etiquetas usando paréntesis.
Conditional with stop on an action [kill, detach]
You can stop action on a if loop.
kill or detach keyword:
kill
detach
El ciclo Repeat
Puedes usar las palabras reservadas repeat y repeatwhile para colocar bucles.
repeat target and insert an action in the return path using the backward keyword.
WARNING
This translation need to be updated. WARNING
Break on a repeat loop [break]
You can use the break keyword after an action on a loop.
Goto and Label Processing [label, goto]
⚠ It is currently only experimental 🚧
You can use label and goto keywords to denote goto processing, with:
label <label_name>goto <label_name>
El ciclo While
Puedes usar las palabras reservadas while y end while para un ciclo repetitivo.
endwhile, o usar la palabra reservada is .
WARNING
This translation need to be updated. WARNING
Procesamiento paralelo
Puedes usar las palabras reservadas fork, fork again y end fork para denotar procesamientos paralelos.
WARNING
This translation need to be updated. WARNING
Split processing
Split
You can usesplit, split again and end split keywords to denote split processing.
Input split (multi-start)
You can usehidden arrows to make an input split (multi-start):
Output split (multi-end)
You can usekill or detach to make an output split (multi-end):
Notas
Se puede aplicar formato a un texto usando sintaxis de WikiCreole.
Una nota puede ser flotante, usando la palabra clave floating.
WARNING
This translation need to be updated. WARNING
Colores
Puedes especificar colores en algunas actividades.
WARNING
This translation need to be updated. WARNING
Lines without arrows
You can use skinparam ArrowHeadColor none in order to connect activities using lines only, without arrows.
Flechas
Usando la notación ->, puedes añadir texto a una flecha y cambiar su color.
También es posible tener flechas punteadas, en linea discontinua, en negrita u ocultas.
Simple colored arrow [link]
You can use simple colored arrow with the link keyword.
Multiple colored arrow
You can use multiple colored arrow.
Connector (or Circle)
You can use parentheses to denote connector.
Color on connector
You can add color on connector.
Agrupación
Puedes agrupar actividades definiendo particiones:
WARNING
This translation need to be updated. WARNING
Carriles
Usando la tecla pipe |, puedes definir carriles.
También es posible cambiar el color de los carriles.
WARNING
This translation need to be updated. WARNING
Desacoplar y remover
Es posible remover una flecha usando la palabra reservada detach .
Emoji as action (with icon stereotype)
You can use emoji as action, with the stereotype <<icon>>:
Otras formas de representación de actividades
Cambiando el sepador final, ; , puedes configurar diferentes representaciones para una actividad:
|<>/]}
WARNING
This translation need to be updated. WARNING
UML (Unified Modeling Language) Shape (with UML stereotype)
Table of UML Shape Name
| Name | Stereotype syntax |
| ObjectNode |
<<object>>
|
|
ObjectNode typed by signal |
<<objectSignal>> or <<object-signal>>
|
|
AcceptEventAction without TimeEvent trigger |
<<acceptEvent>> or <<accept-event>>
|
|
AcceptEventAction with TimeEvent trigger |
<<timeEvent>> or <<time-event>>
|
|
SendSignalAction SendObjectAction with signal type |
<<sendSignal>> or <<send-signal>>
|
| Trigger |
<<trigger>>
|
UML Shape Example using Stereotype
Ejemplo completo
Condition Style
Inside style (by default)
Diamond style
InsideDiamond (or Foo1) style
Condition End Style
Diamond style (by default)
- With one branch
- With two branches (
B1,B2)
Horizontal line (hline) style
- With one branch
- With two branches (
B1,B2)
Using (global) style
Without style (by default)
With style
You can use style to change rendering of elements.
Creole on Activity
You can use Creole or HTML Creole on Activity diagram: