[Answered ]-Viewflow.io: What is the recommended pattern to go a step back in a flow?

2πŸ‘

βœ…

If updating data is not the part of the process, it could be implemented as usual django view. Nothing special required here.

If it is the part of process, it’s always moving forward, and all process decisions recorded and could be used in flow gateways. In this case you should have two explicit tasks, one for data input, another one for data validation, and IF gateway to check validation status.

I could recommend for you to became familiar with BPMN notation and practice. Viewflow resembles them directly.

enter image description here

If you would like to have a next task undo and cancel functionality, you can implement custom view action.

# cancel current task
activation = current_task.activate()
if activation.undo.can_proceed():
   activation.undo()
   activation.cancel()

# allow to re-execute previous task
activation = previous_task.activate()
if activation.undo.can_proceed():
   activation.undo()
πŸ‘€kmmbvnr

Leave a comment