Authoring Operational Maker-Checker Approvals
The platform's Maker-Checker primitive is exposed to Pathmakers through a visual graph composer. You map your operational workflow — who proposes a change, who approves, what happens if the primary approver is unavailable, how long until escalation — to a declarative approval graph that compiles into platform-enforced behaviour. No application code required.
This tutorial walks through composing an expense approval workflow for expenses over $1,000.
Prerequisites
- A Pathmaker-role account on the project
- The Console's Workflow editor enabled
- An
expensescollection in your project schema (with at leastamount_usd,department,submitter_idfields) - An understanding of your org's approval policy (who can approve what, fallback hierarchy)
Step 1 — Map the workflow on paper first
Before opening the composer, sketch the flow:
- Triggering event — a new
expensesrow is inserted (or updated) withamount_usd >= 1000 - Auto-approval — department heads can auto-approve expenses in their own department up to $5,000
- Primary approver — Finance Approver (any subject with the role) within 48 hours
- Fallback level 1 — Finance Lead within 24 hours
- Fallback level 2 — CFO within 24 hours
- Concurrent edit policy — if the expense is modified by the submitter while the approval is in flight, block and re-evaluate the policy
Having this sketch in hand makes the visual composition trivial.
Step 2 — Open the workflow composer
In the Console, navigate to Workflows → New approval graph. The composer opens a canvas with a default trigger node and an approval node.
Step 3 — Configure the trigger
The YAML in the steps below shows each node's settings as the Console composer's form presents them; these are composer form fields, not keys of a policy document, and the composer compiles them for you.
Click the Trigger node:
applies_to:
- collection: expenses
on: [insert, update]
match:
gte: ["resource.amount_usd", 1000]
The trigger uses the standard Unified Policy match-expression vocabulary. The composer's match builder UI lets you express this without writing JSON (drag operators, point at fields), but the underlying compilation is to the same JSON your policies use elsewhere.
Step 4 — Add an auto-approval branch
Drag an Auto-Approve node onto the canvas, connected after Trigger:
auto_approve:
match:
and:
- eq: ["subject.attributes.department", "resource.department"]
- eq: ["subject.roles", "department-head"]
- lte: ["resource.amount_usd", 5000]
The branch evaluates against the maker's subject context. A department-head submitting an expense within their own department, up to $5,000, auto-commits. Above $5,000 or outside their own department, the flow falls through to the queue.
Step 5 — Configure the primary approver queue
Drag a Queue node after the auto-approval branch's "fall-through" output:
queue:
primary:
role: finance-approver
timeout_hours: 48
notify:
channels: [email, in-app]
The composer shows the role selector populated from your project's RBAC role taxonomy. The timeout determines when the request escalates if no action is taken.
Step 6 — Add the fallback levels
Click the Queue node's Add fallback button twice to add two fallback levels:
queue:
primary:
role: finance-approver
timeout_hours: 48
fallback:
- role: finance-lead
timeout_hours: 24
notify:
channels: [email, in-app, slack]
- role: cfo
timeout_hours: 24
notify:
channels: [email, in-app, slack]
Each fallback level has its own timeout and notification configuration. If the entire chain exhausts without an approval (96 hours total in this example), the request expires and is sealed as rejected with K9O_APPROVAL_EXPIRED; the maker is notified.
Step 7 — Enable delegation
Approvers sometimes go on leave; the workflow should accommodate planned absences without requiring policy changes:
delegation:
allowed: true
delegation_scope:
- role: finance-approver
delegation_max_amount_usd: 10000
delegation_max_duration_days: 14
This permits Finance Approvers to delegate their approval authority to another subject for up to 14 days, capped at $10,000 per approval. The delegate signs as themselves; the audit log records the delegation chain (delegator → delegate → approval).
Step 8 — Configure concurrent-edit handling
conflict_resolution:
on_concurrent_edit: block-and-rebase
block-and-rebase means: if the expense row is modified while an approval is pending, the in-flight approval is blocked until the change settles, and then the policy re-evaluates against the new resource state. This protects against an edge case where a submitter modifies a $999 expense to $1,200 after submitting it (the trigger would re-fire) or vice versa.
Alternatives:
serial— strict sequential queue; arrivals are processed in order regardless of resource stateoptimistic— concurrent evaluations proceed; the first one to commit wins (CAS-style)
For expense workflows, block-and-rebase is the right default.
Step 9 — Test in the simulator
The composer includes a workflow simulator. Click Simulate and feed in test scenarios:
Scenario 1: Department head submits $3,000 in their own department Expected: auto-approved, no queue routing Result: ✓ Auto-approved at 0s; audit event records the matching auto-approve predicate
Scenario 2: Department head submits $8,000 in their own department Expected: above auto-approval cap; falls to queue; Finance Approver receives notification Result: ✓ Queued to Finance Approver at 0s; notification sent
Scenario 3: Finance Approver does not act within 48 hours Expected: escalates to Finance Lead Result: ✓ Re-routed at 48h; Finance Lead notification sent
Scenario 4: Maker modifies the expense to $500 after submitting at $1,200 Expected: block-and-rebase fires; re-evaluates; trigger no longer matches; approval cancelled Result: ✓ In-flight approval cancelled; audit event records the rebase
The simulator catches misconfigurations before they affect production traffic.
Step 10 — Publish
Click Publish. The graph is validated against the project's policy (the referenced roles must exist), compiled into platform-enforced behaviour, and goes live. Subsequent expense inserts/updates traverse the graph; the audit log captures every routing decision and every approval.
Step 11 — Observe in Lookout
Lookout surfaces approval-graph telemetry:
- Average time from submission to approval, by approver level
- Auto-approval rate vs queued rate
- Queue depth per approver role
- Escalation count over time
- Withdrawn vs approved vs expired
If escalations to the CFO level spike, that's an organisational signal (the Finance Approver / Finance Lead are overloaded). If withdrawal rates are high, that's a UX signal (maybe the submission form is misleading). The graph is a structural artifact; the analytics are the operational feedback loop.
What just happened
You composed an operational approval workflow as a declarative graph that compiles to platform-enforced behaviour. The benefits:
- No application code — the workflow is a graph, not a microservice you operate
- Built-in audit chain — every routing decision and approval is signed and chained
- Delegation, escalation, conflict resolution — first-class primitives, not custom code
- Modifiable via the composer — change the graph in the Console; the change goes live without a deploy
- Maker-Checker forensic guarantees — every approval is cryptographically attributable per Guides → Maker-Checker
Next
- Identity-Native Telemetry Mapping — surface approval-graph metrics in dashboards.
- Privacy-First Analytical Data Masking — keep approver-pool dashboards privacy-respecting.
- Guides → Maker-Checker — the underlying primitive this builds on.