Connector policy is hierarchical, meaning that a child event class inherits all policy operations from a parent class. The following code fragment shows the OPR-DSMEVENT class inheriting all connector policy operations defined in the parent OPR-BASE class:
<EventClass name="OPR-BASE") <Classify ...../> <Filter ...../> </EventClass> <EventClass name="OPR-DSMEVENT" extends="OPR-BASE"> <Parse ...../> </EventClass>
In cases where a parent class and child class have similar operations, the parent operations are enacted first, followed by the child operations. For example, if a parent and child include a parse operation, the parent parsing occurs first, followed by the child parsing. You must understand this rule so that the connector policy you write is processed in the intended order. The following example shows this rule:
<EventClass name="OPR-BASE"> <Parse> <Field input="tagA" pattern="^(\w+)-(\w+)$" output="tagA1,tagA2"/> </Parse> </EventClass> <EventClass name="OPR-DSMEVENT" extends="OPR-BASE"> <Parse> <Field input="tagA1" pattern="^(\d\d)(\w+)$" output="tagA1a,tagA1b"/> </Parse> </EventClass>
In this example, assume that tagA="12Buckle-Shoe". The property is parsed by the parent operation, which transforms the property into two properties, tagA1 (12Buckle) and tagA2 (Shoe). Afterwards, the tagA1 value, "12Buckle", is parsed by the child operation into two more separate properties, tagA1a (12) and tagA1b (Buckle).
There are no limits on the levels of inheritance or the number of inheriting children. All connector policy operations support inheritance except for classification.
|
Copyright © 2013 CA.
All rights reserved.
|
|