- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2022 08:46 PM
We have a business rule which is scheduling one event in the event queue. The script action will run once that event is processed. And we have an event queue scheduled where we are processing the event after half an hour by using delay method in our business rule. The event is getting processed in the event logs but the script action is unable to call the outbound rest message.
Can you please help us why this is not working?
PS: Manual trigger of rest message is working fine
Solved! Go to Solution.
- Labels:
-
Integrations
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2022 01:57 AM
If your instance is domain separated then Script action should be in global domain.
So just add this line in your script action
gs.info('My script action triggered');
If this log doesn't come then the issue is not with script
Other solution
1) make your BR as Async update and add the entire REST Message code inside BR
That should work fine
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2022 08:48 PM
Manual trigger of rest message is working fine

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2022 09:05 PM
Hi,
Are you getting the info message log added on 1st line?
try adding try-catch it will help you to identify run time exceptions.
try{
//your script
}catch(e){
gs.info('exception in script action :'+e);
}
Thanks,
Anil Lande
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2022 09:37 PM
no i am not getting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2022 09:05 PM
Hi,
so did you add gs.info() in your above script.
I could see you are using executeAysnc() so it would wait for response
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader