SlideShare a Scribd company logo
Expression filter in Mule
The main motto of this PPT is how to use
Expression filter in our applications.
Expression filter in Mule
 .mflow
 <?xml version="1.0" encoding="UTF-8"?>
 <mule xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns:vm="http://www.mulesoft.org/schema/mule/vm" 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/vm http://www.mulesoft.org/schema/mule/vm/current/mule-vm.xsd
 http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
 http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd">
 <flow name="MessagePropertiesFlow1" doc:name="MessagePropertiesFlow1">
 <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8089" path="expressionfilter"
doc:name="HTTP"/>
 <message-properties-transformer scope="session" doc:name="Message Properties">
 <add-message-property key="property1" value="mule studio"/>
 </message-properties-transformer>
 <logger message="--flow1--#[sessionVars['property1']]" level="INFO" doc:name="Logger"/>
 <expression-filter expression="#[sessionVars['property1']!='mule']" doc:name="Expression"/>
 <vm:outbound-endpoint exchange-pattern="request-response" path="messageproperties" doc:name="VM"/>
 </flow>
 <flow name="MessagePropertiesFlow2" doc:name="MessagePropertiesFlow2">
 <vm:inbound-endpoint exchange-pattern="request-response" path="messageproperties" doc:name="VM"/>
 <logger message="---flow2--#[sessionVars['property1']]" level="INFO" doc:name="Logger"/>
 </flow>
 </mule>
 Output:
 INFO 2015-10-03 16:00:23,705 [[messageproperties].config.change.14.thread.1]
org.mule.DefaultMuleContext:
 **********************************************************************
 * Application: messageproperties *
 * OS encoding: Cp1252, Mule encoding: UTF-8 *
 * *
 * Agents Running: *
 * Clustering Agent *
 * JMX Agent *
 **********************************************************************
 INFO 2015-10-03 16:00:23,706 [[messageproperties].config.change.14.thread.1]
org.mule.module.launcher.MuleDeploymentService:
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 + Started app 'messageproperties' +
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 INFO 2015-10-03 16:00:26,480 [[messageproperties].connector.http.mule.default.receiver.02]
org.mule.api.processor.LoggerMessageProcessor: --flow1--mule--studio
 INFO 2015-10-03 16:00:26,482 [[messageproperties].connector.http.mule.default.receiver.02]
org.mule.lifecycle.AbstractLifecycleManager: Initialising:
'connector.VM.mule.default.dispatcher.771015974'. Object is: VMMessageDispatcher
 INFO 2015-10-03 16:00:26,482 [[messageproperties].connector.http.mule.default.receiver.02]
org.mule.lifecycle.AbstractLifecycleManager: Starting: 'connector.VM.mule.default.dispatcher.771015974'.
Object is: VMMessageDispatcher
 INFO 2015-10-03 16:00:26,489 [[messageproperties].connector.http.mule.default.receiver.02]
org.mule.api.processor.LoggerMessageProcessor: ---flow2--mule--studio
 Flow of execution:
1. URL to trigger the service from browser
http://localhost:8089/expressionfilter
2. session property is created using message
property component In flow1
3. Service displays session properties in flow1
4. VM component in flow1 will call flow2 if the
value of the session property is other then
mule.
5. In the POC the session property value is
“mule studio” so flow1 calls flow2 and displays
session property value in flow2
https://docs.mulesoft.com/mule-
fundamentals/v/3.7/mule-filters-scopes-
and-routers

More Related Content

PPTX
Expression filter in Mule
PPTX
Message properties component in mule demo
PPTX
Mule esb
PPTX
Choice component in mule
PPTX
Quartz component in mule demo
PPTX
Message properties component in mule
PPTX
Filter expression in mule demo
PPTX
How to get http query parameters in mule
Expression filter in Mule
Message properties component in mule demo
Mule esb
Choice component in mule
Quartz component in mule demo
Message properties component in mule
Filter expression in mule demo
How to get http query parameters in mule

What's hot (15)

PPTX
Mule Message Properties Component
PPTX
Configurare http mule
PPTX
Choice component in mule demo
PPTX
Message properties component in Mule
PPTX
Mule property placeholder
ODP
Dropbox connector Mule ESB Integration
PPTX
Mule Esb Data Weave
PPTX
Until successful component in mule
PPTX
File component in mule
PPTX
For each component in mule
ODP
Mule ESB SMTP Connector Integration
PPTX
Basic example using for each component
PPTX
Filter expression in mule
PPTX
Mule esb :Data Weave
PPTX
Quartz component in mule
Mule Message Properties Component
Configurare http mule
Choice component in mule demo
Message properties component in Mule
Mule property placeholder
Dropbox connector Mule ESB Integration
Mule Esb Data Weave
Until successful component in mule
File component in mule
For each component in mule
Mule ESB SMTP Connector Integration
Basic example using for each component
Filter expression in mule
Mule esb :Data Weave
Quartz component in mule
Ad

Viewers also liked (18)

PPT
Anypoint data gateway
PPTX
Mule java part-1
PPT
MuleEsb Complete integration and middleware solution
PPTX
Service oriented online architecture using mule
PPTX
Using xslt in mule
PPTX
MuleSoft ESB scatter-gather and base64
PPT
Inclusive_Cultural_Empathy 2009
PPTX
Custom Calculations: Your business is unique — shouldn't your metrics be?
PPTX
Webservice vm in mule
PPTX
Winning with Data
PPTX
Wisdom of Crowds Webinar Deck
PDF
Microsoft Dynamics CRM for Education
PDF
gRPC and Microservices
PPTX
Drools in Mule
PPTX
Mule testing
PDF
Simple REST-APIs with Dropwizard and Swagger
PDF
Get more from Analytics 360 with BigQuery and the Google Cloud Platform
PDF
DevOps in AWS with Kubernetes
Anypoint data gateway
Mule java part-1
MuleEsb Complete integration and middleware solution
Service oriented online architecture using mule
Using xslt in mule
MuleSoft ESB scatter-gather and base64
Inclusive_Cultural_Empathy 2009
Custom Calculations: Your business is unique — shouldn't your metrics be?
Webservice vm in mule
Winning with Data
Wisdom of Crowds Webinar Deck
Microsoft Dynamics CRM for Education
gRPC and Microservices
Drools in Mule
Mule testing
Simple REST-APIs with Dropwizard and Swagger
Get more from Analytics 360 with BigQuery and the Google Cloud Platform
DevOps in AWS with Kubernetes
Ad

Similar to Expression filter in Mule (20)

PPTX
Expression Filters
PPTX
How to use expression filter
PPTX
How to use expression filter
PPTX
How to use expression filter
PPTX
How to use expression filter
PPTX
How to use expression filter
PPTX
How to use expression filter
PPTX
How to use expression filter
PPTX
How to use expression filter
PPTX
Filter expression
 
PPTX
Filter expression
PPTX
Filter expression
PPTX
Filter expression in mule
PPTX
PPTX
How to use expression filter
PPTX
Mule routing and filters
PPT
Mule introduction
PPTX
PPTX
Routing in mule
PPTX
M filtering
Expression Filters
How to use expression filter
How to use expression filter
How to use expression filter
How to use expression filter
How to use expression filter
How to use expression filter
How to use expression filter
How to use expression filter
Filter expression
 
Filter expression
Filter expression
Filter expression in mule
How to use expression filter
Mule routing and filters
Mule introduction
Routing in mule
M filtering

More from Khan625 (20)

PPTX
Mapping and listing in mule
PPTX
Jenkins Build System
PPTX
Building and Managing Projects with Maven
PPTX
Web services soap
PPTX
Web services wsdl
PPTX
Web services uddi
PPTX
Web services with soap
PPTX
Maven
PPTX
WebServices Basic Overview
PPTX
Java Basics
PPTX
Mmc rest api user groups
PPTX
Mapping and listing with mule
PPTX
Data weave
PPT
Anypoint data gateway
PPTX
Mule with drools
PPTX
Idempotent filter with simple file
PPTX
Mule with quartz
PPTX
Mule with rabbit mq
PPTX
Mule with velocity
PPTX
Scatter gather flow control
Mapping and listing in mule
Jenkins Build System
Building and Managing Projects with Maven
Web services soap
Web services wsdl
Web services uddi
Web services with soap
Maven
WebServices Basic Overview
Java Basics
Mmc rest api user groups
Mapping and listing with mule
Data weave
Anypoint data gateway
Mule with drools
Idempotent filter with simple file
Mule with quartz
Mule with rabbit mq
Mule with velocity
Scatter gather flow control

Recently uploaded (20)

PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Electronic commerce courselecture one. Pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
cuic standard and advanced reporting.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
Spectroscopy.pptx food analysis technology
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
MYSQL Presentation for SQL database connectivity
Chapter 3 Spatial Domain Image Processing.pdf
Electronic commerce courselecture one. Pdf
Spectral efficient network and resource selection model in 5G networks
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
cuic standard and advanced reporting.pdf
Unlocking AI with Model Context Protocol (MCP)
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Spectroscopy.pptx food analysis technology
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Machine learning based COVID-19 study performance prediction
NewMind AI Weekly Chronicles - August'25 Week I
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Digital-Transformation-Roadmap-for-Companies.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows

Expression filter in Mule

  • 2. The main motto of this PPT is how to use Expression filter in our applications.
  • 4.  .mflow  <?xml version="1.0" encoding="UTF-8"?>  <mule xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:vm="http://www.mulesoft.org/schema/mule/vm" 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/vm http://www.mulesoft.org/schema/mule/vm/current/mule-vm.xsd  http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd  http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd">  <flow name="MessagePropertiesFlow1" doc:name="MessagePropertiesFlow1">  <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8089" path="expressionfilter" doc:name="HTTP"/>  <message-properties-transformer scope="session" doc:name="Message Properties">  <add-message-property key="property1" value="mule studio"/>  </message-properties-transformer>  <logger message="--flow1--#[sessionVars['property1']]" level="INFO" doc:name="Logger"/>  <expression-filter expression="#[sessionVars['property1']!='mule']" doc:name="Expression"/>  <vm:outbound-endpoint exchange-pattern="request-response" path="messageproperties" doc:name="VM"/>  </flow>  <flow name="MessagePropertiesFlow2" doc:name="MessagePropertiesFlow2">  <vm:inbound-endpoint exchange-pattern="request-response" path="messageproperties" doc:name="VM"/>  <logger message="---flow2--#[sessionVars['property1']]" level="INFO" doc:name="Logger"/>  </flow>  </mule>
  • 5.  Output:  INFO 2015-10-03 16:00:23,705 [[messageproperties].config.change.14.thread.1] org.mule.DefaultMuleContext:  **********************************************************************  * Application: messageproperties *  * OS encoding: Cp1252, Mule encoding: UTF-8 *  * *  * Agents Running: *  * Clustering Agent *  * JMX Agent *  **********************************************************************  INFO 2015-10-03 16:00:23,706 [[messageproperties].config.change.14.thread.1] org.mule.module.launcher.MuleDeploymentService:  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  + Started app 'messageproperties' +  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  INFO 2015-10-03 16:00:26,480 [[messageproperties].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: --flow1--mule--studio  INFO 2015-10-03 16:00:26,482 [[messageproperties].connector.http.mule.default.receiver.02] org.mule.lifecycle.AbstractLifecycleManager: Initialising: 'connector.VM.mule.default.dispatcher.771015974'. Object is: VMMessageDispatcher  INFO 2015-10-03 16:00:26,482 [[messageproperties].connector.http.mule.default.receiver.02] org.mule.lifecycle.AbstractLifecycleManager: Starting: 'connector.VM.mule.default.dispatcher.771015974'. Object is: VMMessageDispatcher  INFO 2015-10-03 16:00:26,489 [[messageproperties].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: ---flow2--mule--studio
  • 6.  Flow of execution: 1. URL to trigger the service from browser http://localhost:8089/expressionfilter 2. session property is created using message property component In flow1 3. Service displays session properties in flow1 4. VM component in flow1 will call flow2 if the value of the session property is other then mule. 5. In the POC the session property value is “mule studio” so flow1 calls flow2 and displays session property value in flow2