- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2025 07:06 AM
How do I rerun a flow that failed or did not generate a task after I had made a modification to the flow?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2025 08:07 AM
you can use this to re-run the flow for your RITM
var grScReqItem = new GlideRecord('sc_req_item');
grScReqItem.addEncodedQuery("number=RITM0001"); // provide a Query
grScReqItem.query();
if (grScReqItem.next()) {
try {
var inputs = {};
inputs['request_item'] = grScReqItem; // GlideRecord of table: sc_req_item
inputs['table_name'] = 'sc_req_item';
var contextId = sn_fd.FlowAPI.startFlow('your Flow name', inputs);
} catch (ex) {
var message = ex.getMessage();
gs.error(message);
}
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2025 07:08 AM
Hi @athavichith
Just you can trigger the flow again based upon your conditions mentioned in the flow.
Regards,
Sai Venkatesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2025 07:10 AM
Particularly, the changes will apply only to the new record.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2025 07:44 AM
once you publish the flow then the changes will apply to new records and not to old ones.
what's your business requirement?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2025 07:55 AM
I want to rerun the flow on submitted RITM to generate the catalog tasks. In my previous flow, there was an approval, but now the customer wants to bypass approvals and just generate tasks.