How to stop flow designer from business rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2021 10:28 PM
Hi,
I want to stop flow designer from the Business rule. We have a requirement to copy the state of SCTASK on the RITM. In some catalog items there are more than 1 SCTASKs. I write the below business rule on after , state changes to closed incomplete or state changes to closed skipped
var gr = new GlideRecord('sc_req_item');
gr.get(current.request_item);
//gr.addQuery('sys_id', current.parent);
gr.state = current.state;
gr.stage = 'Request Cancelled';
//gr.setWorkflow(false);
gr.update();
But because of OOTB br(cancel flow on request cancelled) all the sctasks are changing to closed Incomplete.
Please help in this.
Many thanks!!
Saloni
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-06-2021 12:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-06-2021 12:35 AM
You can either update the flow trigger condition
OR
Let the flow trigger the context; you cancel it with the script I shared above.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-06-2021 12:48 AM
Yes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-06-2021 12:59 AM
Let me know if I have answered your question.
If so, please mark appropriate response as correct & helpful so that this thread can be closed and others can be benefited by this.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2023 08:47 AM
Hi Ankur,
I have similar kind of requirement. Need to create business rule to close RITM and REQ when the first task in RITM is closed rejected. Please assist.