Structs
Introduction
Structs are data types that are created from a combination of several primitive data types. They can be freely configured and bundle the information that is relevant to you. It is also possible to use a struct as part of another struct.
Managing Structs
To use and manage structs, you must first ensure that you are logged in as an active editor and then check that the workflow is not active.
Adding Structs
You can create structs in the “My Workflow” section. These structs can be integrated into the workflow via break and make nodes.
Removing structs
When you hover over an entry with the mouse, a “trash can” icon appears on the right-hand side. Clicking on this icon opens a dialog box in which you must confirm the deletion process.
Important: Structs can only be removed if they are not used as nodes in the workflow. If they are in use, you must first remove the node from the workflow before you can remove the struct.
Sorting structs
In the list of structs, you will find an icon with two horizontal lines on the left side of each entry. If you click on it and hold down the button, you can move entries within the structs area. This gives you a better overview.
Duplicating structs
When you hover over an entry with the mouse, another icon appears on the right side to the left of the “trash can” icon. Clicking on this icon allows you to duplicate the struct with all its components.
Usages of structs
As soon as you add a struct as a node in the event graph, a usage is available. You can recognize this by an icon next to the name of the struct. If you click on this icon, a dialog box opens in which the use of the struct is listed with some details.
Configuration options
Adding members
You can add members in the Details tab of the corresponding struct. To do this, simply click on the plus icon in the header.
Removing members
When you hover over an entry with the mouse, a “trash can” icon appears on the right-hand side. Clicking on this icon immediately removes the entry.
Sorting members
In the list of members, you will find an icon with two horizontal lines on the left side of each entry. If you click on it and hold down the button, you can move entries within the member area. This gives you a better overview.
Typing members
In Struct, you can save any relevant data type that is required for your workflow. This includes primitive data types such as strings, enums, booleans, or integers, as well as created enums. Select the appropriate data type from your list and specify whether it is an array or not.
Use in the workflow
To add a struct to the event graph using the set or get method, you can store your user-defined struct in a variable. To do this, specify your struct as the data type of your variable. Alternatively, you can also work with the struct using break and make nodes. In addition, you can also use the table of a CSV file within the CSV component based on a struct.
Make Struct
Make nodes work in the opposite way to break nodes. With this node, structs can be assembled from their individual elements and the node outputs the respective structure.
Break Struct
With this node, structs can be broken down into their individual elements for further processing.