- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2018 09:17 PM
Hi Comunity,
I have a set of business rules and I had given setAboartAction for the first one.
This BR is aborting the user in submitting the incident.
But the problem is that remaining business rules are also running even after AboartAction happens in first BR itself.
Kindly let us know the solution for the same.
Thank you,
Harsha Vardhan,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-27-2018 05:12 AM
So, below your setAboartAction line of code. use setWorkflow(false) to stop other business rules from executing.
setWorkflow(false) is specially used for stopping business rules to fire, and this may be the exact thing you are looking for.
current.setWorkflow(false);
References :

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2018 09:41 PM
My first thought would be to create a property which the first business rule can set as a go/no go flag. For the remaining rules just check the property and exit if the first rule has set it to abort. Just make sure every potential exit condition, even exceptions, sets the flag to either a success or abort condition in all cases. Use try/catch blocks, etc.
If this is helpful or answers your question please mark it so.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-27-2018 04:49 AM
var incGR = new GlideRecord('incident');
// query condition
if(incGR.isAbortedAction()==true){
incGR.setWorkfllow(flase);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-27-2018 05:12 AM
So, below your setAboartAction line of code. use setWorkflow(false) to stop other business rules from executing.
setWorkflow(false) is specially used for stopping business rules to fire, and this may be the exact thing you are looking for.
current.setWorkflow(false);
References :