Last modified by Martijn Woudstra on 2022/08/30 15:48

Show last authors
1 {{container}}{{container layoutStyle="columns"}}(((
2
3 With the help of the eMagiz Mendix module created by the eMagiz team, you can easily connect between Mendix and eMagiz for data integration. In this microlearning, we will focus on calling an asynchronous web service from Mendix.
4
5 Should you have any questions, please get in touch with [[academy@emagiz.com>>mailto:academy@emagiz.com]].
6
7 == 1. Prerequisites ==
8
9 * Intermediate knowledge of the eMagiz platform
10 * Access to a Mendix application
11 * Access to the Deploy phase of your eMagiz project
12 * A connection between Mendix and eMagiz Designed and Created
13 * Using eMagiz Mendix version 5.0.0 or higher.
14
15 == 2. Key concepts ==
16
17 This microlearning centers around calling an asynchronous web service from Mendix
18 With eMagiz Mendix Connector, we mean: A Mendix module developed and maintained by eMagiz that simplifies connect a Mendix application to an eMagiz project for data traffic between both systems.
19
20 To call an asynchronous web service from Mendix, you need the following:
21
22 * Export object (including mapping) or string to export
23 * Name of the queue on which you want to publish the data
24
25 == 3. Calling an asynchronous web service from Mendix ==
26
27 With the help of the eMagiz Mendix module created by the eMagiz team, you can easily connect between Mendix and eMagiz for data integration. In this microlearning, we will focus on calling an asynchronous web service from Mendix. For sending data to eMagiz, we offer two options to send data to our messaging engine:
28
29 * Using the export mapping to send data to the queue
30 * Sending a string message directly to the queue
31
32 Alternatively, you could use the eMagiz Kafka connector to connect to the event broker that eMagiz offers. For more information on that, please check out this [microlearning](intermediate-event-streaming-connectors-using-Kafka-module-mendix.md).
33
34 Below, we will detail how to configure each option for sending data asynchronously to the messaging engine.
35
36 === 3.1 Sending asynchronous messages via Send Message Java Action ===
37
38 Below is the example of the Send Message microflow that contains this Java Action.
39
40 [[image:Main.Images.Microlearning.WebHome@intermediate-mendix-connectivity-calling-an-asynchronous-webservice-from-mendix-send-message-java.png]]
41
42 1. Mapping parameter * select the Mendix entity that holds the data to be sent to eMagiz for further processing
43 2. Export mapping * ensure to have created a Mendix Export mapping object so that the data can be appropriately processed by eMagiz. Consider sequence, data types, and other aspects of attributes to ensure the message can be adequately processed
44 3. Validate * select if the message needs to be validated in Mendix
45 4. Queue * enter the proper value for the onramp queue of eMagiz where the message needs to be put on. Below is an example of an onramp queue / select the destination name as the queue name.
46
47 [[image:Main.Images.Microlearning.WebHome@intermediate-mendix-connectivity-calling-an-asynchronous-webservice-from-mendix-queue-determination.png]]
48
49 === 3.2 Sending asynchronous messages via Send String Java Action ===
50
51 Below is the example of the Send Message microflow that contains this Java Action.
52
53 [[image:Main.Images.Microlearning.WebHome@intermediate-mendix-connectivity-calling-an-asynchronous-webservice-from-mendix-send-string-java.png]]
54
55 1. Message * a string representation of a message that you want to place on the queue
56 2. Queue * enter the proper value for the onramp queue of eMagiz where the message needs to be put on. Below is an example of an onramp queue / select the destination name as the queue name.
57
58 [[image:Main.Images.Microlearning.WebHome@intermediate-mendix-connectivity-calling-an-asynchronous-webservice-from-mendix-queue-determination.png]]
59
60 == 4. Assignment ==
61
62 The assignment is simple this time. Configure a microflow that sends data to an onramp. Ideally, work on both options.
63 This assignment can be completed with the help of an associated Mendix project linked to the (Academy) project that you have created/used in the previous assignment.
64
65 == 5. Key takeaways ==
66
67 To call an asynchronous web service from Mendix you need the following:
68
69 * Export object (including mapping) or string to export
70 * Name of the queue on which you want to publish the data
71 * Depending on your needs, there is a separate Java action available
72
73 Note: To make a connection in allowing data to travel between A and B, you need to fill in the correct constants and set up your Keystore and Truststore correctly. For more information check out this [[course>>doc:Main.eMagiz Academy.Microlearnings.Novice.Mendix Connectivity.WebHome||target="blank"]].
74
75 == 6. Suggested Additional Readings ==
76
77 If you are interested in this topic and want more information, please read the release notes provided by eMagiz that accompany the eMagiz Mendix Connector version you have selected.
78
79 == 7. Silent demonstration video ==
80
81 As most of this configuration occurs in Mendix and not in eMagiz, we have chosen not to make a video on this topic.
82 The pictures and text provided above should give you enough guidance to configure the connection between Mendix and eMagiz.
83
84 )))((({{toc/}}))){{/container}}{{/container}}