Business application data undergo substantial change as time goes. An object is created, then it can be changed many times, and it can be even deleted at some time. Meanwhile, the object can be a member of various business processes, the object's data can be used for creating reports, or they can be analyzed in special systems. In connection with those processes, it might be necessary to control the state of the analyzed object in determined point in time. The data version control module (also called Versioning) is intended exactly for this purpose.
The versioning means the ability to associate the current business object state with the point in time, and the ability to access the object state (i.e. version) for the specified point in time.
Version control systems such as SVN, TFS, etc. meet similar tasks.
The support of versioning of business objects is based on the following concepts:
- The support of versions is only available for the business objects implemented using the Domain Components.
- The Domain Component of the business object is used for storing versions of the business object.
- VersionId property exposes for the business objects with the version control. The property stores the same value for all versions of one business object. It is necessary to use VersionId property and calculated properties to refer to business objects with version control.
Following operations on object versions are available:
- Save a new version of the object (Save as new version).
- Get the last version of the business object (Get Latest Version).
- Get the specific version of the business object for the specified date and time.
- View the object change history (Show history).
- Set the current date for operations with versions.
The global variable Current Date is used extensively during the operations with data versions. This variable specifying the point in time, in relation to which the object versions are calculated. This value is used in the View. The Current Date value is also used to implement of calculated properties of business objects, which must get the current object version.
To see the Data Versioning in action, refer to the Version|Version Main Object section in the Feature Center demo installed with Xafari. The image below shows a list of objects. Every listed object exposes two reference properties to the object with version control.
Every listed object expose two reference properties to the object with version control.
- RefCurrentVersion – refers to the current version.
- RefSpecificVersion – refers to specific version of the document.
You can set Current Date value using an special Action in the toolbar.
The versioning feature also covers all aggregated entities. In other words, when a new version of an object is created, new versions of the objects aggregated with that object are created automatically.
The next topics will provide you with an extensive knowledge of the Data Versioning.