System Events
Summarize
Summary of System Events
System Events in ServiceNow are special records created when specific conditions occur within the platform. These events enable automated responses by triggering actions such as running scripts, sending notifications, or starting workflows. Business rules monitor system activity and generate event records in the Event [sysevent] table, also called the event queue.
Show less
Key Features
- Event Generation: Business rules use the
GlideSystem.eventQueuemethod to insert event records when certain conditions are met (e.g., when an incident is updated or commented on). - Event Record Structure: Each event contains a unique name, parameters (Parm1 and Parm2) for passing relevant record information, the table to which it applies, and the Sys ID of the affected record.
- Event Processing: Scheduled jobs read the event queue and forward events to handlers that execute corresponding actions such as scripts, notifications, workflows, or inactivity monitors.
- Custom Events: Customers can create custom events if the provided baseline events do not cover specific monitoring or automation needs.
- Monitoring: The System Events and Jobs Dashboard provides visibility into event processing and scheduled job activities.
- Upgrade Considerations: During platform upgrades, event processing can be controlled via system properties:
glide.eventprocessor.alleventsupgradesafe(default false) determines if all events are processed during upgrade.glide.eventprocessor.upgradesafeeventsallows specifying a comma-separated list of events to process during upgrade when the former property is false.
Practical Use for ServiceNow Customers
Understanding system events helps customers automate and streamline ITSM and other processes by reacting to changes in records through predefined or custom events. Monitoring event processing ensures workflows and notifications trigger as expected. Configuring event processing during upgrades helps maintain system stability and performance.
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.