Examples
If you have a specific soft type of a part, and it has an attribute called weight to represent how heavy the part is. Before releasing parts that have a weight, you want to ensure that a weight is set to a reasonable figure. In order to do this, you want to construct a business rule to verify that the weight attribute falls within the range 1-100.
Business Rule Set that Implements the Attribute Rule
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE BusinessRuleSet SYSTEM "standardX20.dtd">
<BusinessRuleSet>
<ObjectID><localId>wt.businessRules.BusinessRuleSet:45347
</localId></ObjectID>
<objectContainerPath>/wt.inf.container.
OrgContainer=BusinessRulesTestOrganization
/wt.pdmlink.PDMLinkProduct=BusinessRulesTestProduct
</objectContainerPath>
<key>CHANGEABLE_PRE_RELEASE</key>
<name>Test_Changeable_ReleaseRuleSet</name>
<description>To test basic Attribute RuleSet Validation
</description>
<enabled>true</enabled>
<overridable>true</overridable>
<updateIfExists>true</updateIfExists>
</BusinessRuleSet>
Business Rule that Implements the Attribute Rule
Business Rule Link that implements the Attribute rule
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE BusinessRuleLink SYSTEM "standardX20.dtd">
<BusinessRuleLink>
<ObjectID><localId>wt.businessRules.BusinessRuleLink:168919
</localId></ObjectID>
<ruleSet><ObjectReference><localId>wt.businessRules.BusinessRuleSet:45347
</localId></ObjectReference></ruleSet>
<rule><ObjectReference><localId>wt.businessRules.BusinessRule:168926
</localId></ObjectReference></rule>
<blockNumber>1</blockNumber>
<updateIfExists>true</updateIfExists>
</BusinessRuleLink>
Est-ce que cela a été utile ?