Consultor Eletrônico



Kbase P98636: How does the version tracking in the Dataset Import tool work ?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   27/09/2005
Status: Unverified

GOAL:

How does the version tracking in the Dataset Import tool work ?

FACT(s) (Environment):

Dynamics

FIX:

Version tracking is handled in the repository table gst_record_version.
The relevant fields are version_number_seq, import_version_number_seq and last_version_number_seq fields:

version_number_seq is the current version number of the parent record in this repository. It is updated whenever a change is made to the parent record, or when the user imports an object and chooses the "Set modified status" flag.

import_version_number_seq is the last version number seq that was set in this repository by either the load of a dataset or the reset of the modified status.

Note the following rule: If version_number_seq is not equal to import_version_number_seq, the parent record is considered to have changed.

last_version_number_seq is the last version number that this repository assigned in a change made to this parent record. When the user makes a change to a record in this repository, the last_version_number_seq is incremented by one and assigned to the version_number_seq field. This is the ONLY field of the three that is guaranteed to contain the site number in the mantissa and then only if it is greater than zero. Also, the last_version_number_seq is never deployed. It lives in the current repository only.

During the import of a dataset, the import_version_number_seq field in the database is set to the absolute value of the version_number_seq field in the dataset and the databases' version_number_seq field is set to match the one from the dataset.
If the user chose to set the data modified status, the version_number_seq is then multiplied by -1 so that it is not equal to the import_version_number_seq. Because the two will then not be equal, the framework will treat them as modified.

The last_version_number_seq field is only modified when a user makes a change while using the current repository. In that situation, the value of the field is incremented by 1 and the new value is assigned to the version_number_seq field. Again, because the version_number_seq field now does not match the import_version_number_seq field, the data is treated as modified.