スキーマに関するリフレクション情報の取得
スキーマに関するリフレクション情報を取得することができます。
このタスクについて
以下の例は、スキーマに関するリフレクション情報を取得する方法を示しています。
手順
スキーマに関するリフレクション情報を取得する手順は、以下のとおりです。
タスクの結果
以下にスキーマを示します。
<?xml version="1.0"?>
<schema targetNamespace="http://www.ilog.com/jrules/training/truck">
<element name = "TruckModel">
<complexType>
<sequence>
<element name="name" type="string"/>
<element name="licenseClass" type="string"/>
<element name="capacity" type="float"/>
<element name="thresholdFull" type="float"/>
</sequence>
</complexType>
</element>
</schema>
以下に規則を示します。
rule Threshold
{
when {
?tm: TruckModel(capacity > 8000);
}
then {
modify ?tm {thresholdFull = 0.9;}
}
}