Check Status of Locks Overview |
PROIV Aurora Help |
Soft Locking is a record-based locking system used to restrict access to screens and data to ensure that only one Operator can access the area at a time. It provides an alternative to keeping records open in Change mode and using PROIV’s record-locking logic to restrict access.
The Global Function @AU_AddSoftLock adds Soft Lock records.
It has the following keys:
Type - 2 characters
Reference ID - 40 characters
Description - 40 characters
The values are determined by the developer.
For example, to lock an invoice you can call the @AU_AddSoftLock function and set the Type field to ‘IN’ and set the invoice number to the Reference ID. A lock can also be added at the start of the invoice processing run so that only one instance can be run at the same time.
You can use the $LOCK_ADDED parameter to determine if the item is locked. If a ‘Y’ value is returned then the item can be locked. If it returns the value of ‘N’, then another Operator has locked the item and access to it is blocked. You can code a user message to warn the user about the lock or you can use the supplied @AU_DisplaySoftLock Global Function instead. This requires the Type and Reference ID keys and a full description of the lock, e.g. ‘The following item has a record locked’.
Following snapshot displays an example lock message:
You can use the $RETRY_ALLOWED flag to determine if the user can retry accessing the item. If the flag is set to ‘Y’, the message box displays the Abort and Retry s, otherwise it displays an OK. When a is clicked, the message box returns either ‘A’,’R’ or ‘O’ in the $LOCK_REPLY parameter. There is no automatic Abort/Retry functionality, you must code your function or application to react to the response as required.
The @AU_RemoveSoftLock Global function removes the lock record for the Type and Reference ID supplied in its parameters. If Soft Locking is used, then @AU_RemoveSoftLock should be called after an Operator has finished editing the locked record.
Soft Locks can be viewed and removed on the Check Status of Locks screen. When sessions are terminated or a lock left behind, you can remove the lock and release the screen for others to use. Soft Locks are not automatically removed. It is the developer’s responsibility to add code to their functions to manage the locks. If functions are coded to remove locks when exited or when the lock is no longer required, then the lock record is deleted and does not appear on the Check Status of Locks screen.
Section Links
Topic ID: 810090