I have my workflow creating multiple approval tasks at different levels with multiple approvers per level using @ananya-chatterjee-oracle's blog on setting up a custom plugin.
- Expense Cost Center Approvers - multiple at once
- Project Managers - multiple at once
- etc
Step 1 doesn't continue until all have approved, same with step 2. It works great except for one thing. With multiple tasks out there waiting to be approved, if the first person rejects the approval, the workflow is canceled but the other tasks are still waiting out there.
I was hoping to utilize APEX_APPROVAL.CANCEL_TASK during the OnComplete event of the approval task, but this can only be called by the Initiator or the Business Admin. The person rejecting the approval isn't either but it takes only one rejection to cancel the workflow - leaving the other tasks out there with no point in having them.
Is there another way to cancel the remaining tasks programmatically?
Thanks,
-Dave