SlideShare a Scribd company logo
1 of 8
 The main motto of this PPT is How to use Or
Filter in our applications.
 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.
.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="OrFilterFlow1" doc:name="OrFilterFlow1">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8090" path="OrFilter"
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;mule&lt;/Path&gt;&lt;/Body&gt;&lt;/Soap-
Env&gt;" doc:name="Set Payload"/>
<or-filter doc:name="Or">
<expression-filter expression="#[xpath('/Soap-Env/Body/Path/text()').text.contains('mule')]"/>
<expression-filter expression="#[xpath('/Soap-Env/Body/Path/text()').text.contains('soft')]"/>
</or-filter>
<logger message="--Success" level="INFO" doc:name="Logger"/>
</flow>
</mule>
 Output:
INFO 2015-12-12 07:03:26,157 [main] org.mule.DefaultMuleContext:
**********************************************************************
* Application: OrFilter *
* OS encoding: Cp1252, Mule encoding: UTF-8 *
* *
* Agents Running: *
* Clustering Agent *
* JMX Agent *
**********************************************************************
INFO 2015-12-12 07:03:26,158 [main]
org.mule.module.launcher.MuleDeploymentService:
+++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++
+ Started app 'OrFilter' +
+++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++
INFO 2015-12-12 07:03:54,738 [[OrFilter].connector.http.mule.default.receiver.02]
org.mule.api.processor.LoggerMessageProcessor: ----entered into the flow
INFO 2015-12-12 07:03:54,994 [[OrFilter].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:8090/OrFilter
2. OR filter checks whether the request contains
‘mule’ or ‘soft’ or not?, if yes, it will print a
message ‘Success’, else it will not go further.
 https://docs.mulesoft.com/mule-user-
guide/v/3.7/filters

More Related Content

What's hot

What's hot (12)

Exception handling in mule
Exception handling in muleException handling in mule
Exception handling in mule
 
How to use expression filter
How to use expression filter How to use expression filter
How to use expression filter
 
Expression Filters
Expression FiltersExpression Filters
Expression Filters
 
Mule property placeholder
Mule property placeholderMule property placeholder
Mule property placeholder
 
File component in mule
File component in muleFile component in mule
File component in mule
 
Validation
ValidationValidation
Validation
 
File component
File componentFile component
File component
 
Message properties component in mule demo
Message properties component in mule demoMessage properties component in mule demo
Message properties component in mule demo
 
How to use file component
How to use file componentHow to use file component
How to use file component
 
Property place holder
Property place holderProperty place holder
Property place holder
 
Filter expression in mule
Filter expression in muleFilter expression in mule
Filter expression in mule
 
Quartz component in mule
Quartz component in muleQuartz component in mule
Quartz component in mule
 

Viewers also liked

Integrate mule esb with microsoft office 365 share point
Integrate mule esb with microsoft office 365 share pointIntegrate mule esb with microsoft office 365 share point
Integrate mule esb with microsoft office 365 share pointsivachandra mandalapu
 
Synchronous communication using jms back channel
Synchronous communication using jms back channelSynchronous communication using jms back channel
Synchronous communication using jms back channelsivachandra mandalapu
 
Setting up organization with api access
Setting up organization with api accessSetting up organization with api access
Setting up organization with api accesssivachandra mandalapu
 
Integration of mule esb with microsoft azure
Integration of mule esb with microsoft azureIntegration of mule esb with microsoft azure
Integration of mule esb with microsoft azuresivachandra mandalapu
 
Specifying a default exception strategy
Specifying a default exception strategySpecifying a default exception strategy
Specifying a default exception strategysivachandra mandalapu
 

Viewers also liked (20)

Splitter
SplitterSplitter
Splitter
 
Dockerizing mule soft esb
Dockerizing mule soft esbDockerizing mule soft esb
Dockerizing mule soft esb
 
Integrate mule esb with microsoft office 365 share point
Integrate mule esb with microsoft office 365 share pointIntegrate mule esb with microsoft office 365 share point
Integrate mule esb with microsoft office 365 share point
 
How to use processor chain
How to use processor chainHow to use processor chain
How to use processor chain
 
Synchronous communication using jms back channel
Synchronous communication using jms back channelSynchronous communication using jms back channel
Synchronous communication using jms back channel
 
How to use parse template
How to use parse templateHow to use parse template
How to use parse template
 
Setting up organization with api access
Setting up organization with api accessSetting up organization with api access
Setting up organization with api access
 
How to use attachment transformer
How to use attachment transformerHow to use attachment transformer
How to use attachment transformer
 
Mule esb with amazon s3 Integration
Mule esb with amazon s3 IntegrationMule esb with amazon s3 Integration
Mule esb with amazon s3 Integration
 
Integration of mule esb with microsoft azure
Integration of mule esb with microsoft azureIntegration of mule esb with microsoft azure
Integration of mule esb with microsoft azure
 
Apache spark
Apache sparkApache spark
Apache spark
 
Cloud hub deployment
Cloud hub deploymentCloud hub deployment
Cloud hub deployment
 
Bean as Datasource
Bean as DatasourceBean as Datasource
Bean as Datasource
 
How to use poll scope
How to use poll scopeHow to use poll scope
How to use poll scope
 
How to use jms outbound endpoint
How to use jms outbound endpointHow to use jms outbound endpoint
How to use jms outbound endpoint
 
How to use IMAP endpoint
How to use IMAP endpointHow to use IMAP endpoint
How to use IMAP endpoint
 
Securing api with_o_auth2
Securing api with_o_auth2Securing api with_o_auth2
Securing api with_o_auth2
 
How to read json message payload
How to read json message payloadHow to read json message payload
How to read json message payload
 
How to use message enricher
How to use message enricherHow to use message enricher
How to use message enricher
 
Specifying a default exception strategy
Specifying a default exception strategySpecifying a default exception strategy
Specifying a default exception strategy
 

Similar to Or Filter

File component in mule demo
File component in mule demoFile component in mule demo
File component in mule demoSudha Ch
 
Message properties component in mule
Message properties component in muleMessage properties component in mule
Message properties component in muleKhan625
 
Expression filter in Mule
Expression filter in MuleExpression filter in Mule
Expression filter in MuleKhan625
 
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
 
Choice component in mule demo
Choice component in mule demoChoice component in mule demo
Choice component in mule demoSudha Ch
 
Filter expression in mule
Filter expression in muleFilter expression in mule
Filter expression in mulejaveed_mhd
 
Filter expression
Filter expression Filter expression
Filter expression F K
 
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
 
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 Or Filter (20)

File component in mule demo
File component in mule demoFile component in mule demo
File component in mule demo
 
Message properties component in mule
Message properties component in muleMessage properties component in mule
Message properties component in mule
 
Expression filter in Mule
Expression filter in MuleExpression filter in Mule
Expression filter in Mule
 
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
 
Wildcard Filter
Wildcard FilterWildcard Filter
Wildcard Filter
 
Choice component in mule demo
Choice component in mule demoChoice component in mule demo
Choice component in mule demo
 
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
 
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
 
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
 

More from sivachandra mandalapu (18)

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 SFTP
How to use SFTPHow to use SFTP
How to use SFTP
 
How to use secure property placeholder
How to use secure property placeholderHow to use secure property placeholder
How to use secure property placeholder
 
Defining global exception strategies
Defining global exception strategiesDefining global exception strategies
Defining global exception strategies
 
Reference exception strategy
Reference exception strategyReference exception strategy
Reference exception strategy
 
Validate json schema
Validate json schemaValidate json schema
Validate json schema
 
Collection aggregator
Collection aggregatorCollection aggregator
Collection aggregator
 
Deployment options for mule applications
Deployment options for mule applicationsDeployment options for mule applications
Deployment options for mule applications
 
API gateway setup
API gateway setupAPI gateway setup
API gateway setup
 
Sap
SapSap
Sap
 
Salesforce
SalesforceSalesforce
Salesforce
 
Data Mapper
Data MapperData Mapper
Data Mapper
 
Soap Component
Soap ComponentSoap Component
Soap Component
 
Rest Component
Rest ComponentRest Component
Rest Component
 
Integration with dropbox using mule esb
Integration with dropbox using mule esbIntegration with dropbox using mule esb
Integration with dropbox using mule esb
 

Recently uploaded

The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
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
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 

Recently uploaded (20)

The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
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
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 

Or Filter

  • 1.
  • 2.  The main motto of this PPT is How to use Or Filter in our applications.
  • 3.  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.
  • 4.
  • 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="OrFilterFlow1" doc:name="OrFilterFlow1"> <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8090" path="OrFilter" 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;mule&lt;/Path&gt;&lt;/Body&gt;&lt;/Soap- Env&gt;" doc:name="Set Payload"/> <or-filter doc:name="Or"> <expression-filter expression="#[xpath('/Soap-Env/Body/Path/text()').text.contains('mule')]"/> <expression-filter expression="#[xpath('/Soap-Env/Body/Path/text()').text.contains('soft')]"/> </or-filter> <logger message="--Success" level="INFO" doc:name="Logger"/> </flow> </mule>
  • 6.  Output: INFO 2015-12-12 07:03:26,157 [main] org.mule.DefaultMuleContext: ********************************************************************** * Application: OrFilter * * OS encoding: Cp1252, Mule encoding: UTF-8 * * * * Agents Running: * * Clustering Agent * * JMX Agent * ********************************************************************** INFO 2015-12-12 07:03:26,158 [main] org.mule.module.launcher.MuleDeploymentService: +++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++ + Started app 'OrFilter' + +++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++ INFO 2015-12-12 07:03:54,738 [[OrFilter].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: ----entered into the flow INFO 2015-12-12 07:03:54,994 [[OrFilter].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:8090/OrFilter 2. OR filter checks whether the request contains ‘mule’ or ‘soft’ or not?, if yes, it will print a message ‘Success’, else it will not go further.