Changes for page Communication between models
Last modified by Erik Bakker on 2024/09/05 14:00
From version 8.1
edited by Erik Bakker
on 2022/07/26 12:49
on 2022/07/26 12:49
Change comment:
There is no comment for this version
To version 15.1
edited by Erik Bakker
on 2022/07/28 10:48
on 2022/07/28 10:48
Change comment:
There is no comment for this version
Summary
-
Page properties (3 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 - Image Transformations1 +Communication between models - Default language
-
... ... @@ -1,0 +1,1 @@ 1 +en - Content
-
... ... @@ -1,5 +1,5 @@ 1 1 {{container}}{{container layoutStyle="columns"}}((( 2 - Inmost cases,youwilltransformXML messagestootherXMLmessages,oryouwilltransformJSONorEDI messagesinanotheroftheseformats.However,sometimesyou wantto performan imagetransformation.Withthisimage transformationyoucanransformimagesin certainformatsoanotherformat(i.e.png).This can comehandywhenyouwanttostandardizetheimageformatbeforeusingitfurtherdownstreaminyour businessapplication(s).2 +When your integration landscape grows through time, you might decide to split functional business processes into multiple eMagiz models. In those cases, the question of connecting these models easily, stable, and securely could arise. This microlearning will focus on that question and provide an answer based on our vision and best practices when dealing with the platform. 3 3 4 4 Should you have any questions, please get in touch with [[academy@emagiz.com>>mailto:academy@emagiz.com]]. 5 5 ... ... @@ -9,51 +9,50 @@ 9 9 10 10 == 2. Key concepts == 11 11 12 -This microlearning focuses on performingimagetransformationsin eMagiz.12 +This microlearning focuses on communication between two eMagiz models. When communicating to any external party (from the view of a certain model) you should always consider the following: 13 13 14 -With image transformation, we mean transforming the raw data that represents an image to another image format. 14 +* Security 15 +* Loose coupling 16 +* Maintainability 17 +* Clarity 15 15 16 -* Read the helptext of the component to understand which formats are supported 17 -* Ensure the input image is supplied in the correct format 18 -* Ensure you wrap the output image in something if you want to do additional transformations on the data further downstream 19 +== 3. Communication between models == 19 19 20 - ==3.ImageTransformation==21 +In a low-code platform like eMagiz, you want to prevent using custom scripting as much as possible. However, sometimes in practice, you encounter situations that cannot be realized with the standard toolbox provided within the platform. As a result, we offer the option to use a Groovy script in these situations to achieve the desired solution. In this microlearning, we will look at where you can use a Groovy script and discuss the key considerations when implementing a Groovy script within your model. 21 21 22 - In mostcases,youwilltransformXMLmessagestootherXML messages,oryouwilltransformJSON or EDI messages inanotherof these formats. However,sometimesyou want to perform animagetransformation.Withhisimagetransformationyoucan transform imagesin certainformatsto anotherformat(i.e. png). Thiscancome in handywhen you wantto standardizetheimageformat before using it further downstreamin your businessapplication(s).23 +Most users would think that communication via queues to connect two separate eMagiz models is a smart idea. However, this is something that we do not encourage. We discourage this for several practical and technical reasons alike. 23 23 24 - Beforewe dive into thespecificsofhowtoconfigure thislet us first consider the following:25 +When looking at the practical side of things getting it configured correctly is time-consuming and an error-prone action (as is evident by the question). Furthermore, it can lead to unexpected situations in which you make a typo to listen to a queue on which no messages are provided. This queue will however be registered on the JMS level (when you activate the flow in question with the custom configuration) which can lead to confusing queue statistics and even more troublesome false-positive alerting based on missing queue metrics or missing consumers. 25 25 26 -* Read the helptext of the component to understand which formats are supported 27 -* Ensure the input image is supplied in the correct format 28 -* Ensure you wrap the output image in something if you want to do additional transformations on the data further downstream 27 +On top of that because you basically allow one model to write and read from queues registered in another model maintaining both models will become very confusing for the ones working on the project at the moment but also for those working on it at a later stage and does that need to provide (incidental) support on the environments. 29 29 30 - {{warning}}Thefocus ofthis microlearningliesonthe image transformercomponent.Ensuringthattheinputis usefuland the outputfitsheremainderoftheprocess ishighlydependingontheusecaseandwilltherefore notbeiscussedinthis microlearning{{/warning}}29 +Another practical reason for not wanting this is that we do not actively support this use case from eMagiz. This means that when we do updates to our technical infrastructure we will not take this scenario into account. This could lead to additional work on your part in the future and reduced stability of your solution. 31 31 32 - Whenturningto theCreatephaseofeMagiz,we need to openthe flowand enter"StartEditing"mode toaddthecomponentweneed. Forxample,intheleftpanel,you cansearchfor"Image".Thiswillyieldthefollowingresult.31 +From the technical point of view, the consequence of this construction is that both models need to know each other certificates and credentials which are not considered secure. On top of that because you, theoretically, can exchange data from any queue to any queue you could create a situation in which updates in one model trigger changes in the other model (i.e. when using the same data model) that are unexpected (and frankly unwanted). 33 33 34 -[[image:Main.Images.Microlearning.WebHome@expert-create-your-transformations-image-transformation-image-transformation-component.png]] 33 +We advise using functionality that makes it explicit that both models function independently of each other. From eMagiz we consider two valid alternatives for this: 34 +- Using a web service as a layer of communication between the two models. This web service can be REST or SOAP and has been implemented before 35 +- Using the Event Streaming functionality of eMagiz to write and read from topics. 35 35 37 +Both alternatives have the benefit that the security can be tight and explicit (i.e. only model A can write/post data to model B). Furthermore managing the solution becomes a lot easier as it makes use of the standard functionality within the platform. We have no plans to support this approach in the product. 38 + 36 36 == 4. Assignment == 37 37 38 -C heckoutwhichoftheXPathswe havediscussedtodaycanbefound withinyourproject.39 -This assignment can be completed with inthe (Academy) project you created/used in the previous assignment.41 +Consider what your criteria are when communicate between models and compare them to our criteria. 42 +This assignment can be completed with the help of the (Academy) project you created/used in the previous assignment. 40 40 41 41 == 5. Key takeaways == 42 42 43 -Some of the very complex XPath options are: 46 +* Consider the following when communication between two models 47 +** Security 48 +** Loose coupling 49 +** Maintainability 50 +** Clarity 44 44 45 -* matches 46 -* replace 47 -* tokenize 48 - 49 49 == 6. Suggested Additional Readings == 50 50 51 -If you are interested in this topic and want more information on it, pleasereadthehelptextprovided byeMagizand read moreinformationonhefollowinglinks:54 +If you are interested in this topic and want more information, please consult us at [[productmanagement@emagiz.com>>mailto:productmanagement@emagiz.com]] 52 52 53 -* http://www.xsltfunctions.com/xsl/fn_matches.html 54 -* http://www.xsltfunctions.com/xsl/fn_replace.html 55 -* http://www.xsltfunctions.com/xsl/fn_tokenize.html 56 - 57 57 == 7. Silent demonstration video == 58 58 59 59 As this is more of theoretical microlearning, there is no video accompanying the microlearning.)))((({{toc/}}))){{/container}}{{/container}}