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, business logic, and manage the solution.
Enter the Structure name and click on the CREATE button in the pop-up window.
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.
As a result, a new data structure will be created, and you will be able to start populating its properties.
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.
Some structures are auto-generated during creation of assets and some connectors (e.g. SOAP, REST, and EVM blockchain).
The inherited system classes are located in the structure selector PDK folder. While selecting a property type to access the structure selector, click on 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 menu contains a list of commands:
Edit or simply clicking on the name of the structure allows you to open the Structure Builder with the structure properties.
Copy allows you to copy the structure into the clipboard to make a copy of it in some other folder.
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 into the clipboard to move it into another folder.
Paste allows you to paste the structure form the clipboard into the selected folder. It is only available if you have the previously used the Copy or Cut command.
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 on the Extends, then select See All. Select the structure in the Structure Selector and click on 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 on 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 on the property name, then enter the name you need.
Simple data types are:
Boolean — value “true” or “false”
String — text, for example, “Peter Peterson”
Integer — whole number, for example, “22”
Float — real number which can have a fractional part, 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 by hand, or click on the BROWSE button to select a file, then click on the UPLOAD button in the pop-up window.
Select the necessary structures using the checkbox and click on the CONFIRM button. You can view the contents of each structure by navigating it before clicking on 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 on the ADD button.
If your structure has previously created properties, to replace them, click on the CONFIRM button. To cancel an operation, click on 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 on the New Structure button at the top of the Explorer panel. To create a structure in a folder, select or create the desired folder first, and then click on the New Structure button.
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 on the Plus button, then click on 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 on See All.
To filter Own Properties for necessary data, сlick on 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 on the Import Structure button at the end of the Own Properties section header.