Para conjuntos de reglas más complejos, RuleDoc puede ayudarle a:
A continuación se proporciona el XML para un conjunto de reglas más complejo:
<?xml version="1.0" encoding="UTF-8"?> <RuleSet name="RetirementYearRuleSet" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "http://www.curamsoftware.com/CreoleRulesSchema.xsd"> <Class name="RetirementYear"> <Attribute name="yearOfBirth"> <type> <javaclass name="Number"/> </type> <derivation> <Number value="1970"/> </derivation> </Attribute> <Attribute name="ageAtRetirement"> <type> <javaclass name="Number"/> </type> <derivation> <Number value="65"/> </derivation> </Attribute> <Attribute name="yearOfRetirement"> <type> <javaclass name="Number"/> </type> <derivation> <arithmetic operation="+"> <reference attribute="yearOfBirth"/> <reference attribute="ageAtRetirement"/> </arithmetic> </derivation> </Attribute> </Class> </RuleSet>
A continuación se muestra el RuleDoc generado para el conjunto de reglas anterior:
Este ejemplo muestra: