ServiceNow Learning 76: Setting up a priority to a Flow Designer in ServiceNow.

Shamma Negi
Kilo Sage
Kilo Sage

Hi Team,

 

Here I will explain how and what is the process of associating priority to a flow.

 

You can only set a flow priority for flows that run in the background. Background flows run from the next available worker thread. By default, Flow Designer can use up to half of the available worker threads to run background flows. If there’s no available worker thread to run a flow, the flow is queued until there’s an available worker thread to run it.

 

You can set background flows to have one of these priority values.
  • High
  • Medium
  • Low
By default, background flows run with medium priority.
Note: Flows that run in the foreground run in the current thread and don’t use flow priority to determine run order.
 
What Different does it make after defining the priority?
 

1. Setting a flow priority determines the order that worker threads pick flows from the queue. Worker threads run several higher priority flows before running a lower priority flow.

 

2. This priority scheme ensures that some lower priority flows get run even when there are higher priority flows in the queue. When there’s a large work queue to run, most low-priority flows must wait until the high priority flows are run. After the high priority flows have run, the worker threads can run lower priority flows.

 

3. Should a flow remain in the queue for more than five minutes, the system delegates the flow to another node to run. When a flow is delegated to another node, it loses its priority value. A delegated node pulls flows from the event queue in chronological order. The delegated node runs the oldest flows first and then runs the newest flows.
 
Generally, delegating flows to run from another node only happens when all the available worker threads on a node are busy.
 
Note: Worker threads run all system events, not just flow events.
 
Hope it helps you.
I hope this article helpful. Please mark it as helpful and bookmark if you like it.
 
Regards,
Shamma
Regards,Shamma Negi
0 REPLIES 0