SlideShare a Scribd company logo
Or Filter
 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.
Or Filter
.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

PPTX
PPTX
PPTX
How to use not filter
PPTX
How to use or filter
PPTX
How to use and filter
PPTX
PPTX
How to use expression filter
PPTX
Expression filter in Mule
How to use not filter
How to use or filter
How to use and filter
How to use expression filter
Expression filter in Mule

What's hot (12)

PPTX
Exception handling in mule
PPTX
How to use expression filter
PPTX
Expression Filters
PPTX
Mule property placeholder
PPTX
File component in mule
PPTX
PPTX
File component
PPTX
Message properties component in mule demo
PPTX
How to use file component
PPTX
Property place holder
PPTX
Filter expression in mule
PPTX
Quartz component in mule
Exception handling in mule
How to use expression filter
Expression Filters
Mule property placeholder
File component in mule
File component
Message properties component in mule demo
How to use file component
Property place holder
Filter expression in mule
Quartz component in mule
Ad

Viewers also liked (20)

PPTX
PPTX
Dockerizing mule soft esb
PPTX
Integrate mule esb with microsoft office 365 share point
PPTX
How to use processor chain
PPTX
Synchronous communication using jms back channel
PPTX
How to use parse template
PPTX
Setting up organization with api access
PPTX
How to use attachment transformer
PPTX
Mule esb with amazon s3 Integration
PPTX
Integration of mule esb with microsoft azure
PPTX
Apache spark
PPTX
Cloud hub deployment
PPTX
Bean as Datasource
PPTX
How to use poll scope
PPTX
How to use jms outbound endpoint
PPTX
How to use IMAP endpoint
PPTX
Securing api with_o_auth2
PPTX
How to read json message payload
PPTX
How to use message enricher
PPTX
Specifying a default exception strategy
Dockerizing mule soft esb
Integrate mule esb with microsoft office 365 share point
How to use processor chain
Synchronous communication using jms back channel
How to use parse template
Setting up organization with api access
How to use attachment transformer
Mule esb with amazon s3 Integration
Integration of mule esb with microsoft azure
Apache spark
Cloud hub deployment
Bean as Datasource
How to use poll scope
How to use jms outbound endpoint
How to use IMAP endpoint
Securing api with_o_auth2
How to read json message payload
How to use message enricher
Specifying a default exception strategy
Ad

Similar to Or Filter (20)

PPTX
Mule filters
PPTX
Mule ESB Tutorial Part 2
PPTX
Filter expression in mule demo
PPT
Mule introduction
PPTX
How muleworks
PPT
Mule esb presentation 2015
PPTX
How muleworks
PPTX
Expression filter in Mule
PPTX
Wildcard Filter
PPTX
Mule filters
PPTX
How to use expression filter
PPTX
How to use expression filter
PPTX
How to use expression filter
PDF
Global Scale ESB with Mule
PPTX
Working of mule
PPTX
Mule esb
PDF
Mule esb and_relevant_components
PPT
Mulesoft Filters
PPTX
Filter expression
 
PPTX
Filter expression
Mule filters
Mule ESB Tutorial Part 2
Filter expression in mule demo
Mule introduction
How muleworks
Mule esb presentation 2015
How muleworks
Expression filter in Mule
Wildcard Filter
Mule filters
How to use expression filter
How to use expression filter
How to use expression filter
Global Scale ESB with Mule
Working of mule
Mule esb
Mule esb and_relevant_components
Mulesoft Filters
Filter expression
 
Filter expression

More from sivachandra mandalapu (18)

PPTX
Mock component in munit
PPTX
Jms selector
PPTX
PPTX
Object store
PPTX
How to use SFTP
PPTX
How to use secure property placeholder
PPTX
Defining global exception strategies
PPTX
Reference exception strategy
PPTX
Validate json schema
PPTX
Collection aggregator
PPTX
Deployment options for mule applications
PPTX
API gateway setup
PPTX
PPTX
PPTX
Soap Component
PPTX
Rest Component
PPTX
Integration with dropbox using mule esb
Mock component in munit
Jms selector
Object store
How to use SFTP
How to use secure property placeholder
Defining global exception strategies
Reference exception strategy
Validate json schema
Collection aggregator
Deployment options for mule applications
API gateway setup
Soap Component
Rest Component
Integration with dropbox using mule esb

Recently uploaded (20)

PDF
1_English_Language_Set_2.pdf probationary
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
PPTX
Lesson notes of climatology university.
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
Indian roads congress 037 - 2012 Flexible pavement
PDF
LDMMIA Reiki Yoga Finals Review Spring Summer
PPTX
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
PDF
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
PDF
SOIL: Factor, Horizon, Process, Classification, Degradation, Conservation
PDF
Weekly quiz Compilation Jan -July 25.pdf
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PPTX
Unit 4 Skeletal System.ppt.pptxopresentatiom
PDF
Paper A Mock Exam 9_ Attempt review.pdf.
PDF
A systematic review of self-coping strategies used by university students to ...
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
PPTX
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PDF
Trump Administration's workforce development strategy
1_English_Language_Set_2.pdf probationary
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Practical Manual AGRO-233 Principles and Practices of Natural Farming
Lesson notes of climatology university.
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
Indian roads congress 037 - 2012 Flexible pavement
LDMMIA Reiki Yoga Finals Review Spring Summer
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
SOIL: Factor, Horizon, Process, Classification, Degradation, Conservation
Weekly quiz Compilation Jan -July 25.pdf
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
Unit 4 Skeletal System.ppt.pptxopresentatiom
Paper A Mock Exam 9_ Attempt review.pdf.
A systematic review of self-coping strategies used by university students to ...
A powerpoint presentation on the Revised K-10 Science Shaping Paper
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
Final Presentation General Medicine 03-08-2024.pptx
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
Trump Administration's workforce development strategy

Or Filter

  • 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.
  • 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.