我目前正在尝试重新创建此流程:
到目前为止,我的流程只有一个方向,没有退后一步的选择,假设人'b'发现人'a'键入的错误,我希望能够允许人'b'将任务发送回人“a”,以便他们可以“编辑”他们的条目。但是,视图流中似乎没有“编辑”功能,这是有原因的吗?
流.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
我知道有一些“撤消”混合视图,但我不确定在我的案例中它是如何实现的,以及一切是如何编排的,请帮忙!