Contact TLCC

Locking Design Elements Click here to see all the Developer/Admin Tips

Date tip published:08/11/2003
Description:Release 6 now supports the locking of design elements. This feature can be used in team development environments to avoid conflicts when more than one developer is working on a application.


To learn more about locking design elements use the following links:

Notes Domino 6 Application Development Update
Notes Domino 6 Application Development 1



Locking a Design Element

Prior to Notes 6 developers had to be very careful when working on the same application. Suppose a developer (Tom) started to edit a form and before Tom saved the form Amy started to edit the same form. Tom goes ahead and saves the form he was working on. When Amy saved the form she was working on she would overwrite the changes that Tom had made.

Release 6 supports the locking of design elements. This feature can be used in team development environments to avoid conflicts. Now when a developer starts to edit a form it is locked. Another developer can not edit this form until the first developer saves their changes. This design element locking will even work across replicas of a database on different servers.

To use design element locking follow the instructions below to setup the database.


Setup Requirements for Design Element Locking

The setup requirements to enable design element locking for a database are:

    • The property 'Allow design locking' is set for the database.
    • The master lock server is set for the database.



Procedure: Setting the Allow Design Locking Property

Follow these steps to set the 'Allow design locking' property for a database:

  1. Open the database and select File | Database | Properties... from the menu.
  2. On the Design tab in the Database properties dialog, check the 'Allow design locking' property.



Procedure: Setting the Master Lock Server for a Database

Follow these steps to set the master lock server for a database:

  1. Open the database and select File | Database | Access Control... from the menu.
  2. In the Access Control List dialog, click on the [Advanced] tab.
  3. In the 'Administration Server (Master Lock Server)' section, choose the "Server" radio button and select the master lock server from the server list.

  4. Click the [OK] button to save the change.




Automatic Design Element Locking and Unlocking

When design locking is enabled for a database, a design elements is automatically locked when opened by a developer. The following message is displayed in the status bar:



If another developer opens a design element which is locked, the following message is displayed in a dialog window:


When the developer who locked the design element completes their edits and closes the element, the following message is displayed in the status bar:





Manually Locking and Unlocking Design Elements

A developer can also place a manual long-term lock on a design element.


Procedure: Manually Locking a Design Element

Follow these steps to manually lock a design element:

  1. In Designer, select the element to lock in its design list.
  2. Choose Design | Lock Design Element from the menu. A lock icon ( ) is added and a status bar message indicate that the design element is successfully locked.



    However, if the setup requirements are not complete for the database, the following message is displayed when attempting to lock a design element:





Procedure: Manually Unlocking a Design Element

The same Notes user id must be used to remove a design element lock. One exception is that a developer with Manager access to the database can remove another developer's lock. Follow these steps to manually unlock a design element:

  1. In Designer, select the element to unlock in its design list.

    This icon indicates elements that are locked with the current Notes user id.
    This icon indicate elements that have been locked with another Notes user id.
  2. Choose Design | Unlock Design Element from the menu. The lock icon ( or ) is removed and a status bar message indicates that the design element is successfully unlocked.



    However, unlocking fails and the following message is displayed when the design element is locked with another Notes user id and you do not have Manager access to the database.





Feature
Provisional Locks for Mobile Developers

A provisional lock is applied when a mobile developer locks a design element. A mobile developer is a developer with no connection to the master lock server for the database. The provisional lock prohibits other developers from editing the same design element in the same replica. However, since the design element could not be locked in the master lock database on the master lock server, a replication conflict can occur if another developer changes the same design element in another replica copy of the database. The following message is displayed when a mobile developer attempts to lock a design element: