Introduction
When building software, it can be hard to understand how different actions flow and connect. Activity diagrams help by showing the step-by-step flow of tasks and decisions in a clear picture.
Imagine planning a day trip where you decide what to do step by step. You start at home, choose between going to the park or the museum, and maybe do both in parallel before returning home.
┌───────────┐
│ Start │
└─────┬─────┘
│
┌───▼───┐
│ Activity│
│ 1 │
└───┬───┘
│
┌───▼───────┐
│ Decision │
│ (Choice) │
└───┬───┬───┘
│ │
┌───▼─┐ ┌─▼────┐
│Act 2│ │Act 3 │
└──┬──┘ └──┬───┘
│ │
┌──▼───────▼───┐
│ Join (Sync) │
└─────┬────────┘
│
┌───▼───┐
│ End │
└───────┘