I have a case type call it Order Case type with an optional “Close” case action. Before allowing the close, I need to verify there’s no open related work across 5 different case types that have no parent-child case relationship with the Order case:
- 4 “Request” case types (each a separate case type, e.g. Request-TypeA, Request-TypeB, Request-TypeC, Request-TypeD)
- 1 “Invoice” case type
Each of these stores a reference ID back to the Order (equivalent to a foreign key) inside a different nested embedded page, the property path is different in each case type (e.g. `.RequestADetails.OrderID`, `.RequestBDetails.OrderID`, `.InvoiceDetails.OrderID`, etc.), so there’s no single shared flat property I can filter on across all of them.
Constraints:
- Can’t add a schema/data model change (a common flattened property) because there are many in-flight cases already in these tables and no way to retrofit them.
- Also need to check for open assignments tied to any of those related cases, which could sit in either Assign-Worklist or Assign-WorkBasket.
- Need to surface a dynamic list to the UI showing exactly which related cases/tasks are still open, so the user knows what to resolve before they can close.
What I’m looking for:
best-practice pattern in Pega for this kind of cross-case-type “are there any open related records” check when:
1. There’s no case hierarchy to leverage
2. A Class Group / common ancestor property isn’t an option due to in-flight data
3. Performance is a concern running multiple Report Definitions per validation
Is running one Report Definition per case type (5 total) plus one unioned query against `Assign-` for assignments the standard approach here, or is there a cleaner OOTB pattern (e.g. Declare Index, Search rule, Data Page chaining) that avoids the multiple-RD fan-out…