Usage of gs.sleep() on Workflow Activities

Use a Workflow Timer activity instead of gs.sleep. This will ensure the workflow will release the thread, freeing up system resources. 
Impact area

Performance

Severity

High

Affected element

Workflow Activities

Rule ID

SN-0409

Impact

 The gs.sleep() function should not be used on any workflow activities because it does not release session, the workflow will hold on to the thread and the the instance will run out of worker threads for other jobs.

Remediation

Use a Workflow Timer activity instead of gs.sleep. This will ensure the workflow will release the thread, freeing up system resources.

Time to fix

10 min

What's here


Related content

ServiceNow rules

Workflow rules




Last modified on Sep 22, 2021