State Diagram in draw.io: Order Status Lifecycle
A state diagram shows every status a thing can have and what moves it from one status to the next. Learn how to draw a UML state machine for free in draw.io: the start dot, states, transitions labelled with their trigger, and the final state, using an online shop order.
Step by step
Statuses on one page
- State diagrams. An order can be placed, paid, shipped or cancelled. But which status can follow which? A state diagram answers that, and it stops gaps in your requirements. Here's the order lifecycle we'll build.
- Blank diagram. Start a blank diagram in draw.io.
- UML shapes. Click more shapes, tick UML two point five, and click apply. It has the state shapes.
Start and states
- Start dot. Every state diagram begins with a solid black dot. It's the start, not a status. Drag it onto the page.
- State. A state is a rounded box. Name it with the status the order is in. Placed. Hover over the dot and drag the blue arrow onto placed. A new order always starts here. Add the next state on the right. Paid.
Transitions
- Trigger label. An arrow between states is a transition. Label it with the trigger, the event that moves the order on. Payment okay.
- State. Then the order is shipped. Add that state.
- Trigger label. Connect paid to shipped. The trigger is the courier picking it up.
The final state
- Final state. When the order is delivered, its life is over. That's the final state, a dot inside a ring. Put it under shipped. Connect shipped down to it, and label the trigger. Delivered.
Another path
- Cancelled. A placed order can also be cancelled. Add a cancelled state under placed. Connect placed down to it, with the trigger. Customer cancels. A cancelled order is finished too. Connect it to the same final state. People often forget this arrow and leave a status going nowhere.
- The finished lifecycle. Click away to see the whole lifecycle. One start, four states, and every arrow says what triggers it.
Recap
- The rules. So, start with the black dot, name states as statuses, label every transition with its trigger, and make every path reach the final state. Subscribe for more draw.io tips for business analysts.