Business Rule - Fields in filter condition and current-previous values.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2020 03:05 AM
Hi,
I have written an 'after' business rule to trigger a REST message to POST data from one instance to another. The Business Rule is written on sys_app table, with condition set on version field: Version changes. With this configuration, I was able to access correct values for current.version and previous.version into the REST message.
However, we faced some issues with version field as the filter condition. The BR didn't trigger at times. So, I changed the filter condition to another field. Now current.version and previous.version return the same value. Is there any dependencies on the filed to be used in filter condition to fetch the current and previous values of that field?
Thanks
Ramya
- Labels:
-
Platform and Cloud Security
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2020 03:14 AM
Hi,
Has the version been changed for that call?
Simply use gs.log to verify the values
Thanks
Sudhanshu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2020 03:22 AM
yes, version changes. I did use gs.log and verified that values are same for previous and current.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2020 03:34 AM
Try with async as with REST api calls, you should use that.
Thanks
Sudhanshu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2020 03:20 AM
Hi Ramya,
It is not recommended to trigger API Calls from After business rule as per best practices.
instead you should use Async BR for this
please share BR configurations
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader