Concurrency on Records

ShivangiC
Tera Contributor

My requirement is:-

Employee submits an expense record via record producer and his Manager is asked for approval. I want to implement if Manager has opened an Expense Record[on platform UI or from My Tasks in Esc portal ] for approval and the same record or its related line items[another table] is being modified by the Employee at the same time. As soon as Employee updates the record of which approval is opened by the Manager on his screen, a confirm dialog box must appear for the Manager and after confirm dialog box the page must refresh in ServiceNow.

 

Please help me out with this solution

15 REPLIES 15

mohanramesh
Tera Contributor

This is a classic concurrency bottleneck. When you scale this out to multi-agent automated workflows, it gets even worse: LLM reasoning latency causes background agents to trigger silent data overwrites (returning HTTP 200 OK while wiping concurrent updates).

If you're dealing with record state collisions, enforcing optimistic locking via an outbound gateway that throws HTTP 409 Conflicts on version drift completely stops the data loss. Let me know if you want to test a lightweight gateway built for this exact problem!"