Document locking is a common step done within ERP software when an account or document is opened. For example, a customer record or an invoice is locked when it is being changed so that another user does not make changes at the same. Like all database applications, EBMS uses locking to ensure data consistency. EBMS employs both optimistic and pessimistic locking strategies.
Optimistic Locking vs. Pessimistic Locking
Optimistic locking assumes that no other user is writing the same data at the same time. This method of document locking is delayed until just prior to saving changes, at which point proposed changes are compared with data originally read and the current state of the database. If another user has modified the same changed data, the second user's changes cannot be saved. EBMS always performs optimistic locking, and it is implemented at the database record level.
Pessimistic locking implements software locks immediately when an account or document is opened with the assumption that the user intends to modify information. The pessimistic lock greatly decreases the likelihood of being unable to save changes since the concurrent modification are limited. EBMS optionally performs pessimistic locking based on an account or the complete document, including detail lines.
Document Lock Messages
A message may appear if someone already has the same account or document open, such as "You have already been editing [Document Name]. If you decide to edit an additional instance, conflicts may prevent one of them from saving." This message gives the user the following options:
-
Open Read-Only: This option allows the 2nd user to view the information without editing, with the confidence that data will not be changed.
-
Notify Me: This option notifies the user when the document is saved by the other EBMS user. Review the following section for more details.
-
Edit Anyway: This option risks the chance of common data being changed by multiple users. Use this option with caution, because it can lead to data errors.
-
Cancel: Come back later to make changes.
This document lock message is designed to help the user determine the risk involved with multiple users editing simultaneously.
EBMS will merge whenever possible and will only give this alternative message if an actual conflict occurs: "You have changed data that has also been changed by another application...Your data will not be saved." This message will list the File, Record, and Field being edited.
Enable Pessimistic Locks
Complete the following steps to enable lock warnings within documents that have a high opportunity for data conflicts.
-
Enable lock warnings by selecting
from the main EBMS menu. -
Select the Enabled option to enable lock warnings. If there is a checkmark in the Enabled column, the selected documents will have document locking enabled. Large documents with extensive data changes or a document with a high chance of conflicts should have this option checked. Click OK to enable.
Notify Me
A user may wish to be notified when a lock is released or when another user has closed the selected document. Complete the following steps to enable EBMS to notify me.
- Click on the Notify Me button to prompt the system to notify you when the document lock is released.
-
The system will give you the following options:
-
Click Yes to open the following document locks monitor:
This dialog can also be opened by selecting from the main EBMS menu. -
Click No to have a message appear within EBMS when the document lock is released. Verify that the Auto Refresh setting Refresh search lists every ___ minutes is enabled within File > System Options > Settings.
-
-
The list will highlight the document lock along with the EBMS User, Computer Name, and Document. Enter a number into the Refresh Interval __ seconds on the right side of the page to refresh the lists on a regular interval. Click the Apply Refresh button to refresh manually.
-
The user will be prompted when the document lock clears and give the user the option to open. The user can select a document lock and click Clear to remove the lock warning. Clearing the lock will allows others to edit the document, but it does increase the likelihood of edit conflicts. The main reason to use this option is if a user has a document open with a pessimistic lock for an extended period. Users should close EBMS when leaving their desk to remove active account and document locks.
Clearing locks is a better option than selecting Edit Anyway from the lock message.
The Clear All option should only be used rarely, if at all.
Review User and Other Monitoring Tools for more information on monitoring document locks.