Codetabellen

Jede Anwendungscodetabelle kann in einem CER-Regelwerk als Datentyp verwendet werden.

Tipp: Die Codetabelle muss nicht zwangsläufig zur Entwicklungszeit vorhanden sein. Falls ein Benutzer mit Administratorberechtigung die Onlineanwendung zum Erstellen einer neuen Codetabelle verwendet, kann diese Codetabelle anschließend in dynamisch definierten CER-Regelwerken als Datentyp verwendet werden.

Um eine Instanz eines Codetabelleneintrags zu erstellen (um also auf einen bestimmten Eintrag in der Codetabelle zu verweisen), verwenden Sie den Ausdruck "code" (sieheCode).

<?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>