django-fsm
django-fsm copied to clipboard
How can I have multiple workflows in the same template?
The need is that depending on the type of article, I have to choose a custom workflow model.
Do you mean, how to start different flows from a single page?
What is your Viewflow setup? Do you use frontend or write custom views?
Could you have just a single flow with flow.If after start to select different path ?
Yes, single page.
I have a specific form, and depending on the type of article, I want to start a different workflow.
At this point I created the workflow at the Model level. But i need to be able to choose the workflow.
Here's an example, i have a Model Product, but i have two types of products, cars and trains. Each on of them has a diferent workflow.
Product is a Car Kick-off -> Design Validation -> Release
Product is Train Kick-off -> Concept Validation -> Design Validation -> Release
When i create a product, i choose the type(car/train) and i choose respective workflow.
Is this possible?
there are some tricks that django-fsm could handle this with proxy models, but generally I recommended to switch to my another project django-viewflow==2.0.0b
viewflow.fsm is not model based, and you can instanticate any fsm flow explicitly on the view
https://docs-next.viewflow.io/fsm/models.html