Correct way to trigger a Business Rules from Scheduled Script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2023 12:05 PM - edited 09-23-2023 01:20 PM
Hi,
As per subject, I just wanted to know the correct way to trigger Business Rules from Scheduled Script.
In my Scheduled Script, i have put in - example :
gs.eventQueue('event_A', table, current.user);
And in my Business Rules. I have put in a few events to trigger emails based on different conditions.
So did I do it wrongly? Since I tested out and the Events did not fire at all..
This is what I am trying to do.
1. Look for KBs that has comment added by employees
2. Send emails to these employees to gather more feedback -- trigger event
3. If these employees are no longer active then trigger the emails to their Supervisors - -- trigger event
4. If both the employees and Supervisors are no longer active then trigger the emails to the Department Managers - -- trigger event
In summary - my question is -- Can I trigger events in a Business Rule from an event in a Scheduled Script?
Appreciate if anyone could just guide me on how to proceed with the request.
Thank you in advance ! 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2023 05:56 PM
Yes and No..
I did some further testing by executing the Scheduled Script and sometimes the Event in Business Rule is getting fired and sometimes its not..
Seems like its working intermittently..
Do you mind to help me test it out and let me know the ways to make it work?
Thank you..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2023 01:47 AM
Hi @Happy S ,
Hope you are doing great.
Yes we can call a BR from scheduled job .Please refer to below video for same :
https://www.youtube.com/watch?v=VpHoDIHEeDg
Regards,
Riya Verma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2023 08:15 AM
Hello Happy S,
We can call a business rule from scheduled jobs by using
fcScriptName=<Business rule name>
Please mark a appropriate response as correct answer if you feel it as helpful.
Reagrds,
Naveen G N