
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2018 10:29 AM
We had a workflow that had approvals. A business rule caused a error and the workflow finished skipping the creation of the task and setting the RITM to closed Incomplete. Is there a way to restart the workflow?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2018 12:18 PM
I was looking though some code I help someone else if about a UI Action that would reopen tasks and was able to figure our I could just run this in the backgroud scrip.
var gr = new GlideRecord('sc_req_item');
gr.addQuery('sys_id', 'IN', 'fd4aa2e20f6d6304fe2342bce1050eed,d286161e0fe52304fe2342bce1050eba,db46121e0fe52304fe2342bce1050e56,2d1656da0fe52304fe2342bce1050ea3');
gr.query();
while (gr.next()){
new Workflow().restartWorkflow(gr, true);
gr.state = "1";
gr.stage = "fulfillment";
gr.active = true;
gr.update();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2024 08:05 PM
I know it's been a bit, but this script has come in handy!
Curious though, is there a way to have this script, or a different/similar script, do the same thing but instead of going to the beginning of workflow, just go back and re run a specific stage of the workflow?
I have a similar issue in my workflow where some RITMS got to an approval action and skipped it due to a lack of approver for this record in the table. I'd like to just restart or dial back the workflow to re-run that specific approval stage in the workflow and then flow forward.... in essence keeping all actions on tasks and approvals that were acted on prior to the skipped approval in place, and just letting that skipped approval run again and then go forward and act accordingly. Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2024 08:06 PM
c
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2021 04:51 PM
Thanks Brian. This worked perfectly for my use case!