Process Commander provides two kinds of class inheritance, known as directed inheritance and pattern inheritance. Pattern inheritance, an optional feature you can set up for a class in the Rule-Obj-Class rule, affects the first steps in the rule resolution algorithm. This approach is sometimes called "dual" inheritance.
During rule resolution, pattern inheritance causes a class to inherit rules first from classes that match a prefix of the class name.
Select the Find by name first (Pattern)? checkbox on the Class rule form to instruct the system to use pattern inheritance for this class. This checkbox corresponds to the Rule-Obj-Class.pyPatternInheritance property. Pattern inheritance causes the system to search for a rule in classes derived from the current class name by truncating, from the right, alphanumeric segments that follow a hyphen (dash) character.
Use the Class Inheritance tool to confirm which classes are ancestor classes to a specific class, and the order in which Process Commander searches these classes during rule resolution using both pattern inheritance and directed inheritance. On this display, a dashed black arrow () indicates a pattern inheritance relationship; the arrow head identifies the pattern parent class. B-25363 and BUG-7948
Rule resolution always looks first for a rule it needs in the class initially provided, regardless of the state of the Find by name first (Pattern)? checkbox. If the box is selected and the rule is not found, rule resolution forms a sequence of candidate classes to search by truncating, from the left, portions of the class name that consist only of a dash character, or consist only of characters other than a dash. If no class exists for one of these computed names, rule resolution continues with the next prefix.
For example, a request for a rule in the WalCare-Financial-Credit class causes the system to search through these classes, in the order indicated:
For a class using pattern inheritance, the following is a simplified description of the rule resolution algorithm:
The ultimate base class @baseclass is searched last.
For example, assume your application requests a rule from WalCare-Financial-Credit, which derives from PegaCare-Financial-Credit, and WalCare-Financial-Credit uses pattern inheritance.
The system searches for the rule as follows:
No inheritance occurs for external classes, even when the class name contains a dash character.
directed inheritance, external class, rule resolution | |
About
Class rules
About the Class Inheritance tool About the Class Structure viewer Class hierarchy concepts and terms |