Data model editing
Data model editor
You can access the data model editor by selecting "Data model" on the application's main screen in Eximee Designer

The data model editor is divided into three tabs:
Structure, where we manage the model structure and fill in node parameters,
Data sources, where we define and parameterize data sources,
Source, where we edit the JSON that is the source representation of the model - functionality for advanced users.
Structure
The structure of the data model is presented as a tree in the left panel of the editor. Clicking a tree element expands its branch. It is also possible to expand and collapse branches using a separate button next to the node.

Selecting a tree node automatically filters the nodes in the list on the right side.

At the top of the node list, the key that serves as the current view filter is displayed: "client.surname" in this case.
Parameterization of model elements
Node

In the model node editing section, you can edit the key and documentation ("description") of the object. You can also mark the object as an array.
Above the fields of the node card and field card you can see the full key, where each list in the path has empty brackets, e.g. customerData.address[].phones[].number. In this notation, the form refers to the data model.
![Edytor modelu danych z zaznaczonym polem numer w liście telefony listy adres. Nad polami karty klucz customerData.adres[].telefony[].numer, obok pola Klucz przycisk kopiowania](https://docs.eximee.com/~gitbook/image?url=https%3A%2F%2F2112972046-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F2CssJT0zIo4SJQLbSZ6l%252Fuploads%252Fgit-blob-20c826f69098ce294fa68bc0938f9894cfa2d680%252Fkarta-wezla-klucz-z-listami.png%3Falt%3Dmedia&width=768&dpr=3&quality=100&sign=0a309a457b58f3002c636e60928ff4a8&sv=3)
The context menu includes an option to delete a node together with its descendants.
To add a field to a node, click the "Add field".
Field
The field section in the data model also allows you to provide a default value for the field.

On the right side of the field card is the section Used in. It shows in which column of the all cases list in Eximee Dashboard the application uses the field, e.g. "Case list, column Declared amount (PLN)", with a link Application configuration. A field that is not used by any application displays the text "The field is not used in the case list.". You specify fields for list columns in the application configuration, in the tab Case list – see Columns of the all cases list in application configuration.
When you change the key of a field used in the case list or delete it, the new model version save dialog warns: "The case list uses field … which was deleted or changed. Fix the application configuration.". The warning does not block saving.
Data source
Clicking the data source chip or the pencil icon next to it opens a drawer with a list of data sources and the ability to edit their usage (source order, source parameters, value mapping).

By default, for each leaf of the data model tree (i.e. fields that have no further subfields), the platform automatically adds a special data source of type ValueMap. This is a built-in source that stores the field value in the application's memory structure (the so-called request value map) – it can be treated as the equivalent of a session variable storing data in the context of the entire application (form). The default ValueMap mapping uses the full path of the field's keys as the key in this internal map (e.g. for the field country located inside the object personalData the key in the value map will be personalData.country). As a result, after binding form fields to the model, you do not need to write additional code to save the entered data – the value entered by the user will be automatically placed under the appropriate key in the model's memory.
Data source - defensive logic and empty values
Data sources for the data model must not assume a deterministic order of calls or that all input data is already available. The platform may call a source earlier (e.g. when determining the multiplicity of dynamic sections of the form or model), even if a given field is not yet used directly in the form or process.
Therefore, data sources must be designed defensively: in the absence of data, incomplete data, or data that is "not ready yet", they should return safe, empty values (null, an empty list, an empty object) and not raise exceptions. An empty value means: at this stage I cannot determine the value and it allows subsequent sources in the cascade to act, in particular default sources (e.g. ValueMap or default values on the field definition).
Exceptions should be reserved only for real technical errors (e.g. communication errors or incorrect configuration) that should interrupt system operation (form interruption, process transaction rollback, etc.), not for transitional process states.
Last updated
Was this helpful?
