To signal to the user any offline process engine errors in a mobile app, you can add, clear, or check for error messages on a page and its properties. Adding, clearing or checking for error messages takes place during the post-processing of the flow action that a Pega 7 Platform developer implements as a JavaScript hook. For example, you can use error handling to validate whether a value entered in a property or a page is in the correct format.
Offline errors work in a similar way to how they work on Pega 7 Platform desktop applications. Field-level (property) errors take precedence over form level (page) errors. If the field level errors are not available then form errors are shown. You can submit a form if such errors exist on a page or its properties, but you will not be able to progress the flow forward until all these errors are resolved.
When processing cases in a mobile app while in offline mode, you can use several JavaScript functions to handle errors. The JavaScript error handling API provides several methods for clearing and settiong messages according to their post-processing logic. The error handling API allows you to: