Changes for page Command Queue
Last modified by Erik Bakker on 2024/02/22 13:38
From version 13.1
edited by Erik Bakker
on 2022/07/28 09:20
on 2022/07/28 09:20
Change comment:
There is no comment for this version
To version 14.1
edited by Erik Bakker
on 2022/07/28 10:27
on 2022/07/28 10:27
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,5 +1,5 @@ 1 1 {{container}}{{container layoutStyle="columns"}}((( 2 - Ina low-code platformlikeeMagiz, youwanttopreventusingcustomscriptingasmuch aspossible.However,sometimesinpractice,youencountersituationsthatcannotberealizedwiththestandardtoolboxprovidedwithintheplatform. As a result,weoffertheoptiontouse aGroovyscriptin thesesituationsto achievethedesiredsolution. Inthis microlearning, we will lookatwhere you can useaGroovy script anddiscussthekey considerationswhenimplementing a Groovyscriptwithin your model.2 +Within the platform of eMagiz, sometimes you need to send a particular command from the eMagiz portal to retrieve information or execute a specific action. These commands can happen from the Deploy and the Manage phase. The two most noteworthy examples of the triggered command queue are the runtime dashboard functionalities and the message redelivery actions. 3 3 4 4 Should you have any questions, please get in touch with [[academy@emagiz.com>>mailto:academy@emagiz.com]]. 5 5 ... ... @@ -9,71 +9,35 @@ 9 9 10 10 == 2. Key concepts == 11 11 12 -This microlearning focuses on groovy scripts. A groovy script is a pieceofcodewrittenin thegroovy languagethat allows youtoextendthe platform's functionalitybeyondthemereuse ofthecomponentssuppliedviatheflow designer.12 +This microlearning focuses on the command queue. The command queue communicates between the eMagiz portal and an eMagiz runtime. 13 13 14 -* Groovy scripts should be viewed as an extension that can be used in fringe cases, not as a standard best practice 15 -* When a groovy script becomes so complex that you are programming, you should consider alternatives to the solution 16 -* Groovy scripts can be used in a filter, transformation, and as part of a standard executor 17 -* Groovy scripts should be well documented as they are though to read for most of our community members 18 -* There is no guarantee from eMagiz that Groovy scripts within models keep working in newer versions of the platform 14 +* Commands towards a runtime, for example, to retrieve runtime information in the runtime dashboard, are sent via the command queue 15 +* You can monitor the command queue the same way as any other queue within your model 16 +* The command queue is prominently used when accessing the [[Runtime Dashboard>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course Platform.crashcourse-platform-deploy-runtime-dashboard.WebHome||target="blank"]] and when using [[Message Redelivery>>doc:Main.eMagiz Academy.Microlearnings.Intermediate Level.Message Redelivery.WebHome||target="blank"]] 19 19 20 -== 3. Groovyscript==18 +== 3. Command queue == 21 21 22 - Ina low-code platformlikeeMagiz, youwanttopreventusingcustomscriptingasmuch aspossible.However,sometimesinpractice,youencountersituationsthatcannotberealizedwiththestandardtoolboxprovidedwithintheplatform. As a result,weoffertheoptiontouse aGroovyscriptin thesesituationsto achievethedesiredsolution. Inthis microlearning, we will lookatwhere you can useaGroovy script anddiscussthekey considerationswhenimplementing a Groovyscriptwithin your model.20 +Within the platform of eMagiz, sometimes you need to send a particular command from the eMagiz portal to retrieve information or execute a specific action. These commands can happen from the Deploy and the Manage phase. The two most noteworthy examples of the triggered command queue are the runtime dashboard functionalities and the message redelivery actions. 23 23 24 - ===3.1 Implementation inCreate===22 +For example, when you navigate the Runtime Dashboard and click on a runtime, the eMagiz portal will send a command to the runtime via the command queue to retrieve the runtime state. So, for example, the same logic applies when you select a flow and stop it. 25 25 26 -To implement a groovy script in Create you first need to consider what your Groovy script should do. Within the flow designer there are five components available that can handle a Groovy script. 27 - 28 -* In case you want the Groovy script to filter out messages you should implement the Groovy script in a "standard filter" component. 29 -* If you want your Groovy script to always transform your message from a certain format into another format you should consider using a "standard transformer" component. 30 -* In case you need an optional output the "standard service activator" is your friend. So for example, when you want to do some transformation and do a check whether a message can continue you can use the "standard service activator" and have an optional output. 31 -* When you want to split your message based on a Groovy script you should use the "standard splitter" 32 -* If you want to route messsages based on a Groovy script you should use the "standard router" 24 +For Message redelivery, the command queue retrieves all messages in the dead letter queue and resends messages via the command queue. 33 33 34 -{{ warning}}Note,thatinpracticewemainlyseeusecasesfor the"standardserviceactivator"andthe"standardtransformation".{{/warning}}26 +{{info}}When all commands sent from the eMagiz portal are not working across models, something is probably broken in the backend of the eMagiz platform. In these cases, please contact us at [[support@emagiz.com>>mailto:support@emagiz.com]]{{/info}} 35 35 36 -[[image:Main.Images.Microlearning.WebHome@expert-data-handling-groovy-script-available-components.png]] 37 - 38 -Regardless of the component you choose you always need to select the option called "Groovy script" and reference the Groovy resource available on flow level that you want to use within the component. 39 - 40 -[[image:Main.Images.Microlearning.WebHome@expert-data-handling-groovy-script-groovy-configuration.png]] 41 - 42 -{{info}}As you can see in the help text when selecting the "resource" attribute you need to make sure that the Groovy script is uploaded within the context of your flow.{{/info}} 43 - 44 -After you have the component in such a way that the correct Groovy script is called you are done with the configuration of the component and can test the flow using flow testing. 45 - 46 -=== 3.2 Key considerations === 47 - 48 -* To make some groovy scripts work you need to upload (third-party) Java libraries that are not packaged on default by eMagiz 49 -* To make some groovy scripts work you need to reference Java libraries via a standard header enricher or as a dummy variable 50 -* The store consists of several groovy scripts that might be of use to you 51 -* Groovy scripts should be viewed as an extension that can be used in fringe cases, not as a standard best practice 52 -* When a groovy script becomes so complex that you are programming, you should consider alternatives to the solution 53 -* Groovy scripts can be used in a filter, transformation, and as part of a standard executor 54 -* Groovy scripts should be well documented as they are though to read for most of our community members 55 -* There is no guarantee from eMagiz that Groovy scripts within models keep working in newer versions of the platform 56 - 57 57 == 4. Assignment == 58 58 59 -Try to implement a component that references a Groovy script and see whether the flow can be tested. 60 -This assignment can be completed with the help of the (Academy) project that you have created/used in the previous assignment. 30 +There is no assignment for this microlearning. 61 61 62 62 == 5. Key takeaways == 63 63 64 -* To make some groovy scripts work you need to upload (third-party) Java libraries that are not packaged on default by eMagiz 65 -* To make some groovy scripts work you need to reference Java libraries via a standard header enricher or as a dummy variable 66 -* The store consists of several groovy scripts that might be of use to you 67 -* Groovy scripts should be viewed as an extension that can be used in fringe cases, not as a standard best practice 68 -* When a groovy script becomes so complex that you are programming, you should consider alternatives to the solution 69 -* Groovy scripts can be used in a filter, transformation, and as part of a standard executor 70 -* Groovy scripts should be well documented as they are though to read for most of our community members 71 -* There is no guarantee from eMagiz that Groovy scripts within models keep working in newer versions of the platform 34 +* Commands towards a runtime, for example, to retrieve runtime information in the runtime dashboard, are sent via the command queue 35 +* You can monitor the command queue the same way as any other queue within your model 36 +* The command queue is prominently used when accessing the [[Runtime Dashboard>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course Platform.crashcourse-platform-deploy-runtime-dashboard.WebHome||target="blank"]] and when using [[Message Redelivery>>doc:Main.eMagiz Academy.Microlearnings.Intermediate Level.Message Redelivery.WebHome||target="blank"]] 72 72 73 73 == 6. Suggested Additional Readings == 74 74 75 -If you are interested in this topic and want more information, please read the help text provided by eMagiz and read the following link: 76 -* https://www.tutorialspoint.com/groovy/index.htm 40 +There are no suggested additional readings. 77 77 78 78 == 7. Silent demonstration video == 79 79