I'm currently trying to recreate this flow:
So far, my flow only goes in 1 direction, there is no option for going back a step back, let's say Person 'b' spots a mistake keyed in by person 'a', I wish to be able to allow person 'b' to send the task back to person 'a' so that they can 'edit' their entry. However, there doesn't seem to be an 'editing' function in view flow, is there a reason for this?
flows.py
class Pipeline(Flow):
process_class = PaymentVoucherProcess
lock_impl = lock.select_for_update_lock
#process starts here
start = flow.Start(
PVStartView,
task_title="Processing New Voucher"
).Permission("cash.can_start_voucher"
).Next(this.approve_by_preparer)
#preparer will approve
approve_by_preparer = flow.View(
UpdateProcessView,
form_class=PreparerApproveForm,
task_title="Approval By Preparer"
).Assign(lambda act: act.process.assign_preparer
).Permission("cash.preparer"
).Next(this.documents)
#preparer will upload supporting documents
documents = flow.View(
UploadView,
task_title="Recieving Supporting Documents"
).Assign(lambda act: act.process.assign_preparer
).Permission("cash.preparer"
).Next(this.preparer)
#preparer will sign
preparer = flow.View(
PreparerSignature,
task_title="Signature By Preparer"
).Assign(lambda act: act.process.assign_preparer
).Permission("cash.preparer"
).Next(this.approve_by_verifier)
#system check point
check_treasury = flow.If(
cond=lambda act: act.process.preparer,
task_title="Processing",
).Then(this.approve_by_verifier).Else(this.end)
#verifier will sign
approve_by_verifier = flow.View(
UpdateProcessView,
form_class=VerifierApproveForm,
task_title="Approval By Verifier"
).Assign(lambda act: act.process.assign_verifier
).Permission("cash.verifier"
).Next(this.verifier)
#there is more but not relevant
I understand that there are some 'undo' mixin views but I'm not sure how it is being implemented in my case and how everything is orchestrated, please help!
Undo
task flow is part of admin functionality, and not desined to be used by usual cases. If you need to edit a process data by usera
, you could simple create edit task for usera