SlideShare a Scribd company logo
By Anirban Sen Chowdhary
Mule ESB has the ability to store data into variables.
Fortunately Mule offers 2 types of variables 1) Flow variables that has scope limited
to a flow and subflow and 2) Session variables that has scope and can be accessed
from entire application.
Now, one interesting facts I come across several Mule users is how to define a List
or a Map with a variable in Mule in the same way as Java.
Let me tell you, this is absolutely possible with Mule.
We will see in this demo how to create Map in Mule with Mule variables in different
ways.
Also note, the data used here is just for demonstration purpose and it doesn’t
follow any standard.
Map in Mule
we can define a Map in number
of ways
Step1: In a Groovy Script :-
So, if we debug we can see the variable is turned into a Hashmap:-
Step2: In a Groovy Script, directly assigning the value in a variable after declaring the
variable as java.util.HashMap() :-
So, if we debug we can see the variable is turned into a Hashmap:-
Step3: In a variable directly and initialising it’s value:-
So, if we debug we can see the variable is turned into a Hashmap:-
Step3: In an expression component declaring and initialising the HashMap(), then
assigning to a flow Variable:-
So, if we debug we can see the variable is turned into a Hashmap:-
So, here you can see how to use a Map with Mule variable… Hope I was clear
enough to give an Idea of it’s implementation ….
In my next slide I will bring some other techniques in Mule implementation .
Hope you have enjoyed this simpler version.
Keep sharing your knowledge and let our Mule community grow 
Map in Mule

More Related Content

PPTX
Filtering jms messages with mule
Anirban Sen Chowdhary
 
PPTX
Creating dynamic json in Mule
F K
 
PPTX
Accessing jms in mule using groovy
Anirban Sen Chowdhary
 
PPTX
Mule velocity
Praneethchampion
 
PPTX
Mapping and listing with mule
Anirban Sen Chowdhary
 
PPTX
Mule soap
Khasim Saheb
 
PPTX
Groovy in Mule
Praneethchampion
 
PPTX
Scatter and gather in mule
Rajkattamuri
 
Filtering jms messages with mule
Anirban Sen Chowdhary
 
Creating dynamic json in Mule
F K
 
Accessing jms in mule using groovy
Anirban Sen Chowdhary
 
Mule velocity
Praneethchampion
 
Mapping and listing with mule
Anirban Sen Chowdhary
 
Mule soap
Khasim Saheb
 
Groovy in Mule
Praneethchampion
 
Scatter and gather in mule
Rajkattamuri
 

What's hot (12)

PPTX
Caching and invalidating with managed store
Anirban Sen Chowdhary
 
PPTX
Mule Clustering
Vijay Shan
 
PPTX
Cache for community edition
Anirban Sen Chowdhary
 
PPTX
Soap request in mule
Praneethchampion
 
PPTX
Stored procedure in Mule
Khasim Saheb
 
PPTX
Scatter gather in mule
Khasim Cise
 
PPTX
Mule xml transformation
D.Rajesh Kumar
 
PPTX
Create dynamic json using mule
Son Nguyen
 
PPTX
Mapping and listing in mule
Khan625
 
PPTX
Mapping and listing with mule
Praneethchampion
 
PPTX
Mule message enricher
Anirban Sen Chowdhary
 
PPTX
Mule soap
D.Rajesh Kumar
 
Caching and invalidating with managed store
Anirban Sen Chowdhary
 
Mule Clustering
Vijay Shan
 
Cache for community edition
Anirban Sen Chowdhary
 
Soap request in mule
Praneethchampion
 
Stored procedure in Mule
Khasim Saheb
 
Scatter gather in mule
Khasim Cise
 
Mule xml transformation
D.Rajesh Kumar
 
Create dynamic json using mule
Son Nguyen
 
Mapping and listing in mule
Khan625
 
Mapping and listing with mule
Praneethchampion
 
Mule message enricher
Anirban Sen Chowdhary
 
Mule soap
D.Rajesh Kumar
 
Ad

Similar to Map in Mule (15)

PPTX
Using map and list starter
Son Nguyen
 
PPTX
Mapping and listing with mule
Khan625
 
PPTX
Mapping and listing with mule
javeed_mhd
 
PPTX
Mapping and listing with mule
mdfkhan625
 
PPTX
Mapping and listing with mule
princeirfancivil
 
PPTX
Mapping and listing with mule
irfan1008
 
PPTX
Mapping and listing with mule
Phaniu
 
PPTX
Mapping and listing with mule
Sunil Komarapu
 
PPTX
Mapping and listing with mule
Khasim Saheb
 
PPTX
Mapping and listing with mule
Anand kalla
 
PPTX
Variable
krishashi
 
PPTX
Variables in mule
Srinu Prasad
 
PPTX
MuleSoft : How to add filters and expression in maps
Zaheer Ahmad Chaudhry
 
PPTX
Mule message structure
Shanky Gupta
 
PPTX
Mule expression language - Part 1
removed_34be96619b7b4fcc8ecd9495ad92d40b
 
Using map and list starter
Son Nguyen
 
Mapping and listing with mule
Khan625
 
Mapping and listing with mule
javeed_mhd
 
Mapping and listing with mule
mdfkhan625
 
Mapping and listing with mule
princeirfancivil
 
Mapping and listing with mule
irfan1008
 
Mapping and listing with mule
Phaniu
 
Mapping and listing with mule
Sunil Komarapu
 
Mapping and listing with mule
Khasim Saheb
 
Mapping and listing with mule
Anand kalla
 
Variable
krishashi
 
Variables in mule
Srinu Prasad
 
MuleSoft : How to add filters and expression in maps
Zaheer Ahmad Chaudhry
 
Mule message structure
Shanky Gupta
 
Mule expression language - Part 1
removed_34be96619b7b4fcc8ecd9495ad92d40b
 
Ad

More from Anirban Sen Chowdhary (20)

PPTX
Change the game with Game changer
Anirban Sen Chowdhary
 
PPTX
Ring central desktop app overview
Anirban Sen Chowdhary
 
PPTX
Overview in ringcentral digital line
Anirban Sen Chowdhary
 
PPTX
Some basics with ring central
Anirban Sen Chowdhary
 
PPTX
Ring central and python
Anirban Sen Chowdhary
 
PPTX
RingCentral application development overview
Anirban Sen Chowdhary
 
PPTX
Cloze connect ringcentral
Anirban Sen Chowdhary
 
PPTX
Overview on ring central errors part 4
Anirban Sen Chowdhary
 
PPTX
Setting up your ring central sandbox in steps
Anirban Sen Chowdhary
 
PPTX
Overview on ring central errors: part 2
Anirban Sen Chowdhary
 
PPTX
Overview on ring central errors
Anirban Sen Chowdhary
 
PPTX
Call recording overview ring central
Anirban Sen Chowdhary
 
PPTX
Ring central engaging with amazon alexa
Anirban Sen Chowdhary
 
PPTX
How ring central sdk changing the game
Anirban Sen Chowdhary
 
PPTX
When ring central connect salesforce
Anirban Sen Chowdhary
 
PPTX
Mule 4 connecting ring central
Anirban Sen Chowdhary
 
PPTX
Ring central sdk
Anirban Sen Chowdhary
 
PPTX
Ring central with okta
Anirban Sen Chowdhary
 
PPTX
Ring central connecting salesforce overview
Anirban Sen Chowdhary
 
PPTX
Ring central call logs overview (part 2)
Anirban Sen Chowdhary
 
Change the game with Game changer
Anirban Sen Chowdhary
 
Ring central desktop app overview
Anirban Sen Chowdhary
 
Overview in ringcentral digital line
Anirban Sen Chowdhary
 
Some basics with ring central
Anirban Sen Chowdhary
 
Ring central and python
Anirban Sen Chowdhary
 
RingCentral application development overview
Anirban Sen Chowdhary
 
Cloze connect ringcentral
Anirban Sen Chowdhary
 
Overview on ring central errors part 4
Anirban Sen Chowdhary
 
Setting up your ring central sandbox in steps
Anirban Sen Chowdhary
 
Overview on ring central errors: part 2
Anirban Sen Chowdhary
 
Overview on ring central errors
Anirban Sen Chowdhary
 
Call recording overview ring central
Anirban Sen Chowdhary
 
Ring central engaging with amazon alexa
Anirban Sen Chowdhary
 
How ring central sdk changing the game
Anirban Sen Chowdhary
 
When ring central connect salesforce
Anirban Sen Chowdhary
 
Mule 4 connecting ring central
Anirban Sen Chowdhary
 
Ring central sdk
Anirban Sen Chowdhary
 
Ring central with okta
Anirban Sen Chowdhary
 
Ring central connecting salesforce overview
Anirban Sen Chowdhary
 
Ring central call logs overview (part 2)
Anirban Sen Chowdhary
 

Recently uploaded (20)

PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
PDF
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
PDF
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
PPTX
Simple and concise overview about Quantum computing..pptx
mughal641
 
PDF
Software Development Methodologies in 2025
KodekX
 
PDF
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
PDF
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
Doc9.....................................
SofiaCollazos
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PPTX
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
Simple and concise overview about Quantum computing..pptx
mughal641
 
Software Development Methodologies in 2025
KodekX
 
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
Doc9.....................................
SofiaCollazos
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 

Map in Mule

  • 1. By Anirban Sen Chowdhary
  • 2. Mule ESB has the ability to store data into variables. Fortunately Mule offers 2 types of variables 1) Flow variables that has scope limited to a flow and subflow and 2) Session variables that has scope and can be accessed from entire application. Now, one interesting facts I come across several Mule users is how to define a List or a Map with a variable in Mule in the same way as Java. Let me tell you, this is absolutely possible with Mule. We will see in this demo how to create Map in Mule with Mule variables in different ways. Also note, the data used here is just for demonstration purpose and it doesn’t follow any standard.
  • 4. we can define a Map in number of ways
  • 5. Step1: In a Groovy Script :-
  • 6. So, if we debug we can see the variable is turned into a Hashmap:-
  • 7. Step2: In a Groovy Script, directly assigning the value in a variable after declaring the variable as java.util.HashMap() :-
  • 8. So, if we debug we can see the variable is turned into a Hashmap:-
  • 9. Step3: In a variable directly and initialising it’s value:-
  • 10. So, if we debug we can see the variable is turned into a Hashmap:-
  • 11. Step3: In an expression component declaring and initialising the HashMap(), then assigning to a flow Variable:-
  • 12. So, if we debug we can see the variable is turned into a Hashmap:-
  • 13. So, here you can see how to use a Map with Mule variable… Hope I was clear enough to give an Idea of it’s implementation ….
  • 14. In my next slide I will bring some other techniques in Mule implementation . Hope you have enjoyed this simpler version. Keep sharing your knowledge and let our Mule community grow 