Restart approval workflow after rejection
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2025 07:45 AM
I have a workflow that executes when a record state changes to requested, then processes approvals in sequence depending on approval limits, and can be rejected at any interval.
On rejection, the workflow currently sets the record approval stage to rejected and resets the state to draft.
After this, I require the ability to re-submit the record for approval again, but the workflow doesn't re-execute after the rejection, even when the state changes to requested again, which should match the workflow condition.
I do require the historical approvals from the previous workflow to remain for audit in the approval list view, but need the new approvals to show as they are generated.
Thoughts?
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2025 08:41 AM
Try using a Subflow
1. Update Workflow Condition: Keep it as current.state == 'requested' AND add a flag like re_submitted == true
2. On Rejection:
Set state = draft
Set a flag ready_for_resubmit = true
Keep the existing approvals for audit
3. When User Resubmits:
In your resubmit UI action or logic:
Set state = requested
Set re_submitted = true
Manually start a new workflow using startFlow(workflow_name, current)
Script could be like this
var wf = new Workflow();
wf.startFlow('your_workflow_name', current, current.operation(), current.sys_id);
I believe by this way, new approvals are generated, and the old ones remain in sysapproval_approver for audit.