System Events
Summarize
Summary of System Events
System Events in ServiceNow are records used to log specific conditions and trigger actions in response. Business rules monitor these conditions and generate event records in the Event [sysevent] table (event log/queue). These events can be created based on various actions taken on incident records, such as adding comments or making updates.
Show less
Key Features
- Event Generation: Based on business rules, events are triggered by conditions related to records, such as incident.commented or incident.updated.
- Event Queue: The GlideSystem eventQueue method is used to insert events into the event log, which includes fields like event name, parameters, and instance Sys ID.
- Scheduled Jobs: Jobs periodically read the event queue to process events, which can include running scripts, sending notifications, and triggering workflows.
- Custom Events: Users can create custom events to monitor specific changes if the default events do not meet their needs.
Key Outcomes
Utilizing System Events allows ServiceNow customers to effectively monitor application activity, automate responses to specific conditions, and customize event handling based on business needs. Additionally, customers can manage event processing during platform upgrades by configuring properties to control which events are processed, ensuring that critical events are not missed. For detailed developer training, resources are available on the ServiceNow Developer Site.
Events are special records that the system uses to log when certain conditions occur and to take some kind of action in response to the conditions.
The system uses business rules to monitor for system conditions and to generate event records in the Event [sysevent] table, which is also known as the event log or event queue.
Event-generating business rules typically use this script logic:
If [some condition is true for the current record], then [add a specific event to the queue].
- If a user adds a comment to an incident record, add an incident.commented event.
- If a user adds an incident record, add an incident.inserted event.
- If a user updates an incident record, add an incident.updated event.
| Field | Description |
|---|---|
| Name | Unique name of event. Baseline event names include the record affected and the triggering action, such as incident.commented. |
| Parm1 | Event-specific parameter the system uses to pass record information to other parts of the system, such as a record Sys ID or a field value. |
| Parm2 | Event-specific parameter the system uses to pass record information to other parts of the system, such as a record Sys ID or a field value. |
| Table | Table to which the event applies. This is the same table on which the business rule ran. |
| Instance | Sys ID of the record to which this event applies. |
- Run a script action
- Send a notification
- Trigger a workflow activity
- Trigger an inactivity monitor
By default, the system provides events covering a broad view of application activity. If existing events do not meet your needs, you can create your own events to watch for specific changes to records.
For developer training, see Scheduled Script Executions and Events Objectives on the ServiceNow® Developer Site.
Use the System Events and Jobs Dashboard to monitor the system event processing system and the scheduled jobs processing system.
Event processing during platform upgrade
Determine which events are to be processed during a platform upgrade by configuring the following properties:
- glide.event_processor.all_events_upgrade_safe: Set to true to process all events during platform upgrade. Default = false.
- glide.event_processor.upgrade_safe_events: Configure a
comma-separated list of event names to indicate that only specified events are
processed. Default = <empty>.
This property is relevant only when glide.event_processor.all_events_upgrade_safe = false.