Using Locks for Change Control
Combining ZOMImport and ZOMExport with keywording and object locking can give you a great deal of control over the management of the application as a whole. Let’s assume that the master is to receive Steve’s work, but needs to protect the application from any changes that Steve has made outside his defined task of user interface design. In the master environment, the following example unlocks all objects, then locks all objects except forms, displays and windows before importing objects from Steve.
ZOMSet * ;p l!
ZOMSet * -t Form,Disp,Win ;p l
ZOMImport
Usually a developer is not confined to specific types of objects, but rather to subsets of the application. If Steve were given the job to maintain the Inventory system, for example, we could lock everything except the Inventory system prior to import:
ZOMSet * ;p l!
ZOMSet * -k Inventory_System ;p l
ZOMImport
If you have the potential for conflicting updates from different developers, you should take steps to control or prevent conflict. One of the most straightforward methods is to keyword the objects when exporting from a development environment such that the keyword indicates the environment they were exported from, as shown in the following example:
ZOMExport +k $new,$changed ;k Steve_Env
This keyword is retained with the exported object descriptions, so when the objects are imported into the master, they retain this keyword.
As each developer’s work is imported, all previously imported work is locked as well by executing a lock against their keyword. Thus, when importing Carol’s work, execute
ZOMSet * ;p l!
ZOMSet * -t Ent,Rel,Role +k Steve_Env ;p l
These commands start by unlocking all objects. Then a lock is placed on all objects except for EntitySets, relationships, and roles but including objects keyworded with “Steve_Env”.