编写分类规则集

所有分类规则集都将需要使用分类接口,以便可在 UA 内执行这些规则集。下面对该接口进行了详细描述:

<?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright 2010-2011 Curam Software Ltd.
  All rights reserved.

  This software is the confidential and proprietary
  information of Curam Software, Ltd. ("Confidential
  Information").  You shall not disclose such Confidential
  Information and shall use it only in accordance with
  the terms of the license agreement you entered into
  with Curam Software.
-->
<RuleSet
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation=
   "http://www.curamsoftware.com/CreoleRulesSchema.xsd"
  name="TriageInterfaceRuleSet">

  <!-- This class must be extended by all rule sets invoked by
  the Citizen Portal screening results processing. -->
  <Class name="AbstractTriageResult" abstract="true">

    <Attribute name="alertMessage">
      <type>
        <javaclass name="List">
          <ruleclass name="AbstractAlertMessage"/>
        </javaclass>
      </type>
      <derivation>
        <abstract/>
      </derivation>
    </Attribute>

    <Attribute name="services">
      <type>
        <javaclass name="List">
          <ruleclass name="AbstractService"/>
        </javaclass>
      </type>
      <derivation>
        <abstract/>
      </derivation>
    </Attribute>

    <Attribute name="programs">
      <type>
        <javaclass name="List">
          <ruleclass name="AbstractProgram"/>
        </javaclass>
      </type>
      <derivation>
        <abstract/>
      </derivation>
    </Attribute>

    <Attribute name="screenings">
      <type>
        <javaclass name="List">
          <ruleclass name="AbstractScreening"/>
        </javaclass>
      </type>
      <derivation>
        <abstract/>
      </derivation>
    </Attribute>

    <Attribute name="intakeApplications">
      <type>
        <javaclass name="List">
          <ruleclass name="AbstractIntakeApplication"/>
        </javaclass>
      </type>
      <derivation>
        <abstract/>
      </derivation>
    </Attribute>

    <Attribute name="needs">
      <type>
        <javaclass name="List">
          <ruleclass name="AbstractNeed"/>
        </javaclass>
      </type>
      <derivation>
        <abstract/>
      </derivation>
    </Attribute>

  </Class>

  <!-- Abstract Need -->
  <Class abstract="true" name="AbstractNeed">
    <Attribute name="description">
      <type>
        <javaclass name="curam.creole.value.Message"/>
      </type>
      <derivation>
        <abstract/>
      </derivation>
    </Attribute>

    <Attribute name="identifier">
      <type>
        <javaclass name="String"/>
      </type>
      <derivation>
        <abstract/>
      </derivation>
    </Attribute>

    <Attribute name="appropriate">
      <type>
        <javaclass name="Boolean"/>
      </type>
      <derivation>
        <abstract/>
      </derivation>
    </Attribute>

    <Attribute name="priority">
      <type>
        <javaclass name="Number"/>
      </type>
      <derivation>
        <abstract/>
      </derivation>
    </Attribute>
  </Class>

  <!-- Abstract Screening -->
  <Class abstract="true" name="AbstractScreening">
    <Attribute name="description">
      <type>
        <javaclass name="curam.creole.value.Message"/>
      </type>
      <derivation>
        <abstract/>
      </derivation>
    </Attribute>

    <Attribute name="appropriate">
      <type>
        <javaclass name="Boolean"/>
      </type>
      <derivation>
        <abstract/>
      </derivation>
    </Attribute>

    <Attribute name="identifier">
      <type>
        <javaclass name="String"/>
      </type>
      <derivation>
        <abstract/>
      </derivation>
    </Attribute>
  </Class>
  <!-- End Abstract Screening -->

  <!-- AbstractIntakeApplication -->
  <Class abstract="true" name="AbstractIntakeApplication">
    <Attribute name="description">
      <type>
        <javaclass name="curam.creole.value.Message"/>
      </type>
      <derivation>
        <abstract/>
      </derivation>
    </Attribute>

    <Attribute name="appropriate">
      <type>
        <javaclass name="Boolean"/>
      </type>
      <derivation>
        <abstract/>
      </derivation>
    </Attribute>

    <Attribute name="identifier">
      <type>
        <javaclass name="String"/>
      </type>
      <derivation>
        <abstract/>
      </derivation>
    </Attribute>
  </Class>
  <!-- End AbstractIntakeApplication -->

  <Class name="AbstractAlertMessage" abstract="true">
    <Attribute name="alertRequired">
      <type>
        <javaclass name="Boolean"/>
      </type>
      <derivation>
        <abstract/>
      </derivation>
    </Attribute>
    <Attribute name="message">
      <type>
        <javaclass name="curam.creole.value.Message"/>
      </type>
      <derivation>
        <abstract/>
      </derivation>
    </Attribute>
  </Class>

  <!-- Abstract Service -->
  <Class abstract="true" name="AbstractService">
    <Attribute name="description">
      <type>
        <javaclass name="curam.creole.value.Message"/>
      </type>
      <derivation>
        <abstract/>
      </derivation>
    </Attribute>

    <Attribute name="appropriate">
      <type>
        <javaclass name="Boolean"/>
      </type>
      <derivation>
        <abstract/>
      </derivation>
    </Attribute>

    <Attribute name="identifier">
      <type>
        <javaclass name="String"/>
      </type>
      <derivation>
        <abstract/>
      </derivation>
    </Attribute>

    <Attribute name="groupInd">
      <type>
        <javaclass name="Boolean"/>
      </type>
      <derivation>
        <abstract/>
      </derivation>
    </Attribute>

    <Attribute name="needIdentifier">
      <type>
        <javaclass name="String"/>
      </type>
      <derivation>
        <abstract/>
      </derivation>
    </Attribute>

  </Class>

  <!--  Abstract program  -->
  <Class abstract="true" name="AbstractProgram">
    <Attribute name="description">
      <type>
        <javaclass name="curam.creole.value.Message"/>
      </type>
      <derivation>
        <abstract/>
      </derivation>
    </Attribute>

    <Attribute name="appropriate">
      <type>
        <javaclass name="Boolean"/>
      </type>
      <derivation>
        <abstract/>
      </derivation>
    </Attribute>

    <Attribute name="programTypeReference">
      <type>
        <javaclass name="String"/>
      </type>
      <derivation>
        <abstract/>
      </derivation>
    </Attribute>

    <Attribute name="needIdentifier">
      <type>
        <javaclass name="String"/>
      </type>
      <derivation>
        <abstract/>
      </derivation>
    </Attribute>

  </Class>

</RuleSet>

curam.citizenworkspace.triage.ruleset.name 应用程序属性指定的规则集必须包括对上面概述的 AbstractTriageResult 规则类进行扩展的规则类(名称通常为“分类”)。

这样使用此 AbstractTriageResult 规则类会确保所需属性在执行规则期间可用。