PROCESIO
OverviewPlatform ActionsIntegrations & DemosMarketplaceCustom ActionsDeveloper’s Guide

Working with Data Models

Create data models by hand or from JSON, duplicate them, make them public, delete them, and use them as the type of process variables.

Use the Data Model Designer to create your custom data type. It helps you define the relationships between the data elements (attributes) you have, to give it a structure. Data models are a key concept in PROCESIO as they can be used to configure the data type of process variables.

Data model structure

A Data Model is an organized view of attributes and their relationships with other data models. 

Each data model has one or more attributes. Each attribute has a data type, either primitive or data model, which would effectively create a relationship between 2 data models.

Relationships consist of dependencies or associations between two data models. Thus a data model can have another data model as an attribute, describing the relationship between the two. 

Creating a data model

Here are the steps to create a data model and add attributes to it:

Step 1:  Go to the Designer panel and select Data Model Designer to access the Data Models page. 

Step 2:  Once on the Data Models page, select Create data model from the upper right corner.

Step 3: A modal screen will pop up where you must set a name for your Data model.

If you want to create several data models at this point, check the Add another option and hit Create. A similar form will be displayed to set a name for the following data model.  

Step 5: Press Create when done.

Step 6: The data model is now created and you can add attributes by pressing Add attribute.

Step 7: Define the Display Name, Type, and JSon Property. 

Note: the Type of an attribute can be a primitive (integer, string, boolean etc.) or another Data Model created upfront. This is how you can create Relationships between two or more data models.

If you want to create several attributes at this point, check the Add another option and click Create. A similar form will be displayed to set a name for the following attribute.

Step 8: Press Create button to complete the attribute definition. It will be listed within the data model you created.

Creating a data model from JSON

Instead of adding the attributes one by one, you can let PROCESIO build them from a JSON example.

  1. On the Data Models page, open the arrow next to Create data model and choose Create from JSON.
  2. Fill in Display Name and Name. Each can be up to 64 characters.
  3. Under Select a source to add from:, choose one:
    • Upload file: a .json file of up to 10 MB.
    • URL link: the address of a JSON document. It must be reachable without signing in; otherwise you see "Invalid URL. Make sure there are no typos, or that the file is public, or if you are authorized to access it."
    • Editor (JSON content): paste or type the JSON.
  4. Click Preview Data Model. The Preview structure step shows the attributes found in the JSON.
  5. Click Create, or Back to change the source.

Nothing is saved until you click Create.

The Create Data Model panel with the three source options: Upload file, URL link and Editor (JSON content)

Duplicating a data model

Open the ⋯ menu on a data model's row and choose Duplicate. The copy gets the same attributes and the name of the original followed by _1. Duplicate is offered only for data models that have at least one attribute.

Public and private data models

The data models on the Data Models page are public: you can use them as the type of a process variable and as the type of an attribute in other data models.

When you create a data model while choosing an attribute's type, it is a private data model: it belongs to that attribute only. On the attribute's row you can:

  • Make public: the data model becomes public, so other data models can use it too. All changes to a public data model affect every data model that uses it.
  • Make public clone: PROCESIO creates a public copy and leaves the private one as it is. The copy is not linked to the private data model.

If a public data model is used as an attribute type in other data models, its page warns you that changes to its structure may affect those data models too, and lists them.

Deleting a data model

Open the ⋯ menu on a data model's row and choose Delete, then confirm.

PROCESIO lets you delete a data model even while processes use it. Processes that have variables of that type become invalid. Check where a data model is used before you delete it, and create a replacement first if you still need it.

Using a data model in a process

After you created a process you can add variables that have a custom data type that you defined in the Data Model Designer. For example, you have defined the data model Country like in the image below:

In the process designer, you can create the <country_var> variable that has the data type “Country”:

We can use the <%country_var%> variable in any action configuration, by selecting an attribute of the “Country” data model:

When mapped to the property of an action, the format is <%variable_name%>.<data_model_attribute_name>, like in the image below:

On this page