Mobile Workspace offline internals

With LiveCycle ES4, Mobile Workspace has enabled working without network connection. Offline support has mainly been achieved by caching and storing the data locally on the device. From the offset, the application assumes to be in offline mode. This has following major advantages:

1. Any action performed by the user is stored offline ensuring that the user gets best experience.

2. Make sure that the user action/data is not lost due to intermediate network disconnection.

The offline app is constantly made to sync to the server by a background thread which has a timer setting that can be controlled by the user. The application also provides an on demand sync to the server using the refresh button at the top right of the main screen. It is possible to configuring the background sync thread frequency from the settings screen. Here we can see that the user is trying to change the sync frequency from 4 hours to 15 minutes.


The possible sync frequencies are 15 minutes, 1 hours, 4 hours, once per day or Manual. These can be selected from the drop down in the ‘General’ tab of the settings screen.


Once the user settings are saved, the background sync thread is updated as per the new settings.


Data storage and caching

Going into the internals of the data being stored on the device, application users disk storage, browser cache backed up by disk and the database in the form of webSql to store the complete data of the application. The main data associated with a task is

a. Task metadata in the form of JSON associated with task object. This also includes the attachments metadata.

b. Attachment files associated with the task.

c. Form corresponding to the task and the form data, if any stored on the server.

The application caches all this data efficiently onto the device so that the complete functionality can be replicated when there is no network connection. The task metadata and the other data in the form of task JSON is stored in the database in proper tables per user per server for efficient update and retrieval. Now comes the question of the attachment files  associated with the task. These files are downloaded and stored on the disk within the task specific directory. Lastly the form and the data associated with the form are cached with the help of browser cache. Browser cache of UIWebView uses NSURLCache concept to backup the shared cache of the application by disk. The browser cache is set to 40 MB which is sufficient to store the resources and the XDP of the forms associated with the task.

Caching configuration

By default the form and the attachments associated with the task are not cached onto the device. This comes with a background that the application should not blindly cache everything and it should be configurable for the user to decide what all data needs to be offlined. the default value of ‘Fetch forms’ and ‘fetch attachments’ is OFF in the ‘General tab of the settings screen.

fetch_attachments fetch_formsOnce the user enables the caching or either forms or attachments then any subsequent refresh will cache the forms or attachments for the new tasks being synced form the server.

This entry was posted in Adobe LiveCycle ES4 and tagged , , , , , , , , . Bookmark the permalink.

Comments are closed.