|Project Name||Stars||Downloads||Repos Using This||Packages Using This||Most Recent Commit||Total Releases||Latest Release||Open Issues||License||Language|
|Viewflow||2,385||30||2||11 days ago||39||April 05, 2022||32||agpl-3.0||Python|
|Reusable workflow library for Django|
|Loonflow||1,671||a month ago||12||mit||Python|
|基于django的工作流引擎,工单(a workflow engine base on django python)|
|Django River||624||6||1||2 years ago||34||January 31, 2021||22||bsd-3-clause||Python|
|Django workflow library that supports on the fly changes ⛵|
|Django Lb Workflow||175||a year ago||7||December 17, 2021||mit||Python|
|Reusable workflow library for Django|
|Joeflow||64||12 days ago||14||June 20, 2022||4||bsd-3-clause||Python|
|The workflow automation framework for machines with heart|
|River Admin||61||2 years ago||6||February 01, 2021||9||bsd-3-clause||Vue|
|:rocket: A shiny admin interface for django-river built with DRF, Vue & Vuetify|
|Django Workflows||28||8 years ago||5||bsd-3-clause||Python|
|Django_workflow||5||3 years ago||2||August 29, 2017||1||bsd-3-clause||Python|
|simple database driven workflow engine for Django|
|Workflow engine for orchestration graphs|
|Django Workflows||5||12 years ago||2||bsd-3-clause||Python|
|Fork of https://bitbucket.org/diefenbach/django-workflows|
River is an open source workflow framework for
Django which supports on
the fly changes instead of hard-coding states, transitions and authorization rules.
The main goal of developing this framework is to be able to modify literally everything about the workflows on the fly. This means that all the elements in a workflow like states, transitions or authorizations rules are editable at any time so that no changes requires a re-deploying of your application anymore.
Playground: There is a fake jira example repository as a playground of django-river. javrasya/fakejira
This is a fully open source project and it can be better with your donations.
If you are using
django-river to create a commercial product,
please consider becoming our sponsor , patron or donate over PayPal
Online documentation is available at http://django-river.rtfd.org/
A very modern admin with some user friendly interfaces that is called River Admin has been published.
Django= 2.2 is supported for
Django>= 3.0 is supported for
Install and enable it
pip install django-river
INSTALLED_APPS=[ ... river ... ]
Create your first state machine in your model and migrate your db
from django.db import models from river.models.fields.state import StateField class MyModel(models.Model): my_state_field = StateField()
Create all your
states on the admin page
workflow with your model (
my_state_field ) information on the admin page
transition metadata within the workflow created earlier, source and destination states
transition approval metadata within the workflow created earlier and authorization rules along with their priority on the admin page
my_model=MyModel.objects.get(....) my_model.river.my_state_field.approve(as_user=transactioner_user) my_model.river.my_state_field.approve(as_user=transactioner_user, next_state=State.objects.get(label='re-opened')) # and much more. Check the documentation
Whenever a model object is saved, it's state field will be initialized with the
state is given at step-4 above by
django-river provides you to have your custom code run on certain events. And since version v2.1.0 this has also been supported for on the fly changes. You can create your functions and also the hooks to a certain events by just creating few database items. Let's see what event types that can be hooked a function to;
For all these event types, you can create a hooking with a given function which is created separately and preliminary than the hookings for all the workflow objects you have or you will possible have, or for a specific workflow object. You can also hook up before or after the events happen.
This will be the description of your functions. So you define them once and you can use them with multiple hooking up. Just go to
/admin/river/function/ admin page
and create your functions there.
django-river function admin support python code highlights.
INSTALLED_APPS=[ ... codemirror2 river ... ]
Here is an example function;
from datetime import datetime def handle(context): print(datetime.now())
Important: YOUR FUNCTION SHOULD BE NAMED AS
django-river won't execute your function.
django-river will pass a
context down to your function in order for you to know why the function is triggered or for which object or so. And the
context will look different for
different type of events. Please see detailed context documentation to know more on what you would get from context in your functions.
You can find an advance function example on the link.
The hookings in
django-river can be created both specifically for a workflow object or for a whole workflow.
django-river comes with some model objects and admin interfaces which you can use
to create the hooks.
To create one for whole workflow regardless of what the workflow object is, go to
/admin/river/onapprovedhook/to hook up to an approval
/admin/river/ontransithook/to hook up to a transition
/admin/river/oncompletehook/to hook up to the completion of the workflow
To create one for a specific workflow object you should use the admin interface for the workflow object itself. One amazing feature of
django-river is now that it creates a default admin interface with the hookings for your workflow model class. If you have already defined one,
django-river enriches your already defined admin with the hooking section. It is default disabled. To enable it just define
RIVER_INJECT_MODEL_ADMIN to be
True in the
Note: They can programmatically be created as well since they are model objects. If it is needed to be at workflow level, just don't provide the workflow object column. If it is needed to be for a specific workflow object then provide it.
Here are the list of hook models;
django-river has behavioral tests that are very easy to read and write. One can easily set up one
and see if everything is running as expected. Please look at other examples (that are the files with
features folder that you can get all the inspiration and create one for yourself before you open an issue
Then refer to your behavioral test to point out what is not function as expected to speed the process up for your own
sake. It is even better to name it with your issue number so we can persist it in the repository.
django-river v3.0.0 comes with quite number of migrations, but the good news is that even though those are hard to determine kind of migrations, it comes with the required migrations
out of the box. All you need to do is to run;
python manage.py migrate river
django-river started to support Microsoft SQL Server 17 and 19 after version 3.2.0 but the previous migrations didn't get along with it. We needed to reset all
the migrations to have fresh start. If you have already migrated to version 3.1.X all you need to do is to pull your migrations back to the beginning.
python manage.py migrate --fake river zero python manage.py migrate --fake river
Have a look at FAQ
This project exists thanks to all the people who contribute 🚀 ❤️
Become a financial contributor and help us sustain our community. Contribute
Support this project with your organization. Your logo will show up here with a link to your website. Contribute
This software is licensed under the New BSD License. See the
file in the top distribution directory for the full license text.