HowTo: Working with Lock Mode in GeneXus Server

Official Content

This document explains the steps needed to start working with GeneXus Server, using the Lock Mode, and the operations that the Developer must know to interact with the rest of the team. 

Step bt step

1) Connecting to a GeneXus Server

A Knowledge Base can be connected to GeneXus Server in two ways.

  1. If the Knowledge Base is already hosted on a GeneXus Server, by using the Create Knowledge Base from GXserver operation. 
  2. In the other hand, is not hosted on a GeneXus Server the Send Knowledge Base to GeneXus Server operation must be performed. When this action is being performed the Developer will be able of choosing to use either the Merge Mode or the Lock Mode. Check the 'Work With Lock Mode' option to enable this mode.

Once your Knowledge Base is connected to a GeneXus Server instance, the Team Development node will be displayed. This node will display all the information regarding the GeneXus Server instance to which the Knowledge Base is connected to.

Note: Notice the Team Development contextual menu adds new options to work with locks: 

Team Development Contextual Menu Lock

2) Locking an object

The Developer must first obtain exclusive write access (lock) to an object to be edited. Obtaining the object's Lock will allow the Developer to make any changes to the object.

Changes will automatically add the corresponding object to the Pending Commit list.

3) Committing changes

Once the Developer's work is ready to be shared with the rest of the team, a Commit to GeneXus Server operation must be executed. 

The commit operation automatically releases the lock over all committed objects allowing other users to Lock and then modify those objects.

On the other hand, Commits made by other users will be blocked until the Lock's owner release it. A locked object cannot be modified in any way, in the GeneXus Server instance, by a user who does not have its Lock. So it cannot be deleted or even renamed, except by the Lock owner.

4) Releasing a lock

If a Developer needs to make changes to an object that is locked by another user the Release Lock or Commit operation must be performed by the Lock's owner.

However, if the other user is not capable of releasing the lock or committing by any means, the Steal Lock operation can be performed.

Considerations

  • If a Developer steals someone else's Lock without telling them, it could potentially cause loss of work. Once a stolen Lock is released, the original Lock's owner is free to check the changes and overwrite them.
  • Prompt Objects

This type of objects is not considered in the Commit or Update operations. When a prompt is saved as 'User prompt' it is marked as inserted in the local Knowledge Base, so from now on it will be considered for Commit and Update in other Knowledge Bases. After the Prompt is committed to GeneXus Server, the Lock operation on this object will be available.

 

See Also



Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.