Changes for page Exercises

Last modified by Carlijn Kokkeler on 2022/10/19 13:32

From version 18.1
edited by eMagiz
on 2022/10/19 12:43
Change comment: There is no comment for this version
To version 7.1
edited by Carlijn Kokkeler
on 2022/09/30 09:54
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.eMagiz
1 +XWiki.CarlijnKokkeler
Content
... ... @@ -13,235 +13,68 @@
13 13  
14 14  == 3. CDM, CDM & system message, message mapping ==
15 15  By following the steps below, you should gain a better understanding of the differences between CDM, CDM messages, and system messages.
16 +
17 +== 3.1 Creating a CDM ==
18 +Please add the following entities and attributes to your CDM:
19 +
20 +* Person, with attributes ID, Name, and Email
21 +* PlatformCourse, with attributes ID and Name
16 16  
17 -* Creating a CDM
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.
19 -* Creating a CDM message
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.
22 -* Creating a system message
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.
24 -* Creating a CDM message
25 - ** Select CreateOrder as root entity and add all other entities and attributes to your system definition.
26 -* Complete message mapping
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
23 +
24 +One person has access to many platform courses. It should look like the following:
25 +
26 +[[image:Main.Images.Usecase.WebHome@data-modeling-in-design-exercises--adding-attributes-entities-CDM.png]]
27 +
28 +== 3.2 Creating a CDM message ==
29 +Now, go to your CDM message and add the Person and PlatformCourse to your message definition, including all attributes. It should look like the following:
31 31  
31 +[[image:Main.Images.Usecase.WebHome@data-modeling-in-design-exercises--adding-message-definition-CDM-message.png]]
32 +
33 +== 3.3 Creating a system message ==
34 +In System message, create the following entities and attributes:
35 +
36 +* User, with attributes ID and Name
37 +* Course, with attributes ID and Name
32 32  
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"]].
34 34  
35 -== 4. Code for xsd files ==
36 -=== 4.1 Code for Order.xsd ===
37 -{{code language="xml"}}
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}}
40 +One user has access to many courses. It should look like the following:
95 95  
96 -=== 4.2 Code for TransportOrder.xsd ===
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}}
42 +[[image:Main.Images.Usecase.WebHome@data-modeling-in-design-exercises--adding-attributes-entities-system-message.png]]
43 +
44 +Now, remove the attribute Name in Course by using the Toggle canvas edit mode. It should result in the following:
45 +
46 +[[image:Main.Images.Usecase.WebHome@data-modeling-in-design-exercises--remove-attribute-system-message.png]]
47 +
48 +== 3.4 Complete message mapping ==
49 +
50 +Now that you have completed these steps, go to Message mapping and complete the mapping.
51 +
52 +[[image:Main.Images.Usecase.WebHome@data-modeling-in-design-exercises--complete-message-mapping.png]]
53 +
54 +== 4. Assignment ==
55 +
56 +Navigate to Design and open the message definition option of at least one integration within your project.
57 +This assignment can be completed within the (Academy) project that you have created/used in the previous assignment.
58 +
234 234  == 5. Key takeaways ==
235 235  
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.
61 +* A message definition is a visual representation of how the elements are related to each other, whether they are mandatory and the data types they have that can be used in the message mapping
62 +* Some message definitions are specific to a system. Others are generic across systems
239 239  
240 240  
65 +
241 241  == 6. Suggested Additional Readings ==
242 242  
243 -If you are interested in this topic and want more information on it please read the help text provided by eMagiz.
68 +If you are interested in this topic and want more information on it please read the help text provided by eMagiz. Furthermore check out these links if you want a more in-depth knowledge of the eMagiz data models:
244 244  
70 +* [API Gateway model](crashcourse-api-gateway-api-data-model.md)
71 +* [Understanding the eMagiz CDM](crashcourse-messaging-what-is-cdm.md)
72 +* [Event Streaming data model](intermediate-configuring-event-streaming-data-model.md)
245 245  
74 +== 7. Silent demonstration video ==
246 246  
76 +This video demonstrates a working solution and how you can validate whether you have successfully completed the assignment.
77 +
78 +{{video attachment="crashcourse-platform-design-what-is-a-message-definition.mp4" reference="Main.Videos.Microlearning.WebHome"/}}
79 +
247 247  )))((({{toc/}}))){{/container}}{{/container}}