Personnalisation avancée > Business Logic Customization > Business Rules > Loading Business Rule Objects > Process > Business Rule Objects
  
Business Rule Objects
These are the Business Rule objects that are needed for using the Business Rules engine.
BusinessRuleSet : A BusinessRuleSet instance is the persistence configuration used to navigate persistent set of Validation business rule for a container. This can be overridden at container level.
BusinessRule : BusinessRule holds the information about the Rule to be executed. Each Rule may have unique configuration requirements associated to it. The selector is mapped to the actual implemented rule validation class.
BusinessRuleLink : A ObjectToObject binary link holding the references to BusinessRuleSet and BusinessRule. Each BusinessRuleSet is associated to a BusinessRule using the BusinessRuleLink.
These are the attributes used for business rules objects:
Name
Applicable Object
Optional
Comments
Type
key
BusinessRuleSetBusinessRule
No
Key unique to the business rule object. For business rule set, key, typically would be something like CHANGE_RELEASE_VALIDATION
String - 256 characters
name
BusinessRuleSetBusinessRule
Yes
Name of the BusinessRuleSet or BusinessRuleObject. The name field is localized.
String - 256 characters
description
BusinessRuleSetBusinessRule
No
Description of the business rule object. The description field is localized.
String – 4000 characters
configs
BusinessRule
Yes
configs attribute holds the information that is required to evaluate BusinessRule against objects. configs element holds 0 or more than 0 config element. Each config element will hold the name and key attribute defining the configuration required to run the Rule.
If the key needs to specify more than one value, it could specify it using a new config element as shown in the example. If the rule needs to specify name “validType”, it should specify as below: <config name=" validType " value="WTPart.class"></config> <config name=" validType " value="WTDocument.class"></config>
Name value pair
enabled
BusinessRuleSetBusinessRule
Yes
The ability to configure the business rule object to be executed. When the value is false, the business rule object is ignored and look for the next available enabled in the container hierarchical lookup.
boolean
overridable
BusinessRuleSet
The overridable attribute can be set to true if the system could override the BusinessRuleSet at the below container. If the value is set to false, even though a BusinessRuleSet is defined at children container, business rules instance at the parent container where the overridable is set to false are used. The lookup mechanism work similar to the Windchill preferences look for a container.
boolean
blockNumber
BusinessRuleLink
Yes
A number indicating the execution of the rules. Multiple rules can be configured to the same blockNumber. This supports execution of rules in parallel. A value of 1 indicates the first rule to be executed within the business rule set.
Example: If blockNumber 1a ruleA
blockNumber 2a ruleB and ruleC
The rules execution engine executes ruleA and could potentially execute ruleB and ruleC is parallel.
Numeric integer value