- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2023 03:14 AM
Hello experts,
I am trying to prevent duplicate software entitlements. If a duplicate is found, I want the request to abort and an error to show up. However, the error is not showing up. I tried both below:
Below is the full business rule script:
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2023 01:10 AM
I would suggest to update the RITM with additional comments to update the user.
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2023 05:27 AM
The script works fine in my instance.
When are you running your BR?
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2023 11:12 AM
I am running BR on Before Insert and Update

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2023 12:01 AM
That should be fine.
Is your BR triggered at all? If you add a gs.info('debug BR') line at the start of your script, do you see this is the system log? If not, please verify your conditions.
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2023 12:51 AM
I added gs.info and it does run the BR
The following error does show up in the log:
Flow Designer: Operation(Deploy Workstation Request.If$9.1b44563b97c431502a7733471153afeb.624b63b5979c39502a7733471153af3e.f9e09916c31332002841b63b12d3aeaa) failed with error: com.snc.process_flow.exception.OpException: Error occured while inserting record: Operation against file 'alm_entitlement_user' was aborted by Business Rule 'Ensure no duplicate entitlements^dfee9e8a97fcbd102a7733471153af3b'. Business Rule Stack:Ensure no duplicate entitlements
I think this error is because of current.setAbortAction(true);
I also checked the conditions is empty. Is that the cause? I'm not sure what the condition should be.