SlideShare a Scribd company logo
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
mdfkhan625
 
Data Mapper
Data MapperData Mapper
Data Mapper
sivachandra mandalapu
 
Expression filter in Mule
Expression filter in MuleExpression filter in Mule
Expression filter in Mule
Mohammed246
 
File component
File componentFile component
File component
Durga Prasad Kakarla
 
Validation
ValidationValidation
Validation
sivachandra mandalapu
 
Splitter
SplitterSplitter
Splitter
sivachandra mandalapu
 
Specifying a default exception strategy
Specifying a default exception strategySpecifying a default exception strategy
Specifying a default exception strategy
sivachandra mandalapu
 
Collection aggregator
Collection aggregatorCollection aggregator
Collection aggregator
sivachandra mandalapu
 
Validate json schema
Validate json schemaValidate json schema
Validate json schema
sivachandra mandalapu
 
Reference exception strategy
Reference exception strategyReference exception strategy
Reference exception strategy
sivachandra mandalapu
 
Property place holder
Property place holderProperty place holder
Property place holder
sivachandra mandalapu
 
Mule property placeholder
Mule property placeholderMule property placeholder
Mule property placeholder
Sashidhar Rao GDS
 
Message properties component in mule demo
Message properties component in mule demoMessage properties component in mule demo
Message properties component in mule demo
Sudha Ch
 

Viewers also liked (13)

SegarAnakan_EIS_011014-Reduced
SegarAnakan_EIS_011014-ReducedSegarAnakan_EIS_011014-Reduced
SegarAnakan_EIS_011014-Reduced
Mark Pillsworth
 
resume 2015
resume 2015resume 2015
resume 2015
Mitchelle Suarez
 
Destilasi
DestilasiDestilasi
Destilasi
UIN Alauddin Makassar
 
NFPtweetup Critiquing Twitter Voice Disney
NFPtweetup Critiquing Twitter Voice DisneyNFPtweetup Critiquing Twitter Voice Disney
NFPtweetup Critiquing Twitter Voice Disney
NFPtweetup
 
4 popular uncommon home utility gifts
4 popular uncommon home utility gifts4 popular uncommon home utility gifts
4 popular uncommon home utility gifts
Jason's Gizmoly Hub
 
Age Awareness
Age AwarenessAge Awareness
Age Awareness
Generations Working Together
 
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
Sydney Finchum
 
Global warming
Global warmingGlobal warming
Global warming
ivid1990
 
Kromatografi kolom (resin penukar ion)
Kromatografi kolom (resin penukar ion)Kromatografi kolom (resin penukar ion)
Kromatografi kolom (resin penukar ion)
UIN Alauddin Makassar
 
Photoshoot scheduling
Photoshoot schedulingPhotoshoot scheduling
Photoshoot scheduling
azizamrobinsonmedia
 
Kromatografi lapis tipis (klt)
Kromatografi lapis tipis (klt)Kromatografi lapis tipis (klt)
Kromatografi lapis tipis (klt)
UIN Alauddin Makassar
 
Connecting generations through walking
Connecting generations through walkingConnecting generations through walking
Connecting generations through walking
Alison Clyde
 

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
RaviRajuRamaKrishna
 
How to use expression filter
How to use expression filterHow to use expression filter
How to use expression filter
Anand kalla
 
How to use expression filter
How to use expression filterHow to use expression filter
How to use expression filter
Sunil Komarapu
 
How to use expression filter
How to use expression filterHow to use expression filter
How to use expression filter
Khasim Saheb
 
Mule- File component example
Mule- File component exampleMule- File component example
Mule- File component example
DivyaSree1391
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
Sunil Komarapu
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
Khasim Saheb
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
Anand kalla
 
Message properties component in Mule
Message properties component in MuleMessage properties component in Mule
Message properties component in Mule
Khan625
 
Filter expression in mule
Filter expression in muleFilter expression in mule
Filter expression in mule
Rajkattamuri
 
Filter expression
Filter expressionFilter expression
Filter expression
AbdulImrankhan7
 
Filter expression in mule
Filter expression in muleFilter expression in mule
Filter expression in mule
javeed_mhd
 
Filter expression
Filter expression Filter expression
Filter expression
Sunil Komarapu
 
Filter expression
Filter expression Filter expression
Filter expression
F K
 
File component in mule
File component in muleFile component in mule
File component in mule
javeed_mhd
 
File component
File component File component
File component
F K
 
File component
File component File component
File component
Sunil Komarapu
 
Mule File component
Mule File component Mule File component
Mule File component
AbdulImrankhan7
 
Expression Filters
Expression FiltersExpression Filters
Expression Filters
Durga Prasad Kakarla
 
How to use wildcard filter
How to use wildcard filterHow to use wildcard filter
How to use wildcard filter
RaviRajuRamaKrishna
 
How to use expression filter
How to use expression filterHow to use expression filter
How to use expression filter
Anand kalla
 
How to use expression filter
How to use expression filterHow to use expression filter
How to use expression filter
Sunil Komarapu
 
How to use expression filter
How to use expression filterHow to use expression filter
How to use expression filter
Khasim Saheb
 
Mule- File component example
Mule- File component exampleMule- File component example
Mule- File component example
DivyaSree1391
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
Sunil Komarapu
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
Khasim Saheb
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
Anand kalla
 
Message properties component in Mule
Message properties component in MuleMessage properties component in Mule
Message properties component in Mule
Khan625
 
Filter expression in mule
Filter expression in muleFilter expression in mule
Filter expression in mule
Rajkattamuri
 
Filter expression in mule
Filter expression in muleFilter expression in mule
Filter expression in mule
javeed_mhd
 
Filter expression
Filter expression Filter expression
Filter expression
F K
 
File component in mule
File component in muleFile component in mule
File component in mule
javeed_mhd
 
File component
File component File component
File component
F K
 

More from RaviRajuRamaKrishna (10)

Mock component in munit
Mock component in munitMock component in munit
Mock component in munit
RaviRajuRamaKrishna
 
Jms selector
Jms selectorJms selector
Jms selector
RaviRajuRamaKrishna
 
Sftplite
SftpliteSftplite
Sftplite
RaviRajuRamaKrishna
 
Object store
Object storeObject store
Object store
RaviRajuRamaKrishna
 
How to use splitter component
How to use splitter componentHow to use splitter component
How to use splitter component
RaviRajuRamaKrishna
 
How to use rest component
How to use rest componentHow to use rest component
How to use rest component
RaviRajuRamaKrishna
 
How to use soap component
How to use soap componentHow to use soap component
How to use soap component
RaviRajuRamaKrishna
 
How to use salesforce cloud connector
How to use salesforce cloud connectorHow to use salesforce cloud connector
How to use salesforce cloud connector
RaviRajuRamaKrishna
 
How to use data mapper transformer
How to use data mapper transformerHow to use data mapper transformer
How to use data mapper transformer
RaviRajuRamaKrishna
 
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
RaviRajuRamaKrishna
 

Recently uploaded (20)

pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
Operations Management (Dr. Abdulfatah Salem).pdf
Operations Management (Dr. Abdulfatah Salem).pdfOperations Management (Dr. Abdulfatah Salem).pdf
Operations Management (Dr. Abdulfatah Salem).pdf
Arab Academy for Science, Technology and Maritime Transport
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
Handling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptxHandling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptx
AuthorAIDNationalRes
 
LDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini UpdatesLDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini Updates
LDM Mia eStudios
 
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Library Association of Ireland
 
Quality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdfQuality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdf
Dr. Bindiya Chauhan
 
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Celine George
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
SPRING FESTIVITIES - UK AND USA -
SPRING FESTIVITIES - UK AND USA            -SPRING FESTIVITIES - UK AND USA            -
SPRING FESTIVITIES - UK AND USA -
Colégio Santa Teresinha
 
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
Handling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptxHandling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptx
AuthorAIDNationalRes
 
LDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini UpdatesLDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini Updates
LDM Mia eStudios
 
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Library Association of Ireland
 
Quality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdfQuality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdf
Dr. Bindiya Chauhan
 
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Celine George
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 

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.