The CreatorCon Call for Content is officially open! Get started here.

Correct way to trigger a Business Rules from Scheduled Script

Happy S
Tera Expert

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 ! 🙂

 

12 REPLIES 12

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..

Riya Verma
Kilo Sage

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

 

 
Please mark the appropriate response as correct answer and helpful, This may help other community users to follow correct solution.
Regards,
Riya Verma

NaveenGN
Tera Expert

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