Error message in Pega Platform are messages on the Clipboard that could be associated with a page (Primary/Nested) or a particular property. Platform uses standard public engine APIs to access the messages on the page, but due to technical limitations in the engine, this does not reflect the same ordering of the messages on the UI associated to the clipboard.
The standard pattern for the ordering of messages is as follows:
- Primary page messages appear at the top
- Nested page messages appear next
- Page messages appear in the order they are added to the page
- Property messages appear after page messages
- Property messages are unordered
Platform relies on engine APIs to access messages within the page and all of its child pages, and additionally to retrieve messages from properties. The API returns a the messages stored within a HashMap object, which by nature does not guarantee an ordered result. The engine API used is tools.getPrimaryPage().getMessageMap().