Skip to content

Locking

Brian Collins edited this page Jul 5, 2014 · 2 revisions

Card

As any user I want to prevent other users changing an order that I'm working on so that my changes aren't lost

This user story is implemented under this issue.

Conversation

Pessimistic locking paradigms (where users are denied access to a record someone else is in the process of editing) are difficult to implement in stateless web-based applications. This type of locking is also probably unnecessary in POPS where it is unlikely that two people will be working on the same purchase order at the same time. Consequently, locking should be implemented using an optimistic locking paradigm which allows multiple users to edit the same record concurrently. If one user then saves the record, the second user will be presented with an error message on trying to save the record.

Initially, this should be implemented by displaying an error message, discarding the changes made by the second user and redisplaying the record with the changes the first user made. Although this will result in the second user's changes being lost, this is likely to be an infrequent occurrence and the amount of data lost will be minimal. Other mechanisms such as merging data could be investigated later if necessary.

Confirmation

Replace this text with descriptions of workflows for testing

Clone this wiki locally