Changes for page Calling an Asynchronous Queue in Mendix
Last modified by Erik Bakker on 2025/02/28 09:50
From 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
To 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
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. ebakker1 +XWiki.dfirdausy - Content
-
... ... @@ -1,5 +1,5 @@ 1 1 {{container}}{{container layoutStyle="columns"}}((( 2 - Inthismicrolearning,wewillintegrate Mendixwith eMagiz usingthe eMagizMendixmodule. Here, we willguide youthroughcalling a synchronous queue in Mendix, essential for efficient data exchange between your systems.2 +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 queue in Mendix. 3 3 4 4 Should you have any questions, please get in touch with [[academy@emagiz.com>>mailto:academy@emagiz.com]]. 5 5 ... ... @@ -6,86 +6,67 @@ 6 6 == 1. Prerequisites == 7 7 8 8 * Intermediate knowledge of the eMagiz platform 9 -* Access to a Mendix application (potentially via an external party)9 +* Access to a Mendix application 10 10 * Access to the Deploy phase of your eMagiz project 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. 11 +* A connection between Mendix and eMagiz Designed and Created 12 +* Using eMagiz Mendix version 5.0.0 or higher. 15 15 16 16 == 2. Key concepts == 17 17 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 connect inga Mendix application to an eMagiz project for data traffic between both systems.16 +This microlearning centers around calling an asynchronous queue in Mendix. 17 +* 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. 20 20 21 -To call a synchronous queue in Mendix, you need the following: 19 +To call an asynchronous queue in Mendix, you need the following: 22 22 23 -* The destination (i.e., the queue from which you want to retrieve the information) 24 24 * Execute microflow (the microflow that will process the incoming data) 25 -* Optionally, you can define an import mapping and subsequent option s.22 +* Optionally, you can define an import mapping and subsequent option 26 26 27 - {{warning}}AllchangesineMagizneed to beactivated by addingthe changesto the eMagiz release and activating said release. When setting up the initial connection, the Mendix system mustbe**in** theeMagiz release before connectingfromMendixto eMagiz with an **activation key**.{{/warning}}24 +== 3. Calling an asynchronous queue in Mendix == 28 28 29 - ==3.Calling a synchronous queue in Mendix==26 +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 queue in Mendix. For sending data to Mendix, we offer two options to send data: 30 30 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: 28 +* Using the import mapping to send data to Mendix 29 +* Sending a string message directly to Mendix 32 32 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. 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). 36 36 37 -Below, we will detail how to configure each option for sending data synchronously to Mendix. 33 +Below, we will detail how to configure each option for sending data asynchronously to Mendix. 38 38 39 -=== 3.1 Sending synchronous messages with import and exportmapping ===35 +=== 3.1 Sending asynchronous messages with import mapping === 40 40 41 -To send data to Mendix, you must define several configuration options in theMendixproject. In this example, we will look at the configurationusingtheimportandexport mapping in Mendix. In the subsequent paragraph, we will look at configuringthe exit ifyou do **not** want to use the importand exportmapping.37 +To send data to Mendix, you need to define several configuration options in the exit flow within the eMagiz portal. You want to connect your eMagiz solution to Mendix. In this example, we will look at the configuration for when you want to use the import mapping in Mendix. In the subsequent paragraph, we will take a closer look at how to configure the exit in case you do **not** want to use the import mapping. 42 42 43 - In eMagiz, you will seeaflowCreatethat you cannotedit,astheautogeneratedfunctionalityprovidedbyeMagizis allyou need.Oncedone,make suretheflowistransportedtoDeployandreadytobeusedinaMendixapplicationby addingit toa release.39 +You will see the following overview within the exit flow, which you can configure (if in "Start Editing" mode). Here, you need to define the import mapping (complete name in Mendix including module name) and the execute microflow (complete name in Mendix including module name). 44 44 45 - {{info}}Theexit versionmustbealteredwhenyouchangeyoursystem messagesin Design.{{/info}}41 +[[image:Main.Images.Microlearning.WebHome@intermediate-mendix-connectivity-calling-an-asynchronous-webservice-in-exit-flow-config.png]] 46 46 47 - Inparallel,earlierorlater,theMendixapplication needsto bedevelopedtohandlethemessage'sconsumptionandrespondtotherequest with aresponsemapping.Thisisdonebyaddingthe followingconfigurationto the existing "After Startup" microflow.43 +When selecting the import mapping, several additional options need to be chosen within the exit. What each specific option does is detailed in the accompanying help text. Below you will see an example of how you could configure this. 48 48 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. 45 +[[image:Main.Images.Microlearning.WebHome@intermediate-mendix-connectivity-calling-an-asynchronous-webservice-in-exit-flow-config-import-mapping-specific.png]] 51 51 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. 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. 57 57 58 - [[image:Main.Images.Microlearning.WebHome@intermediate-mendix-connectivity-calling-a-synchronous-webservice-in-mendix-on-receive-microflow-config.png]]49 +When satisfied with this setup, please create a new version of the flow and include it in your latest release. That will allow Mendix to retrieve the newest version upon the next restart of Mendix (or by manually downloading the release in Mendix). 59 59 60 -=== 3.2 Sending synchronous messages without import and exportmapping ===51 +=== 3.2 Sending asynchronous messages without import mapping === 61 61 62 -We just saw the example when working with the import and exportmapping. Now we turn our attention to an instance withoutthosemappings. 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.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. 63 63 64 - In eMagiz, you will seeaflowCreatethat you cannotedit,astheautogeneratedfunctionalityprovidedbyeMagizis allyou need.Oncedone,makesurehe flowis transportedto Deployand ready to beusedinaMendixapplicationby addingit toa release.55 +You will see the following overview within the exit flow, which you can configure (if in "Start Editing" mode). Here you need to define the execute microflow (complete name in Mendix including module name). 65 65 66 - {{info}}Theversion of yourxitneeds tobealteredwhenyou makehangestoyoursystem messagesinDesign.{{/info}}57 +[[image:Main.Images.Microlearning.WebHome@intermediate-mendix-connectivity-calling-an-asynchronous-webservice-in-exit-flow-config-string.png]] 67 67 68 - Inparallel, earlieror later,theMendixapplicationneedstobedevelopedto handle theconsumption ofthemessage andrespond to therequestwith a responsemapping.Thisisdone by adding the following configuration to the existing"After Startup" microflow.59 +When satisfied with this setup, please create a new version of the flow and include it in your latest release. That will allow Mendix to retrieve the newest version upon the next restart of Mendix (or by manually downloading the release in Mendix). 69 69 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 - 80 80 == 4. Key takeaways == 81 81 82 -To call a synchronous queue in Mendix, you need the following: 63 +To call an asynchronous queue in Mendix, you need the following: 83 83 84 -* The destination (i.e., the queue from which you want to retrieve the information) 85 85 * Execute microflow (the microflow that will process the incoming data) 86 -* Optionally, you can define an import mapping and subsequent options. 66 +* Optionally, you can define an import mapping and subsequent option 67 +* Setting the Range option correctly is critical to prevent 'unexpected' errors 87 87 88 - {{warning}}To make a connection in allowing data to travel between A and B, you need to[[install(Explanation)>>doc:Main.eMagizAcademy.Microlearnings.Novice.MendixConnectivity.novice-mendix-connectivity-install-emagiz-mendix-connector.WebHome||target="blank"]]and doa 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}}69 +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 [[Novice - Mendix Connectivity>>doc:Main.eMagiz Academy.Microlearnings.Novice.Mendix Connectivity.WebHome||target="blank"]] microlearnings. 89 89 90 90 == 5. Suggested Additional Readings == 91 91