How to stop other business rules if the first business rule is aborted
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2025 08:13 PM
Hi,
I have multiple before business rules with different orders. I want if any lower order business rule is abort then stop to execute all higher order business rule.
Thanks, Alok
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2025 08:51 PM
Hi @alokims ,
Please refer this link which will tell you how setWorkFlow work. Set workflow
If my response helped then please accept the solution and hi thumbs up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2025 10:10 PM
Hello @alokims
Change the order of code -
Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket.
Regards,
Shivalika
My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194
My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2025 09:07 PM
Hi @alokims ,
why do you want to this do you have any logic on the before BR?(example: altering other tables data in one of the before BRs?)
I would say move that logic to async or after BR
I have tried setWorkflow(false) looks like it only stops the action which are triggered by the current action made on the database since setAbortaction is not going to trigger a different transaction the current transaction's before BRs are being evaluated
you can create a new field (isAborted something like this true/false field) you can set this to true in the BRs where you have used the setAbortaction and update(add) the other higher order BRs conditions with isAborted = false
this is just a suggestion.
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2025 09:40 PM
that's not going to happen.
Why not combine those multiple before BRs into single one?
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