The Visual Graph Designer
The heart of the Approval Workflows system is the Visual Graph Designer — a drag-and-drop canvas where you build multi-stage approval paths.

Understanding the Canvas Nodes
The designer uses three types of nodes:
1. Trigger Node (DRAFT — Orange)
- This is the starting point of every workflow. It represents the moment a document is submitted (e.g., "PEOPLE Submitted" or "EXPENSE Submitted").
- The trigger node is automatically created and cannot be deleted.
2. Approval Step Nodes (Blue/Gray)
- These are the core building blocks. Each one represents a stage where someone (a Persona) must review and take action.
- You can add as many steps as you need by clicking + ADD APPROVAL STEP in the top toolbar.
3. Status Nodes (Green/Red — Terminal)
- APPROVED (green): The final "success" state. When a document reaches this node, it is fully approved.
- REJECTED (red): The "returned/rejected" state. When a document reaches this node, it has been sent back or denied.
- These terminal nodes are automatically created and represent the end states of your workflow.
Adding an Approval Step
Click + ADD APPROVAL STEP in the toolbar. A new step node will appear on the canvas.

Each new step starts with:
- TRIGGER: PENDING — This means it activates when the document enters the "Pending Approval" state.
- No Approver Set — You need to assign a Persona.
- No SLA — No timeout or escalation rules yet.
- No Notifications — Using the global defaults from Module State Management.
The step automatically creates two outbound connections:
- APPROVED (green line) → routes to the next step or the final Approved node.
- REJECTED (red line) → routes to the Returned/Rejected node.
Graph Wiring & Routing Logic
The visual designer is not just a drawing tool; it is a live routing engine. When you save a workflow, the system performs a logical traversal (starting from the Trigger Node) to calculate the strict step_order for the backend database.
- Terminal Nodes are Mandatory: Every valid pathway through your graph must ultimately connect to a Status Node (like
APPROVEDorREJECTED). If you leave an approval node "floating" without connecting its final outbound lines to a terminal status, the document will become permanently stuck inPENDINGwhen it reaches that step. - Visual Placement vs Logical Routing: You can drag nodes anywhere on the screen (left, right, up, down). The system does not care about their visual coordinates. The only thing that determines the order of approvals is how you draw the connection lines (edges) between them.