Offline Mobile Design Guidance

Certified Associate Developer

We have a use case for a mobile offline application. I'm trying to build a simple app to test the functionality. Are there any other pointers beyond the design guidance in the documentation? 

An example of the application process flow is as follows:

  1. Load application and any data that will be needed for the entry form
  2. Go offline
  3. Invoke form to enter data with any ref data populated from Step 1
  4. Enter data
  5. Submit the form to save changes locally
  6. Go online and see the newly created record

The documentation talks about offline actions and offline tasks. I would like to implement offline actions but I'm not seeing much detail on configuring them. 

What would be really useful is a working example with a similar flow to what I've described. In that case, I could dissect to fit my use case. Also useful would be more pointed steps for implementing this functionality.

I'm aware of the following:

  • Enable offline mobile in Admin Console
  • Enable interface for offline
  • Use CDTs
  • Call data at the top of the parent interface
  • Don't use functions/components that aren't compatible with offline

  Discussion posts and replies are publicly visible

    1. Enable Offline Features:

      • Ensure offline capabilities are enabled in your Admin Console.
      • In your application, enable offline interface options.
    2. Data Modeling with CDTs:

      • Use Custom Data Types (CDTs) to model the data you will be handling offline.
      • Make sure your CDTs are designed to support offline storage and synchronization.
    3. Preloading Data:

      • When the application loads, fetch and store any necessary reference data locally. This ensures that the data needed for the form is available offline. snow rider
      • Use a data store that supports offline capabilities, like IndexedDB for web apps or a local database for mobile apps.
    4. Interface Design for Offline:

      • At the top of your parent interface, load the data needed for your forms.
      • Avoid using functions or components that are not supported offline.
    5. Offline Actions:

      • Offline actions typically involve storing data locally and then synchronizing it when the app goes online.
      • Implement a local save functionality to handle form submissions. This could involve writing to a local database or local storage.
      • Design a mechanism to queue these actions for later synchronization.
    6. Synchronizing Data:

      • When the application detects an online state, it should synchronize local changes with the server.
      • Handle conflicts appropriately, perhaps by prompting the user or using a conflict resolution strategy.
  • 0
    Certified Lead Developer
    in reply to adamh2775

    Would you please NOT post ChatGPT generated answers without verification! The issue is, that they sound plausible, but are misleading or plainly wrong in the details.

    E.g. there is no "IndexDB" in Appian, and there is no explicit offline capabilities in CDTs.

  • 0
    Certified Lead Developer

    One helpful piece to remember is that functions such as a!documentDownloadLink() and a!processTaskLink() also need to be part of your a!localVariables() set and not used inline within SAIL components as is the normal design paradigm.