give me the real time scenarios for eventQueue and eventQueueScheduled ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2019 03:17 AM
give me the real time scenarios for eventQueue and eventQueueScheduled ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2019 05:42 AM
Hi Rajesh
Go trough below link, you will get
real time scenarios for eventQueue and eventQueueScheduled
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2019 09:46 PM
Hi Rajesh
My answer in short words.
With eventQueue, you will write events to the system event log. There is a field indicating, WHEN the event scheduler should process the event EARLIEST.
For eventQueue function, this is always Now.
With the eventQueueScheduled function, you can set a date and time, so that you intend the event to be processed later at your given time.
That may be cool, if you intend to fire the event right now, but you want your processs to happen during the night, for example.
Does that make sense to you?
Let me know if that answered your question and mark my answer as correct and helpful, please.
BR
Dirk

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2019 12:16 AM
*** eventQueue(String name, Object instance, String parm1, String parm2, String queue)
-> Queues an event for the event manager.
Example :
if (current.operation() != 'insert' && current.comments.changes()) {
gs.eventQueue('incident.commented', current, gs.getUserID(), gs.getUserName());
}
*** eventQueueScheduled(String name, Object instance, String parm1, String parm2, Object expiration)
-> Queues an event for the event manager at a specified date and time.
Parameter(s):
Name Type Description
name String Name of the event being queued.
instance Object A GlideRecord object, such as "current".
parm1 String (Optional) Saved with the instance if specified.
parm2 String (Optional) Saved with the instance if specified.
expiration Object Date and time to process this event.
Regards,
Sanket