Offline capabilities
People working in offices are spoiled with good reliable and fast network connection; connectivity is a flacky thing for travelers using Mobile / Tablet devices.
Offline capabilities can be defined for multiple scenarios:
- resilience - short connectivity issues (like on a train)
- completely offline - working off-site without an internet connection
Following requirements must be fulfilled to answer those scenarios:
- application should be able to detect network status in real-time
- application should be able to handle lost connectivity
- application must be able to start even when offline
- application must support working on pre-defined items (folders and/or documents) while offline
- application should support editing operations while offline
inPoint.Web currently implements following offline features:
- application code files are pre-cached
- mark items (i.e. Folders) as "Available Offline"
- support Folder / Document Classification editing while offline
- handle editing conflicts
- support creation of new Folders and/or Documents
All this is possible by utilizing technologies available in the latest browsers:
- PWA - Progressive Web Applications
- ServiceWorker - background threading to proxy network requests
- Browser Cache - to persist network responses
- Browser IndexedDb - to persist pending offline requests (to be replayed once back online)
- Notification Services - to be notified in real-time of Network connectivity changes and updates to offline items
- ... and more
Cache types
Pre-caching
Following items are pre-cached on first application start:
- Application files (code, styles, images, etc...)
- PDF Viewer
- Raster Map Provider
Dynamic caching
Since those can change they are cached on every application restart:
- Raster map tiles
- /custom subfolder
Offline Items
Items marked as "available offline" (i.e. Folders) including all their dependencies for offline viewing/editing are synchronized on a periodic basis using the last lastModifiedDate from the Fulltext index.
- Folder tree and subfolders
- Folder
- classification forms including standard inPoint forms and ExtraAttributes
- all subfolders
- lookup values
- activities
- no tree filtering (searching) while offline
- Documents
- classification forms including standard inPoint forms and ExtraDocumentAttributes
- Documents list (only first page)
- thumbnails, previews, activities
- no document filtering/sorting while offline
- upload using archiveTargets (only items that are marked for offline usage will be displayed) or D&D into the DocList
Offline Queue
Items edited/created/deleted while offline need to be stored somewhere until network connectivity can be restored; the Browser's IndexedDb is used to persist those requests, and will immediately be replayed as soon as network connectivity is restored.
Security
Unfortunately there is no way to secure cached data (browsers do not provide this functionality) and as such it is suggested to disable offline functionality for public used desktops or ones used by multiple users. Upon logging out ALL caches will be cleared! For this reason when using SecureParams the items caching functionality will be disabled.
Feature Flag: Offline
Offline is disabled by default; using feature flags you can define WHO/WHERE it can be enabled and used. Note that since the pre-fetch phase happens before user authentication, as soon as Offline is enabled (even with filters) the pre-cache will happen for everyone that matches the browser/ip restrictions.
Assign (Upload)
There are multiple ways to add Documents to inPoint.Web:
- via Drag&Drop into a folder
- via ActionPanel's Upload CommandAction
- via ActionPanel's Create CommandAction
- via ActionPanel's Upload new version CommandAction
- via the Sidebar's Assign menu
- archiveTargets will only include the folder(s) marked for offline
Embedding
If you want to embed inPoint.Web with the offline feature enabled. You need to make sure that the embedding website is also served via https (e.g. AxonIvy).