Complex Data Type
When dropping the Complex Data Type from the palette, one item component will be created by default. Then its name can be changed, its type also, and constraints can be added.
To change the type, select the item component, click on the icon and choose a type. Or, click on the type value, a new dialog will be opened, set the type and the constraints from there.
Item components can be added by clicking on the icon. To delete an item component, select it then press on the Delete from the keyboard or do a right click, on the context menu click on Delete.
Item components can also reordered by dragging them from a position and dropping to another position or also using the arrow keys.
An item component, can refer to another Data type. That will set the type of the item component and also create a reference connector between the item component and the Data Type as shown on the figure below. To do this, select the Complex Data Type from the smart arrow or drag a the connector from the arrow to an existing depicted Item Definition on the Diagram. Refered Item Definition can be hidden by right-clicking on the shape and selecting "Hide". An icon will appear and it can be used to show the hidden Item Definition any time.
Collection can be set on the item component or on the Complex Data Type, it will resize the height of the item component or the header of the complex data type as shown in the following figure.
Resize
On the following figure, the left and the right column of the complex data type can be resized.
Rows can also be resized as shown in the following figure.
It is possible to have multiple depictions of the same Data Type on the Diagram, or on a different diagrams. Updating one of them will synchronize all of the depictions. |
Structured item component
Item component structures of the item definition can be created from the diagram, simply by using the shape smart arrows and choosing Structured Item component.
The item component will be linked with a composition connector to the Structured item component as shown on this example. Here a subcomponent of the Person name is created, and now more components can be added on the Structured item component.
A Structured item component can be hidden and expanded on the diagram. Name can be changed, data type, constraints can be set on its components, reordering is also possible, and also substruture can be created.
There is an option "Refactor as a type" that can be applied on the Structured item component from the diagram to create a new Complex Item Definition. To do it, right click on the Structured item component and choose Refactor as a type. The composition connector will change to reference connector and the structured item component to complex data types.
When the reference connector is unlinked or deleted between the item component and a data type, the type on the item component is unassigned and changed to "Any".