Skip to main content

提供支持django rest framework的viewflow

Project description

viewflow-rest

provide restful viewflow

many of code in the project looks like django-viewflow. I want to keep the interface as same as the django viewflow.

Thanks you for all the contributors of viewflow.

The project is under GPL-3.0 License, any one who change the source code (even if you just use it in intranet of just at home) should upload his code

Example

hr_system/hire/flows.py

  • 中文版
  • English

Quick Start

use the hr_system as a example

git clone git@github.com:ramwin/viewflow-rest.git
cd vieflow-rest/hr_system/
sudo pip3 install -r ./requirements.txt
# add '#' in the file hr_system/urls.py
# so that you can run migrate
# # path("hire/", include("hire.urls")),
python3 manage.py migrate
# delete the # in the file hr_system/urls.py
python3 manage.py migrate
python3 manage.py runserver

The develop vedio can been seen here

  1. create project
  2. create Flow
  3. Create Start & End Node
  4. Create ViewActivation
  5. Create If Node
  6. Create Split Node
  7. Create Join Node
  8. Create Permission
  9. 0.3.0
    • one task for every flow_task
    • add serializer_class parameters for rest_extentions.views
    • add operator for every task

workflow

A flow contains many nodes
every node is a instance of Node every node have a activation_class
every action_class instance will activate_next by

self.flow_task._next  // the next node instance
self.flow_task._next.activate // 

Edge

  • src: source Node instance
  • dst: target Node instance

activations

  • Attribute
    • flow_class
    • flow_task: Node Instance defined in the flows.py
    • task: Current Task

Nodes

  • Function
    • _incoming: Edge Instance list
    • _outgoing: Edge Instance list
  1. models

  2. Views

  3. Flow

  4. rest_extensions

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for viewflow-rest, version 1.2.0
Filename, size File type Python version Upload date Hashes
Filename, size viewflow_rest-1.2.0-py3-none-any.whl (26.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size viewflow-rest-1.2.0.tar.gz (23.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page