• fb
  • tw
  • gg
97008 48403
+91 40-27177600

Blog

How to create an empty list and add elements to it using app.registry in Mule ESB?

single-blog

From the technical center of excellence of Massil Technologies, our technology leaders make it easy to understand the complex situations you come across in Mule ESB from the experience of Massil Technologies to have countered them in their experience of working on client projects in real time. This blog talks about creating an empty list and adding elements to it using app.registry in Mule ESB. This blog is a part of series of blogs being authored and published by Massil Technologies for the benefit of the IT community globally.

App.registry is the most popular term in Mule ESB. If you need to store runtime data that is available from across the application, you can store the data as objects in the Registry. You can get a handle to the registry from anywhere that you have access to the Mule Context, as in most Mule ESB entities.

Now, addressing the above scenario, we present you the best possible approach in a step by step manner.

Step 1: Create a project and search HTTP listener in Mule ESB Palette and drag it to the message flow and configure as follows

Step 2:- Store the data in a variable which is present in Payload (i.e. data which is coming from post man) as follows:

Step 3:-Create an empty list by using bean in global elements. The configuration of creating an empty list as follows:

Step 4: Drag an expression connector from mule Palette to message flow after the variable and we will add the data which we are passing from postman into the list by using app.registry in expression as follows

Step 5:-Drag the set payload and write the code to print the data present in the list as output.

Step 6:- Complete flow in Mule ESB is as follows:

Step 7: Run the project and after successful deployment hit some data from postman to see the results

Hence, we have gone through the step by step process to depict the way Massil Technologies team has addressed the above mentioned. scenario. Hope this article from Massil Technologies was useful for you. If you have any further queries on this topic, please reach out to info@massil.tech.

Leave a Reply

Your email address will not be published. Required fields are marked *

map

Contact Us

Get in touch with us