An Object Rule operates on the primary source object itself rather than field values. Object Rules can have XML attributes but do not have source field arguments. The primary source object is an Object Rule's only argument.
-
HasRelatedObjects: True if the primary source object has related objects in a specified class. This example governs the generation of a DeviceBank in the CIM corresponding to an ArcFM Transformer with multiple TransformerUnits. The operator also supports an atMost attribute. If neither attribute is present, the default is atleast="1".
<optional>
<HasRelatedObjects relatedClass="TRANSFORMERUNIT" atLeast="2" />
</optional>
-
NumberOfRelatedObjects: Returns the number of related objects with a unique value of a specified field. This example finds ServicePoint objects by traversing one or more related SecondaryConnected objects. It returns the number of objects with unique values of ConsumptionType on these ServicePoint objects..
<NumberOfRelatedObjects relatedClass="SecondaryConnected*.ServicePoint" uniqueValuesOf="ConsumptionType" />
-
SourceIs: True if the primary source object belongs to the specified class.
<SourceIs class="BusBar" />
-
SumRelatedValues: Sums the values of fields of related objects. This example finds ServicePoint objects by traversing one or more related SecondaryConnected objects. For ServicePoints with a unique value of ConsumptionType, the rule finds related ServiceAddress objects. From these ServiceAddress objects, the rule finds related CustomerInfo objects, and it sums the value of KW from all CustomerInfo objects it finds. The result is a group of sums, one for each unique value of ConsumptionType.
<SumRelatedValues uniqueValuesOf="SecondaryConnected*.ServicePoint.ConsumptionType" relatedField="ServiceAddress.CustomerInfo.KW" />
-
UniqueValues: Returns the unique values of a specified field on a related object. This example finds ServicePoint objects by traversing one or more related SecondaryConnected objects. It returns the unique values of ConsumptionType on these ServicePoint objects. SecondaryConnected is an aggregate class incorporating secondary underground and overhead conductors.
<UniqueValues name="SecondaryConnected*.ServicePoint.ConsumptionType" />