Activity diagram (PlantUML)

The activity diagram is where PlantUML clearly beats a plain flowchart: real forks and joins for parallel work, and swimlanes that do not need drawing by hand.


#What this example shows

  • fork and end fork, for work that happens in parallel.

  • Swimlanes written as |Name| markers.

  • A repeat loop, for retry behaviour.


#A worked example

Open it, edit it, or copy the source below.

Activity diagram (PlantUML)

The source, which you can paste into a new diagram and edit:

@startuml
|Engineering|
start
:Merge to main;
:Build artefact;

fork
  :Unit tests;
fork again
  :Integration tests;
fork again
  :Security scan;
end fork

if (All checks green?) then (yes)
  |Release manager|
  :Deploy to staging;
  repeat
    :Run smoke tests;
  repeat while (Failed and attempts < 3?) is (retry) not (done)
  if (Approved?) then (yes)
    :Deploy to production;
  else (no)
    :Roll back staging;
    stop
  endif
else (no)
  |Engineering|
  :Notify author;
  stop
endif

|Engineering|
:Monitor for 30 minutes;
stop
@enduml

#Making it your own

  • A fork must be closed by end fork; unclosed parallel paths are a modelling error.

  • Swimlane markers can appear anywhere; the next activity lands in that lane.

  • Use repeat and repeat while for retries rather than drawing a loop by hand.



Verbose, stable, and it draws almost everything.