Servicenow-workflow-api [DIRECT]

The is a collection of server-side classes and methods used to programmatically interact with workflows on the ServiceNow platform. While modern automation often utilizes Flow Designer , the legacy Workflow API remains essential for managing complex, multi-state processes in older applications. Core Components

The API primarily revolves around three key server-side classes:

: Used to access definitions and configurations of specific workflows. servicenow-workflow-api

: The main class used to initiate and manage workflow instances.

: Always check for existing Workflow Contexts before starting a new one to avoid duplicate executions on the same record. The is a collection of server-side classes and

: A critical GlideRecord method that determines if database actions should trigger associated business rules and workflows. Common Use Cases

: Terminates all active workflow contexts associated with a specific record. : The main class used to initiate and

: Triggers a specific workflow. workflowId : The sys_id of the workflow definition. current : The GlideRecord the workflow will run against.