Show TOC

From XSD to the Entity Data ModelLocate this document in the navigation structure

This topic lists the data types that are supported by the BPM OData service. It also explains how the Entity Data Model (EDM) of the BPM OData service is generated from the XML Schema Definition (XSD) that describes the data types of the task data. It also describes how default values are transferred to the OData EDM types.

Supported Data Types
This section lists the data types that are supported by the BPM OData service.

Complex Types

In XSD you can define complex types and use these self-defined complex types as input and output types of a task. The BPM OData service translates the complex type into its own entity type in its EDM. The XSD element representing this complex type will be translated into a navigation property that points to the EDM entity type of the complex type.

To see how the BPM OData service translates a complex type defined in the XSD into an entity type in its EDM, see Example: Complex Types.

Anonymous Complex Types

In XSD you can define anonymous complex types. To generate a valid EDM, the BPM OData service generates a name for the anonymous complex type. This name is composed of the surrounding complex type name and the local element name, separated by two colons.

To see how the BPM OData service generates a name for the anonymous complex type, see Example: Anonymous Complex Types.

Collections

In XSD you can define a collection of elements with the properties maxOccurs and minOccurs. The BPM OData service translates a collection into an entity type in the EDM. The XSD element representing this collection is translated into a navigation property that points to the EDM entity type of the collection. The multiplicity of the corresponding association is set to "*", which represents a one-to-many association and thus corresponds to a collection.

Note

Only unbounded collections are supported. Therefore, the OData service supports only 0 as the value for minOccurs and 0 or unbounded as the value for maxOccurs.

To see how the BPM OData service translates a collection into an entity type in the EDM, see Example: Collections.

Default Values Provided by Data Types

Default values can be provided in the XSD file. These default values will be transferred to the OData EDM types as well. Data handling for these types differs depending on the type of the request.

  • Request type: GET data request

    If the value is not given in the input data, the BPM OData services do NOT provide the default value defined in the XSD. It is the task of the OData client to decide what to do with unset values. As a consequence, the generated EDM types are all declared as nullable (even though they are defined differently in XSD/SDO).

    The default value from XSD can be read by using $metadata.

  • Request type: POST data request

    If the value is not specified by the client when sending the entity in the body of the POST request, the behavior depends on whether the affected property is nullable or not. If it is not nullable (that is, it is required), the default value defined by the type definition is used to populate the property in the TaskOutput SDO. Otherwise, the property is not set.