Structured data are defined on the Structured Types element in the outline view of the model.

Figure: Structured Types in the Outline View
Two categories of structured data types can be defined
Additionally you can import Types, see section Importing Types.
The Structured Types tree contains a table tree structure with all defined structured types:

Figure: Structured Types Subtree
Composite types are data types with fields of the following types
for example to describe a person or order data.
To create a new composite type:

Figure: Create a New Composite Type.
The name of the new composite type can be specified in the General properties settings.
Using the Visibility Public option, you can specify whether you want to import type definition by reference when referenced in another model. By default, the Visibility Public checkbox is selected. For more information, please refer to Multi Package Modeling Preferences section of Setting Process Manager Preferences chapter.
Figure: Composite Type - Visibility Public
The target namespace of the schema contained by a type declaration is selected by default. This namespace is used in creating and parsing XML documents based on this type declaration schema. A type declaration uses two fields, the location which specifies the id of the other model and the Xref which specifies the id of the type declaration in the other model.
To edit the new composite type, open its properties page with a double-click on its entry in the Structured Types tree.
Data fields can be specified in the Structured Type Definition field.
To create a new data field, select the <new> table cell, type in a name for the data field to be created and press the TAB key. An entire row representing the new data field will be displayed and can be edited by selecting the corresponding table cells:

Figure: Structured Type Definition
Note that when using structured data that has cardinality zero or more in scoped data, the data path must be set accordingly. If the data path of structured data is not set according to cardinality a validation warning is displayed. For example, if the cardinality is defined as Zero or more then the data path should be set as structured data[0]. The following screenshot displays the warning message:
Figure: Structured Data with Cardinality - Validation Warning
Embedded Unions

Figure: Setting a Choice Type.
In the Type column you can select xsd types as well as all other composite and enumeration types - except the current composite type to avoid recursion.

Figure: Choose a Type.
Anonymous substructures can be defined within a structure in order to fully support XSD composite structures without defining the substructures as separate data structure definitions.
For example:
<xs:complexType name="PaymentTypeInformation1">
<xs:sequence>
<xs:element name="InstrPrty" type="Priority2Code"/>
<xs:choice>
<xs:element name="SvcLvl" type="ServiceLevel2Choice"/>
<xs:element name="ClrChanl" type="ClearingChannel2Code"/>
</xs:choice>
<xs:element name="LclInstrm" type="LocalInstrument1Choice"/>
<xs:element name="CtgyPurp" type="PaymentCategoryPurpose1Code"/>
</xs:sequence>
</xs:complexType>
Selecting the <xsd:anonymous> type sets the type of the new field to <New Composition> and creates an indented line to enter subfields for this composition.
The <new> entry appears as the last node whenever the node is expanded.

Figure: Selecting the Anonymous Type.

Figure: Subtree of Anonymous Type.
If the type of the field of the anonymous composition is changed to another type later, the subfields are deleted.
In case you intend to export a schema file containing XML attribute types, use the <attribute> type, e.g.:

Figure: Selecting the Attribute Type.
An attribute type is displayed with an attribute icon on the left side of the name:

Figure: Attribute Type displayed in Structured Type Definition.
If you import a schema file containing XML attribute types, these types will be mapped as <attribute> type. Note that attribute types can have the cardinality Optional, Prohibited or Required as shown in the above figure.
For example importing a schema file containing:
...
<xsd:complexType name="Product">
<xsd:sequence>
<xsd:element name="Name" type="xsd:string"/>
<xsd:element name="Synopsis" type="xsd:string"/>
<xsd:element name="State" type="xsd:string"/>
</xsd:sequence>
<xsd:attribute name="Analysis" type="xsd:string" use="required"/>
</xsd:complexType>
<xsd:element name="Product" type="pro:Product"/>
...
will result in the following structured data definition:

Figure: Imported Type Example.
In the Cardinality column, you can specify, how many times the selected type should occur. The following cardinalities can be selected:

Figure: Choose Cardinality.
The One or More cardinality provides a list-like behavior.
For Attribute Type, following cardinalities can be selected:

You can change the order of the keys by using the Move Up and Move Down buttons.
! Tip:
You can create your entire structure just by using the TAB key, typing in names and selecting types and cardinalities with the UP/DOWN keys.
The Stardust Structured data type supports two flavors of the xsd simple types that are enumerations and patterned.
The Enumeration type means that the data object will be of type string and it will accept values from the list of values defined in the enumeration. Enumeration types are lists of enumeration keys, e.g. to describe salutations, titles or countries.
To create a new enumeration type:

Figure: Create a New Enumeration Type.
To edit the properties of the enumeration type, double-click its entry in the structured types tree.

Select the <new> cell, type in an enumeration key and press the TAB key.

Optionally you can enter a Minimum Length and a Maximum Length for the enumeration field.
To change the order of enumeration keys use the Move Up and Move Down buttons.
The Patterned type means that the data object is of type string and it accepts values conforming to the defined pattern. Patterned types are series of values. You can define exact sequence of characters that are acceptable. For example, you can define series of numbers [0 - 9] and letters [a - z], gender [male - feamale] where you can give choice.
To create a new patterened type:

Figure: Patterened Type
Select the <new> cell, type in an enumeration key and press the TAB key.

Figure: Patterened Type Values
Optionally you can enter a Minimum Length and a Maximum Length for the enumeration field.
To change the order of enumeration keys use the Move Up and Move Down buttons.
XSD files describing one or more data structure definition can be imported. The corresponding data structure definitions will be created.
To import an xsd file select Structured Types > Import Types in the Outline view:

Figure: Import Types
A dialog opens where you can choose if you want to select the schema from:

Figure: Choose where to select the Schema from.
In case you chose to select from workbench project, the next dialog offers to import appropriate files. Select Import Files... to open the file import dialog.

Figure: Import Files
Now browse to the import resource in your local file system.

Figure: Browse to File.
Now select Finish to accept the files you selected. Select the schema file from the projects and click Next.

Figure: Select an XML Schema File.
Choose the types you want to import and select Finish to close the dialog.

Figure: Choose the Types to be imported.
To select the schema from HTTP:

Figure: Enter a URL for your schema.

Figure: Using the Loaded Schema

Figure: Select the Types to be imported.
Now the imported type is added to your model. You can see it in the structured types tree of the Outline view, e.g.:

Figure: Imported Structured Type
Note
Please note that there will be no warning in case the imported types have
the same name or Id like existing structured types. You need to rename them explicitly.
In case a model has a reference to an external structured type definition that is also referenced by other models, a change of this structured type definition can cause problems in some of these models. If you change an XSD which is referenced by multiple models, you must make sure that it is still valid for all other referencing models. We recommend to give the XSD file an unique name for every model version to prevent invalid XSDs.
The following example shows such a situation:
If you change the content of XSD_GLOBAL, it can happen that the XSD is valid for Model_B but no longer for Model_A. Using two XSDs with unique names like XSD_GLOBAL_A and XSD_GLOBAL_B would prevent this problem.
Data structure definitions can be exported to XSD for single data structures or for all data structure definitions in a process model. To export a structured data type:



Now the exported types appear as xsd files in the selected folder, e.g.:

Figure: Exported Schema Files
Once the file connection is established, the referenced structured data definition can be referred in another model. Note that the structured types from the referenced model are read only. You cannot edit the referenced structured types. To refer the structure data in the referencing model:
In the referencing model, drag and drop the structure data from the Outline view > External Model Information > File Connection
Figure: Drag Referenced Structured Data
Double-click on the dragged structured data in the diagram canvas. The structured data properties get displayed.
Click on the Structured Data Definition. The declared types are displayed. If you select the check box Display Imported Model Elements as Groups then the references for the declared types are also displayed.
Figure: Referenced Declared Type
Process data of structured type are stored in the tables in the Stardust Audit Trail Database. The storage layout is optimized for efficient access in queries.
See details about structured data storage in the chapter Structured Data Storage of the Operation Guide.