Challenge
Designing the subcase hierarchy
Designing the subcase hierarchy
3 Tasks
1 hr
Scenario
Metro Delivery Company (MDC) is a B2B company that specializes in delivering same-day intracity shipments from registered business partners to their destinations. Truck vendors register with MDC to provide pickup and delivery of the packages to facilitate this service.
Analyze the following key requirements for this application:
- Processes
After the approval of vendor registration, the respective truck service and truck for each city must undergo review by the individual city managers. The city managers must be able to provide their feedback in parallel and give the necessary approval independently of one another. - Extensibility
MDC's processes must be flexible enough to support new cities as the company expands its presence. The architecture must accommodate future city additions without requiring redesign of the core case structure. - Security
Each city manager must be able to access only the cases relevant to their assigned city. Data privacy and access control must be enforceable at a granular level.
The following table provides the credentials you need to log in to the Delivery Service application. However, this challenge is mainly meant for evaluating the design options, and there are no specific implementation tasks.
| Role | User name | Password |
|---|---|---|
| Admin | admin@deliveryservice | rules |
Detailed Tasks
1 Identify design options
There are two possible approaches to fulfilling the parallel approval requirement. Locking contention must go through careful evaluation for both options to prevent data loss and ensure a consistent user experience.
Create a top-level Case and use a Split for Each shape
For each Truck Service in a given city, use an advanced Split for Each shape to create an Assignment and route it to the respective city manager. When an Assignment is created for each city manager by using this shape, optimistic locking can address potential conflicts during concurrent submissions.
However, this approach carries important trade-offs:
- If parallel assignment submissions occur simultaneously, data loss may result, leading to a poor user experience.
- While basic data handling is possible, role-based access control (RBAC) and attribute-based access control (ABAC) cannot be applied effectively to differentiate data visibility between city managers. As a result, data privacy and city-level security requirements cannot be fully satisfied with this approach.
- As MDC expands into new cities, the single top-level Case grows in complexity, and the Split for Each shape must be updated for each new city, which reduces extensibility.
In Pega Platform™, optimistic locking is implemented using a Pega-AAT token exchanged between the client and the server. While this strengthens concurrent access handling, it does not resolve the fundamental limitations of RBAC/ABAC enforcement in a single-Case model.
Create a child Case
For each truck service in a given city, create a child Case and assign it to the respective city manager for approval. This approach uses the default Case hierarchy features in Pega Platform to decompose the parent vendor registration into discrete, city-specific approval units.
Key configuration details:
- On the parent Case Type, select the Allow one user locking option to protect the integrity of the main registration record.
- On the child Case Type, select Allow other users to access the parent Case when the child Case is opened to enable city managers to work on their individual child Cases in parallel without blocking each other.
- The ProcessFlowDependencies Agent manages the dependency between child Cases and the parent Case so that the parent proceeds only after all child approvals are complete.
- RBAC and ABAC conditions can be applied at the child Case Type level to enforce city-specific data visibility, ensuring each city manager accesses only the Cases relevant to their assigned city. ABAC additionally supports row-level and column-level security, enabling highly granular access control, and can be inherited across the Case Type hierarchy.
Pega Platform introduces an optimized dependency calculation for Wait shapes. Previously, the system issued separate recursive queries for each Case in the hierarchy to check dependency status. This process is now replaced by a single hierarchical query that retrieves dependency data across the entire Case hierarchy in one operation. This change significantly reduces database load and query run time, improving scalability as the number of Cases grows. To use this feature, enable the optimized dependency calculation in the configuration.
2 Evaluate design options
Review the pros and cons of each design option in the following table:
| Design | Pros | Cons |
|---|---|---|
| Create a top-level Case and use a Split for Each shape |
|
|
| Create a child Case |
|
|
3 Recommend the best design option
A child Case for approving the truck service during vendor registration best suits MDC's requirements for the following reasons:
Locking requirements
The combination of the Allow one user on the parent Case and Allow other users to access the parent Case when the child Case is opened options on the child Case Type enables parallel processing without locking conflicts.
Security requirements
RBAC and ABAC conditions enforced at the child Case Type level ensure that each city manager accesses only the data relevant to their city. Pega Platform support for row-level and column-level ABAC control provides more precise data protection.
Specialization and extensibility
Each child Case Type can be independently specialized for different cities by using Case specialization. This approach does not require changes to the parent Case Type. As MDC expands into new cities, new child Case instances are automatically created according to the existing design, eliminating the need for structural redesign.
Performance
The optimized hierarchical dependency query ensures that Wait shape processing remains performant and database-efficient, even as the number of child Cases grows (one per city per truck service).
Available in the following mission:
Want to help us improve this content?