Think Build Implement Repeat
London, UK +44 7367 067226
WhatsApp FOLLOW f in X
  1. Home
  2. Blog
  3. Getting Work Through Its Stages
Python & Django

Getting Work Through Its Stages

Workflow and approval systems in Django: explicit states, permitted transitions and who may make them, a visible queue and a record of every step.

Updated 2 min readBy SpiderHunts Technologies

Free estimateNo obligation

Get a free estimate

Tell us what you need. A senior engineer reads every enquiry.

Takes under a minute. We never share your details.

  • Free consultation
  • No commitment
  • NDA on request

Prefer to talk? Book a free 30-minute call →

Quick answer — TL;DR

Model the states explicitly, define which transitions are permitted and by whom, record every transition, and make what happens next visible to whoever is responsible.

Model states explicitly

A workflow is a set of states and permitted transitions between them. Modelling that explicitly — rather than with a collection of boolean flags — makes the system comprehensible and the rules enforceable.

A record with six boolean flags has sixty-four possible combinations, most of which are meaningless. A record with a state has the states you defined.

What each transition needs

  1. Who is permitted to perform it
  2. What conditions must hold first
  3. What happens as a result — notifications, records, next steps
  4. What is recorded — who, when, why
  5. Whether it can be reversed, and by whom

Approval rules are usually more complex than stated

  • Thresholds — above a value it needs someone more senior
  • Delegation — who covers when the approver is away
  • Self-approval — usually prohibited, sometimes permitted
  • Sequential versus parallel approval
  • What happens on rejection — back to the start, or to a specific stage

Ask about all five explicitly. Businesses describe their approval process as simpler than it is, and the exceptions emerge in week six otherwise.

Make the queue visible

ShowTo whom
What is waiting for meEach approver
What I have submittedThe submitter
What is overdueWhoever manages the process
Where each item isAnyone with an interest
How long each stage takesWhoever improves the process

Work waiting on an approver who has not noticed is the most common workflow failure and the easiest to prevent.

Record everything

Every transition, with who, when and any comment. That history answers most later questions and is frequently a regulatory or audit requirement.

It also reveals where the process actually stalls, which is usually somewhere different from where people assume.

FAQ

Frequently asked questions

The questions readers ask us after this guide.

Still have a question?

Ask us directly — a senior engineer will get back to you.

Ask about your project

Should we use a workflow library?

For simple state machines, plain code is clearer. Libraries help with genuinely complex branching workflows.

How do we handle exceptions?

An explicit override with a required reason, recorded. Every process has exceptions; the system should handle them visibly rather than forcing workarounds.

What about notifications?

Notify whoever must act, and remind when overdue. Notifying everybody about everything produces a muted channel.

Can the workflow change later?

Yes, and existing records need considering. States in progress at the time of a change need a migration plan.

Keep reading

More on Python & Django

Python & Django

An API Other Systems Can Depend On

Designing a Python API service others can depend on: validation at the boundary, consistent errors and status codes, early versioning and documentation.

Python & Django

Moving and Transforming Data Reliably

Building data pipelines in Python that cope with malformed input: restartable stages, quarantining failures, reconciling counts and alerting on absence.

Start here

Approvals chased by email?

A visible queue with reminders removes most of the chasing. Happy to map your process.

  1. You tell us what you needTwo minutes on the form, or a message on WhatsApp.
  2. A senior engineer reviews itAnd comes back with questions, a realistic range and an honest view on fit.
  3. Free 30-minute scoping callWe talk through scope, options and a realistic estimate — with no obligation.
Free estimateNo obligation

Talk to someone who builds this

Send a short brief and we will come back with an honest view and a realistic range.

Takes under a minute. We never share your details.

  • Free consultation
  • No commitment
  • NDA on request

Prefer to talk? Book a free 30-minute call →