Berechnete Attribute werden in der Regelklasse direkt aufgelistet.
<?xml version="1.0" encoding="UTF-8"?> <RuleSet name="Example_RuleClass" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "http://www.curamsoftware.com/CreoleRulesSchema.xsd"> <Class name="Person"> <Initialization> <!-- Initialized attributes each contain a type but no derivation. You should NOT arbitrarily reorder initialized attributes. --> <Attribute name="firstName"> <type> <javaclass name="String"/> </type> </Attribute> <Attribute name="age"> <type> <javaclass name="Number"/> </type> </Attribute> </Initialization> <!-- Each calculated attribute specifies both a type and a derivation. You are free to arbitrarily reorder calculated attributes. --> <Attribute name="isAdult"> <type> <javaclass name="Boolean"/> </type> <derivation> <compare comparison=">="> <reference attribute="age"/> <Number value="18"/> </compare> </derivation> </Attribute> <Attribute name="isSeniorCitizen"> <type> <javaclass name="Boolean"/> </type> <derivation> <compare comparison=">="> <reference attribute="age"/> <Number value="65"/> </compare> </derivation> </Attribute> </Class> </RuleSet>