Data Versioning | Xafari Framework

Data Versioning

The Xafari platform provides a possibility to save data versions - Data Versioning functionality. Data of a system always exists in time. An object can be created, modified several times, and, finally, deleted. Such an object can participate in different business processes, its data can be taken into consideration for reports generation or can be subject to analysis in specialized systems. Due to this, they may need to consider the state of the object being analyzed at a particular time.

The Versioning module is designed to deliver this business object property. Business object versioning means its ability to bind its state to time spans and provision of a possibility to get access to the object's state (version) at a specified time span.

A similar task is usually solved by such version control systems as SVN, TFS, etc.

Business application Data Versioning is implemented considering the following concepts:

  • Versioning can be used only business objects implemented by means of the Domain Components technology only.
  • The Domain Components of the business object is used to store the versions of the business object.
  • For versioned business objects the filed Verision ID exists. It has the same value for all versions of a business object.

To refer to versioned business objects it's necessary to use Verision ID and calculated fields.

Several operations are provided to work with business objects' versions:

  • Save as a new version.
  • Get the latest version.
  • Get a specified version for the specified date and time.
  • Show history.
  • Set up the current date to work with versions.

While working with versioned data the notion Current date is used actively. This is a global variable containing a time cutoff referring to what the object's version is being calculated. This value is used in visual forms, for calculated properties implementation in a business object to return the current version of the object.