SlideShare a Scribd company logo
1 of 8
Mule Concepts
Mule Expression Language (MEL)
Basics -III
• Basic Syntax Rules:
– #[ ] :
• Always bounds an expression.
• Example :
#[message.id]
– Simple expressions :
• The simplest type of expression.
• consist of just a context object and a field
• or simply a variable.
• Provides access to information from the message
including payload, properties, and variables.
• Example :
[message.field]
[sessionVars.age
Mule Expression Language (MEL)
• Basic Syntax Rules:
– Multi line expressions:
• You can include several lines in a single expression
• Each line must end with a ;
• Example :
#[calendar = Calendar.getInstance();
message.payload =
``neworg.mule.el.datetime.DateTime(calendar);]
– Operators :
• Performs operations in expressions
• Can be unary, comparison, logical, bitwise, arithmetic, and
more.
• Example :
#['Cookie' + flowVars.cookie]
Mule Expression Language (MEL)
• Basic Syntax Rules:
– Boolean expressions:
• Produces Boolean values.
• Example :
#['foo'=='bar']
#[2 + 2 == 4]
– Bean Property Access:
• Access information from bean.
• Example :
#[payload.property1.property2]
Mule Expression Language (MEL)
• Basic Syntax Rules:
– Method invocations:
• Calls a method.
• Then performs it on an object according to the parameter (if
any) specified within the parentheses.
• Method calls always follow the syntax:object.method()
• Example :
#[message.header.get()]
– Assignments:
• Evaluates to assign a value.
• The example below resolves dynamically to set the payload
to sample.
• Example :
#[payload = 'sample']
Mule Expression Language (MEL)
• Basic Syntax Rules:
– Literals:
• Strings, numbers, Boolean values, types, and nulls.
• Example :
'expression'
255
null
– xpath and regex:
• xpath3 and regex provide ways of extracting context
information that doesn’t already exist as a single value.
• Example :
xpath3('/orders/order[0]')
Mule Expression Language (MEL)
• Basic Syntax Rules:
– Wildcards:
• Matches a value (the message payload, by default) against
a wildcard pattern.
• these use the meta-characters '?' to represent any single
character and '*' for a repetition of any character.
• It’s case sensitive by default.
• Example :
wildcard("Hello*")
Mule Expression Language (MEL)
• Basic Syntax Rules:
– Inline list:
• Evaluates to produce a list.
• Example :
[item1, item2, . . .]
– Inline map:
• Evaluates to produce a map.
• Example :
[key1 : value1, key2: value2, …​]
– Inline array:
• Evaluates to produce an array.
• Example :
{item1, item2, . . .}
Mule Expression Language (MEL)

More Related Content

What's hot

What's hot (20)

Mule dataweave
Mule dataweaveMule dataweave
Mule dataweave
 
32sql server
32sql server32sql server
32sql server
 
30csharp
30csharp30csharp
30csharp
 
Jsp tag library
Jsp tag libraryJsp tag library
Jsp tag library
 
3. Java Script
3. Java Script3. Java Script
3. Java Script
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 6...
 Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 6... Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 6...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 6...
 
Java collections
Java collectionsJava collections
Java collections
 
JavaScript - Chapter 12 - Document Object Model
  JavaScript - Chapter 12 - Document Object Model  JavaScript - Chapter 12 - Document Object Model
JavaScript - Chapter 12 - Document Object Model
 
Implementing jsp tag extensions
Implementing jsp tag extensionsImplementing jsp tag extensions
Implementing jsp tag extensions
 
Java Tutorial Lab 1
Java Tutorial Lab 1Java Tutorial Lab 1
Java Tutorial Lab 1
 
SQL - RDBMS Concepts
SQL - RDBMS ConceptsSQL - RDBMS Concepts
SQL - RDBMS Concepts
 
Lecture 23
Lecture 23Lecture 23
Lecture 23
 
Learn advanced java programming
Learn advanced java programmingLearn advanced java programming
Learn advanced java programming
 
Understanding linq
Understanding linqUnderstanding linq
Understanding linq
 
Io streams
Io streamsIo streams
Io streams
 
Reading and Writing Files
Reading and Writing FilesReading and Writing Files
Reading and Writing Files
 
Packages and interfaces
Packages and interfacesPackages and interfaces
Packages and interfaces
 
Language Integrated Query - LINQ
Language Integrated Query - LINQLanguage Integrated Query - LINQ
Language Integrated Query - LINQ
 
LINQ
LINQLINQ
LINQ
 
File Connector
File ConnectorFile Connector
File Connector
 

Viewers also liked

Mule scopes async_scope
Mule scopes async_scopeMule scopes async_scope
Mule scopes async_scopekunal vishe
 
Mule data weave_10
Mule data weave_10Mule data weave_10
Mule data weave_10kunal vishe
 
Mule data weave_7
Mule data weave_7Mule data weave_7
Mule data weave_7kunal vishe
 
10 Useful Asciidoctor Tips
10 Useful Asciidoctor Tips10 Useful Asciidoctor Tips
10 Useful Asciidoctor TipsAndres Almiray
 
Mule soft mel_session_3
Mule soft mel_session_3Mule soft mel_session_3
Mule soft mel_session_3abhipokharna
 

Viewers also liked (6)

Variables in dataweave
Variables in dataweaveVariables in dataweave
Variables in dataweave
 
Mule scopes async_scope
Mule scopes async_scopeMule scopes async_scope
Mule scopes async_scope
 
Mule data weave_10
Mule data weave_10Mule data weave_10
Mule data weave_10
 
Mule data weave_7
Mule data weave_7Mule data weave_7
Mule data weave_7
 
10 Useful Asciidoctor Tips
10 Useful Asciidoctor Tips10 Useful Asciidoctor Tips
10 Useful Asciidoctor Tips
 
Mule soft mel_session_3
Mule soft mel_session_3Mule soft mel_session_3
Mule soft mel_session_3
 

Similar to Mule mel 3

Getting started in Python presentation by Laban K
Getting started in Python presentation by Laban KGetting started in Python presentation by Laban K
Getting started in Python presentation by Laban KGDSCKYAMBOGO
 
Оформление пайплайна в NLP проекте​, Виталий Радченко. 22 июня, 2019
Оформление пайплайна в NLP проекте​, Виталий Радченко. 22 июня, 2019Оформление пайплайна в NLP проекте​, Виталий Радченко. 22 июня, 2019
Оформление пайплайна в NLP проекте​, Виталий Радченко. 22 июня, 2019Mail.ru Group
 
Hey! There's OCaml in my Rust!
Hey! There's OCaml in my Rust!Hey! There's OCaml in my Rust!
Hey! There's OCaml in my Rust!Kel Cecil
 
Python first day
Python first dayPython first day
Python first dayfarkhand
 
SFDC Introduction to Apex
SFDC Introduction to ApexSFDC Introduction to Apex
SFDC Introduction to ApexSujit Kumar
 
Cs1123 3 c++ overview
Cs1123 3 c++ overviewCs1123 3 c++ overview
Cs1123 3 c++ overviewTAlha MAlik
 
R for Pirates. ESCCONF October 27, 2011
R for Pirates. ESCCONF October 27, 2011R for Pirates. ESCCONF October 27, 2011
R for Pirates. ESCCONF October 27, 2011Mandi Walls
 
Distributed Model Validation with Epsilon
Distributed Model Validation with EpsilonDistributed Model Validation with Epsilon
Distributed Model Validation with EpsilonSina Madani
 
Smart Reply - Word-level Sequence to sequence.pptx
Smart Reply - Word-level Sequence to sequence.pptxSmart Reply - Word-level Sequence to sequence.pptx
Smart Reply - Word-level Sequence to sequence.pptxSejalVetkar
 
CLEAN CODING AND DEVOPS Final.pptx
CLEAN CODING AND DEVOPS Final.pptxCLEAN CODING AND DEVOPS Final.pptx
CLEAN CODING AND DEVOPS Final.pptxJEEVANANTHAMG6
 

Similar to Mule mel 3 (20)

Typescript
TypescriptTypescript
Typescript
 
Getting started in Python presentation by Laban K
Getting started in Python presentation by Laban KGetting started in Python presentation by Laban K
Getting started in Python presentation by Laban K
 
Оформление пайплайна в NLP проекте​, Виталий Радченко. 22 июня, 2019
Оформление пайплайна в NLP проекте​, Виталий Радченко. 22 июня, 2019Оформление пайплайна в NLP проекте​, Виталий Радченко. 22 июня, 2019
Оформление пайплайна в NLP проекте​, Виталий Радченко. 22 июня, 2019
 
Hey! There's OCaml in my Rust!
Hey! There's OCaml in my Rust!Hey! There's OCaml in my Rust!
Hey! There's OCaml in my Rust!
 
Python first day
Python first dayPython first day
Python first day
 
Python first day
Python first dayPython first day
Python first day
 
Python Data-Types
Python Data-TypesPython Data-Types
Python Data-Types
 
SFDC Introduction to Apex
SFDC Introduction to ApexSFDC Introduction to Apex
SFDC Introduction to Apex
 
2CPP15 - Templates
2CPP15 - Templates2CPP15 - Templates
2CPP15 - Templates
 
Mit6 094 iap10_lec01
Mit6 094 iap10_lec01Mit6 094 iap10_lec01
Mit6 094 iap10_lec01
 
Cs1123 3 c++ overview
Cs1123 3 c++ overviewCs1123 3 c++ overview
Cs1123 3 c++ overview
 
R for Pirates. ESCCONF October 27, 2011
R for Pirates. ESCCONF October 27, 2011R for Pirates. ESCCONF October 27, 2011
R for Pirates. ESCCONF October 27, 2011
 
Distributed Model Validation with Epsilon
Distributed Model Validation with EpsilonDistributed Model Validation with Epsilon
Distributed Model Validation with Epsilon
 
String.pptx
String.pptxString.pptx
String.pptx
 
Matlab lec1
Matlab lec1Matlab lec1
Matlab lec1
 
Elixir
ElixirElixir
Elixir
 
Smart Reply - Word-level Sequence to sequence.pptx
Smart Reply - Word-level Sequence to sequence.pptxSmart Reply - Word-level Sequence to sequence.pptx
Smart Reply - Word-level Sequence to sequence.pptx
 
Dictionary.pptx
Dictionary.pptxDictionary.pptx
Dictionary.pptx
 
Java session3
Java session3Java session3
Java session3
 
CLEAN CODING AND DEVOPS Final.pptx
CLEAN CODING AND DEVOPS Final.pptxCLEAN CODING AND DEVOPS Final.pptx
CLEAN CODING AND DEVOPS Final.pptx
 

More from kunal vishe

Mule data weave_6
Mule data weave_6Mule data weave_6
Mule data weave_6kunal vishe
 
Mule data weave_5
Mule data weave_5Mule data weave_5
Mule data weave_5kunal vishe
 
Mule data weave_3
Mule data weave_3Mule data weave_3
Mule data weave_3kunal vishe
 
Mule scopes request_response_scope
Mule scopes request_response_scopeMule scopes request_response_scope
Mule scopes request_response_scopekunal vishe
 
Mule scopes foreach_scope
Mule scopes foreach_scopeMule scopes foreach_scope
Mule scopes foreach_scopekunal vishe
 
Mule debugging logging_configuration_in_mule
Mule debugging logging_configuration_in_muleMule debugging logging_configuration_in_mule
Mule debugging logging_configuration_in_mulekunal vishe
 
Mule debugging logging_in_mule
Mule debugging logging_in_muleMule debugging logging_in_mule
Mule debugging logging_in_mulekunal vishe
 
Mule debugging managing_stack_traces
Mule debugging managing_stack_tracesMule debugging managing_stack_traces
Mule debugging managing_stack_traceskunal vishe
 
Mule error handling_rollback exception strategy
Mule error handling_rollback exception strategyMule error handling_rollback exception strategy
Mule error handling_rollback exception strategykunal vishe
 
Mule error handling_choice exception strategy
Mule error handling_choice exception strategyMule error handling_choice exception strategy
Mule error handling_choice exception strategykunal vishe
 
Mule concepts exception strategies
Mule concepts exception strategiesMule concepts exception strategies
Mule concepts exception strategieskunal vishe
 
Mule concepts filters scopes_routers
Mule concepts filters scopes_routersMule concepts filters scopes_routers
Mule concepts filters scopes_routerskunal vishe
 
Mule concepts transformers
Mule concepts transformersMule concepts transformers
Mule concepts transformerskunal vishe
 
Mule concepts components
Mule concepts componentsMule concepts components
Mule concepts componentskunal vishe
 

More from kunal vishe (20)

Mule data weave_6
Mule data weave_6Mule data weave_6
Mule data weave_6
 
Mule data weave_5
Mule data weave_5Mule data weave_5
Mule data weave_5
 
Mule data weave_3
Mule data weave_3Mule data weave_3
Mule data weave_3
 
Mule mel 5_tips
Mule mel 5_tipsMule mel 5_tips
Mule mel 5_tips
 
Mule mel 4_tips
Mule mel 4_tipsMule mel 4_tips
Mule mel 4_tips
 
Mule mel 1
Mule mel 1Mule mel 1
Mule mel 1
 
Mule scopes request_response_scope
Mule scopes request_response_scopeMule scopes request_response_scope
Mule scopes request_response_scope
 
Mule scopes foreach_scope
Mule scopes foreach_scopeMule scopes foreach_scope
Mule scopes foreach_scope
 
Mule scopes 2
Mule scopes 2Mule scopes 2
Mule scopes 2
 
Mule scopes 1
Mule scopes 1Mule scopes 1
Mule scopes 1
 
Mule debugging logging_configuration_in_mule
Mule debugging logging_configuration_in_muleMule debugging logging_configuration_in_mule
Mule debugging logging_configuration_in_mule
 
Mule debugging logging_in_mule
Mule debugging logging_in_muleMule debugging logging_in_mule
Mule debugging logging_in_mule
 
Mule debugging managing_stack_traces
Mule debugging managing_stack_tracesMule debugging managing_stack_traces
Mule debugging managing_stack_traces
 
Mule error handling_rollback exception strategy
Mule error handling_rollback exception strategyMule error handling_rollback exception strategy
Mule error handling_rollback exception strategy
 
Mule message
Mule messageMule message
Mule message
 
Mule error handling_choice exception strategy
Mule error handling_choice exception strategyMule error handling_choice exception strategy
Mule error handling_choice exception strategy
 
Mule concepts exception strategies
Mule concepts exception strategiesMule concepts exception strategies
Mule concepts exception strategies
 
Mule concepts filters scopes_routers
Mule concepts filters scopes_routersMule concepts filters scopes_routers
Mule concepts filters scopes_routers
 
Mule concepts transformers
Mule concepts transformersMule concepts transformers
Mule concepts transformers
 
Mule concepts components
Mule concepts componentsMule concepts components
Mule concepts components
 

Recently uploaded

The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Intelisync
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 

Recently uploaded (20)

The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 

Mule mel 3

  • 1. Mule Concepts Mule Expression Language (MEL) Basics -III
  • 2. • Basic Syntax Rules: – #[ ] : • Always bounds an expression. • Example : #[message.id] – Simple expressions : • The simplest type of expression. • consist of just a context object and a field • or simply a variable. • Provides access to information from the message including payload, properties, and variables. • Example : [message.field] [sessionVars.age Mule Expression Language (MEL)
  • 3. • Basic Syntax Rules: – Multi line expressions: • You can include several lines in a single expression • Each line must end with a ; • Example : #[calendar = Calendar.getInstance(); message.payload = ``neworg.mule.el.datetime.DateTime(calendar);] – Operators : • Performs operations in expressions • Can be unary, comparison, logical, bitwise, arithmetic, and more. • Example : #['Cookie' + flowVars.cookie] Mule Expression Language (MEL)
  • 4. • Basic Syntax Rules: – Boolean expressions: • Produces Boolean values. • Example : #['foo'=='bar'] #[2 + 2 == 4] – Bean Property Access: • Access information from bean. • Example : #[payload.property1.property2] Mule Expression Language (MEL)
  • 5. • Basic Syntax Rules: – Method invocations: • Calls a method. • Then performs it on an object according to the parameter (if any) specified within the parentheses. • Method calls always follow the syntax:object.method() • Example : #[message.header.get()] – Assignments: • Evaluates to assign a value. • The example below resolves dynamically to set the payload to sample. • Example : #[payload = 'sample'] Mule Expression Language (MEL)
  • 6. • Basic Syntax Rules: – Literals: • Strings, numbers, Boolean values, types, and nulls. • Example : 'expression' 255 null – xpath and regex: • xpath3 and regex provide ways of extracting context information that doesn’t already exist as a single value. • Example : xpath3('/orders/order[0]') Mule Expression Language (MEL)
  • 7. • Basic Syntax Rules: – Wildcards: • Matches a value (the message payload, by default) against a wildcard pattern. • these use the meta-characters '?' to represent any single character and '*' for a repetition of any character. • It’s case sensitive by default. • Example : wildcard("Hello*") Mule Expression Language (MEL)
  • 8. • Basic Syntax Rules: – Inline list: • Evaluates to produce a list. • Example : [item1, item2, . . .] – Inline map: • Evaluates to produce a map. • Example : [key1 : value1, key2: value2, …​] – Inline array: • Evaluates to produce an array. • Example : {item1, item2, . . .} Mule Expression Language (MEL)