Search code examples
pythondjangodjango-rest-frameworkdjango-viewflow

Creating custom rest driven nodes Django-Viewflow


i'm interested in creating a rest driven process in django-viewflow. I've been reading the official page and by doing so i've arrived to the conclusion that after aquiring the pro version of viewflow to have rest integration, I would still need to make my own rest implementation for the nodes to drive the process.

My question is basically if what I understand is true, and if so how could I implement restful nodes to drive the process.


Solution

  • Viewflow is the thin workflow layer on top of django standard Model-View-Template. Viewflow just extracts workflow interleaving logic out of views. Viewflow REST node is the node that bound with views that work on the REST protocol. There is no difference in the viewflow node customization itself, for rest of standard django templates.

    So for the sample, you could check the viewflow custom node demo - https://github.com/viewflow/viewflow/blob/master/demo/customnode/nodes.py#L47 The difference between protocols in the views, not in the viewflow node.