Hide last authors
| author | version | line-number | content |
|---|---|---|---|
| |
1.1 | 1 | {{container}}{{container layoutStyle="columns"}}((( |
| 2 | In this microlearning, we will educate you on what we mean when we talk about message definitions. | ||
| 3 | |||
| 4 | Should you have any questions, please contact [[academy@emagiz.com>>mailto:academy@emagiz.com]]. | ||
| 5 | |||
| 6 | == 1. Prerequisites == | ||
| 7 | |||
| 8 | * Basic knowledge of the eMagiz platform | ||
| 9 | |||
| 10 | == 2. Key concepts == | ||
| 11 | |||
| |
2.1 | 12 | This microlearning centers around understanding the concept data modeling in design. |
| |
1.1 | 13 | |
| |
6.1 | 14 | == 3. CDM, CDM & system message, message mapping == |
| 15 | By following the steps below, you should gain a better understanding of the differences between CDM, CDM messages, and system messages. | ||
| |
9.1 | 16 | |
| |
10.1 | 17 | * Creating a CDM |
| |
18.1 | 18 | ** Please import the file Order.xsd in your CDM. The code for this file can be found in section 4. Code for xsd files. |
| |
12.1 | 19 | * Creating a CDM message |
| |
18.1 | 20 | ** Now, go to your CDM message and select Order as root entity. |
| 21 | ** Add all other entities and attributes from Order.xsd, which were imported into the CDM, to your CDM message definition. | ||
| |
12.1 | 22 | * Creating a system message |
| |
18.1 | 23 | ** 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. |
| |
14.1 | 24 | * Creating a CDM message |
| |
18.1 | 25 | ** Select CreateOrder as root entity and add all other entities and attributes to your system definition. |
| |
13.1 | 26 | * Complete message mapping |
| |
18.1 | 27 | ** Now that you have completed these steps, go to Message mapping and complete the mapping. Please add the following to the Design mapping |
| 28 | *** Ensure to properly map the address type | ||
| 29 | *** Ensure to properly document mappings where required | ||
| 30 | *** Ensure to use | ||
| 31 | |||
| |
10.1 | 32 | |
| |
9.1 | 33 | The solutions to these exercises can be found [[here>>doc:Main.eMagiz Academy.Use Cases.Data modeling in Design.Exercises.Solutions.WebHome||target="blank"]]. |
| |
1.1 | 34 | |
| |
14.1 | 35 | == 4. Code for xsd files == |
| |
17.1 | 36 | === 4.1 Code for Order.xsd === |
| |
16.1 | 37 | {{code language="xml"}} |
| |
14.1 | 38 | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" |
| 39 | xmlns="http://www.carlijnsplatform.com/ns/capetms/cdm/1.0/" | ||
| 40 | attributeFormDefault="unqualified" | ||
| 41 | elementFormDefault="qualified" | ||
| 42 | targetNamespace="http://www.carlijnsplatform.com/ns/capetms/cdm/1.0/"> | ||
| 43 | <xs:complexType name="Order"> | ||
| 44 | <xs:sequence> | ||
| 45 | <xs:element name="Date" type="xs:dateTime"/> | ||
| 46 | <xs:element name="OrderId" type="nonEmptyString"/> | ||
| 47 | <xs:element name="Customer" type="Customer"/> | ||
| 48 | <xs:element name="PickupAddress" type="PickupAddress"/> | ||
| 49 | <xs:element name="DeliveryAddress" type="DeliveryAddress"/> | ||
| 50 | <xs:element maxOccurs="unbounded" name="OrderLine" type="OrderLine"/> | ||
| 51 | </xs:sequence> | ||
| 52 | </xs:complexType> | ||
| 53 | <xs:complexType name="Customer"> | ||
| 54 | <xs:sequence> | ||
| 55 | <xs:element name="Name" type="nonEmptyString"/> | ||
| 56 | <xs:element name="Email" type="nonEmptyString"/> | ||
| 57 | </xs:sequence> | ||
| 58 | </xs:complexType> | ||
| 59 | <xs:complexType name="PickupAddress"> | ||
| 60 | <xs:sequence> | ||
| 61 | <xs:element name="Name" type="nonEmptyString"/> | ||
| 62 | <xs:element name="Street" type="nonEmptyString"/> | ||
| 63 | <xs:element name="StreetNumber" type="nonEmptyString"/> | ||
| 64 | <xs:element name="PostalCode" type="nonEmptyString"/> | ||
| 65 | <xs:element name="City" type="nonEmptyString"/> | ||
| 66 | <xs:element name="Country" type="nonEmptyString"/> | ||
| 67 | </xs:sequence> | ||
| 68 | </xs:complexType> | ||
| 69 | <xs:complexType name="DeliveryAddress"> | ||
| 70 | <xs:sequence> | ||
| 71 | <xs:element name="Name" type="nonEmptyString"/> | ||
| 72 | <xs:element name="Street" type="nonEmptyString"/> | ||
| 73 | <xs:element name="StreetNumber" type="nonEmptyString"/> | ||
| 74 | <xs:element name="PostalCode" type="nonEmptyString"/> | ||
| 75 | <xs:element name="City" type="nonEmptyString"/> | ||
| 76 | <xs:element name="Country" type="nonEmptyString"/> | ||
| 77 | </xs:sequence> | ||
| 78 | </xs:complexType> | ||
| 79 | <xs:complexType name="OrderLine"> | ||
| 80 | <xs:sequence> | ||
| 81 | <xs:element name="PackageUnit" type="nonEmptyString"/> | ||
| 82 | <xs:element name="Quantity" type="xs:long"/> | ||
| 83 | <xs:element name="Description" type="nonEmptyString"/> | ||
| 84 | <xs:element name="Weight" type="xs:decimal"/> | ||
| 85 | </xs:sequence> | ||
| 86 | </xs:complexType> | ||
| 87 | <xs:simpleType name="nonEmptyString"> | ||
| 88 | <xs:restriction base="xs:string"> | ||
| 89 | <xs:minLength value="1"/> | ||
| 90 | </xs:restriction> | ||
| 91 | </xs:simpleType> | ||
| 92 | <xs:element name="Order" type="Order"/> | ||
| 93 | </xs:schema> | ||
| 94 | {{/code}} | ||
| |
16.1 | 95 | |
| |
17.1 | 96 | === 4.2 Code for TransportOrder.xsd === |
| |
16.1 | 97 | {{code language="xml"}} |
| 98 | <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
| 99 | xmlns="https://transportinc.nl/ns/tms/1.0/" | ||
| 100 | attributeFormDefault="unqualified" | ||
| 101 | elementFormDefault="unqualified" | ||
| 102 | targetNamespace="https://transportinc.nl/ns/tms/1.0/"> | ||
| 103 | <xs:complexType name="CreateOrder"> | ||
| 104 | <xs:sequence> | ||
| 105 | <xs:element name="Order" type="Order"/> | ||
| 106 | </xs:sequence> | ||
| 107 | </xs:complexType> | ||
| 108 | <xs:complexType name="Order"> | ||
| 109 | <xs:sequence> | ||
| 110 | <xs:element name="OrderID"> | ||
| 111 | <xs:simpleType> | ||
| 112 | <xs:restriction base="xs:string"> | ||
| 113 | <xs:maxLength value="200"/> | ||
| 114 | </xs:restriction> | ||
| 115 | </xs:simpleType> | ||
| 116 | </xs:element> | ||
| 117 | <xs:element name="OrderDate" type="xs:dateTime"/> | ||
| 118 | <xs:element minOccurs="0" name="Order_Customer" type="Order_Customer"/> | ||
| 119 | <xs:element name="Address" type="Address"/> | ||
| 120 | <xs:element name="PartnerInfo_Order" type="PartnerInfo_Order"/> | ||
| 121 | <xs:element name="OrderLine_Order" type="OrderLine_Order"/> | ||
| 122 | </xs:sequence> | ||
| 123 | </xs:complexType> | ||
| 124 | <xs:complexType name="Order_Customer"> | ||
| 125 | <xs:sequence> | ||
| 126 | <xs:element minOccurs="0" name="Customer" type="Customer"/> | ||
| 127 | </xs:sequence> | ||
| 128 | </xs:complexType> | ||
| 129 | <xs:complexType name="Customer"> | ||
| 130 | <xs:sequence> | ||
| 131 | <xs:element name="Name"> | ||
| 132 | <xs:simpleType> | ||
| 133 | <xs:restriction base="xs:string"> | ||
| 134 | <xs:maxLength value="200"/> | ||
| 135 | </xs:restriction> | ||
| 136 | </xs:simpleType> | ||
| 137 | </xs:element> | ||
| 138 | <xs:element minOccurs="0" name="Contact_Customer" type="Contact_Customer"/> | ||
| 139 | </xs:sequence> | ||
| 140 | </xs:complexType> | ||
| 141 | <xs:complexType name="Contact_Customer"> | ||
| 142 | <xs:sequence> | ||
| 143 | <xs:element maxOccurs="unbounded" | ||
| 144 | minOccurs="0" | ||
| 145 | name="Contact" | ||
| 146 | type="Contact"/> | ||
| 147 | </xs:sequence> | ||
| 148 | </xs:complexType> | ||
| 149 | <xs:complexType name="Contact"> | ||
| 150 | <xs:sequence> | ||
| 151 | <xs:element name="eMail"> | ||
| 152 | <xs:simpleType> | ||
| 153 | <xs:restriction base="xs:string"> | ||
| 154 | <xs:maxLength value="200"/> | ||
| 155 | </xs:restriction> | ||
| 156 | </xs:simpleType> | ||
| 157 | </xs:element> | ||
| 158 | <xs:element minOccurs="0" name="Name"> | ||
| 159 | <xs:simpleType> | ||
| 160 | <xs:restriction base="xs:string"> | ||
| 161 | <xs:maxLength value="200"/> | ||
| 162 | </xs:restriction> | ||
| 163 | </xs:simpleType> | ||
| 164 | </xs:element> | ||
| 165 | </xs:sequence> | ||
| 166 | </xs:complexType> | ||
| 167 | <xs:complexType name="Address"> | ||
| 168 | <xs:sequence> | ||
| 169 | <xs:element name="Type" type="nonEmptyString"/> | ||
| 170 | <xs:element name="Name" type="nonEmptyString"/> | ||
| 171 | <xs:element name="Street" type="nonEmptyString"/> | ||
| 172 | <xs:element name="PostalCode" type="nonEmptyString"/> | ||
| 173 | <xs:element name="City" type="nonEmptyString"/> | ||
| 174 | <xs:element name="Country" type="nonEmptyString"/> | ||
| 175 | </xs:sequence> | ||
| 176 | </xs:complexType> | ||
| 177 | <xs:complexType name="PartnerInfo_Order"> | ||
| 178 | <xs:sequence> | ||
| 179 | <xs:element maxOccurs="unbounded" | ||
| 180 | minOccurs="0" | ||
| 181 | name="PartnerInfo" | ||
| 182 | type="PartnerInfo"/> | ||
| 183 | </xs:sequence> | ||
| 184 | </xs:complexType> | ||
| 185 | <xs:complexType name="PartnerInfo"> | ||
| 186 | <xs:sequence> | ||
| 187 | <xs:element name="UUID"> | ||
| 188 | <xs:simpleType> | ||
| 189 | <xs:restriction base="xs:string"> | ||
| 190 | <xs:maxLength value="64"/> | ||
| 191 | </xs:restriction> | ||
| 192 | </xs:simpleType> | ||
| 193 | </xs:element> | ||
| 194 | </xs:sequence> | ||
| 195 | </xs:complexType> | ||
| 196 | <xs:complexType name="OrderLine_Order"> | ||
| 197 | <xs:sequence> | ||
| 198 | <xs:element maxOccurs="unbounded" | ||
| 199 | minOccurs="0" | ||
| 200 | name="OrderLine" | ||
| 201 | type="OrderLine"/> | ||
| 202 | </xs:sequence> | ||
| 203 | </xs:complexType> | ||
| 204 | <xs:complexType name="OrderLine"> | ||
| 205 | <xs:sequence> | ||
| 206 | <xs:element name="Description"> | ||
| 207 | <xs:simpleType> | ||
| 208 | <xs:restriction base="xs:string"> | ||
| 209 | <xs:maxLength value="200"/> | ||
| 210 | </xs:restriction> | ||
| 211 | </xs:simpleType> | ||
| 212 | </xs:element> | ||
| 213 | <xs:element name="Quantity" type="xs:long"/> | ||
| 214 | <xs:element name="Unit" type="Enum"/> | ||
| 215 | <xs:element minOccurs="0" name="Weight" type="xs:double"/> | ||
| 216 | </xs:sequence> | ||
| 217 | </xs:complexType> | ||
| 218 | <xs:simpleType name="nonEmptyString"> | ||
| 219 | <xs:restriction base="xs:string"> | ||
| 220 | <xs:minLength value="1"/> | ||
| 221 | </xs:restriction> | ||
| 222 | </xs:simpleType> | ||
| 223 | <xs:simpleType name="Enum"> | ||
| 224 | <xs:restriction base="xs:string"> | ||
| 225 | <xs:enumeration value="COLLI"/> | ||
| 226 | <xs:enumeration value="EURO"/> | ||
| 227 | <xs:enumeration value="BOX"/> | ||
| 228 | <xs:enumeration value="SACK"/> | ||
| 229 | </xs:restriction> | ||
| 230 | </xs:simpleType> | ||
| 231 | <xs:element name="CreateOrder" type="CreateOrder"/> | ||
| 232 | </xs:schema> | ||
| 233 | {{/code}} | ||
| |
14.1 | 234 | == 5. Key takeaways == |
| |
1.1 | 235 | |
| |
8.1 | 236 | * The CDM holds all entities and attributes that are relevant within the context of your complete integration landscape. |
| 237 | * 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. | ||
| 238 | * A system message is specific to a system. | ||
| |
1.1 | 239 | |
| 240 | |||
| |
14.1 | 241 | == 6. Suggested Additional Readings == |
| |
1.1 | 242 | |
| |
8.1 | 243 | If you are interested in this topic and want more information on it please read the help text provided by eMagiz. |
| |
1.1 | 244 | |
| 245 | |||
| 246 | |||
| 247 | )))((({{toc/}}))){{/container}}{{/container}} |