Defining Property Transforms
Property transforms are macros that you can define using the VB.NET programming language to manipulate data from received resource properties.
This may be a CMDB field for a Federated CMDB resource field mapping, or a Call or Request field for an Event Management field mapping, depending on the area of integration in which you are mapping fields. These macros are stored in the database and mapped against resource property to CMDB field mappings. The data is transformed when it is stored or compared against CMDB fields. However, when viewing resources through the resource viewer (on the External Resource Search screen, Linked Resources CMDB screen or the Federated CMDB Admin screen), the resource property values are displayed in their original data type.
Define a Property Transform
A property transform can be defined for the following field types: String, text, float, decimal, integer, date-time, and Boolean number.
You can specify code to:
convert units: for example bytes to kilobytes or megabytes
round off decimals: for example 1.66666 GHz to 1.7 GHz
summarize data: for example, interpreting “Microsoft Windows 10” as just “Windows”.
Select ≡ > Admin > Integration.
In the Explorer pane, under Integration, select Resources.
Select a source in the drop-down list to populate the resource type list.
Double-click a resource type.
In the mapping window, select a mapping and then select Transform. The Transform window lists all existing property transforms. You can add new transforms, and delete or modify existing ones.
Select the Details tab and add the name and, optionally, a description of the property transform.
Select the Implementation tab and define the arguments and the code that will be used to transform the field data.
To add an external field as an argument, click Add in the Arguments section. In the Add Argument window, select the field and click OK. To edit the name of an argument, double-click the argument or select it and click Edit.
To change the data type that identifies how the data from the source should be interpreted, double-click the argument. At Data Type, select another data type, such as: String, Integer, Float, Boolean, or Date/Time.
You cannot edit the arguments once the property transform is saved.
The code should use VB.NET syntax, but should not contain any Function, Class, Sub, Structure, Property, and Imports or public/private/protected member declarations. It should be assumed that the code is the body of a static function with a single parameter called InputValue of the type defined by Data Type and must include a Return statement that returns a value that is the transformed value to be stored against the CMDB Item
At Return Type, select the data type to be returned by the transform.
In the Code area, type the code that will perform the property transform.
To see whether your code works correctly, click Test. A dialog box displays prompting you to specify an input value. Type the input value. The system will convert the value and display a message that the test has been successful. If the code is incorrect, the system will display a message that the transform failed.
To enable the transform to be used for other internal or external fields, select the Binding tab. For the relevant argument, click in the Value column and click to select a field or specify a value.
Click OK to save your changes. ASM Core will compile the code and display a dialog box if the compilation fails, and will not close the Transform window.
Click Cancel to close the window without saving your changes.
Updating a Transform
Select ≡ > Admin > Integration.
In the Explorer pane, under Integration, select Resources.
Select a source in the drop-down list to populate the resource type list.
Double-click a resource type.
In the mapping window, select a mapping and then select Transform. The Transform window lists all existing property transforms.
Select and select the transform you want to edit.
Click Edit and make the necessary changes.
Deleting a Transform
Select ≡ > Admin > Integration.
In the Explorer pane, under Integration, select Resources.
Select a source in the drop-down list to populate the resource type list.
Double-click a resource type.
In the mapping window, select a mapping and then select Transform. The Transform window lists all existing property transforms.
Select the transform you want to delete.
Click Delete.