With CDT, we can use @Version annotation for optimistic locking. Optimistic locking is a concurrency control mechanism in which it ensures that concurrent transactions will not conflict with each other. If there is a chance of conflict during transactions, the transaction having an older version number will be aborted.
Can we achieve a similar thing using Records?
Discussion posts and replies are publicly visible
community.appian.com/.../data-locking-strategies
The link does indeed talk about the basic concept of Optimistic Concurrency and has the generic textbook explanation of how to theoretically solve the problem.
Would be great to see an actual code pattern, template, or code example of how this can actually be performed in practice. i.e. An Interface querying data and passing the concurrency check field into the process model through a Record Action.
Hi. If you scroll to the bottom of the previous article I had sent, it does point you to an AppMarket example with sample SQL scripts and Appian objects, which should cover what you are asking for. The direct link from that article is here.
Yes, for Pessimistic Locking.With Optimistic concurrency being the "generally the recommended mechanism for concurrency control" (which is true across most apps, Appian and other tech too), my comment is specifically for Optimistic concurrency patterns.
For example, having a Record Related Action, and from an Interface passing the Record ID (identifier) and somehow also passing the concurrencyControlField into the process model for use in an optimistic concurrency check.