javrasya / django-river

Django workflow library that supports on the fly changes ⛵
BSD 3-Clause "New" or "Revised" License
741 stars 105 forks source link

Backward flow step #164

Closed cyberdude86 closed 4 years ago

cyberdude86 commented 4 years ago

Is there a built in method to indicate an approval model was a backward step?

javrasya commented 4 years ago

Hi @cyberdude86 ,

What do you mean by a backward step? Do you mean a transition where it circles?

cyberdude86 commented 4 years ago

Correct, I am trying to indicate when a a circular “reject” occurs.

javrasya commented 4 years ago

There is no exposed API like that but you can use the easy way to do that that django-river internally uses to detect cycling transitions.

See this;

https://github.com/javrasya/django-river/blob/master/river/core/instanceworkflowobject.py#L227

javrasya commented 4 years ago

I don't recommend you to use that method that is meant to be private and internal and rely on it. Things can change in django-river and it would make it harder for you to upgrade. Since it is a trivial one, you can steal the code and put it somewhere in your app.