- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2017 04:43 PM
Hello,
I have set-up a record producer to collect some information and from the record producer I am calling a script include which then calls an event to trigger a script action. My event is firing and everything looks good from there but for some reason I cannot get the script action to fire. I have it marked as active and purely for testing purposes I just have a "gs.info('this is working');" message. But I cannot get it to output. Any ideas?
Thanks for your time!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2017 07:30 PM
Please check the domain of script action if you are working in domain separated instance.
Script Action must be in a global domain in order to run.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2020 05:01 PM
I'm having a similar issue.
Before Business rule triggers on Delete of CI on cmdb_rel_ci table. And successful creates an Event,I have confirmed by checking the Events table.
(function executeRule(current, previous /*null when async*/ ) {
gs.info('Event Created');
gs.eventQueue(name='x_lomo_lmcmdbint.Custom-Applications-App',current, 'This is Param Onezzzzz', 'This is Param Twozzzzz');
})(current, previous);
I have a Action Script Set to trigger (in Global Scope) that runs the code below when this type of event is triggered.
try {
var eventParam1 = event.parm1;
var eventParam2 = event.parm2;
gs.error('Script Action Triggered');
gs.info(eventParam1);
gs.info(eventParam2);
gs.info('Script Action Ended');
} catch (error){
gs.error('Script action failed');
gs.error(error);
}
This does not get logged anywhere, which indicates to me that it is failing to rigger.
Both the Business Rules and Action Script are in the same Scoped Appliction context.
The generated Events, Business Rule, and Action Script are all created and run by the same user, me.
Why am I missing here? Any help would be much appriciated.