Event in stuck state - 'Ready state'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2018 08:09 AM
Why the event is in READY state, not going to the PROCESSED state ?
Please comment on this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2018 11:43 AM
Hi Pravitha,
Can you please share the code how the event was triggered? This can be due to a wrong value being passed in the queue argument of gs.eventQueue method.
Thanks,
Manik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2018 12:18 AM
Hi Manik,
Thanks for the reply !
Event fires when a scheduled job has been failed.
Table : sys_trigger
I have written the code for the scheduled job :
var check = new GlideRecord ('sys_trigger');
check.addEncodedQuery('sys_created_onBETWEENjavascript:gs.beginningOfYesterday()@javascript:gs.endOfToday()^state=-1');
check.query();
while (check.next())
{
gs.eventQueue('scheduledjob.failed',check);
}
Please check and advise..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2018 12:47 AM
Hello Pravitha,
I tried with your code in a similar way as follows -
Here is the script I am using -
var check = new GlideRecord ('incident');
check.addQuery('short_description', 'CONTAINS', 'Test Incident');
check.query();
while(check.next()) {
gs.eventQueue('testincident.found', check);
}
And the event registration is as follows -
So, when I ran the above code, an event was generated and is in processed state itself -
Can you please check once again? Is the event getting generated but remains in ready state or is not generated at all?
Thanks,
Pratyusha