Changes for page Calling an Asynchronous Queue in Mendix
Last modified by Erik Bakker on 2025/02/28 09:50
From version 29.1
edited by Danniar Firdausy
on 2024/10/03 08:39
on 2024/10/03 08:39
Change comment:
There is no comment for this version
To version 30.1
edited by Erik Bakker
on 2025/02/28 09:37
on 2025/02/28 09:37
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. dfirdausy1 +XWiki.ebakker - Content
-
... ... @@ -1,5 +1,5 @@ 1 1 {{container}}{{container layoutStyle="columns"}}((( 2 - WiththehelpoftheeMagizMendixmodule created by theeMagizteam, youcan easily connectbetweenMendix and eMagizfor data integration. In thismicrolearning, we willfocusoncalling anasynchronous queue in Mendix.2 +In this microlearning, we will integrate Mendix with eMagiz using the eMagiz Mendix module. Here, we will guide you through calling a synchronous queue in Mendix, essential for efficient data exchange between your systems. 3 3 4 4 Should you have any questions, please get in touch with [[academy@emagiz.com>>mailto:academy@emagiz.com]]. 5 5 ... ... @@ -6,67 +6,86 @@ 6 6 == 1. Prerequisites == 7 7 8 8 * Intermediate knowledge of the eMagiz platform 9 -* Access to a Mendix application 9 +* Access to a Mendix application (potentially via an external party) 10 10 * Access to the Deploy phase of your eMagiz project 11 -* A connection between Mendix and eMagiz Designed and Created 12 -* Using eMagiz Mendix version 5.0.0 or higher. 11 +* A connection between Mendix and eMagiz Designed, Created, and in the active release 12 +* Using the "eMagiz Connector" in the Mendix Marketplace. 13 +* Initial [[installation (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Novice.Mendix Connectivity.novice-mendix-connectivity-install-emagiz-mendix-connector.WebHome||target="blank"]] done. 14 +* Initial [[configuration (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Novice.Mendix Connectivity.novice-mendix-connectivity-configure-emagiz-mendix-connector.WebHome||target="blank"]] done. 13 13 14 14 == 2. Key concepts == 15 15 16 -This microlearning centers around calling a nasynchronous queue in Mendix.17 -* With eMagiz MendixConnector, 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.18 +This microlearning centers around calling a synchronous queue in Mendix. 19 +* With eMagiz Connector, we mean A Mendix module developed and maintained by eMagiz that simplifies connecting a Mendix application to an eMagiz project for data traffic between both systems. 18 18 19 -To call a nasynchronous queue in Mendix, you need the following:21 +To call a synchronous queue in Mendix, you need the following: 20 20 23 +* The destination (i.e., the queue from which you want to retrieve the information) 21 21 * Execute microflow (the microflow that will process the incoming data) 22 -* Optionally, you can define an import mapping and subsequent option 25 +* Optionally, you can define an import mapping and subsequent options. 23 23 24 - == 3. Calling an asynchronousqueue in Mendix==27 +{{warning}}All changes in eMagiz need to be activated by adding the changes to the eMagiz release and activating said release. When setting up the initial connection, the Mendix system must be **in** the eMagiz release before connecting from Mendix to eMagiz with an **activation key**.{{/warning}} 25 25 26 - Withthe 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 willfocus on calling anasynchronous queue in Mendix.For sending data to Mendix, we offer two options to send data:29 +== 3. Calling a synchronous queue in Mendix == 27 27 28 -* Using the import mapping to send data to Mendix 29 -* Sending a string message directly to Mendix 31 +With the help of the Mendix module (called eMagiz Connector) created by the eMagiz team, you can easily connect between Mendix and eMagiz for data integration. This microlearning will focus on calling a synchronous queue in Mendix. For sending data to Mendix, we offer three options to send data: 30 30 31 -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 +* Using the import and export mapping to send data to Mendix. 34 +* Sending a string to and from Mendix without using the import and export mapping. 35 +* Any combination of the two above. 32 32 33 -Below, we will detail how to configure each option for sending data asynchronously to Mendix.37 +Below, we will detail how to configure each option for sending data synchronously to Mendix. 34 34 35 -=== 3.1 Sending asynchronous messages with import mapping ===39 +=== 3.1 Sending synchronous messages with import and export mapping === 36 36 37 -To send data to Mendix, you needtodefine several configuration options in the exit flow withinthe eMagizportal. You want to connectyour eMagiz solution to Mendix. In this example, we will look at the configurationforwhenyouwantto usethe import mapping in Mendix. In the subsequent paragraph, we willtake a closer look athow toconfigurethe exit incaseyou do **not** want to use the import mapping.41 +To send data to Mendix, you must define several configuration options in the Mendix project. In this example, we will look at the configuration using the import and export mapping in Mendix. In the subsequent paragraph, we will look at configuring the exit if you do **not** want to use the import and export mapping. 38 38 39 - You will seethefollowingoverview withinthe exitflow, whichyou canconfigure(ifin"StartEditing"mode).Here,you needtodefine theimportmapping(complete name inMendixincluding modulename)andtheexecute microflow(completename in Mendix includingmodulename).43 +In eMagiz, you will see a flow in Create that you cannot edit, as the autogenerated functionality provided by eMagiz is all you need. Once done, make sure the flow is transported to Deploy and ready to be used in a Mendix application by adding it to a release. 40 40 41 - [[image:Main.Images.Microlearning.WebHome@intermediate-mendix-connectivity-calling-an-asynchronous-webservice-in-exit-flow-config.png]]45 +{{info}}The exit version must be altered when you change your system messages in Design.{{/info}} 42 42 43 - Whenselecting theimportmapping,severaladditionaloptionsneed to bechosenwithin the exit. Whateachspecificoption doesisdetailedintheaccompanying helptext.Belowyouwill seean exampleofhowyoucould configurethis.47 +In parallel, earlier or later, the Mendix application needs to be developed to handle the message's consumption and respond to the request with a response mapping. This is done by adding the following configuration to the existing "After Startup" microflow. 44 44 45 -[[image:Main.Images.Microlearning.WebHome@intermediate-mendix-connectivity-calling-an-asynchronous-webservice-in-exit-flow-config-import-mapping-specific.png]] 49 +==== 3.1.1 Startup action ==== 50 +In Mendix, you must add the "StartSyncMessageConsumer" Java Action to the after startup flow. The most important configuration items here are the following. 46 46 47 -Note that the Range is a critical piece of the configuration as it defines whether the root of the result of the import mapping is a list (All), a single object (First), or a limited list (Custom). Note that the parameter of your import microflow should match this to prevent errors. So, for example, when your parameter upon the import microflow is an Object, you should select the option First. If the parameter on your import microflow is a List, you should select the option All. In cases where you want to reduce the number of entries in the List, you can use the Custom option to reduce the amount to a predefined limit. 52 +[[image:Main.Images.Microlearning.WebHome@intermediate-mendix-connectivity-calling-a-synchronous-webservice-in-mendix-start-consumer.png]] 53 + 54 +* The destination (i.e., the queue from which you want to consume the **request** messages). This can be supplied by the eMagiz developer or found under Deploy -> Mendix Connectors should you have access to the eMagiz model in question. 55 +* The export and import mapping (based on the system message definitions). These definitions can be determined by the eMagiz developer (and then shared with the Mendix developer) or determined by the Mendix developer (and then shared with the eMagiz developer). 56 +* The microflow that handles the incoming message and returns a result. 48 48 49 - When satisfied with this setup, pleasecreate anew version of the flowandincludet inyour latestrelease. That willallow Mendixtoretrievethenewest version upon thext restart of Mendix(orbymanually downloading the releasein Mendix).58 +[[image:Main.Images.Microlearning.WebHome@intermediate-mendix-connectivity-calling-a-synchronous-webservice-in-mendix-on-receive-microflow-config.png]] 50 50 51 -=== 3.2 Sending asynchronous messages without import mapping ===60 +=== 3.2 Sending synchronous messages without import and export mapping === 52 52 53 -We just saw the example when working with the import mapping. Now we turn our attention to an instance without import mapping. In these cases, the string is just passed to the execute microflow, and you can determine in Mendix yourself what to do with it.62 +We just saw the example when working with the import and export mapping. Now we turn our attention to an instance without those mappings. In these cases, the string is just passed to the execute microflow, and you can determine in Mendix yourself what to do with it. The same applies to the export part of the logic. 54 54 55 - You will seethefollowingoverview withinthe exitflow, whichyou canconfigure(ifin"StartEditing"mode).Hereyou needtodefinetheexecutemicroflow(complete name in Mendix includingmodulename).64 +In eMagiz, you will see a flow in Create that you cannot edit, as the autogenerated functionality provided by eMagiz is all you need. Once done, make sure the flow is transported to Deploy and ready to be used in a Mendix application by adding it to a release. 56 56 57 - [[image:Main.Images.Microlearning.WebHome@intermediate-mendix-connectivity-calling-an-asynchronous-webservice-in-exit-flow-config-string.png]]66 +{{info}}The version of your exit needs to be altered when you make changes to your system messages in Design.{{/info}} 58 58 59 - Whensatisfiedwiththissetup,pleasecreateanew versionoftheflowandincludeit inyourlatestrelease.Thatwill allow Mendixtoretrieve thenewestversionuponthenext restartof Mendix(orbymanually downloadingthereleaseinMendix).68 +In parallel, earlier or later, the Mendix application needs to be developed to handle the consumption of the message and respond to the request with a response mapping. This is done by adding the following configuration to the existing "After Startup" microflow. 60 60 70 +==== 3.1.1 Startup action ==== 71 +In Mendix, you must add the "StartSyncStringConsumer" Java Action to the after startup flow. The most important configuration items here are the following. 72 + 73 +[[image:Main.Images.Microlearning.WebHome@intermediate-mendix-connectivity-calling-a-synchronous-webservice-in-mendix-start-consumer-string.png]] 74 + 75 +* The destination (i.e., the queue from which you want to consume the **request** messages). This can be supplied by the eMagiz developer or found under Deploy -> Mendix Connectors should you have access to the eMagiz model in question. 76 +* The microflow that handles the incoming message and returns a result. 77 + 78 +[[image:Main.Images.Microlearning.WebHome@intermediate-mendix-connectivity-calling-a-synchronous-webservice-in-mendix-on-receive-microflow-config-string.png]] 79 + 61 61 == 4. Key takeaways == 62 62 63 -To call a nasynchronous queue in Mendix, you need the following:82 +To call a synchronous queue in Mendix, you need the following: 64 64 84 +* The destination (i.e., the queue from which you want to retrieve the information) 65 65 * Execute microflow (the microflow that will process the incoming data) 66 -* Optionally, you can define an import mapping and subsequent option 67 -* Setting the Range option correctly is critical to prevent 'unexpected' errors 86 +* Optionally, you can define an import mapping and subsequent options. 68 68 69 - Note:To make a connection in allowing data to travel between A and B, you need tofillinhe correct constantsandset upyourKeystorend Truststorecorrectly.Formoreinformationcheck outthis [[NoviceMendixConnectivity>>doc:Main.eMagiz Academy.Microlearnings.Novice.Mendix Connectivity.WebHome||target="blank"]] microlearnings.88 +{{warning}} To make a connection in allowing data to travel between A and B, you need to [[install (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Novice.Mendix Connectivity.novice-mendix-connectivity-install-emagiz-mendix-connector.WebHome||target="blank"]] and do a basic [[configuration (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Novice.Mendix Connectivity.novice-mendix-connectivity-configure-emagiz-mendix-connector.WebHome||target="blank"]] before you can set up this specific communication.{{/warning}} 70 70 71 71 == 5. Suggested Additional Readings == 72 72