Smartform Data Storage and Access


Overview

From the storage point of view we make a distinction between a smartform template and a smartform instance. Additionally we store values and structure for reporting purpose and easier access via API in a separate DTO for instance element data.


Template vs. Instance

Template

1 Represents the structure of the form and the element composing it (together with their static values for the titles etc.)
2 Is a ‘blank form’ that can be filled many times.
3 Is stored in the cloud as a ChecklistTemplate DTO object.
4 Is created and modified by the Designer app only.
4 Is versioned: each version is stored as a different object in the cloud.
5 Needed for supporting the evolution/development of the form.
6 Has statuses reflecting its lifecycle state (ready to be used for new smartforms or still in construction).

Instance

1 Represents the values typed by the user to fill the template (see above).
2 Is stored in the cloud as ChecklistInstance DTO.
3 Contains link to the template on which it was created.
4 Can be read by any mobile client.

Instance Element Data

Smartform instance element data represents the values typed by the user to fill the template including the structural information from the template required to build a report or do analytics. This information is stored in the cloud in the ChecklistInstanceElement DTO.

This information contains all relevant information for:

  • creating reports and the values in a table view
  • filling in instances via the Web Application
  • all content can be queried via Query API

Data Storage

Smartform Template

A smartform template is stored in the ChecklistTemplate data transfer object in the cloud.

The content field holds the elements of the template and is stored as a binary zip file.


Smartform Instance

The data entered by a user to fill in a smartform is referred to as a smartform instance.

This data is stored in XML files which are archived in a zip file, which is then encoded as binary data in the content field of the ChecklistInstance cloud object.

The zip file will contain the following:

  • A file with the name pattern: values-x-yy.xml in which the smartform instance data was entered
  Notes
1 The x in the name pattern represents the version number of the smartform instance. Now this is always 1 in the past we supported several versions, see note below.
2 The yy represents the language code in which the smartform instance data was entered. In the past it was possible to have several files per language which is not anymore relevant.