Skip to main content

No project description provided

Project description

SCF_FSM_PACKAGE

Logo

A resuable python django package that can handle state transition and workflow's in your django application .

Description

  • The finflo package is designed to handle the workflow management cycle .
  • Your state transition's are made easy with finflo
  • customizable Actions and states with on_flow interchangable
  • Pre installed signature levels for each action

TECHNOLOGY STACK

https://www.python.org/ DJANGO DjangoREST

IMPORTANT LINKS

  1. Documentation
  2. Postman collection

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'],
    'PARTY_TYPE' : [] #optional
}
  • The PARTY_TYPE is optional , if it is not needed you can leave it as blank like this []

  • 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'],
    'PARTY_MODEL' : ['MyApp1.Model1'] 
}

  • In the above 1.1 , you can see MyApp3.Model3 is newly addded
  • Now you can remigrate the database without droping it simply by the below command .
- python manage.py migrate --fake finflo 0001
- python manage.py migrate finflo 0002

Usage

  1. Once your setup is completed , whenever the objects in WORK_MODEL is created , the finflo automatically creates :

    • Transition manager
    • workflowitems
    • workevents
  2. The transition for each model can be carried out with 2 methods:

    1. Navigate to the url : localhost/transition/

      • in the content section use the format as below and POST
      • {"type" : "MyApp.Model" , "action" : "MyAction" , "t_id" : "1"}
    2. In Postman , pass the following key in body as follows

      • t_id (transition_id)
      • type (model_type)
      • action
      • Example
        Screenshot
  3. Some important information for transition are as follows :

    Arguments Data_Type
    type str
    action str
    t_id int
    source str
    interim str
    target str
    from_party str
    to_party str

API URLS

  1. List of all Url's
Api URL's METHOD FORM DATA QUERY_PARAMS
localhost/model/ GET NONE ?type=Model&t_id=1 or
or t_id=1
localhost/transition/ POST action , type , t_id ,
optional : from_party , to_party ,
source , interim , target
NONE
localhost/transition/reset/ POST type , t_id NONE
localhost/action/ GET , POST description , model ,
from_state ,to_state ,
from_party , to_party , stage_required
?action=MYACTION or
?action=MYACTION&?model=Model
localhost/signatures/ GET , POST name , sub_action_name NONE
localhost/party-type/ GET , POST description NONE
localhost/states/ GET , POST description NONE
localhost/workflowitems/ GET NONE NONE
localhost/workevents/ GET NONE NONE

Support

For support, contact

  1. support@venzo.com
  2. anandrajb@venzotechnologies.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.45.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

finflo-1.10.45-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file finflo-1.10.45.tar.gz.

File metadata

  • Download URL: finflo-1.10.45.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for finflo-1.10.45.tar.gz
Algorithm Hash digest
SHA256 167fad394372d481c9b21261bdf23bc7f49942358d2d9cd9bc6b646744dd48de
MD5 0f24e54a0ffce5d6a720c58c7805d5f2
BLAKE2b-256 bd192ac332165404071c2e7d1639a7ba29d3c2d1a0246a21202eb66adbba7a72

See more details on using hashes here.

File details

Details for the file finflo-1.10.45-py3-none-any.whl.

File metadata

  • Download URL: finflo-1.10.45-py3-none-any.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for finflo-1.10.45-py3-none-any.whl
Algorithm Hash digest
SHA256 1e2244df986d9ae2d7e717d0ea1ed9c76ed0365b7dc030b66c90cc483f1c41e7
MD5 1aaa817b6b03148dffaa7bf91a32ae90
BLAKE2b-256 f96ed4c5718f8082b0fec70215fd087301a11b34c5f3b8635b1aab8faae12495

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page