This document explains the steps needed to start working with GeneXus Server, using the Lock Mode, and the operations that you must know to interact with the rest of the team.
1) Connecting to a GeneXus Server
A Knowledge Base can be connected to GeneXus Server in two ways.
- If the Knowledge Base is already hosted on a GeneXus Server, by using the Create Knowledge Base from GXserver operation.
- On 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 you 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:
2) Locking an object
You must first obtain exclusive write access (lock) to an object to be edited. Obtaining the object's Lock will allow you to make any changes to the object.
Changes will automatically add the corresponding object to the Pending Commit list.
3) Committing changes
Once your 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 releases them. 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 you need 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.
- If you steal 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 object 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.