No project description provided
Project description
SCF_FSM_PACKAGE
A resuable python django package that can handle transition and workflow's in your django application .
Description
- The finflo package is designed to take over all the complexity in FSM building for a workflow scenario
- Your transition's are made easy with finflo
- customizable Actions and states with on_flow interchangable
Authors
Prerequisite
- python
- Django
- Django-rest-framework
1. Installation
1.1 Initial setup
- Install finflo using pip
pip install finflo
- In your django application , browse to installed_apps section in settings.py and add this ,
INSTALLED_APPS = [
'finflo',
'rest_framework'
]
- Add this in your settings.py
FINFLO = {
'WORK_MODEL' : ['MyApp.Model','MyApp2.Model2']
}
- Navigate to the middleware section in your settings.py and add the finflo middleware
MIDDLEWARE = [
'finflo.middleware.TransitionUserMiddleware',
]
- Now add this peice of code in your urls.py
urlpatterns = [
path('', include('finflo.urls'))
]
1.2 Migrations
- once all the steps done from the above section 1.1 .
- now we can apply the migrations for the database using ,
- python manage.py makemigrations
- python manage.py migrate
1.3 Re-migrate
- scenario 1 : if any new values is added to the WORK_MODEL
- example for scenario 1 :
# see 1.1
FINFLO = {
'WORK_MODEL' : ['MyApp.Model','MyApp2.Model2','MyApp3.Model3']
}
- you can remigrate the database without droping it using the below command .
- python manage.py migrate finflo 0002
Usage
-
Once your setup is completed , whenever the objects in WORK_MODEL is created , the finflo automatically creates :
- Transition manager
- workflowitems
- workevents
-
The transition for each model can be carried out with :
- t_id (transition_id)
- type (model_type)
- action
- example
-
Some important information for transition are as follows :
Arguments Data_Type type str action str t_id int source (optional) str interim (optional) str target (optional) str from_party (optional) str to_party (optional) str
Additional API's
Api urls
Api URL's | METHOD | QUERY_PARAMS |
---|---|---|
localhost/model/ | GET | ?type=PROGRAM & t_id = 1 |
localhost/action/ | GET | NONE |
localhost/action/ | POST | NONE |
localhost/workflowitems/ | GET | NONE |
localhost/workevents/ | GET | NONE |
Support
For support, email support@venzo.com .
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
finflo-1.10.2.tar.gz
(15.3 kB
view details)
Built Distribution
finflo-1.10.2-py3-none-any.whl
(19.4 kB
view details)
File details
Details for the file finflo-1.10.2.tar.gz
.
File metadata
- Download URL: finflo-1.10.2.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07ae06ee8b6cad4b0009c37e6261abaee6efdfc674549770fb68bbf9f728efaa |
|
MD5 | 59883c742fdcbc0b3e41172243a98ab4 |
|
BLAKE2b-256 | 60ee8c67d3a94d9849a729a8c0a796fcd3a2c936b7f03c480f4154ba5eb734c1 |
File details
Details for the file finflo-1.10.2-py3-none-any.whl
.
File metadata
- Download URL: finflo-1.10.2-py3-none-any.whl
- Upload date:
- Size: 19.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 613bda4f23c1f02e9acd3d1b17736c82f4793a0be201de59aeb015facaa51687 |
|
MD5 | 4c536e5dc85f422a44df71480fbfee7b |
|
BLAKE2b-256 | 24274e17d812fef4950fb24e2f7f00df59e15d8f61cca2d6dd23dfbedea9e313 |