This release is a pre-release and may not be stable for production use.
An embeddable BPMN and DMN workflow engine for Python applications.
The workflow core of m8flow: import it, pass it a database session, and run
processes inside your own application.
m8flow-core
m8flow-core is the workflow core of m8flow. It runs Business Process Model and Notation (BPMN) 2.0 processes and Decision Model and Notation (DMN) decision tables inside your own Python process, on top of SpiffWorkflow and SQLAlchemy. You import it, pass it a database session, and call commands and queries. There's no server to deploy.
It's a library, in the same spirit as an embedded Camunda engine: your application owns the HTTP layer, the users, and the transaction. The library owns the workflow state.
Features
The library covers the following:
- Process definitions. Import BPMN XML and optional DMN XML, validated before anything is stored.
- Process execution. Start instances from stored definitions and run them through exclusive and parallel gateways, script tasks, and DMN business rule tasks.
- Human tasks. Build worklists of work items from BPMN lanes, then claim and complete them, safely under concurrency. Form values you submit are stored as process metadata.
- Lifecycle control. Suspend, resume, error, retry, and terminate process instances, with an event history for each one.
- Timers and scheduled retries. Timer start events, intermediate timers, interrupting boundary timers, and delayed retries, stored as database jobs that your application polls.
- Service tasks. Run BPMN service tasks through pluggable connectors, including an adapter for the m8flow connector proxy.
- Multi-tenancy and authorization. Every call is scoped to a tenant, and stored data, down to workflow payloads, belongs to one tenant. User actions are checked against tenant membership and command grants on exact resources, and you can plug in your own policy.
- Caller-owned transactions. Pass a SQLAlchemy
Connectionand the library never commits or rolls back for you.
Quick start
You need Python 3.12 and uv. To install the project and run a complete purchase-order workflow on an in-memory SQLite database, run the following commands:
git clone https://github.com/AOT-Technologies/m8flow-core.git
cd m8flow-core
uv sync
uv run python examples/parallel_review.py
The script imports a BPMN definition, starts a process instance, and drives it through a parallel review to completion, printing the pending tasks after each step.
The core of an integration looks like the following:
from m8flow_core import api
with engine.begin() as connection:
definition = api.execute_command(
connection,
api.ImportBpmnProcessDefinitionCommand(
tenant_id="acme",
bpmn_identifier="expense-approval",
user_id=admin_id,
source_bpmn_xml=bpmn_xml,
properties_json={"lane_owners": {"Approvers": ["approver"]}},
),
)
instance = api.execute_command(
connection,
api.InitializeProcessInstanceFromDefinitionCommand(
tenant_id="acme",
bpmn_process_definition_id=definition.id,
process_initiator_id=admin_id,
),
)
tasks = api.execute_query(
connection,
api.GetPendingTasksQuery(tenant_id="acme", user_id=approver_id),
)
The quick start tutorial builds this into a complete script, from an empty database to a finished process. Running the finished script looks like this:
Documentation
The full documentation is in docs/. The pages follow the
Diátaxis structure. Find your task in the following
table:
| I want to… | Read |
|---|---|
| Run my first workflow | Quick start |
| Add the library to my application | Embed the library in your application · Build and install the package |
| Run timers and scheduled retries | Run timers and scheduled retries |
| Call an external system from a process | Call external services from service tasks |
| Add my own authorization rules | Customize authorization |
Upgrade from m8flow-bpmn-core 0.x |
Upgrade to 1.0 |
| Look up a command, query, or error | Public API reference · Database schema |
| Check which BPMN elements work | BPMN support · Limitations |
| Understand how it fits together | Architecture · Workflow data model |
| Try the runnable examples | Run the examples · Sample app |
| Change the library itself | Develop and test |
Project status
m8flow-core 1.0 is the first stable release. The public surface is the
m8flow_core.api module, documented in the
API reference, together with the
database schema. The
changelog records every change to either. Coming from
m8flow-bpmn-core 0.x? Follow Upgrade to 1.0. Messaging and correlation, call
activities, multi-instance activities, and tenant and user management aren't
covered yet. Limitations lists every known
gap.
Get help and contribute
Use the following resources:
- Read SUPPORT.md for where to ask questions.
- Report bugs and request features in the issue tracker.
- Report security vulnerabilities privately, as described in SECURITY.md. Don't open a public issue.
- Before you open a pull request, read the contributing guide.
- Everyone who takes part follows the code of conduct.
- Release notes are in the changelog.
License
m8flow-core is released under the Apache License 2.0. See NOTICE for third-party attributions, including the LGPL-3.0 dependencies SpiffWorkflow and psycopg.
Metadata
Release files for m8flow-core 1.0.0b2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| m8flow_core-1.0.0b2.tar.gz | 350.9 kB | With provenance | Details for m8flow_core-1.0.0b2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| m8flow_core-1.0.0b2-py3-none-any.whl | Python 3 | none | any | Details for m8flow_core-1.0.0b2-py3-none-any.whl |
Total release size: 439.6 kB
Release files / m8flow_core-1.0.0b2.tar.gz
| Download URL | m8flow_core-1.0.0b2.tar.gz |
|---|---|
| Size | 350.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
760db885168a8cd9460ec22b0f55dbf02255838ef825660166762a4d6037c1bf
|
|
BLAKE2b-256 checksum How to use checksums |
af1951e3f5d826926d137de4e7ea9ac53e5faad0cace72311f9fa4e0cbfaf0b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.
Transparency logRelease files / m8flow_core-1.0.0b2-py3-none-any.whl
| Download URL | m8flow_core-1.0.0b2-py3-none-any.whl |
|---|---|
| Size | 88.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d330c28c81c1ebe99282a8b36265cd2c5b37f276a196a84fc31b5167a40d13c0
|
|
BLAKE2b-256 checksum How to use checksums |
f2cc20992d7df5358f14c20f5e70b016a95ed9c793ae1d3d53e65296ed0d6ad1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.
Transparency logSecurity for m8flow-core 1.0.0b2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for m8flow_core-1.0.0b2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.