When you edit items in the product catalog, it is possible for another administrator to edit items at the same time. To prevent multiple administrators from simultaneously modifying the same item and overwriting each other’s changes, the catalog repository supports a version-control system.

Note: The version-control system described here is different from the versioning feature that’s part ATG Content Administration and ATG Merchandising. For information on that versioning feature, see the ATG Content Administration Programming Guide.

The version-control system detects when changes are submitted that are not synchronized with the current values in the database. The catalog repository maintains a version property for each item. The value of that property is an Integer that ATG Commerce increments automatically each time the item is modified.

For example, suppose you create a new item. The version property is 1.

The next day, you open this item in the ATG Control Center and begin modifying its properties. The changes you make exist only in memory until you save the item. While you are editing the item, administrator Bob also opens the item. Because you have not saved your changes yet, the version Bob opens is still version 1.

You finish making your changes, and save the item. ATG Commerce sets the value of the version property to 2.

When Bob tries to save his changes, ATG Commerce detects that the current version in the database is not the same version that Bob has been modifying, and rejects his changes. Version 2 (which includes your changes) is then loaded into Bob’s editor.

Note that this system does not guarantee that the first person to open the item will be able to save his or her changes. If Bob had saved his changes before you tried to, your changes would have been rejected.

loading table of contents...