Glide events relative to workflows
Summarize
Summarized using AI
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.
Summary of Glide events relative to workflows
In ServiceNow workflows, several Glide events are integral for triggering and advancing workflows based on changes to GlideRecord instances. These events are managed internally by the Glide engine and the workflow engine to ensure workflows respond appropriately to data operations such as insert, update, delete, and query on records.
Show less
Key Features
- Insert Event: Triggered when a GlideRecord is inserted, causing the script and workflow engines to wake up. This event starts workflows that are associated with the new record either by direct reference or by conditions on the record's table.
- Update Event: Triggered on updating a GlideRecord, causing workflows related to the record to advance through their next transitions by checking the workflow context.
- Delete Event: Triggered on deleting a GlideRecord, which prompts running workflows associated with that record to advance through transitions based on the workflow context.
- Query Event: Triggered on querying the Glide database for records, allowing workflows tied to the queried records to advance through transitions.
Key Outcomes
- These events enable automatic starting and progression of workflows in response to typical database operations on records, ensuring workflows remain in sync with record lifecycle changes.
- While the events themselves have no direct customer-facing configuration or manipulation, understanding their role helps in grasping how workflows internally respond to data changes.
- Workflows can also be started manually through scripting if needed, supplementing the automatic triggering via Glide events.
Workflow uses several Glide events.
| Event | Description | Purpose | To Use | Source | Thread | Listeners |
|---|---|---|---|---|---|---|
| Insert | Global event set upon the insert of a GlideRecord that causes the script engine, and through that the workflow engine, to wake up. | Starts workflows that are associated with the current GlideRecord either by reference, as in request items and SLA timers, or by conditions associated with the GlideRecord's table. | There is no explicit customer-facing use for this in a workflow. It is part of the Glide engine, and with this event, the only thing workflows can do is start. Workflows can also be started manually using a script. | Workflow Engine, RunEngine | Current thread, current mutex | User action of insert |
| Update | Global event set upon the update of a GlideRecord that causes the script engine, and through that the workflow engine, to wake up. | Looks to the Workflow Context [wf_context] table to find running workflows that are associated with the current GlideRecord by document ID. | There is no explicit customer-facing use for this in a workflow. It is part of the Glide engine, and with this event, the only thing workflows can do is advance through the next set of transitions. | Workflow Engine, RunEngine | Current thread, current mutex | User action of update of a GlideRecord |
| Delete | Global event set upon the delete of a GlideRecord that causes the script engine, and through that the workflow engine, to wake up. | Looks to the Workflow Context [wf_context] table to find running workflows that are associated with the current GlideRecord by document ID. | There is no explicit customer-facing use for this in a workflow. It is part of the Glide engine, and with this event, the only thing workflows can do is advance through the next set of transitions. | Workflow Engine, RunEngine | Current thread, current mutex | User action of delete of a GlideRecord |
| Query | Global event set upon the query of the Glide database that causes the script engine, and through that the workflow engine, to wake up. | Looks to the Workflow Context [wf_context] table to find running workflows that are associated with the current GlideRecord by document ID. | There is no explicit customer-facing use for this in a workflow. It is part of the Glide engine, and with this event, the only thing workflows can do is advance through the next set of transitions. | Workflow Engine, RunEngine | Current thread, current mutex | User action of query of a GlideRecord |