Schedule job event not being processed

pablor
Kilo Expert

I have created a scheduled job to keep the track of priority two incidents that are currently in waiting feedback status and last update was 3 days ago.

But once executed the list of event are not processed and the state always stay as ready. Could somebody explain me what is wrong? The purpose is create a notification. Many thanks in advance

var looking = new GlideRecord('incident');
looking.addQuery('active', true);
looking.addQuery('priority', '2');
looking.addQuery('incident_state', '=', '-10');
looking.addQuery('sys_updated_on', '<', gs.daysAgo(3));
looking.query();     // Issue the query to the database to get relevant records
            while (looking.next()) {
                        gs.eventQueue('incident.p2inactivity',looking,looking.u_owner,looking.number);
                }

Bellow the event log summary:

p2incident.jpg

p22.jpg

p23.png

1 ACCEPTED SOLUTION

pablor
Kilo Expert

Hi,



Is working perfectly fine now. The problem was caused by the event definition.


When I created the new event I set up the Queue field to value '100', which was causing the event to not be grabbed by the event process.


View solution in original post

10 REPLIES 10

kiley
Giga Contributor

try switching what you have for parm1 and parm2. Currently, according to your code snippet, you have this:



gs.eventQueue('incident.p2inactivity',looking,looking.u_owner,looking.number);




and you use "Event parm1 contains recipient". Try switching the checkmark to "Event parm2   contains recipient or switch parm1 and parm2. I am assuming looking.number is the creator's unique ID number, whereas their name, looking.u_owner could have multiple others with the same name. Let me know if that works




Hi Kiley,



Parameters are OK.   I did all kind of test under parameters, switching then and so on, but always the state is ready and not processed.



Thanks again


Are emails working in general? Check if here are any other email events which are still in Ready state from email logs.


Hi Sarita,



Yes, other email events are working as expected.



Regards


pablor
Kilo Expert

Hi,



Is working perfectly fine now. The problem was caused by the event definition.


When I created the new event I set up the Queue field to value '100', which was causing the event to not be grabbed by the event process.