BPMN Workflow Engine for Django

BPMN (Business Process Model and Notation) is the standard for modeling business processes. Viewflow is an open-source BPMN workflow engine for Django: you write BPMN diagrams as plain Python code and run them in production.

Unlike a finite state machine, BPMN supports parallel task execution. This matters when several people work on different parts of a process at the same time.

BPMN workflow diagram modeled in Django with Viewflow

Code-First Workflows

Most BPMN tools use graphical designers. You drag boxes and draw arrows. Viewflow takes a different approach: you write workflows in Python.

This means you can:

  • Track changes in git
  • Review workflows in pull requests
  • Reuse code across different workflows
  • Test workflows with standard Python tools

The viewflow.workflow module adds a thin layer on top of Django’s Model/View/Template pattern. It extracts workflow logic from your views, so you can reuse the same view code in different workflows.

FAQ

What is a BPMN workflow?

A BPMN workflow is a business process modeled with Business Process Model and Notation — tasks, gateways, and flows that describe how work moves from start to finish. Viewflow runs these workflows inside a Django application.

Is there an open-source BPMN engine for Python?

Yes. Viewflow’s core is an open-source BPMN workflow engine for Python and Django. You define the process as code and execute it; the PRO edition adds a visual frontend and extra widgets.

Can I run BPMN workflows in production with Django?

Yes. Workflow state is stored in your database, long-running and background tasks run on Celery, and processes survive restarts — so BPMN workflows run in production alongside the rest of your Django app.