SlideShare a Scribd company logo
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 can define List or a Map in Mule with Mule variables.
We can define a List with a Mule variable in following ways :-
<set-variable variableName="test" value="#[{1000,100,14,1}]" doc:name="Variable"/>
Or
<set-variable variableName="test" value="#[[1000,100,14,1]]" doc:name="Variable"/>
Here you can see we define a variable named as test which is defined as a List
Now, we can get the values from the List as follow :-
<logger level="INFO" message="#[flowVars['test'][0]]" doc:name="Logger"/>
<logger level="INFO" message="#[flowVars['test'][1]]" doc:name="Logger"/>
<logger level="INFO" message="#[flowVars['test'][2]]" doc:name="Logger"/>
<logger level="INFO" message="#[flowVars['test'][3]]" doc:name="Logger"/>
As you can see we are retrieving the values from the List with the index
Now, we can define a Map in the same way as follow :-
<set-variable variableName="customMap" value="#[{'k2':'new', 'k3':'v3'}]" />
Or
<set-variable variableName="customMap" value="#[['k2':'new', 'k3':'v3‘]]" />
Here you can see we define a variable named as customMap which is defined as a
Map
Now, we can get the values from the Map as follow :-
<logger message="#[flowVars['customMap']['k2']] " level="INFO"
doc:name="Logger"/>
<logger message="#[flowVars['customMap']['k3']] " level="INFO"
doc:name="Logger"/>
As you can see we are retrieving the values from the Map with the key
Now, let us consider a simple flow to demonstrate the List and the Map as follow :-
The Mule config will be :-
You can see here we are using Expression component to reassign our List value of index
1 and index 2 … Then we are using logger to print the new value of List again in the
console
So, if we test the example we will get all the value of List and Map variables as follow as
well as with new reassigned value :-
So, here you can see how to use a List and 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 
Mapping and listing with mule

More Related Content

What's hot

Splitting with mule part2
Splitting with mule part2Splitting with mule part2
Splitting with mule part2
Anirban Sen Chowdhary
 
Json to json transformation in mule
Json to json transformation in muleJson to json transformation in mule
Json to json transformation in mule
Antonio Pellegrino
 
Xslt in mule
Xslt in muleXslt in mule
Xslt in mule
irfan1008
 
Converting with custom transformer
Converting with custom transformerConverting with custom transformer
Converting with custom transformer
F K
 
Filtering jms messages with mule
Filtering jms messages with muleFiltering jms messages with mule
Filtering jms messages with mule
Anirban Sen Chowdhary
 
Mule esb How to use Jackson in Object to Json converter
Mule esb How to use Jackson in Object to Json converterMule esb How to use Jackson in Object to Json converter
Mule esb How to use Jackson in Object to Json converter
Raffaela Vitiello
 
Stored procedure in mule
Stored procedure in muleStored procedure in mule
Stored procedure in mule
Son Nguyen
 
Database integrate with mule
Database integrate with muleDatabase integrate with mule
Database integrate with mule
Son Nguyen
 
Mule esb How to use Jackson in Json to Object converter
Mule esb How to use Jackson in Json to Object converterMule esb How to use Jackson in Json to Object converter
Mule esb How to use Jackson in Json to Object converter
Gennaro Spagnoli
 
Accessing jms in mule using groovy
Accessing jms in mule using groovyAccessing jms in mule using groovy
Accessing jms in mule using groovy
Anirban Sen Chowdhary
 
Mule esb How to convert from Object to Json in 5 minutes
Mule esb How to convert from Object to Json in 5 minutesMule esb How to convert from Object to Json in 5 minutes
Mule esb How to convert from Object to Json in 5 minutes
Gennaro Spagnoli
 
Xml to xml transformation in mule
Xml to xml transformation in muleXml to xml transformation in mule
Xml to xml transformation in mule
Rajkattamuri
 
Mule xml parsing
Mule xml parsingMule xml parsing
Mule xml parsing
Muralidhar Gumma
 

What's hot (13)

Splitting with mule part2
Splitting with mule part2Splitting with mule part2
Splitting with mule part2
 
Json to json transformation in mule
Json to json transformation in muleJson to json transformation in mule
Json to json transformation in mule
 
Xslt in mule
Xslt in muleXslt in mule
Xslt in mule
 
Converting with custom transformer
Converting with custom transformerConverting with custom transformer
Converting with custom transformer
 
Filtering jms messages with mule
Filtering jms messages with muleFiltering jms messages with mule
Filtering jms messages with mule
 
Mule esb How to use Jackson in Object to Json converter
Mule esb How to use Jackson in Object to Json converterMule esb How to use Jackson in Object to Json converter
Mule esb How to use Jackson in Object to Json converter
 
Stored procedure in mule
Stored procedure in muleStored procedure in mule
Stored procedure in mule
 
Database integrate with mule
Database integrate with muleDatabase integrate with mule
Database integrate with mule
 
Mule esb How to use Jackson in Json to Object converter
Mule esb How to use Jackson in Json to Object converterMule esb How to use Jackson in Json to Object converter
Mule esb How to use Jackson in Json to Object converter
 
Accessing jms in mule using groovy
Accessing jms in mule using groovyAccessing jms in mule using groovy
Accessing jms in mule using groovy
 
Mule esb How to convert from Object to Json in 5 minutes
Mule esb How to convert from Object to Json in 5 minutesMule esb How to convert from Object to Json in 5 minutes
Mule esb How to convert from Object to Json in 5 minutes
 
Xml to xml transformation in mule
Xml to xml transformation in muleXml to xml transformation in mule
Xml to xml transformation in mule
 
Mule xml parsing
Mule xml parsingMule xml parsing
Mule xml parsing
 

Viewers also liked

Women participation in peace process
Women participation in peace processWomen participation in peace process
Women participation in peace process
HRRAC Consortium
 
Mule esb Data Weave
Mule esb Data WeaveMule esb Data Weave
Mule esb Data Weave
F K
 
Hi600 u13_inst_slides
Hi600 u13_inst_slidesHi600 u13_inst_slides
Hi600 u13_inst_slides
ljmcneill33
 
The mobile revolution is here: engaging our users where they are
The mobile revolution is here: engaging our users where they areThe mobile revolution is here: engaging our users where they are
The mobile revolution is here: engaging our users where they are
Steven Chang
 
Instintos, Sexo y Sexualidad.
Instintos, Sexo y Sexualidad.Instintos, Sexo y Sexualidad.
Instintos, Sexo y Sexualidad.
Universidad Yacambú
 
cultivation practices of of peach
cultivation practices of  of peachcultivation practices of  of peach
cultivation practices of of peach
Pawan Nagar
 
Procesos mentales
Procesos mentalesProcesos mentales
Procesos mentales
Tomás Antonio Rojas Noguera
 
02 baumgartner
02 baumgartner02 baumgartner
02 baumgartner
fruitbreedomics
 
10 cantin
10 cantin10 cantin
10 cantin
fruitbreedomics
 
Suppurative lung diseases
Suppurative lung diseasesSuppurative lung diseases
Suppurative lung diseases
Dr Riham Hazem Raafat
 
Ley resorte
Ley resorteLey resorte
Macroestructura
MacroestructuraMacroestructura
MacroestructuraNullysc26
 
Mule with velocity
Mule with velocityMule with velocity
Mule with velocity
Hasan Syed
 

Viewers also liked (13)

Women participation in peace process
Women participation in peace processWomen participation in peace process
Women participation in peace process
 
Mule esb Data Weave
Mule esb Data WeaveMule esb Data Weave
Mule esb Data Weave
 
Hi600 u13_inst_slides
Hi600 u13_inst_slidesHi600 u13_inst_slides
Hi600 u13_inst_slides
 
The mobile revolution is here: engaging our users where they are
The mobile revolution is here: engaging our users where they areThe mobile revolution is here: engaging our users where they are
The mobile revolution is here: engaging our users where they are
 
Instintos, Sexo y Sexualidad.
Instintos, Sexo y Sexualidad.Instintos, Sexo y Sexualidad.
Instintos, Sexo y Sexualidad.
 
cultivation practices of of peach
cultivation practices of  of peachcultivation practices of  of peach
cultivation practices of of peach
 
Procesos mentales
Procesos mentalesProcesos mentales
Procesos mentales
 
02 baumgartner
02 baumgartner02 baumgartner
02 baumgartner
 
10 cantin
10 cantin10 cantin
10 cantin
 
Suppurative lung diseases
Suppurative lung diseasesSuppurative lung diseases
Suppurative lung diseases
 
Ley resorte
Ley resorteLey resorte
Ley resorte
 
Macroestructura
MacroestructuraMacroestructura
Macroestructura
 
Mule with velocity
Mule with velocityMule with velocity
Mule with velocity
 

Similar to Mapping and listing with mule

Mapping and listing with mule
Mapping and listing with muleMapping and listing with mule
Mapping and listing with mule
Anand kalla
 
Mapping and listing with mule
Mapping and listing with muleMapping and listing with mule
Mapping and listing with mule
Sunil Komarapu
 
Mapping and listing with mule
Mapping and listing with muleMapping and listing with mule
Mapping and listing with mule
Khasim Saheb
 
Mule accessing multiple database in parallel
Mule accessing multiple database in parallelMule accessing multiple database in parallel
Mule accessing multiple database in parallel
Anirban Sen Chowdhary
 
Mule xml transformation
Mule xml transformationMule xml transformation
Mule xml transformation
D.Rajesh Kumar
 
Multi database access
Multi database accessMulti database access
Multi database access
Son Nguyen
 
Parameters as a part of body
Parameters as a part of bodyParameters as a part of body
Parameters as a part of body
Anirban Sen Chowdhary
 
Ijetr012023
Ijetr012023Ijetr012023
Ijetr012023
ER Publication.org
 
Xml transform
Xml transformXml transform
Xml transform
Son Nguyen
 
Xml to xml transformation in mule
Xml to xml transformation in muleXml to xml transformation in mule
Xml to xml transformation in mule
Mohammed625
 
Xml to xml transformation in mule
Xml to xml transformation in muleXml to xml transformation in mule
Xml to xml transformation in mule
javeed_mhd
 
Xml to xml transformation
Xml to xml transformationXml to xml transformation
Xml to xml transformation
Son Nguyen
 
Apache Scoop - Import with Append mode and Last Modified mode
Apache Scoop - Import with Append mode and Last Modified mode Apache Scoop - Import with Append mode and Last Modified mode
Apache Scoop - Import with Append mode and Last Modified mode
Rupak Roy
 
Knockoutjs Part 2 Beginners
Knockoutjs Part 2 BeginnersKnockoutjs Part 2 Beginners
Knockoutjs Part 2 Beginners
Bhaumik Patel
 
My sql with querys
My sql with querysMy sql with querys
My sql with querysNIRMAL FELIX
 
Data weave (MuleSoft)
Data weave (MuleSoft)Data weave (MuleSoft)
Data weave (MuleSoft)
Nandu List5
 
Mule mel 5_tips
Mule mel 5_tipsMule mel 5_tips
Mule mel 5_tips
kunal vishe
 
Introduction of ssis
Introduction of ssisIntroduction of ssis
Introduction of ssisdeepakk073
 

Similar to Mapping and listing with mule (20)

Mapping and listing with mule
Mapping and listing with muleMapping and listing with mule
Mapping and listing with mule
 
Mapping and listing with mule
Mapping and listing with muleMapping and listing with mule
Mapping and listing with mule
 
Mapping and listing with mule
Mapping and listing with muleMapping and listing with mule
Mapping and listing with mule
 
Mule accessing multiple database in parallel
Mule accessing multiple database in parallelMule accessing multiple database in parallel
Mule accessing multiple database in parallel
 
Mule xml transformation
Mule xml transformationMule xml transformation
Mule xml transformation
 
Multi database access
Multi database accessMulti database access
Multi database access
 
Parameters as a part of body
Parameters as a part of bodyParameters as a part of body
Parameters as a part of body
 
Ijetr012023
Ijetr012023Ijetr012023
Ijetr012023
 
Xml transform
Xml transformXml transform
Xml transform
 
SQL
SQLSQL
SQL
 
Xml to xml transformation in mule
Xml to xml transformation in muleXml to xml transformation in mule
Xml to xml transformation in mule
 
Xml to xml transformation in mule
Xml to xml transformation in muleXml to xml transformation in mule
Xml to xml transformation in mule
 
Operators
OperatorsOperators
Operators
 
Xml to xml transformation
Xml to xml transformationXml to xml transformation
Xml to xml transformation
 
Apache Scoop - Import with Append mode and Last Modified mode
Apache Scoop - Import with Append mode and Last Modified mode Apache Scoop - Import with Append mode and Last Modified mode
Apache Scoop - Import with Append mode and Last Modified mode
 
Knockoutjs Part 2 Beginners
Knockoutjs Part 2 BeginnersKnockoutjs Part 2 Beginners
Knockoutjs Part 2 Beginners
 
My sql with querys
My sql with querysMy sql with querys
My sql with querys
 
Data weave (MuleSoft)
Data weave (MuleSoft)Data weave (MuleSoft)
Data weave (MuleSoft)
 
Mule mel 5_tips
Mule mel 5_tipsMule mel 5_tips
Mule mel 5_tips
 
Introduction of ssis
Introduction of ssisIntroduction of ssis
Introduction of ssis
 

More from javeed_mhd

For each component in mule
For each component in muleFor each component in mule
For each component in mule
javeed_mhd
 
Filter expression in mule
Filter expression in muleFilter expression in mule
Filter expression in mule
javeed_mhd
 
File component in mule
File component in muleFile component in mule
File component in mule
javeed_mhd
 
Database component in mule
Database component in muleDatabase component in mule
Database component in mule
javeed_mhd
 
Choice component in mule
Choice component in muleChoice component in mule
Choice component in mule
javeed_mhd
 
Vm component in mule
Vm component in muleVm component in mule
Vm component in mule
javeed_mhd
 
Until successful component in mule
Until successful component in muleUntil successful component in mule
Until successful component in mule
javeed_mhd
 
Quartz component in mule
Quartz component in muleQuartz component in mule
Quartz component in mule
javeed_mhd
 
Mule management console installation
Mule management console installation Mule management console installation
Mule management console installation
javeed_mhd
 
Mule esb made system integration easy
Mule esb made system integration easy Mule esb made system integration easy
Mule esb made system integration easy
javeed_mhd
 
Message properties component in mule
Message properties component in muleMessage properties component in mule
Message properties component in mule
javeed_mhd
 
Junit in mule demo
Junit in mule demo Junit in mule demo
Junit in mule demo
javeed_mhd
 
How to install sonarqube plugin in anypoint
How to install sonarqube plugin in anypoint How to install sonarqube plugin in anypoint
How to install sonarqube plugin in anypoint
javeed_mhd
 
How to commit a project in svn using svn plugin in anypointstudio
How to commit a project in svn using svn plugin in anypointstudioHow to commit a project in svn using svn plugin in anypointstudio
How to commit a project in svn using svn plugin in anypointstudio
javeed_mhd
 
Mule any point exchange
Mule any point exchangeMule any point exchange
Mule any point exchange
javeed_mhd
 
Mule esb api layer
Mule esb api layer Mule esb api layer
Mule esb api layer
javeed_mhd
 
Mule Maven Plugin
Mule Maven PluginMule Maven Plugin
Mule Maven Plugin
javeed_mhd
 
Mule esb stripe
Mule esb stripeMule esb stripe
Mule esb stripe
javeed_mhd
 
Mule with stored procedure
Mule with stored procedureMule with stored procedure
Mule with stored procedure
javeed_mhd
 
Deploying and running in mule standalone
Deploying and running in mule standaloneDeploying and running in mule standalone
Deploying and running in mule standalone
javeed_mhd
 

More from javeed_mhd (20)

For each component in mule
For each component in muleFor each component in mule
For each component in mule
 
Filter expression in mule
Filter expression in muleFilter expression in mule
Filter expression in mule
 
File component in mule
File component in muleFile component in mule
File component in mule
 
Database component in mule
Database component in muleDatabase component in mule
Database component in mule
 
Choice component in mule
Choice component in muleChoice component in mule
Choice component in mule
 
Vm component in mule
Vm component in muleVm component in mule
Vm component in mule
 
Until successful component in mule
Until successful component in muleUntil successful component in mule
Until successful component in mule
 
Quartz component in mule
Quartz component in muleQuartz component in mule
Quartz component in mule
 
Mule management console installation
Mule management console installation Mule management console installation
Mule management console installation
 
Mule esb made system integration easy
Mule esb made system integration easy Mule esb made system integration easy
Mule esb made system integration easy
 
Message properties component in mule
Message properties component in muleMessage properties component in mule
Message properties component in mule
 
Junit in mule demo
Junit in mule demo Junit in mule demo
Junit in mule demo
 
How to install sonarqube plugin in anypoint
How to install sonarqube plugin in anypoint How to install sonarqube plugin in anypoint
How to install sonarqube plugin in anypoint
 
How to commit a project in svn using svn plugin in anypointstudio
How to commit a project in svn using svn plugin in anypointstudioHow to commit a project in svn using svn plugin in anypointstudio
How to commit a project in svn using svn plugin in anypointstudio
 
Mule any point exchange
Mule any point exchangeMule any point exchange
Mule any point exchange
 
Mule esb api layer
Mule esb api layer Mule esb api layer
Mule esb api layer
 
Mule Maven Plugin
Mule Maven PluginMule Maven Plugin
Mule Maven Plugin
 
Mule esb stripe
Mule esb stripeMule esb stripe
Mule esb stripe
 
Mule with stored procedure
Mule with stored procedureMule with stored procedure
Mule with stored procedure
 
Deploying and running in mule standalone
Deploying and running in mule standaloneDeploying and running in mule standalone
Deploying and running in mule standalone
 

Recently uploaded

Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 

Recently uploaded (20)

Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 

Mapping and listing with mule

  • 1.
  • 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 can define List or a Map in Mule with Mule variables.
  • 3.
  • 4. We can define a List with a Mule variable in following ways :- <set-variable variableName="test" value="#[{1000,100,14,1}]" doc:name="Variable"/> Or <set-variable variableName="test" value="#[[1000,100,14,1]]" doc:name="Variable"/> Here you can see we define a variable named as test which is defined as a List
  • 5. Now, we can get the values from the List as follow :- <logger level="INFO" message="#[flowVars['test'][0]]" doc:name="Logger"/> <logger level="INFO" message="#[flowVars['test'][1]]" doc:name="Logger"/> <logger level="INFO" message="#[flowVars['test'][2]]" doc:name="Logger"/> <logger level="INFO" message="#[flowVars['test'][3]]" doc:name="Logger"/> As you can see we are retrieving the values from the List with the index
  • 6. Now, we can define a Map in the same way as follow :- <set-variable variableName="customMap" value="#[{'k2':'new', 'k3':'v3'}]" /> Or <set-variable variableName="customMap" value="#[['k2':'new', 'k3':'v3‘]]" /> Here you can see we define a variable named as customMap which is defined as a Map
  • 7. Now, we can get the values from the Map as follow :- <logger message="#[flowVars['customMap']['k2']] " level="INFO" doc:name="Logger"/> <logger message="#[flowVars['customMap']['k3']] " level="INFO" doc:name="Logger"/> As you can see we are retrieving the values from the Map with the key
  • 8. Now, let us consider a simple flow to demonstrate the List and the Map as follow :-
  • 9. The Mule config will be :- You can see here we are using Expression component to reassign our List value of index 1 and index 2 … Then we are using logger to print the new value of List again in the console
  • 10. So, if we test the example we will get all the value of List and Map variables as follow as well as with new reassigned value :-
  • 11. So, here you can see how to use a List and Map with Mule variable… Hope I was clear enough to give an Idea of it’s implementation ….
  • 12. 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 