Wiki source code of Solutions

Last modified by Carlijn Kokkeler on 2022/10/20 14:29

Show last authors
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 * Completion of the [[exercises>>doc:Main.eMagiz Academy.Use Cases.Transformations.Exercises.WebHome||target="blank"]] from the Data modeling in Design use case from the XML/JSON Transformations use case.
9
10 == 2. Key concepts ==
11
12 This microlearning contains the solutions to the [[exercises>>doc:Main.eMagiz Academy.Use Cases.Transformations.Exercises.WebHome||target="blank"]] from the Data modeling in Design use case.
13
14 == 3. Transformations in Create ==
15
16 * Ensure that the CDM and System messages follow the standards for country code as given below.
17 ** Add ISO-3 standard enumeration values for the attribute Country in your CDM message. This can be done in Create.
18 [[image:Main.Images.Usecase.WebHome@xml-json-transformations-exercises--cdm-country-enumeration.png]]
19 ** Note that the enumeration values have to be added twice; for Country in PickupAddress and for Country in DeliveryAddress.
20 [[image:Main.Images.Usecase.WebHome@xml-json-transformations-exercises--enumeration-iso3.png]]
21 ** Add ISO-2 standard enumeration values for the attribute Country in your System message. This can be done in Create.
22 [[image:Main.Images.Usecase.WebHome@xml-json-transformations-exercises--enumeration-iso2.png]]
23 ** Map the enumeration values for the attribute Country in Transformation. This can be done in Create.
24 ** Click on the plus button next to the attribute Country, and add a New transformer by clicking on the button completely to the left.
25 [[image:Main.Images.Usecase.WebHome@xml-json-transformations-exercises--enumeration-mapping.png]]
26 ** Complete the value mapping.
27 [[image:Main.Images.Usecase.WebHome@xml-json-transformations-exercises--enumeration-mapping-example.png]]
28 [[image:Main.Images.Usecase.WebHome@xml-json-transformations-exercises--enumeration-mapping-complete.png]]
29 ** Note that this mapping has to be done twice; for Country in PickupAddress and for Country in DeliveryAddress.
30 [[image:Main.Images.Usecase.WebHome@xml-json-transformations-exercises--enumeration-mapping-complete-overview.png]]
31 * Map values for units.
32 ** First change the data type of the attribute PackageUnit in your CDM to boolean.
33 ** Click on the plus button next to Unit in the Create Transformations screen, and click on the filter most to the right.
34 [[image:Main.Images.Usecase.WebHome@xml-json-transformations-exercises--boolean-value-mapping-filter.png]]
35 ** Add 'COLLI' as destination value for source boolean value 'TRUE', and 'BOX' as destination value for source boolean value 'FALSE'.
36 [[image:Main.Images.Usecase.WebHome@xml-json-transformations-exercises--boolean-value-mapping-filter-edit.png]]
37 [[image:Main.Images.Usecase.WebHome@xml-json-transformations-exercises--boolean-value-mapping-filter-edit-overview.png]]
38 * Add fixed values.
39 ** Add a static input to the Type attribute from the entity Address by clicking on the plus in the Create Transformations screen, and clicking the green circle in the middle.
40 [[image:Main.Images.Usecase.WebHome@xml-json-transformations-exercises--fixed-value-static-input.png]]
41 ** Note that the static input needs to be added twice; for PickupAddress and DeliveryAddress. Either pick 'pickupaddress' as a value, or 'deliveryaddress', depending on the transformation.
42 [[image:Main.Images.Usecase.WebHome@xml-json-transformations-exercises--fixed-value-static-input-edit.png]]
43 [[image:Main.Images.Usecase.WebHome@xml-json-transformations-exercises--fixed-value-static-input-overview.png]]
44 * Change when an attribute is generated.
45 ** Make sure that a Description attribute is only generated if a description exists by clicking on the plus in the Create Transformations screen, and clicking the destination filter, the second from the left.
46 [[image:Main.Images.Usecase.WebHome@xml-json-transformations-exercises--if-exists.png]]
47 [[image:Main.Images.Usecase.WebHome@xml-json-transformations-exercises--if-exists-edit.png]]
48 [[image:Main.Images.Usecase.WebHome@xml-json-transformations-exercises--if-exists-overview.png]]
49 * Add conditionals.
50 ** Use XPath to ensure that the city 'Enschede' is changed 'Hengelo'.
51 ** Click on the plus in the Create Transformations screen, and click on the 'New Conditional' filter, most to the right.
52 [[image:Main.Images.Usecase.WebHome@xml-json-transformations-exercises--conditional-filter.png]]
53 ** Add a new conditional using Custom XPath, with the following XPath:
54 [[image:Main.Images.Usecase.WebHome@xml-json-transformations-exercises--conditional-x-path-value.png]]
55 ** Note that this has to be done twice; for the delivery address and the pickup address.
56 [[image:Main.Images.Usecase.WebHome@xml-json-transformations-exercises--conditional-overview.png]]
57
58 == 4. Key takeaways ==
59
60 * The CDM holds all entities and attributes that are relevant within the context of your complete integration landscape.
61 * 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.
62 * A system message is specific to a system.
63
64
65 == 5. Suggested Additional Readings ==
66
67 If you are interested in this topic and want more information on it please read the help text provided by eMagiz.
68
69
70
71 )))((({{toc/}}))){{/container}}{{/container}}