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

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
 
Xml to xml transformation in mule
Xml to xml transformation in muleXml to xml transformation in mule
Xml to xml transformation in mule
Rajkattamuri
 
Converting with custom transformer
Converting with custom transformerConverting with custom transformer
Converting with custom transformer
F K
 
Idempotent filter with simple file
Idempotent filter with simple fileIdempotent filter with simple file
Idempotent filter with simple file
Anirban Sen Chowdhary
 
Xml to xml transformation in mule
Xml to xml transformation in muleXml to xml transformation in mule
Xml to xml transformation in mule
mdfkhan625
 
Xslt in mule
Xslt in muleXslt in mule
Xslt in mule
Mohammed246
 
Splitting with mule part2
Splitting with mule part2Splitting with mule part2
Splitting with mule part2
Anirban Sen Chowdhary
 
Integrate with database by groovy
Integrate with database by groovyIntegrate with database by groovy
Integrate with database by groovy
Son Nguyen
 
Mapping and listing with mule
Mapping and listing with muleMapping and listing with mule
Mapping and listing with mule
Praneethchampion
 
xslt in mule
xslt in mulexslt in mule
xslt in mule
Praneethchampion
 
Filtering jms messages with mule
Filtering jms messages with muleFiltering jms messages with mule
Filtering jms messages with mule
Anirban Sen Chowdhary
 
Velocity in Mule
Velocity in MuleVelocity in Mule
Velocity in Mule
Mohammed246
 
Scatter and gather in mule
Scatter and gather in muleScatter and gather in mule
Scatter and gather in mule
Rajkattamuri
 

What's hot (13)

Json to json transformation in mule
Json to json transformation in muleJson to json transformation in mule
Json to json 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
 
Converting with custom transformer
Converting with custom transformerConverting with custom transformer
Converting with custom transformer
 
Idempotent filter with simple file
Idempotent filter with simple fileIdempotent filter with simple file
Idempotent filter with simple file
 
Xml to xml transformation in mule
Xml to xml transformation in muleXml to xml transformation in mule
Xml to xml transformation in mule
 
Xslt in mule
Xslt in muleXslt in mule
Xslt in mule
 
Splitting with mule part2
Splitting with mule part2Splitting with mule part2
Splitting with mule part2
 
Integrate with database by groovy
Integrate with database by groovyIntegrate with database by groovy
Integrate with database by groovy
 
Mapping and listing with mule
Mapping and listing with muleMapping and listing with mule
Mapping and listing with mule
 
xslt in mule
xslt in mulexslt in mule
xslt in mule
 
Filtering jms messages with mule
Filtering jms messages with muleFiltering jms messages with mule
Filtering jms messages with mule
 
Velocity in Mule
Velocity in MuleVelocity in Mule
Velocity in Mule
 
Scatter and gather in mule
Scatter and gather in muleScatter and gather in mule
Scatter and gather in mule
 

Viewers also liked

For each component in mule demo
For each component in mule demoFor each component in mule demo
For each component in mule demo
Sudha Ch
 
Question 4
Question 4Question 4
Question 4
ArchieC
 
Mule splitters
Mule splittersMule splitters
Mule splitters
Ravinder Singh
 
Movimiento de tierras presentacion
Movimiento de tierras presentacionMovimiento de tierras presentacion
Movimiento de tierras presentacion
Marianella241990
 
source code which create file and write into it
source code which create file and write into itsource code which create file and write into it
source code which create file and write into it
melakusisay507
 
Presentacion sobre rss
Presentacion sobre  rssPresentacion sobre  rss
Presentacion sobre rss
anyi22campo
 
Λογισμικό
ΛογισμικόΛογισμικό
Λογισμικό
MariaProGr
 
Comprehensive study on pharmacognostic, physico and phytochemical evaluation ...
Comprehensive study on pharmacognostic, physico and phytochemical evaluation ...Comprehensive study on pharmacognostic, physico and phytochemical evaluation ...
Comprehensive study on pharmacognostic, physico and phytochemical evaluation ...
Uploadworld
 
Python lab - Βασικές Αρχές Προγραμματισμού Εργαστήριο
Python lab - Βασικές Αρχές Προγραμματισμού ΕργαστήριοPython lab - Βασικές Αρχές Προγραμματισμού Εργαστήριο
Python lab - Βασικές Αρχές Προγραμματισμού Εργαστήριο
Pavlos (Παύλος) Avgerinopoulos (Αυγερινόπουλος)
 
The Challenges of Affect Detection in the Social Programmer Ecosystem
The Challenges of Affect Detection in the Social Programmer EcosystemThe Challenges of Affect Detection in the Social Programmer Ecosystem
The Challenges of Affect Detection in the Social Programmer Ecosystem
Nicole Novielli
 
Stack Overflow DK Recruitment Day 2015 Presentation
Stack Overflow DK Recruitment Day 2015 PresentationStack Overflow DK Recruitment Day 2015 Presentation
Stack Overflow DK Recruitment Day 2015 Presentation
Angela Nyman
 
Safe navigation operator in Ruby
Safe navigation operator in RubySafe navigation operator in Ruby
Safe navigation operator in Ruby
Koichi ITO
 
Emergency Vehicle Preemption
Emergency Vehicle PreemptionEmergency Vehicle Preemption
Emergency Vehicle Preemption
Fairfax County
 
Springfield Multi-Use Parking Garage: Public Information Meeting Aug. 17, 2016
Springfield Multi-Use Parking Garage: Public Information Meeting Aug. 17, 2016Springfield Multi-Use Parking Garage: Public Information Meeting Aug. 17, 2016
Springfield Multi-Use Parking Garage: Public Information Meeting Aug. 17, 2016
Fairfax County
 
Reston Transportation Funding Plan: Funding Scenarios and Advisory Group Work...
Reston Transportation Funding Plan: Funding Scenarios and Advisory Group Work...Reston Transportation Funding Plan: Funding Scenarios and Advisory Group Work...
Reston Transportation Funding Plan: Funding Scenarios and Advisory Group Work...
Fairfax County
 
Algebra b 1
Algebra b 1Algebra b 1
Algebra b 1
Christos Loizos
 

Viewers also liked (17)

For each component in mule demo
For each component in mule demoFor each component in mule demo
For each component in mule demo
 
Question 4
Question 4Question 4
Question 4
 
Mule splitters
Mule splittersMule splitters
Mule splitters
 
Movimiento de tierras presentacion
Movimiento de tierras presentacionMovimiento de tierras presentacion
Movimiento de tierras presentacion
 
Tabla paso 2
Tabla paso 2Tabla paso 2
Tabla paso 2
 
source code which create file and write into it
source code which create file and write into itsource code which create file and write into it
source code which create file and write into it
 
Presentacion sobre rss
Presentacion sobre  rssPresentacion sobre  rss
Presentacion sobre rss
 
Λογισμικό
ΛογισμικόΛογισμικό
Λογισμικό
 
Comprehensive study on pharmacognostic, physico and phytochemical evaluation ...
Comprehensive study on pharmacognostic, physico and phytochemical evaluation ...Comprehensive study on pharmacognostic, physico and phytochemical evaluation ...
Comprehensive study on pharmacognostic, physico and phytochemical evaluation ...
 
Python lab - Βασικές Αρχές Προγραμματισμού Εργαστήριο
Python lab - Βασικές Αρχές Προγραμματισμού ΕργαστήριοPython lab - Βασικές Αρχές Προγραμματισμού Εργαστήριο
Python lab - Βασικές Αρχές Προγραμματισμού Εργαστήριο
 
The Challenges of Affect Detection in the Social Programmer Ecosystem
The Challenges of Affect Detection in the Social Programmer EcosystemThe Challenges of Affect Detection in the Social Programmer Ecosystem
The Challenges of Affect Detection in the Social Programmer Ecosystem
 
Stack Overflow DK Recruitment Day 2015 Presentation
Stack Overflow DK Recruitment Day 2015 PresentationStack Overflow DK Recruitment Day 2015 Presentation
Stack Overflow DK Recruitment Day 2015 Presentation
 
Safe navigation operator in Ruby
Safe navigation operator in RubySafe navigation operator in Ruby
Safe navigation operator in Ruby
 
Emergency Vehicle Preemption
Emergency Vehicle PreemptionEmergency Vehicle Preemption
Emergency Vehicle Preemption
 
Springfield Multi-Use Parking Garage: Public Information Meeting Aug. 17, 2016
Springfield Multi-Use Parking Garage: Public Information Meeting Aug. 17, 2016Springfield Multi-Use Parking Garage: Public Information Meeting Aug. 17, 2016
Springfield Multi-Use Parking Garage: Public Information Meeting Aug. 17, 2016
 
Reston Transportation Funding Plan: Funding Scenarios and Advisory Group Work...
Reston Transportation Funding Plan: Funding Scenarios and Advisory Group Work...Reston Transportation Funding Plan: Funding Scenarios and Advisory Group Work...
Reston Transportation Funding Plan: Funding Scenarios and Advisory Group Work...
 
Algebra b 1
Algebra b 1Algebra b 1
Algebra b 1
 

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
 
Using map and list starter
Using map and list starterUsing map and list starter
Using map and list starter
Son Nguyen
 
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
 
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
 
Database integrate with mule
Database integrate with muleDatabase integrate with mule
Database integrate with mule
Son Nguyen
 
Mule mel 5_tips
Mule mel 5_tipsMule mel 5_tips
Mule mel 5_tips
kunal vishe
 

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
 
Using map and list starter
Using map and list starterUsing map and list starter
Using map and list starter
 
Mule accessing multiple database in parallel
Mule accessing multiple database in parallelMule accessing multiple database in parallel
Mule accessing multiple database in parallel
 
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)
 
Database integrate with mule
Database integrate with muleDatabase integrate with mule
Database integrate with mule
 
Mule mel 5_tips
Mule mel 5_tipsMule mel 5_tips
Mule mel 5_tips
 

More from Phaniu

Anypoint data gateway
Anypoint data gatewayAnypoint data gateway
Anypoint data gateway
Phaniu
 
Data weave
Data weave Data weave
Data weave
Phaniu
 
How to use expression filter
How to use expression filterHow to use expression filter
How to use expression filter
Phaniu
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
Phaniu
 
Mmc rest api user groups
Mmc rest api user groupsMmc rest api user groups
Mmc rest api user groups
Phaniu
 
Mmc
MmcMmc
Mmc
Phaniu
 
Mmc 2
Mmc 2Mmc 2
Mmc 2
Phaniu
 
Mule esb stripe
Mule esb stripeMule esb stripe
Mule esb stripe
Phaniu
 
Mule for each scope headerc ollection
Mule for each scope headerc ollectionMule for each scope headerc ollection
Mule for each scope headerc ollection
Phaniu
 
Mule esb
Mule esbMule esb
Mule esb
Phaniu
 
Mule for each scope headerc ollection
Mule for each scope headerc ollectionMule for each scope headerc ollection
Mule for each scope headerc ollection
Phaniu
 
Mule for each scope headerc ollection
Mule for each scope headerc ollectionMule for each scope headerc ollection
Mule for each scope headerc ollection
Phaniu
 
Mule esb
Mule esbMule esb
Mule esb
Phaniu
 
Mule for each scope headerc ollection
Mule for each scope headerc ollectionMule for each scope headerc ollection
Mule for each scope headerc ollection
Phaniu
 
Mule security jaas
Mule security jaasMule security jaas
Mule security jaas
Phaniu
 
Mule security jaas
Mule security jaasMule security jaas
Mule security jaas
Phaniu
 
Mule security saml
Mule security samlMule security saml
Mule security saml
Phaniu
 
Mule soa
Mule soaMule soa
Mule soa
Phaniu
 
Mule soap
Mule soapMule soap
Mule soap
Phaniu
 
Mule soap
Mule soapMule soap
Mule soap
Phaniu
 

More from Phaniu (20)

Anypoint data gateway
Anypoint data gatewayAnypoint data gateway
Anypoint data gateway
 
Data weave
Data weave Data weave
Data weave
 
How to use expression filter
How to use expression filterHow to use expression filter
How to use expression filter
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
Mmc rest api user groups
Mmc rest api user groupsMmc rest api user groups
Mmc rest api user groups
 
Mmc
MmcMmc
Mmc
 
Mmc 2
Mmc 2Mmc 2
Mmc 2
 
Mule esb stripe
Mule esb stripeMule esb stripe
Mule esb stripe
 
Mule for each scope headerc ollection
Mule for each scope headerc ollectionMule for each scope headerc ollection
Mule for each scope headerc ollection
 
Mule esb
Mule esbMule esb
Mule esb
 
Mule for each scope headerc ollection
Mule for each scope headerc ollectionMule for each scope headerc ollection
Mule for each scope headerc ollection
 
Mule for each scope headerc ollection
Mule for each scope headerc ollectionMule for each scope headerc ollection
Mule for each scope headerc ollection
 
Mule esb
Mule esbMule esb
Mule esb
 
Mule for each scope headerc ollection
Mule for each scope headerc ollectionMule for each scope headerc ollection
Mule for each scope headerc ollection
 
Mule security jaas
Mule security jaasMule security jaas
Mule security jaas
 
Mule security jaas
Mule security jaasMule security jaas
Mule security jaas
 
Mule security saml
Mule security samlMule security saml
Mule security saml
 
Mule soa
Mule soaMule soa
Mule soa
 
Mule soap
Mule soapMule soap
Mule soap
 
Mule soap
Mule soapMule soap
Mule soap
 

Recently uploaded

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
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
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
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
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
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
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
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
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
 
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
 
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
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 

Recently uploaded (20)

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...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
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...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
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
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
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
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
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...
 
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
 
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...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 

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 