Application stack hierarchy for multiple built-on applications
When you use multiple built-on applications, Pega Platform automatically converts the hierarchical application tree of multiple built-on applications into a single linear application stack. As a result, you can shorten development time and increase consistency in your application by reusing rulesets and frameworks.
Pega Platform creates the linear application stack using the following rules:
- The system always locates PegaRULES at the end of the linear application stack list.
- Pega Platform processes each built-on application by using a
depth-first algorithm that searches as far as possible along an application tree
branch before moving on to another branch.
An application tree branch consists of a built-on application and its built-on applications.
- For duplicate applications with the same application version, Pega Platform retains only the application that has the lowest position in the tree in the application stack list, and ignores the other application.
- For duplicate applications with different application versions, as well as for PegaRULES, Pega Platform uses the numerically highest available application version.
The following image represents the automatic conversion of a hierarchical application tree into a single linear application stack at run time:
Ruleset behavior at design time
Each application in the hierarchical application tree consists of various rulesets that Pega Platform automatically assembles into a linear ruleset stack. This ruleset stack defines which rulesets a specific rule can use for context purposes at design time.
Ruleset stack assembly generally follows the same guidelines as for creating the linear application stack at run time. However, ruleset stack assembly for a specific rule is based on the specific application that the rule belongs to, which is also called the rule's owning application.
After Pega Platform determines a rule's owning application, Pega Platform automatically creates the linear ruleset stack for that specific rule, starting with the rule's owning application and working through the hierarchical application tree branch to PegaRULES.
When you use Application Validation mode, at design time, the saved rule cannot reference certain rulesets that are available at run time. This restriction allows for the appropriate isolation of applications, and makes applications easier to reuse.
Example of the transition from hierarchical to linear ruleset stack assembly
In the following example, the hierarchical application tree contains only rulesets that use the Application Validation mode:MortPlus 01.01 (Ruleset1 | |
Underwriting 01.01 (Ruleset2) | Pricing 01.01 (Ruleset4) |
uPlusFin 01.02 (Ruleset3) | uPlusFin 01.01 (Ruleset5) |
PegaRULES | PegaRULES |
Pega Platform starts building the ruleset stack at the Underwriting application, and then processes the stack through PegaRULES in that specific application tree branch. Because the Pricing application is located on a separate application tree branch, at design time, ruleset stack processing cannot reference Ruleset4 and Ruleset5 from the other tree branch.
Ruleset behavior at run time
At run time, Pega Platform creates the linear application stack for the entire tree of built-on applications by following the preceding guidelines. This application stack is the basis for application functionality in a live environment.
Use case examples
The following use cases describe how Pega Platform processes the hierarchical application tree into a single linear application stack at run time.
Previous topic Best practices for using multiple built-on applications Next topic Configuring advanced application settings