Any application code table may be used as a data type in your CER rule set.
To create an instance of a code table entry (i.e. to refer to a particular item in the code table), use the Code expression.
<?xml version="1.0" encoding="UTF-8"?>
<RuleSet name="Example_codetableentryDataType"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"http://www.curamsoftware.com/CreoleRulesSchema.xsd">
<Class name="Person">
<Attribute name="gender">
<type>
<!-- The value of this attribute will
be an entry from the "Gender" Cúram
code table. -->
<codetableentry table="Gender"/>
</type>
<derivation>
<specified/>
</derivation>
</Attribute>
<Attribute name="isMale">
<type>
<javaclass name="Boolean"/>
</type>
<derivation>
<!-- Use "Code" to create a codetableentry value
for comparison. -->
<equals>
<reference attribute="gender"/>
<Code table="Gender">
<!-- The code from the code table -->
<String value="MALE"/>
</Code>
</equals>
</derivation>
</Attribute>
</Class>
</RuleSet>