The rule checks for initialization of the data lock. If the creation of a lock is found, the call of the "Lock()" method is checked, and the call must be in a try block.
DataLock = new DataLock;
DataLockItem = DataLock.Add("Document.Test");
DataLockItem.Mode = DataLockMode.Exclusive;
DataLock.Lock();
BeginTransaction();
Try
DataLock = new DataLock;
DataLockItem = DataLock.Add("Document.Test");
DataLockItem.Mode = DataLockMode.Exclusive;
DataLock.Lock();
CommitTransaction();
Except
RollbackTransaction();
Raise;
EndTry;