Data Page Error Handling: Presenting errors encountered during load [LSA Data Excellence]

How should errors be presented when loading a Data Page from its Data Source(s)?

Errors encountered from non-Activity based Data Sources are typically published as either “messages” on the Data Page, as well as in its .pyErrorPage embedded page. Should you use an Activity as your Data Source, emulate this pattern.

Any scenario that is dependent on the successful load of a Data Page should (using the Data Page as the step page) evaluate the pxDataPageHasErrors When rule - which checks both locations for symptoms of errors - in order to determine whether the load was completely successful.

Discussion on this topic was sought from the LSA Data Excellence (Pega 8.4) webinar conducted in July 2020. The webinar and its full set of discussions that arose from it are available at LSA Data Excellence: Webinar, Questions & Answers.

Errors during Data Page load should be shown on the Data Page itself so they are easy to detect and handle later. When a Data Page loads from any source other than an Activity, any issues must be stored as messages on the page and also recorded in the .pyErrorPage structure. If an Activity is used as the data source, it should follow the same approach and place errors in the same locations for consistency. Any process that depends on this Data Page must check whether errors exist before continuing. This check is done using the pxDataPageHasErrors When rule, which looks at both message and error page data. If errors are found, the process should treat the Data Page load as unsuccessful.