Event class transform
When a generated event occurs, it has an event class assigned to it. This causes the event class mapping step to be skipped. The only way to affect the fields of one of these events is through the configuration properties and transform of the event class.
To access the transform for an event class:
- Navigate to the event class from Events > Event Classes.
- From the drop-down list, select Transforms.
- Enter information into the dialog box (as Python code), and then click the Save button in the upper-right corner. As you develop your transform, you can revert back to the last saved state by clicking the Revert this Transform button.
During transform execution, certain Python objects are available for evaluation and alteration.
|evt||The event, itself.|
|device||If the event matches a device that exists in the system, a device object is provided.|
|component||If the event matches a component that exists in the system, a component object is provided.|
The following example shows how you can validate that a device object exists before using it to drop events from a particular location.
if device and "Hawaii" in device.getLocationName(): evt._action = "drop"
Transforms on an event class are executed after any transforms on that classes parent class. Transforms on event class mappings are executed after any transforms in the target event class path.
More information on event transforms can be viewed here: