With viewflow, My usecase is this: A user is assigned multiple tasks. He wants to select some of the task and apply the same transition(Approve/Reject) to them. How can he do this?
Asked
Active
Viewed 206 times
1 Answers
1
Nothing specific. Just to activate and complete activation per-task. For safety reasons, you need to pre .select_for_update
all included processes.
Process.objects.filter(...).select_for_update()
for task in _list_of_tasks_:
activation = task.activate()
activation.prepare()
# do something
# activation.process.approved = False
# activation.process.save()
activation.done()

kmmbvnr
- 5,863
- 4
- 35
- 44