The tasks in your app are downloaded from the AEM forms server. Also, when you complete and submit a task, the task is uploaded back to the AEM forms server. Both of these happen when the app is synchronized with the AEM forms server.
When you are online with the AEM forms server, by default, your app is synchronized every 15 minutes. However, you have the option to change the synchronization frequency. Alternatively, you can manually synchronize the app at any time.
Currently, AEM forms app does not reflect the changes made in a form or formset on AEM forms server. To synchronize the changes in AEM forms app without clearing its local cache, you need to make a dummy change in the startpoint of the corresponding application in Workbench and redeploy the application. It will synchronize AEM forms app with AEM forms server on the next scheduled synchronization and reflect the changes.
- The main logic of submitting the offline app data to the AEM forms server is included in runtime/offline/util/offline.js.
- In the .js, the call to the processOfflineSubmittedSavedTasks(...) function, sends the saved / submitted tasks to the server. It also handles any errors or conflicts in the sync process. If the submission of a task fails, the task on the app is marked as failed. In addition, the task remains in your Outbox.
- The syncSubmittedTask() and syncSavedTask() function perform operations on individual tasks.
- The call to the processOfflineSubmittedSavedTasks() function is initiated by the task list component after a user selects to synchronize offline state to the server or an automatic sync by the background thread.