business rule triggered by an event
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2016 09:23 AM
Hi,
I'm facing a problem with business rules. I know that a common way to use BR is to trigger an event when some prerequisites are met. But I need to do the opposite way.
I have an event named "email.failed" that is inserted in the sysevent table by an inbound script (gs.eventQueue("email.failed", sys_email, email.from, sys_email.sys_id)). I want my BR to modify the state of the source email when the event is created. So I created this BR (After, insert and update) :
As you can see, the source email should be in error state after the sysevent is created (parm2 contains the sys_email sys_id).
My problem is that the business rule is not ran when the sysevent is created ! The gs.log never shows in the logs.
If I go on the event and I click to Reprocess event, the BR is correctly ran and is doing the needed operations !
Do you have any idea on why the business rule is not triggered on the sysevent table ?
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2016 09:33 AM
Script Actions are a good tool to use when you want Business Rule type functionality, but only when an event is fired.
Script Actions - ServiceNow Wik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-25-2016 02:25 AM
Thanks Robert, I didn't know about script actions...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-25-2016 04:09 AM
Slam that correct / helpful button.