Steps and decisions
A flowchart shows process steps and the decisions between them. Each branch should name the condition, so a reader can follow yes and no without asking you.
A state diagram is the neighbor when you are drawing the lifecycle of one object, including guards and loops back to an earlier state. A sequence diagram is the neighbor when several participants send messages in time order.
Flowchart, state, or sequence
Use a flowchart for a procedure a person or a service follows. Use a state diagram when the boxes are conditions of one thing, such as draft, sent, and paid. Use a sequence diagram when the main fact is who called whom.
Tighten the draft
1. Give every decision two exits
If a diamond has only one outgoing arrow, name the other outcome in the prompt and regenerate, or add the arrow in the editor.
2. Merge repeated steps
Three boxes that all mean review can be one box. Keep a split only when the next step actually changes.
3. Move lifecycles out
If the picture is mostly return to an earlier status, redraw it as a state diagram. A flowchart will hide the loop.
How to phrase the prompt
Write the steps in order. When a choice appears, state the question and both outcomes. Name the start and the end. Leave out class fields, table keys, and message payloads.
Flowchart drafts
- How long can the flow be?
- One sitting of the process, from a clear start to a clear end. Split a second process into a second diagram.
- The draft used a diamond for a normal step. What now?
- Change that node back to a plain step. Reserve diamonds for questions with more than one answer.
- Can the same flowchart include a swimlane per team?
- You can name the actor on each step in the prompt. If the actors trade messages, switch to a sequence diagram.