When updating a canvas app and/or the underlying data model, you want to make sure nobody is actually using the canvas app at that time and that when the update is complete, only the new version of the canvas app and/or underlying data model is used. Being able to put a canvas app in maintenance mode, having a session timeout and having a version check makes this possible.
In this blog post, the idea behind these topics is explained. In a future blog post, an update process using these techniques is described.
Maintenance mode
There is no maintenance mode mechanism in canvas apps but with a few simple steps, you can create your own!
The idea behind maintenance mode is the following:
When a canvas app is started and before any other data is retrieved, the maintenance mode must be retrieved from a data source outside the canvas app. In case of maintenance mode, a related message is shown and the user cannot proceed.
Session timeout
There is no session timeout mechanism in canvas apps but with a few simple steps, you can create your own!
The idea behind session timeout is the following:
When a canvas app is started, 2 global variables are created and set:
- The moment the session started.
- The number of minutes after which a session timeout occurs.
At specific points in the canvas app, it is checked if the session has timed out. If this is the case, a related message is shown and the user cannot proceed.
I prefer to use many points for this timeout check but for sure before data is retrieved/changed.
Version check
There is no version check mechanism in canvas apps but with a few simple steps, you can create your own!
The idea behind a version is the following:
When a canvas app is started, the correct version of the app must be retrieved. A canvas app contains its version hardcoded. The values of these two versions are compared. In case of a it difference, a version mismatch message is shown and the user cannot proceed.