Execution order between After Business Rule with order 1000 and a Flow not expected!

trangdan106
Tera Contributor

Hello all,

I noticed in the docs that the flow should execute before the after business rule of orther >1000: https://www.servicenow.com/docs/r/de-DE/api-reference/scripts/r_ExecutionOrderScriptsAndEngines.html

However, I have a scenario where I have a flow that create a case and a business rule that check if the case existed then it will send an email, the business rule is after at order 1000, the business rule cannot capture the related case.

I am expecting it to capture the flow created case as per the docs.

3 REPLIES 3

Ankur Bawiskar
Tera Patron

@trangdan106 

Workaround

-> make the BR async or use an event/notification that runs after the case is created, so you are not racing the flow

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

I'm more interested in the reason behind why it doesn't work as the docs mentioned.

Race condition? Or something else? And would this happen always? From my experience, it happens all the time.

@trangdan106 

I believe it's race condition.

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader