Skip to main content

Application stack hierarchy for multiple built-on applications

Suggest edit
Updated on November 29, 2021

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:

Automatic conversion into a single linear application stack
A diagram representing the automatic conversion of a design-time
                        application stack 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.

Note: The behavior described above applies only when you save a rule in an Application Validation mode ruleset. When saving a rule in a Ruleset Validation mode ruleset, you must specify prerequisites in the REQUIRED RULESETS AND VERSIONS section on the Versions tab of the ruleset.

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)
PegaRULESPegaRULES
If you save RuleABC in Ruleset2, the Underwriting application becomes the rule's owning application. Pega Platform then assembles the ruleset stack that RuleABC can use at design time according to the following pattern:

Ruleset2Ruleset3PegaRULES

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.

Note: These examples are for demonstration purposes only and might not represent the application structure of current application offerings.
For example:

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, Ruleset2]
BaseApp1BaseApp2BaseApp3
PegaRULES

The resulting application stack has the following structure:

TopAppBaseApp1BaseApp2BaseApp3PegaRULES

The system processes each built-on application by using a depth-first algorithm.

For example:

​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:

MyCustomerAppBillingApp > BillingPlansAppSupportAppPegaRULES:07.05

Pega Platform uses version of PegaRULES with the highest available number in the application stack list.

For example:

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:

ProductionAppFinalAppTemplateCustomerAppServicesAppEmployeeAppMyBusinessApp:01-02PegaRULES

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.

For example:

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
ComplexAppBasicApp1BasicApp2
MyPlannerResultsAppSurveyAppPegaRULES
MyReportsMyHealthApp​PegaRULES
MyHealthAppPegaRULES
PegaRULES

MyCustomApp has four built-on applications: ComplexApp, BasicApp1, BasicApp2, and PegaRULES. The resulting application stack has the following structure:

MyCustomAppComplexAppMyPlannerMyReportsBasicApp1ResultsAppMyHealthAppBasicApp2SurveyAppPegaRULES

Duplicate applications with the same version use the lowest-positioned application in the tree list.

For example:

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
  • Branch_MyCallCenterRS
  • Branch_Processes
MyStaffingAppProcesses
PoliciesPegaRULES
PegaRULES

The resulting application stack has the following structure:

MyCallCenterMyStaffingAppPoliciesProcessesPegaRULES

  • Previous topic Best practices for using multiple built-on applications
  • Next topic Configuring advanced application settings
Did you find this content helpful? YesNo

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us