Data Structure Builder
Last updated
Last updated
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, previously created structures, and pre-built system stuctures 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.
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.
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.
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:
Editing or simply clicking the name of the structure allows you to open the Structure Builder with the structure properties.
Copy allows you to copy the structure for further transfer.
Clone allows you to create the clone structure. The cloned structure will have the same name as the parent structure + Clone(n).
Cut allows you to cut the structure for further transfer.
Paste allows you to paste the structure. It is not available unless you have the previously used Copy or Cut options.
Rename allows you to rename the structure.
Export — allows exporting the selected structure in JSON format, enabling its further import into another folder, project or a different branch of the current project.
Import — allows importing a previously exported structure into another folder, project, or branch of the current project.
Find Usage — allows finding the usage of the selected structure across the entire project. The search results will be displayed in the search panel located at the bottom of the screen.
Delete allows you to delete the structure.
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.
Simple data types:
Boolean — value “true” or “false”
String — text, for example, “Peter Peterson”
Integer — number, for example, “22”
Float — floating-point or decimal number, for example, “0.1234”
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”
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:
Add allows you to add a new property.
Copy allows you to copy the property for further transfer.
Paste allows you to paste property. It is not available unless you have the previously used Copy or Cut options.
Clone allows you to create the clone property. The cloned property will have the same name as the parent property + Clone(n).
Find Usage allows finding the usage of the selected property across the entire project. The search results will be displayed in the search panel located at the bottom of the screen.
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.
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.
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.
To create a new Structure, select the Structures icon on the Project Explorer panel — left vertical panel. Make sure you are in the Structures entity section. Create a structure by clicking the New Structure button at the top of the Explorer panel. To create a structure in a folder, select the desired folder and click the New Structure button. Enter the Structure name and click the CREATE button in the pop-up window.
To filter Inherited Properties to find the necessary data, сlick the Filter button, then enter the name of the element you need to find in the open field.
To add a new property, click the plus button, then click the data type and select the necessary data type. If you do not see the required type or already created structure that you would like to use for this property in the drop-down list, then click See All.
To filter Own Properties for necessary data, сlick the Filter button, then enter the name of the element you need to find in the open field.
To import structure from JSON object, click the Import structure button at the end of the Own Properties section header.