Exercises
In this microlearning, we will educate you on what we mean when we talk about message definitions.
Should you have any questions, please contact academy@emagiz.com.
1. Prerequisites
- Basic knowledge of the eMagiz platform
2. Key concepts
This microlearning centers around understanding the concept data modeling in design.
3. CDM, CDM & system message, message mapping
By following the steps below, you should gain a better understanding of the differences between CDM, CDM messages, and system messages.
- Creating a CDM
Please import the file Order.xsd in your CDM. The code for this file can be found in section 4. Code for xsd files. - Creating a CDM message
Now, go to your CDM message and select Order as root entity.
Add all other entities and attributes from Order.xsd, which were imported into the CDM, to your CDM message definition. - Creating a system message
In one of your System messages, import the file TransportOrder.xsd. The code for this file can be found at the bottom of this page. - Creating a CDM message
Select CreateOrder as root entity and add all other entities and attributes to your system definition. - Complete message mapping
Now that you have completed these steps, go to Message mapping and complete the mapping.
The solutions to these exercises can be found here.
4. Code for xsd files
Order.xsd:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.carlijnsplatform.com/ns/capetms/cdm/1.0/"
attributeFormDefault="unqualified"
elementFormDefault="qualified"
targetNamespace="http://www.carlijnsplatform.com/ns/capetms/cdm/1.0/">
<xs:complexType name="Order">
<xs:sequence>
<xs:element name="Date" type="xs:dateTime"/>
<xs:element name="OrderId" type="nonEmptyString"/>
<xs:element name="Customer" type="Customer"/>
<xs:element name="PickupAddress" type="PickupAddress"/>
<xs:element name="DeliveryAddress" type="DeliveryAddress"/>
<xs:element maxOccurs="unbounded" name="OrderLine" type="OrderLine"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Customer">
<xs:sequence>
<xs:element name="Name" type="nonEmptyString"/>
<xs:element name="Email" type="nonEmptyString"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PickupAddress">
<xs:sequence>
<xs:element name="Name" type="nonEmptyString"/>
<xs:element name="Street" type="nonEmptyString"/>
<xs:element name="StreetNumber" type="nonEmptyString"/>
<xs:element name="PostalCode" type="nonEmptyString"/>
<xs:element name="City" type="nonEmptyString"/>
<xs:element name="Country" type="nonEmptyString"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DeliveryAddress">
<xs:sequence>
<xs:element name="Name" type="nonEmptyString"/>
<xs:element name="Street" type="nonEmptyString"/>
<xs:element name="StreetNumber" type="nonEmptyString"/>
<xs:element name="PostalCode" type="nonEmptyString"/>
<xs:element name="City" type="nonEmptyString"/>
<xs:element name="Country" type="nonEmptyString"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="OrderLine">
<xs:sequence>
<xs:element name="PackageUnit" type="nonEmptyString"/>
<xs:element name="Quantity" type="xs:long"/>
<xs:element name="Description" type="nonEmptyString"/>
<xs:element name="Weight" type="xs:decimal"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="nonEmptyString">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
</xs:restriction>
</xs:simpleType>
<xs:element name="Order" type="Order"/>
</xs:schema>
5. Key takeaways
- The CDM holds all entities and attributes that are relevant within the context of your complete integration landscape.
- The CDM message is tailor-made for a specific piece of data and only holds the entities and attributes relevant for that piece of data.
- A system message is specific to a system.
6. Suggested Additional Readings
If you are interested in this topic and want more information on it please read the help text provided by eMagiz.