SlideShare a Scribd company logo
1 of 9
Using Expression Filter
- By Rahul Kumar
Expression Filter
Expression Filter filters against a range of expressions
Accepts Mule Expressions which results in boolean value
Lets the messages pass through the filter only if the expression is evaluated
to true otherwise it drops it silently.
Configuration
Expression : Accepts Mule Expressions which results in boolean value
nullReturnsTrue parameter : Returns True if the expression provided is Null
Sample Expressions
1. #[payload.endsWith('!!')]
2. #[message.inboundProperties['http.query.params']['priority'] > 2]
3. #[payload.endsWith('!!') &&
message.inboundProperties['http.query.params']['priority'] > 2]
Sample Flow
<http:listener-config name="HTTP_Listener_Configuration1" host="0.0.0.0"
port="8081" doc:name="HTTP Listener Configuration"/>
<flow name="filtersFlow">
<http:listener config-ref="HTTP_Listener_Configuration1" path="/filter"
doc:name="HTTP"/>
<logger message="HTTP Listener invoked" level="INFO"
doc:name="Logger"/>
<object-to-string-transformer doc:name="Object to String"/>
<expression-filter expression="#[payload.endsWith('!!') &amp;&amp;
message.inboundProperties['http.query.params']['priority'] &gt; 2]"
doc:name="Expression"/>
<set-payload value="#['Filter Passed']" doc:name="Set Payload"/>
</flow>
Sample Flow Contd..
Expression used is :
#[payload.endsWith('!!') && message.inboundProperties['http.query.params']['priority'] > 2]
Which means that it will allow the Mule Message to pass through it only if
Payload contains “!!” at the end and has Query parameter “priority” of value
more than 2
Sample Flow Test 1,2
Result : Does not Passes the
Expression Filter
Result : Does not Passes the
Expression Filter
Sample Flow Test 3
TH
Result : Passes the Expression Filter
Thank You !

More Related Content

Viewers also liked

BCS-Suarabh-PGDMA-Summer Project-Final
BCS-Suarabh-PGDMA-Summer Project-FinalBCS-Suarabh-PGDMA-Summer Project-Final
BCS-Suarabh-PGDMA-Summer Project-Final
Saurabh Sharma
 
Características actitudinales de la buena practica docente
Características actitudinales de la buena practica docenteCaracterísticas actitudinales de la buena practica docente
Características actitudinales de la buena practica docente
Laura Alday
 

Viewers also liked (13)

Conversia Delegado de Protección de Datos · RGPD
Conversia Delegado de Protección de Datos · RGPDConversia Delegado de Protección de Datos · RGPD
Conversia Delegado de Protección de Datos · RGPD
 
Numerical modeling to evaluate pile head deflection under the lateral load
Numerical modeling to evaluate pile head deflection under the lateral loadNumerical modeling to evaluate pile head deflection under the lateral load
Numerical modeling to evaluate pile head deflection under the lateral load
 
Power compartir
Power compartirPower compartir
Power compartir
 
BCS-Suarabh-PGDMA-Summer Project-Final
BCS-Suarabh-PGDMA-Summer Project-FinalBCS-Suarabh-PGDMA-Summer Project-Final
BCS-Suarabh-PGDMA-Summer Project-Final
 
BBA 2010 Unit VII Quiz
BBA 2010 Unit VII QuizBBA 2010 Unit VII Quiz
BBA 2010 Unit VII Quiz
 
Derechos de los Interesados RGPD - Conversia
Derechos de los Interesados RGPD - ConversiaDerechos de los Interesados RGPD - Conversia
Derechos de los Interesados RGPD - Conversia
 
Informzapyt 170127100039
Informzapyt 170127100039Informzapyt 170127100039
Informzapyt 170127100039
 
SK-KD Kimia SMA-MA
SK-KD Kimia SMA-MASK-KD Kimia SMA-MA
SK-KD Kimia SMA-MA
 
http://vnx.su/ Renault Kaptur 2016 media-nav руководство по эксплуатации
http://vnx.su/ Renault Kaptur 2016 media-nav руководство по эксплуатацииhttp://vnx.su/ Renault Kaptur 2016 media-nav руководство по эксплуатации
http://vnx.su/ Renault Kaptur 2016 media-nav руководство по эксплуатации
 
Stop Informatiion Overload
Stop Informatiion OverloadStop Informatiion Overload
Stop Informatiion Overload
 
Características actitudinales de la buena practica docente
Características actitudinales de la buena practica docenteCaracterísticas actitudinales de la buena practica docente
Características actitudinales de la buena practica docente
 
http://vnx.su/ renault megane scenic 1999 руководство по эксплуатации
http://vnx.su/ renault megane scenic 1999 руководство по эксплуатацииhttp://vnx.su/ renault megane scenic 1999 руководство по эксплуатации
http://vnx.su/ renault megane scenic 1999 руководство по эксплуатации
 
Sistem koloid powerpoint
Sistem koloid powerpointSistem koloid powerpoint
Sistem koloid powerpoint
 

Similar to Using expression filter

Asynchronous t sql
Asynchronous t sqlAsynchronous t sql
Asynchronous t sql
Remus Rusanu
 
Intro to tsql unit 14
Intro to tsql   unit 14Intro to tsql   unit 14
Intro to tsql unit 14
Syed Asrarali
 
Productivity Acceleration Tools for SOA Testers
Productivity Acceleration Tools for SOA TestersProductivity Acceleration Tools for SOA Testers
Productivity Acceleration Tools for SOA Testers
WSO2
 

Similar to Using expression filter (20)

Mule esb expression_filter
Mule esb expression_filterMule esb expression_filter
Mule esb expression_filter
 
Mule message processor or routers
Mule message processor or routersMule message processor or routers
Mule message processor or routers
 
Mule esb
Mule esbMule esb
Mule esb
 
Custom filters in mule soft
Custom filters in mule softCustom filters in mule soft
Custom filters in mule soft
 
Mule smtp connector
Mule smtp connectorMule smtp connector
Mule smtp connector
 
Asynchronous t sql
Asynchronous t sqlAsynchronous t sql
Asynchronous t sql
 
TestNG Framework
TestNG Framework TestNG Framework
TestNG Framework
 
Java components in mule
Java components in muleJava components in mule
Java components in mule
 
Test Driven Development with PHPUnit
Test Driven Development with PHPUnitTest Driven Development with PHPUnit
Test Driven Development with PHPUnit
 
Mulesoft idempotent Message Filter
Mulesoft idempotent Message FilterMulesoft idempotent Message Filter
Mulesoft idempotent Message Filter
 
JavaOne 2009 - TS-5276 - RESTful Protocol Buffers
JavaOne 2009 - TS-5276 - RESTful  Protocol BuffersJavaOne 2009 - TS-5276 - RESTful  Protocol Buffers
JavaOne 2009 - TS-5276 - RESTful Protocol Buffers
 
Bt0083 server side programing 2
Bt0083 server side programing  2Bt0083 server side programing  2
Bt0083 server side programing 2
 
Запускаем тесты в Continuous Integration - Сергей Пак (JetBrains)
Запускаем тесты в Continuous Integration - Сергей Пак (JetBrains)Запускаем тесты в Continuous Integration - Сергей Пак (JetBrains)
Запускаем тесты в Continuous Integration - Сергей Пак (JetBrains)
 
Mule ESB
Mule ESBMule ESB
Mule ESB
 
Action Controller Overview, Season 1
Action Controller Overview, Season 1Action Controller Overview, Season 1
Action Controller Overview, Season 1
 
Detection as Code, Automation, and Testing: The Key to Unlocking the Power of...
Detection as Code, Automation, and Testing: The Key to Unlocking the Power of...Detection as Code, Automation, and Testing: The Key to Unlocking the Power of...
Detection as Code, Automation, and Testing: The Key to Unlocking the Power of...
 
Intro to tsql unit 14
Intro to tsql   unit 14Intro to tsql   unit 14
Intro to tsql unit 14
 
Intro to tsql
Intro to tsqlIntro to tsql
Intro to tsql
 
Productivity Acceleration Tools for SOA Testers
Productivity Acceleration Tools for SOA TestersProductivity Acceleration Tools for SOA Testers
Productivity Acceleration Tools for SOA Testers
 
Mule routing and filters
Mule routing and filtersMule routing and filters
Mule routing and filters
 

More from Rahul Kumar

More from Rahul Kumar (20)

Combine collections transformer
Combine collections transformerCombine collections transformer
Combine collections transformer
 
Creating global functions
Creating global functionsCreating global functions
Creating global functions
 
Creating custom object store
Creating custom object storeCreating custom object store
Creating custom object store
 
Using parse template component
Using parse template componentUsing parse template component
Using parse template component
 
Using groovy component
Using groovy componentUsing groovy component
Using groovy component
 
Using expression component
Using expression componentUsing expression component
Using expression component
 
Creating custom transformer
Creating custom transformerCreating custom transformer
Creating custom transformer
 
Creating custom aggregation strategy
Creating custom aggregation strategyCreating custom aggregation strategy
Creating custom aggregation strategy
 
Creating custom aggregator
Creating custom aggregatorCreating custom aggregator
Creating custom aggregator
 
Byte array to hex string transformer
Byte array to hex string transformerByte array to hex string transformer
Byte array to hex string transformer
 
Creating custom filter
Creating custom filterCreating custom filter
Creating custom filter
 
Hex string to byte array transformer
Hex string to byte array transformerHex string to byte array transformer
Hex string to byte array transformer
 
XML to DOM Transformer
XML to DOM TransformerXML to DOM Transformer
XML to DOM Transformer
 
Dom to xml transformer
Dom to xml transformerDom to xml transformer
Dom to xml transformer
 
Object to input stream transformer
Object to input stream transformerObject to input stream transformer
Object to input stream transformer
 
Byte array to object transformer
Byte array to object transformerByte array to object transformer
Byte array to object transformer
 
Byte array to string transformer
Byte array to string transformerByte array to string transformer
Byte array to string transformer
 
Object to string transformer
Object to string transformerObject to string transformer
Object to string transformer
 
Csv to json transform in simple steps
Csv to json transform in simple stepsCsv to json transform in simple steps
Csv to json transform in simple steps
 
Using scatter gather
Using scatter gatherUsing scatter gather
Using scatter gather
 

Recently uploaded

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 

Recently uploaded (20)

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
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
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
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 

Using expression filter

  • 1. Using Expression Filter - By Rahul Kumar
  • 2. Expression Filter Expression Filter filters against a range of expressions Accepts Mule Expressions which results in boolean value Lets the messages pass through the filter only if the expression is evaluated to true otherwise it drops it silently.
  • 3. Configuration Expression : Accepts Mule Expressions which results in boolean value nullReturnsTrue parameter : Returns True if the expression provided is Null
  • 4. Sample Expressions 1. #[payload.endsWith('!!')] 2. #[message.inboundProperties['http.query.params']['priority'] > 2] 3. #[payload.endsWith('!!') && message.inboundProperties['http.query.params']['priority'] > 2]
  • 5. Sample Flow <http:listener-config name="HTTP_Listener_Configuration1" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"/> <flow name="filtersFlow"> <http:listener config-ref="HTTP_Listener_Configuration1" path="/filter" doc:name="HTTP"/> <logger message="HTTP Listener invoked" level="INFO" doc:name="Logger"/> <object-to-string-transformer doc:name="Object to String"/> <expression-filter expression="#[payload.endsWith('!!') &amp;&amp; message.inboundProperties['http.query.params']['priority'] &gt; 2]" doc:name="Expression"/> <set-payload value="#['Filter Passed']" doc:name="Set Payload"/> </flow>
  • 6. Sample Flow Contd.. Expression used is : #[payload.endsWith('!!') && message.inboundProperties['http.query.params']['priority'] > 2] Which means that it will allow the Mule Message to pass through it only if Payload contains “!!” at the end and has Query parameter “priority” of value more than 2
  • 7. Sample Flow Test 1,2 Result : Does not Passes the Expression Filter Result : Does not Passes the Expression Filter
  • 8. Sample Flow Test 3 TH Result : Passes the Expression Filter