Class BusinessRuleSetBean
java.lang.Object
com.ptc.core.businessRules.engine.BusinessRuleSetBean
The BusinessRuleSetBean is used to specify more than one business rule set
and target collection relationship key at a time in order to generate an
accumulation of results with one call to the business rule engine. The
required attributes are the business rule set key and the relationship. The
relationship attribute is used to lookup the correct association objects in
relation to the primary business object.
See
Note that when using this technique the container reference is not needed. The rule set will instead be evaluated by the containers of the objects in the target collection.
Supported API: true
Extendable: true
See
BusinessRuleSetRelationshipDelegate for details on how to create
new relationship delegates.
| Relationship Key | Description |
|---|---|
| wt.change2.ChangeRecord2 | Gets the resulting objects of the primary business object if it is a change notice or change task. |
| wt.change2.AffectedActivityData | Gets the affected objects of the primary business object if it is a change notice or change task. |
| wt.change2.ReportedAgainst | Gets the affected objects of the primary business object if it is a change issue (i.e. Problem Report or Variance) |
| wt.change2.RelevantRequestData | Gets the affected objects of the primary business object if it is a change request |
| wt.change2.IncludedIn2 | Gets the change tasks of the primary business object if it is a change notice or the change notice if the primary business object is a change task. |
| wt.maturity.MaturityBaseline | Gets the baseline items of the primary business object if it is a promotion notice. |
| wt.maturity.PromotionSeed | Gets the promotion seeds of the primary business object if it is a promotion notice. |
| wt.maturity.PromotionTarget | Gets the promotion targets of the primary business object if it is a promotion notice. |
Note that when using this technique the container reference is not needed. The rule set will instead be evaluated by the containers of the objects in the target collection.
Supported API: true
Extendable: true
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConstant for getting the primary business Object "primaryBusinessObject" as the target object. -
Method Summary
Modifier and TypeMethodDescription
Supported API: true
Supported API: trueboolean
Supported API: trueboolean
Supported API: truestatic BusinessRuleSetBeannewBusinessRuleSetBean(String ruleSetKey, String relationship) Creates a new BusinessRuleSetBean.static BusinessRuleSetBeannewBusinessRuleSetBean(String ruleSetKey, String relationship, boolean useRoleB, boolean failOnFirstFailure) Creates a new BusinessRuleSetBean.voidsetFailOnFirstFailure(boolean failOnFirstFailure) Used to indicate that the business rules engine should fail on the first validation result failure status.voidsetUseRoleB(boolean useRoleB) Used to configure a collection of target links to use determine the role A or role B side of the link to populate the target objects in the validation criteria.
-
Field Details
-
PRIMARY_BUSINESS_OBJECT
Constant for getting the primary business Object "primaryBusinessObject" as the target object.
Supported API: true- See Also:
-
-
Method Details
-
newBusinessRuleSetBean
Creates a new BusinessRuleSetBean. Defaults to setting the seed objects to the role B object when the given seed objects are links and to not fail on first failure.
Supported API: true- Parameters:
ruleSetKey- The business rule set identifier string.relationship- Used to lookup the correct association objects in relation to the primary business object.
-
newBusinessRuleSetBean
public static BusinessRuleSetBean newBusinessRuleSetBean(String ruleSetKey, String relationship, boolean useRoleB, boolean failOnFirstFailure) Creates a new BusinessRuleSetBean.
Supported API: true- Parameters:
ruleSetKey- The business rule set identifier string.relationship- Used to lookup the correct association objects in relation to the primary business object.useRoleB- Used to configure a collection of target links to use determine the role A or role B side of the link to populate the target objects in the validation criteria.failOnFirstFailure- Used to indicate that the business rules engine should fail on the first validation result failure status
-
getRuleSetKey
Supported API: true- Returns:
- The business rule set identifier string.
-
getRelationship
Supported API: true- Returns:
- The key to lookup the association objects in relation to the primary business object
-
isUseRoleB
public boolean isUseRoleB()
Supported API: true- Returns:
- The role of the link to populate the target objects in the validation criteria
-
setUseRoleB
public void setUseRoleB(boolean useRoleB) Used to configure a collection of target links to use determine the role A or role B side of the link to populate the target objects in the validation criteria.
Supported API: true -
isFailOnFirstFailure
public boolean isFailOnFirstFailure()
Supported API: true- Returns:
- true when set to fail on first error.
-
setFailOnFirstFailure
public void setFailOnFirstFailure(boolean failOnFirstFailure) Used to indicate that the business rules engine should fail on the first validation result failure status. The default value is false so that a report of all validation rules can be generated. Setting to true will fail on first failure found.
Supported API: true- Parameters:
failOnFirstFailure-
-