SlideShare a Scribd company logo
1 of 8
How to use And Filter
12-12-2014
Abstract
• The main motto of this PPT is How to use And
Filter in our applications.
Introduction
• Mule bundles more than a dozen Filters that
determine whether a message can proceed
through an application flow. The simplest
filters implement basic logic operators (such
as and, or, and not), but these simple
elements can be combined in various ways to
specify complex logical conditions.
Example
.mflow
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.4.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd">
<flow name="AndFilterFlow1" doc:name="AndFilterFlow1">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8089" path="andfilter"
doc:name="HTTP"/>
<logger message="--entered into the flow" level="INFO" doc:name="Logger"/>
<set-payload value="&lt;Soap-Env&gt;&lt;Body&gt;&lt;Path&gt;mulesoft&lt;/Path&gt;&lt;/Body&gt;&lt;/Soap-
Env&gt;" doc:name="Set Payload"/>
<and-filter doc:name="And">
<expression-filter expression="#[xpath('/Soap-Env/Body/Path/text()').text.contains('mule')]"/>
<expression-filter expression="#[xpath('/Soap-Env/Body/Path/text()').text.contains('soft')]"/>
</and-filter>
<logger message="--Success" level="INFO" doc:name="Logger"/>
</flow>
</mule>
• Output:
INFO 2015-12-12 06:49:37,897 [main] org.mule.DefaultMuleContext:
**********************************************************************
* Application: AndFilter *
* OS encoding: Cp1252, Mule encoding: UTF-8 *
* *
* Agents Running: *
* Clustering Agent *
* JMX Agent *
**********************************************************************
INFO 2015-12-12 06:49:37,898 [main]
org.mule.module.launcher.MuleDeploymentService:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Started app 'AndFilter' +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
INFO 2015-12-12 06:49:41,558 [[AndFilter].connector.http.mule.default.receiver.02]
org.mule.api.processor.LoggerMessageProcessor: --entered into the flow
INFO 2015-12-12 06:49:42,214 [[AndFilter].connector.http.mule.default.receiver.02]
org.mule.api.processor.LoggerMessageProcessor: --Success
• Flow of execution:
1. URL to trigger the service from browser
http://localhost:8089/andfilter
2. AND filter checks whether the request
contains ‘mule’ and ‘soft’ or not?, if yes, it will
print a message ‘Success’, else it will not go
further.
References
• https://docs.mulesoft.com/mule-user-
guide/v/3.7/filters

More Related Content

What's hot (13)

How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
Data Mapper
Data MapperData Mapper
Data Mapper
 
Expression filter in Mule
Expression filter in MuleExpression filter in Mule
Expression filter in Mule
 
File component
File componentFile component
File component
 
Validation
ValidationValidation
Validation
 
Splitter
SplitterSplitter
Splitter
 
Specifying a default exception strategy
Specifying a default exception strategySpecifying a default exception strategy
Specifying a default exception strategy
 
Collection aggregator
Collection aggregatorCollection aggregator
Collection aggregator
 
Validate json schema
Validate json schemaValidate json schema
Validate json schema
 
Reference exception strategy
Reference exception strategyReference exception strategy
Reference exception strategy
 
Property place holder
Property place holderProperty place holder
Property place holder
 
Mule property placeholder
Mule property placeholderMule property placeholder
Mule property placeholder
 
Message properties component in mule demo
Message properties component in mule demoMessage properties component in mule demo
Message properties component in mule demo
 

Viewers also liked

Viewers also liked (13)

SegarAnakan_EIS_011014-Reduced
SegarAnakan_EIS_011014-ReducedSegarAnakan_EIS_011014-Reduced
SegarAnakan_EIS_011014-Reduced
 
resume 2015
resume 2015resume 2015
resume 2015
 
Destilasi
DestilasiDestilasi
Destilasi
 
NFPtweetup Critiquing Twitter Voice Disney
NFPtweetup Critiquing Twitter Voice DisneyNFPtweetup Critiquing Twitter Voice Disney
NFPtweetup Critiquing Twitter Voice Disney
 
4 popular uncommon home utility gifts
4 popular uncommon home utility gifts4 popular uncommon home utility gifts
4 popular uncommon home utility gifts
 
Age Awareness
Age AwarenessAge Awareness
Age Awareness
 
AML 2015
AML 2015AML 2015
AML 2015
 
Elyse Sydney Kaysha This Is My Penis After All Fall 2015
Elyse Sydney Kaysha This Is My Penis After All Fall 2015Elyse Sydney Kaysha This Is My Penis After All Fall 2015
Elyse Sydney Kaysha This Is My Penis After All Fall 2015
 
Global warming
Global warmingGlobal warming
Global warming
 
Kromatografi kolom (resin penukar ion)
Kromatografi kolom (resin penukar ion)Kromatografi kolom (resin penukar ion)
Kromatografi kolom (resin penukar ion)
 
Photoshoot scheduling
Photoshoot schedulingPhotoshoot scheduling
Photoshoot scheduling
 
Kromatografi lapis tipis (klt)
Kromatografi lapis tipis (klt)Kromatografi lapis tipis (klt)
Kromatografi lapis tipis (klt)
 
Connecting generations through walking
Connecting generations through walkingConnecting generations through walking
Connecting generations through walking
 

Similar to How to use and filter

How to use expression filter
How to use expression filterHow to use expression filter
How to use expression filterSunil Komarapu
 
How to use expression filter
How to use expression filterHow to use expression filter
How to use expression filterAnand kalla
 
How to use expression filter
How to use expression filterHow to use expression filter
How to use expression filterKhasim Saheb
 
Mule- File component example
Mule- File component exampleMule- File component example
Mule- File component exampleDivyaSree1391
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties componentSunil Komarapu
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties componentKhasim Saheb
 
Message properties component in Mule
Message properties component in MuleMessage properties component in Mule
Message properties component in MuleKhan625
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties componentAnand kalla
 
Filter expression in mule
Filter expression in muleFilter expression in mule
Filter expression in muleRajkattamuri
 
Filter expression
Filter expression Filter expression
Filter expression F K
 
Filter expression in mule
Filter expression in muleFilter expression in mule
Filter expression in mulejaveed_mhd
 
File component
File component File component
File component F K
 
File component in mule
File component in muleFile component in mule
File component in mulejaveed_mhd
 

Similar to How to use and filter (20)

How to use expression filter
How to use expression filterHow to use expression filter
How to use expression filter
 
How to use expression filter
How to use expression filterHow to use expression filter
How to use expression filter
 
How to use expression filter
How to use expression filterHow to use expression filter
How to use expression filter
 
How to use expression filter
How to use expression filterHow to use expression filter
How to use expression filter
 
Mule- File component example
Mule- File component exampleMule- File component example
Mule- File component example
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
Message properties component in Mule
Message properties component in MuleMessage properties component in Mule
Message properties component in Mule
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
Filter expression
Filter expression Filter expression
Filter expression
 
Filter expression in mule
Filter expression in muleFilter expression in mule
Filter expression in mule
 
Filter expression
Filter expression Filter expression
Filter expression
 
Filter expression
Filter expressionFilter expression
Filter expression
 
Filter expression in mule
Filter expression in muleFilter expression in mule
Filter expression in mule
 
File component
File component File component
File component
 
Mule File component
Mule File component Mule File component
Mule File component
 
File component
File component File component
File component
 
File component in mule
File component in muleFile component in mule
File component in mule
 
Expression Filters
Expression FiltersExpression Filters
Expression Filters
 
How to use wildcard filter
How to use wildcard filterHow to use wildcard filter
How to use wildcard filter
 

More from RaviRajuRamaKrishna

More from RaviRajuRamaKrishna (10)

Mock component in munit
Mock component in munitMock component in munit
Mock component in munit
 
Jms selector
Jms selectorJms selector
Jms selector
 
Sftplite
SftpliteSftplite
Sftplite
 
Object store
Object storeObject store
Object store
 
How to use splitter component
How to use splitter componentHow to use splitter component
How to use splitter component
 
How to use rest component
How to use rest componentHow to use rest component
How to use rest component
 
How to use soap component
How to use soap componentHow to use soap component
How to use soap component
 
How to use salesforce cloud connector
How to use salesforce cloud connectorHow to use salesforce cloud connector
How to use salesforce cloud connector
 
How to use data mapper transformer
How to use data mapper transformerHow to use data mapper transformer
How to use data mapper transformer
 
How to use bean as datasource in database connector
How to use bean as datasource in database connectorHow to use bean as datasource in database connector
How to use bean as datasource in database connector
 

Recently uploaded

Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 

Recently uploaded (20)

Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 

How to use and filter

  • 1. How to use And Filter 12-12-2014
  • 2. Abstract • The main motto of this PPT is How to use And Filter in our applications.
  • 3. Introduction • Mule bundles more than a dozen Filters that determine whether a message can proceed through an application flow. The simplest filters implement basic logic operators (such as and, or, and not), but these simple elements can be combined in various ways to specify complex logical conditions.
  • 5. .mflow <?xml version="1.0" encoding="UTF-8"?> <mule xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd"> <flow name="AndFilterFlow1" doc:name="AndFilterFlow1"> <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8089" path="andfilter" doc:name="HTTP"/> <logger message="--entered into the flow" level="INFO" doc:name="Logger"/> <set-payload value="&lt;Soap-Env&gt;&lt;Body&gt;&lt;Path&gt;mulesoft&lt;/Path&gt;&lt;/Body&gt;&lt;/Soap- Env&gt;" doc:name="Set Payload"/> <and-filter doc:name="And"> <expression-filter expression="#[xpath('/Soap-Env/Body/Path/text()').text.contains('mule')]"/> <expression-filter expression="#[xpath('/Soap-Env/Body/Path/text()').text.contains('soft')]"/> </and-filter> <logger message="--Success" level="INFO" doc:name="Logger"/> </flow> </mule>
  • 6. • Output: INFO 2015-12-12 06:49:37,897 [main] org.mule.DefaultMuleContext: ********************************************************************** * Application: AndFilter * * OS encoding: Cp1252, Mule encoding: UTF-8 * * * * Agents Running: * * Clustering Agent * * JMX Agent * ********************************************************************** INFO 2015-12-12 06:49:37,898 [main] org.mule.module.launcher.MuleDeploymentService: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Started app 'AndFilter' + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ INFO 2015-12-12 06:49:41,558 [[AndFilter].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: --entered into the flow INFO 2015-12-12 06:49:42,214 [[AndFilter].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: --Success
  • 7. • Flow of execution: 1. URL to trigger the service from browser http://localhost:8089/andfilter 2. AND filter checks whether the request contains ‘mule’ and ‘soft’ or not?, if yes, it will print a message ‘Success’, else it will not go further.