Understanding Offline Data
  • 23 Nov 2022
  • 2 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

Understanding Offline Data

  • Dark
    Light
  • PDF

Article Summary

About Master Data and Transaction Data

The data required for the various operations done by the user in the Offline app is of two types: 

  • Master Data 
  • Transaction Data 

Master data is initially downloaded from the the EdgeReady Database or third-party servers during app installation.

Transaction data is initialized during the first app session. It includes the following types of data: 

  • Any data downloaded from server during app installation
  • Data from Delta download BOS that is downloaded at predefined sync intervals
  • Data obtained or generated through a business logic in the offline app
Note
Both Master data and Transaction data are persisted between sessions and remains in the device until Data Validity period ends. The transaction data should be designed to be posted to the server before it expires.

Types of BOSes in the Offline App

There are three types of BOSes in the Offline app: 

  • Initial Download BOS 
  • Delta Download BOS 
  • Custom BOS

The Initial and Delta Download BOSes are available in the APM screen by default when an offline app is created. 

UnderstandingTransactiondata

1) Initial Download BOS

The Initial Download BOS is used to download the master data from the backend ERP server(or EdgeReady Database) into business function variables. These variables are Output Variables of the Initial Download BOS.

Additionally, if applicable for a use-case, the BOS also downloads the required transaction data from the server. The download happens while installing or updating the app. 

Note
The initial download data remains in the App until the container app is uninstalled or deleted.

Sample Initial Download BOS

In APM, double click the Initial download BOS to open the Integration Builder screen.

Initial Download-Busines func variables(1)In the above screenshot, data from 'vendordata' and 'Department' master tables are downloaded into 'VendorAccount' and 'departmentMaster' output variables initially. This master data is stored in the device during the app installation.

2) Delta Download BOS

Multiple users using the offline app may update data at the same time. These updates are retrieved from the server through the Delta Download BOS. The device’s transaction data is updated with server data through the Delta Download BOS at regular download intervals set by the user in the Service Start window.

ServiceStart

The Tobedeleted Variable

In the initial and delta download the TobeDeleted variable is available by default under the Output Variables section to the right of the Integration Builder screen. It cannot be deleted from the integration builder. 

The deleted records from the EdgeReady server are sent to the Tobedeleted variable, which in turn are cleared automatically when the delta download runs in the specified interval.

TobeDeleted

3) Custom BOS

Other custom BOSes can be developed in the offline app to enable the movement of records to and from the server.

Developer Guidelines

1) If the business use-case does not require the use of delta download data, it is best practice to enable a separate delta download BOS in the Service Start window with an empty OnCloud lane. The reason being, if initial and delta download is set to same BOS, the Initial download BOS will run at specific intervals and thereby downloading master data periodically. This might not be required for certain use-cases.

2) The developer can ensure that the variables have table structures(array) based on the alignment of data in the UI. This is to ensure the ease of programming, so that the data in a specific UI component is referenced from a single table and not multiple tables.







Was this article helpful?

ESC

Eddy, a super-smart generative AI, opening up ways to have tailored queries and responses