Structures builder

Structures are models of data objects, can be both simple and complex, and contain elements of various types. The Structure builder is a built-in editor for structure creation. The builder helps to create structures by using basic data types: String, Integer, Float, Date, Boolean, Arrays, Maps, and previously created structures, without limits of their use. Structures can be of any nesting.

Once a structure has been created, it is available for use by any entity within the platform. For example, in a Flow as an incoming structure or to define a local variable structure.

How to create the first Structure?

After a project has been created, you will be redirected to the Integrated Development Environment (IDE). Use it to create a data model, own logic, and manage the solution.

The Structure's name should be longer than 1 character and shorter than 100. It can contain letters (Latin a-z A-Z), numbers 0-9, $, and underscore. It should begin with a letter character.

Now your first structure has now been created.

How to work with Structures?

Every Structure is a set of own properties and inherited properties (optional). By default, a Structure is inherited from UserObject superclass.

Each structure can contain up to 255 properties.

Structures can inherit properties from any other structures created in the system,auto-generated ones, and those from the system structures. The inherited properties are listed in the 'Inherited Properties' block and cannot be edited from the current structure.

Auto-generated structures appear while creating Assets, SOAP, Rest, and EVM blockchain connectors.

The inherited system classes are located in the structure selector PDK folder. While selecting a property type to access the structure selector, click See All in the drop-down list.

Operations with Structures

Select Structure on the Project Explorer panel (the left vertical panel). To see all available operations, open a context menu by clicking the right mouse button.

The list of ready-to-use operations:

  1. Editing or simply clicking the name of the structure allows you to open the Structure Builder with the structure properties.

  2. Copy allows you to copy the structure for further transfer.

  3. Clone allows you to create the clone structure. The cloned structure will have the same name as the parent structure + Clone(n).

  4. Cut allows you to cut the structure for further transfer.

  5. Paste allows you to paste the structure. It is not available unless you have the previously used Copy or Cut options.

  6. Rename allows you to rename the structure.

  7. Delete allows you to delete the structure.

How to build Structures and work with properties?

After creation, the new Structure has empty Inherited Properties and Own Properties.

A structure can extend another structure, in this case parent structure properties will be available as inherited properties. To do this, click the Extends, then select See All. Select the structure in the Structure Selector and click the CONFIRM button. Then inherited properties section will be added with properties and their types from the selected structure. The inherited properties are not editable. To view the inherited structure, click the extension icon right side to its name, the inherited structure will appear in a new tab.

If you need the property to be presented as an array of elements, open the structure selector, select pdk → Core → Array→ then the required type (optional). A constructor template will display your current selection at the top of the selector.

For example.

You wish to select String Array. In this case, open the structure selector, select pdk → Core → Array then String.

The same sequence of operations is also true for Maps.

To rename Own Property click the property name, then enter the name you need.

Supported data types

  1. Boolean — value “true” or “false”

  2. String — text, for example, “Peter Peterson”

  3. Integer — number, for example, “22”

  4. Float — floating-point or decimal number, for example, “0.1234”

  5. Date — specifies the date value in the format yyyy-MM-ddTHH:mm:ss.sssTZD, for example “1997-07-16T19:20:30.023+01:00” or “2013-12-24T09:12:14.232344Z”

  6. Custom — any arbitrary structures that can be created in the Structure builder or default structures.

Operations with properties

Select a property in the Own Properties section. You can see the number of available operations in a context menu, by clicking the right mouse button.

The list of ready-to-use operations:

  1. Add allows you to add a new property.

  2. Copy allows you to copy the property for further transfer.

  3. Paste allows you to paste property. It is not available unless you have the previously used Copy or Cut options.

  4. Clone allows you to create the clone property. The cloned property will have the same name as the parent property + Clone(n).

  5. Delete allows you to delete the property.

To perform the same operation on multiple entities simultaneously, select multiple entities. Drag and drop the entity to move it to another position in the list.

How to import XSD?

You can import XSD structure to simplify the process of structure creation or to reuse your existing developments. To do this: select Project on the top panel → Import → XSD Structures.

Enter the URL or BROWSE button and click the UPLOAD button in the pop-up window.

Select the necessary structures using the checkbox and click the CONFIRM button. You can view the contents of each structure by navigating it before clicking the confirm button.

Once the import has been successful, all imported structures can be viewed in the Structures section in the Explorer panel.

In the future, all imported structures can be used in the same way as those created manually on the platform, you can also edit them.

xmltovariable function can automatically assign values to the generated structures because often they have a pair of XML VS XSD files.

How to import structure from JSON object?

Paste the JSON object in the left part of the Import Properties pop-up window. The right side of the pop-up window will indicate the Properties List of the pasted JSON object. To add the properties in the structure, click the ADD button.

If your structure has previously created properties, to replace them, click the CONFIRM button. To cancel an operation, click the CANCEL button.

Newly added properties can be viewed in the Own Properties section.

Last updated