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.
Use case 1: Multiple applications that use the same PegaRULES version
In this example, the TopApp application is built on the BaseApp1, BaseApp2, and BaseApp3 applications. All applications are built on the same version of PegaRULES.
TopApp [Ruleset1 | ||
BaseApp1 | BaseApp2 | BaseApp3 |
PegaRULES |
The resulting application stack has the following structure:
The system processes each built-on application by using a depth-first algorithm.
Use case 2: Multiple applications that use different PegaRULES versions
In this example, the MyCustomerApp application is built on the BillingApp and SupportApp applications. Each of these applications is built on a different version of PegaRULES.
MyCustomerApp (Ruleset1 | |
BillingApp (Ruleset2) | SupportApp (Ruleset4) |
BillingPlansApp (Ruleset3) | PegaRULES 07.05 |
PegaRULES 07.01 |
The resulting application stack has the following structure:
Pega Platform uses version of PegaRULES with the highest available number in the application stack list.
Use case 3: A duplicated application with different versions
In this example, the ProductionApp application is built on the FinalAppTemplate application, which is built on the CustomerApp and EmployeeApp applications. Each of these applications has additional built-on applications, including the duplicated MyBusinessApp application, which has two different versions in use. All applications are built on the same version of PegaRULES.
ProductionApp 01.01 (Ruleset1 | |
FinalAppTemplate 01.01 (Ruleset2 | |
CustomerApp 07.01 (Ruleset3) | EmployeeApp 01.01 (Ruleset6) |
ServicesApp 01.01 (Ruleset4) | MyBusinessApp 01.01 (Ruleset7) |
MyBusinessApp 01.02 (Ruleset5) | PegaRULES 07.01 |
PegaRULES 07.01 |
The resulting application stack has the following structure:
Even though the system retains the application with the lowest position in the tree list, the application stack list uses the numerically highest available version for the duplicated application.
Use case 4: A duplicated application with multiple branch points
In this example, the MyCustomApp application is built on several other applications, including two applications that both contain the same MyHealthApp application. All applications are built on the same version of PegaRULES.
MyCustomApp | |||
ComplexApp | BasicApp1 | BasicApp2 | |
MyPlanner | ResultsApp | SurveyApp | PegaRULES |
MyReports | MyHealthApp | PegaRULES | |
MyHealthApp | PegaRULES | ||
PegaRULES |
MyCustomApp has four built-on applications: ComplexApp, BasicApp1, BasicApp2, and PegaRULES. The resulting application stack has the following structure:
Duplicate applications with the same version use the lowest-positioned application in the tree list.
Use case 5: An application with branches
In this example, the MyCallCenter application has two branches: Branch_MyCallCenterRS and Branch_Policies. All applications are built on the same version of PegaRULES.
MyCallCenter
| |
MyStaffingApp | Processes |
Policies | PegaRULES |
PegaRULES |
The resulting application stack has the following structure:
Previous topic Best practices for using multiple built-on applications Next topic Configuring advanced application settings