XML Reference

Here is an example rule set with DisplaySubscreen rule attributes:

<?xml version="1.0" encoding="UTF-8"?>
<RuleSet name="Example_DisplaySubscreen"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation=
"http://www.curamsoftware.com/CreoleRulesSchema.xsd">


  <Class name="MyProductSummary" extends="DefaultCase"
    extendsRuleSet="DefaultProductDecisionDetailsRuleSet">

    <!-- Allow the screen to display a list of members for the
         case. -->
    <Attribute name="householdMembers">
      <Annotations>
        <Display/>
      </Annotations>
      <type>
        <javaclass name="List">
          <ruleclass name="HouseholdMember"/>
        </javaclass>
      </type>
      <derivation>
        <specified/>
      </derivation>
    </Attribute>

    <!-- Allow the screen to drill down into more details for each
         household member -->
    <Attribute name="householdMemberSubscreens">
      <Annotations>
        <DisplaySubscreen/>
      </Annotations>
      <type>
        <javaclass name="List">
          <ruleclass name="HouseholdMemberSubscreen"/>
        </javaclass>
      </type>
      <derivation>
        <dynamiclist>
          <list>
            <reference attribute="householdMembers"/>
          </list>
          <!-- Create a wrapper HouseholdMemberSubscreen for each 
               HouseholdMember -->
          <listitemexpression>
            <create ruleclass="HouseholdMemberSubscreen">
              <specify attribute="householdMember">
                <current/>
              </specify>
            </create>
          </listitemexpression>
        </dynamiclist>

      </derivation>
    </Attribute>


  </Class>

  <Class name="HouseholdMember">
    <Attribute name="concernRoleID">
      <type>
        <javaclass name="Number"/>
      </type>
      <derivation>
        <specified/>
      </derivation>
    </Attribute>

    <Attribute name="earnedIncome">
      <type>
        <javaclass name="Number"/>
      </type>
      <derivation>
        <specified/>
      </derivation>
    </Attribute>

    <Attribute name="unearnedIncome">
      <type>
        <javaclass name="Number"/>
      </type>
      <derivation>
        <specified/>
      </derivation>
    </Attribute>


  </Class>

  <Class name="HouseholdMemberSubscreen"
 extends="AbstractCaseSubscreenDisplay"
    extendsRuleSet="DefaultProductDecisionDetailsRuleSet">

    <!-- The wrapped household member -->
    <Attribute name="householdMember">
      <type>
        <ruleclass name="HouseholdMember"/>
      </type>
      <derivation>
        <specified/>
      </derivation>
    </Attribute>

    <!-- identifier of the business object -->
    <Attribute name="businessObjectID">
      <type>
        <javaclass name="Number"/>
      </type>
      <derivation>
        <reference attribute="concernRoleID">
          <reference attribute="householdMember"/>
        </reference>
      </derivation>
    </Attribute>

    <!-- Data to display on the subscreen -->

    <Attribute name="totalIncome">
      <Annotations>
        <Display/>
      </Annotations>
      <type>
        <javaclass name="Number"/>
      </type>
      <derivation>
        <arithmetic operation="+">
          <reference attribute="earnedIncome">
            <reference attribute="householdMember"/>
          </reference>
          <reference attribute="unearnedIncome">
            <reference attribute="householdMember"/>
          </reference>
        </arithmetic>
      </derivation>
    </Attribute>

  </Class>
</RuleSet>