WorkFlows
Mermaid Flow →
Create diagrams visually!
-
Default Flows →
Explore the Default Flows.
-
ServiceNow Flows →
Explore the ServiceNow Flows.
-
Standard Flows →
Explore the Standard Flows.
Mermaid Syntax
Concept Order of Operations
ServiceNow script execution flow and engine order
sequenceDiagram
participant uxux as User Interactions
participant csup as UI Policy
participant cscs as Client Script
participant ssss as Server Side
participant eeee as Engines
participant dbdb as Database
uxux->>ssss: Form Request
ssss->>dbdb: Query Business Rules
dbdb->>ssss: Display Business Rules
ssss->>cscs: OnLoad Client Scripts
cscs->>csup: OnLoad UI Policies
csup->>uxux: Form loaded
loop Every Change
uxux->>ssss: ref_qual_element field changes
ssss->>cscs: OnChange Client Scripts
cscs->>csup: OnChange UI Policies
csup->>uxux: Form Updated
end
uxux->>csup: Form Submit(client)
csup->>cscs: OnSubmit Client Scripts
cscs->>ssss: Form Submit(server)
ssss->>eeee: Before Business Rules <1000
eeee-->ssss: Approval engine
eeee-->ssss: Assignment rules engine
eeee-->ssss: Data policy engine
eeee-->ssss: Escalation engine
eeee-->ssss: Field normalization engine
eeee-->ssss: Role engine
eeee-->ssss: Execution plan engine
eeee-->ssss: Update version engine
eeee-->ssss: Workflow engine (for default workflows)
eeee->>ssss: Before Business Rules >=1000
ssss->>dbdb: Database Update
dbdb->>ssss: After Business Rules <1000
ssss-->eeee: Label engine
ssss-->eeee: Listener engine
ssss-->eeee: Table notifications engine
Note right of eeee: This creates sysevents that process later
ssss-->eeee: Role engine
ssss-->eeee: Text indexing engine
ssss-->eeee: Update sync engine
ssss-->eeee: Data lookup engine inserts or updates
ssss-->eeee: Workflow engine (for deferred workflows)
ssss-->eeee: Trigger engine (for all Flow Designer flows)
eeee->>ssss: After Business Rules >=1000
ssss->>dbdb: Query Business Rules
ssss-->dbdb: Async Business Rules
Note right of eeee: This creates sys_triggers that process later
dbdb->>ssss: Display Business Rules
ssss->>uxux: Return UI
Note over uxux,dbdb: Thanks to http://www.snc-blog.com/2017/02/02/script-execution-flow/