Using a data transform, you can specify initial properties for objects of a specific class and also map properties (and their values) of an instance of a class to an instance of a different class.
For example, you can ensure that a special set of risk-related properties is present on all instances of class Data-Loan-Aircraft-SingleEngine. When a page of this class is created, you can instruct the system to apply a data transform, named Aircraft-High-Risk. The system places into the page the risk-related properties defined in the data transform. When the page is later saved into the database as a persistent instance, the properties are present with meaningful values.
Typically, you use the actions within a data transform to update and apply data to clipboard pages. Additionally, there are four activity methods that can optionally use a data transform as a parameter:
The Apply-Model method is deprecated in version 6.2, and replaced by the Apply-DataTransform method. To use the Apply-DataTransform method to achieve the same result of using the Apply-Model method with the OverwriteProperties parameter set to 'false'
, use When actions in the data transform to prevent values from being applied when properties are already present on the target page. For example:
When !@PropertyHasValue(.FirstName) Set .FirstName = "Bob"
In the preceding example, when the FirstName
property has a value, the condition is not satisfied and the Set action is skipped.
Service rules (Rule-Service- classes) and a few other rule types can reference a data transform. The data transform is processed and applied at runtime to a newly created page.
Click Actions > View Java to view the generated Java of a rule. You can use the Java code to debug your application or to examine how rules are implemented.