Hello everyone,
Requirement
I am trying to implement a hierarchical (multi-level) shareholder structure in Pega Constellation where users can define shareholders and their nested sub-shareholders.
Each Shareholder has the following fields:
- Name
- Type (Individual / Corporate)
- Share Percentage
Business Rules / Validations
- No shareholder can have more than 100% share.
- The sum of sub-shareholders must equal the parent shareholder’s percentage.
- Individual shareholders cannot have sub-shareholders.
- Corporate shareholders can have sub-shareholders.
- All leaf-level shareholders must be Individuals (no Corporate at leaf level).
Functional Expectations
- Users should be able to dynamically add nested shareholders (multi-level hierarchy).
- Validations should be enforced before submission.
- On submission, the entire hierarchy should be persisted to the system of record.
- The saved data should be retrievable later for viewing and further processing.
Current Implementation
- Using nested embedded Page Lists to represent hierarchy.
- Implemented UI using modal dialogs.
Approach 1: View-type modal
- Able to add nested shareholders successfully.
- However, unable to perform certain validations during modal submission (no post-processing hooks available).
Approach 2: Action-type modal
-
Added Flow Action with pre- and post-processing for validations.
-
Encountering runtime error while submitting:
specified stack frame ‘listlist’ does not match top of stack: ‘viewview’
- Due to this error, case creation fails.
Questions
- What could be the reason for the stack frame error (
listlist vs viewview) when using Action-type modal in Constellation? - Is there a recommended way to perform complex validations (like hierarchical percentage checks) when using View-type modals?
- What is the best-practice approach in Constellation to:
- Capture hierarchical data like this
- Enforce cross-level validations
- Persist the structure cleanly to a System of Record?
- Are there alternative design patterns (e.g., data transforms, validate rules, client-side validations, DX components) that would better suit this use case?
Additional Context
-
Using Constellation UI
-
Requirement involves both UI-level validations and post-submit consistency checks across hierarchy
Any suggestions on this topic is highly appreciated
Regards
JC
