ProcessMaker can save your work on your device when the internet connection is lost. Nothing is worse than losing all the data you entered simply due to an unreliable or intermittent internet connection. ProcessMaker captures your data without the worry that a lack of connectivity will cause you to lose your work. New cases cannot be started when the mobile device is offline, but this feature allow users to finish working on the current task in a case and save the data locally on the mobile device, so that it can be submitted later when the internet connection is restored.
This functionality is available in ProcessMaker 3.2.2 and later for the Standard, Corporate and Enterprise editions.
This section lists the available offline functions:
- Enable a Task for Offline Support
- Setup an offline task to automatically route completed offline cases
- Start a new case
- Open a case
- Evaluate step conditions (with some constraints)
- Manually get up to 100 offline cases into the device
- Synchronize offline data
- Collect cases and forms to work offline
- Save offline data
- Handle offline data
- Store form data in the device when working offline
- Merge device with case data when the connection is reestablished
- Check and warn the user about data conflicts
Only simple step conditions can be evaluated because the data to evaluate the comparison is available in the forms.
- Conditional evaluation must support the following comparison operators: ==, !=, <, >, <=, >=.
- Logical operators supported are: &&, ||, !.
- ProcessMaker variable markups supported are: @@, @#, @=.
The following scenarios are not available while working offline:
- Controls with queries like dropdowns and suggests will not show the items, because executing queries requires connectivity with the server.
- Dependent controls won't work because dependent require connectivity with the server to query control values.
- Suggest control is not supported, not even for items created from the Options property.
- File, Multiple files, image, video, audio, signature and geo map controls are not supported.
- saveForm and submitForm helpers are not supported because they work with an endpoint that records the data in the server.
- REST and SOAP APIs will not work.
- Triggers before and after a step are ignored because triggers are executed in the server.
- Manual Routing is not supported because the list of users is populated from the server.
- Claiming a case is not supported to avoid having conflicts with other offline or online users that might have claimed the case.
- The routing screen doesn't display for those cases that are automatically routed when connectivity is reestablished.
Enable a Task for Offline Support
A task works offline as long as it is enabled in the Activity Properties by following the next steps:
1. In the process designer, right click on a task.
2. Click Properties.
3. In the Activity Properties, click the Mobile option.
4. Check the Enable this task for offline use option to activate the offline support.
Take into acount the following scenarios:
- If the activity is a starting task then users are allowed to start a case in this task while working offline.
- If the activity is not a starting task then users are allowed to open those cases that are going through this activity while working offline.
- The case is routed automatically if in the activity properties, the Route case when back online is checked. Otherwise, the user in ProcessMaker mobile can open the form again while online to route it.
The Working offline message displays as long as you are working without server connectivity (highlighted below).
Take into acount that there is an offline notification in the following scenarios:
Cases that can be started offline are marked with the label Available Offline.
Cases that can be worked offline are marked with the label Available Offline.
Download Offline Cases
Users in ProcessMaker mobile can download all cases that can be worked offline to a device, as well as the resources required to start offline cases. Otherwise, the cases displayed in the Inbox tray are the ones that are going to be stored in the device for offline use.
This is useful when users plan to collect data offline for several cases. For example, when a user has to collect data for thirty cases in the country, download the cases with this option ensures that the user has data of the 30 cases as well as all the resources needed to start cases offline.
The operation can be performed from the Settings menu by tapping the Get offline cases option:
The operation finishes when the Sync formsViewer with Server screen dissapears.
Offline Case Status
Labels display at the bottom of the card when a case is opened or created offline:
- The label is Work in progress when:
- The task is not setup to automatically route the case when recovering connectivity.
- You didn't reach the last step of the task, but instead left the case incomplete.
- The label is Sending when:
- You have completed the forms up to the last step of the task and the task is setup to route offline cases.
Take into acount the following scenarios:
- If a case with the Sending label was opened from the draft list, it will change its status to Work in progress, and you will have to go through all steps to set the case to the Sending status again.
- When the last step of the case is completed, the previous Draft or Inbox case list displays. An alert displays depending on the case status:
- The Saved offline alert for "Work in progress" label
- The The case will be sent when back online alert for "Sending" label
Connectivity Lost While Working Online
You are prompted to save and go back to the Inbox tray if connectivity is lost while working a case that was opened or started offline, even if the task supports offline use. The prompt triggers when you try to save the information. The case is tagged with Work in Progress.
The prompt appears if the case is saved in the last step of the task. Instead, it is tagged as Sending and is routed automatically to the server when back online.
Cases Started Offline
While offline, only starting tasks that allow offline support are listed to start cases. When a case is created offline it is listed in the draft list like in the graphic below:
Take into acount the following features in cases that are started offline:
- Case title and case number remain empty.
- The Sent on date refers to the case date created in the device while offline. The date will be updated after the case is successfully created in ProcessMaker.
- Cases created offline with the Work in progress label are created in ProcessMaker when you interact with the case while online. Meanwhile, the case remains saved in the device and is listed under Draft list.
- Cases with the Sending label are automatically routed when the connection is reestablished.
Cases with the Work in progress label check for data conflicts after the case is reopened online.
The application checks if the starting offline data stored in the device is matching with the data stored in the server. If the information in the server is ahead, you are prompted to decide whether to keep the data from the device or discard it. If the data is discarded then all changes stored locally in the device are lost and the case reloads with the server data.