创建 IXB 加载 XML 文件
以下所述是使用 IXB 加载文件的业务规则对象。
名称和说明属性支持进行本地化。值的格式为:<Resourcebundle pacakage name>.ResourceBundleFileName:ResourceKey例如,用于指定业务规则名称的格式为:com.ptc.windchill.enterprise.change2.change2ClientResource:CHECK_OUT_VALIDATOR_RULE_NAME
检索名称和说明的值时,资源束会返回在区域设置中传递的本地化值。
|
如果指定了无效的资源键,则名称或说明字段将显示非本地化字段值。在上述示例中,如果资源束不存在,则名称将显示为 com.ptc.windchill.enterprise.change2.change2ClientResource:CHECK_OUT_VALIDATOR_RULE_NAME
|
BusinessRule
BusinessRule 对象包含待执行规则的相关信息。每个规则均可具有与之关联的唯一配置要求。创建 BusinessRule 对象时,key 和 container 应是唯一的。
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE BusinessRule SYSTEM "standardX20.dtd">
<BusinessRule>
<ObjectID><localId>wt.businessRules.BusinessRule:45346</localId></ObjectID>
<objectContainerPath>/</objectContainerPath>
<key>IXBBusinessRule1_key</key>
<name> com.ptc.windchill.enterprise.change2.change2ClientResource:
CHECK_OUT_VALIDATOR_RULE_NAME</name>
<description> com.ptc.windchill.enterprise.change2.change2ClientResource:
CHECK_OUT_VALIDATOR_RULE_DESC</description>
<enabled>true</enabled>
<configs>
<config name="key1" value="value1"></config>
<config name="key2" value="value1"></config>
<config name="key1" value="value2"></config>
</configs>
</BusinessRule>
BusinessRuleSet
BusinessRuleSet 实例是验证规则集的持久化配置。通常包含配置用于进行容器执行的规则。创建 BusinessRuleSet 对象时,key 和 container 应是唯一的。
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE BusinessRuleSet SYSTEM "standardX20.dtd">
<BusinessRuleSet>
<ObjectID><localId>wt.businessRules.BusinessRuleSet:45345</localId></ObjectID>
<objectContainerPath>/wt.inf.container.OrgContainer=
PTC/wt.pdmlink.PDMLinkProduct=GOLF_CART</objectContainerPath>
<key> IXBBusinessRuleSet1_key </key>
<name> com.ptc.windchill.enterprise.change2.change2ClientResource:
CHANGE_PRE_RELEASE_RULESET_NAME </name>
<description> com.ptc.windchill.enterprise.change2.change2ClientResource:
CHANGE_PRE_RELEASE_RULESET_DESC</description>
<enabled>true</enabled>
<overridable>true</overridable>
</BusinessRuleSet>
BusinessRuleLink
保存 BusinessRuleSet 参考和规则的 ObjectToObject 二进制链接。
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE BusinessRuleLink SYSTEM "standardX20.dtd">
<BusinessRuleLink>
<ObjectID><localId>wt.businessRules.BusinessRuleLink:356747
</localId></ObjectID>
<ruleSet><ObjectReference><localId>wt.businessRules.BusinessRuleSet:45345
</localId></ObjectReference></ruleSet>
<rule><ObjectReference><localId>wt.businessRules.BusinessRule:45346
</localId>
</ObjectReference></rule>
<blockNumber>10</blockNumber>
</BusinessRuleLink>