State machine diagram template
The lifecycle of a request as four states: idle, fetching, success and error. Arrows show what moves it from one to the next, with a self-loop and two-way transitions where a state can go back.
Good for
- Modelling UI or request state before writing the code
- Documenting a workflow with a fixed set of states
- Explaining retries and error handling
How to use it
- Press Use this template. It opens on the canvas in your browser, free, with no sign-up.
- Double-click any shape to rename it, or press / and type a line such as
Client -> API -> DBto add to it. - Share it as a link, present it with Shift+P, or export PNG, SVG or PDF.
In this diagram
- Idle
- Fetching
- Success
- Error
- fetch
- poll
- 200 OK
- 5xx
- retry
- backoff
- reset