Hi All,
I have a requirement to show a different message when due to ABAC policy the work object is not found in search, Currently the default message in both scenarios:
1)If WO doesn’t exist
2)If WO exists but not searchable due to ABAC policy.
Hi All,
I have a requirement to show a different message when due to ABAC policy the work object is not found in search, Currently the default message in both scenarios:
1)If WO doesn’t exist
2)If WO exists but not searchable due to ABAC policy.
Pega does not provide an OOTB distinction between these two scenarios in Global Search.
Implement using Detection Pattern + Post-Fetch Search Enrichment
You cannot change the behavior of SRS or ABAC enforcement, but you can detect the ABAC-blocked scenario and display a custom message without revealing restricted data.
After Search Results Return, Detect Whether the Case Exist but Is ABAC-Blocked
Use pyFilterSearchResults, This rule lets you intercept the list returned by search before it is shown.
pyFilterSearchResults logic : User enters a case ID → Global Search returns zero results.
In this condition, perform a secondary lightweight lookup using Obj-Exists or Data Page (Lookup) on the work class:
This lookup bypasses SRS, but still respects ABAC, meaning:
If the user is not allowed, it returns no result (or fails ABAC open authorization).
If the case does not exist, it returns no result.
If the case exists but user is not allowed, ABAC denies it → this is detectable.
Interpret outcomes:
Case does not exist in DB → show message A: “The case ID you entered does not exist.”
Case exists BUT ABAC blocked access → Obj-Open or D_WorkObject fails with ABAC exception → show message B: “You do not have permission to view this case.”
You are NOT leaking restricted case details — just clarifying that the reason is access, not non-existence.
Pega ABAC engine ensures compliance automatically.
Surface the Message in the Search UX : Since the search results panel is not authorable, you must show your custom message. Global Search UI cannot have its row template modified directly, but Pega explicitly supports customizing outcome messages via:
Result filtering
Result enrichment
Preview/drawer customization
Thanks Vikas , We will give this a try
Update: we were able to achieve this by filtering the data on search action by using RDB query.
Thanks