SlideShare a Scribd company logo
1 of 7
How to use Expression Filter
Abstract
• The main motto of this PPT is how to use
Expression filter in our applications.
Example
• .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
References
• https://docs.mulesoft.com/mule-
fundamentals/v/3.7/mule-filters-scopes-and-
routers

More Related Content

What's hot (12)

Wildcard Filter
Wildcard FilterWildcard Filter
Wildcard Filter
 
Reference exception strategy
Reference exception strategyReference exception strategy
Reference exception strategy
 
Salesforce
SalesforceSalesforce
Salesforce
 
Data Mapper
Data MapperData Mapper
Data Mapper
 
Validate json schema
Validate json schemaValidate json schema
Validate json schema
 
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
 
Bean as Datasource
Bean as DatasourceBean as Datasource
Bean as Datasource
 
Splitter
SplitterSplitter
Splitter
 
Not Filter
Not FilterNot Filter
Not Filter
 
Or Filter
Or FilterOr Filter
Or Filter
 

Viewers also liked

Mule batch processing
Mule batch processingMule batch processing
Mule batch processingirfan1008
 
ING-ASR - US household finances survey 2015
ING-ASR - US household finances survey 2015ING-ASR - US household finances survey 2015
ING-ASR - US household finances survey 2015Ezonomics1
 
Workshop "Succesvol mijn idee overbrengen"
Workshop "Succesvol mijn idee overbrengen"Workshop "Succesvol mijn idee overbrengen"
Workshop "Succesvol mijn idee overbrengen"Pieter de Kiewit
 
Mule anypoint exchange
Mule anypoint exchangeMule anypoint exchange
Mule anypoint exchangeirfan1008
 
Mule security jaas
Mule security jaasMule security jaas
Mule security jaasirfan1008
 
Mule esb stripe
Mule esb stripeMule esb stripe
Mule esb stripeirfan1008
 
Mule architecture
Mule architectureMule architecture
Mule architectureirfan1008
 
15.10.21. RICS Preston - 11 November 2015 - Rural Vitality - Copy
15.10.21. RICS Preston - 11 November 2015 - Rural Vitality - Copy15.10.21. RICS Preston - 11 November 2015 - Rural Vitality - Copy
15.10.21. RICS Preston - 11 November 2015 - Rural Vitality - CopyRob Hindle
 
2nd Middle East CNG forum
2nd Middle East CNG forum2nd Middle East CNG forum
2nd Middle East CNG forumArmstrong Zhan
 
Xslt in mule
Xslt in muleXslt in mule
Xslt in muleirfan1008
 
Groovy with Mule
Groovy with MuleGroovy with Mule
Groovy with Muleirfan1008
 
Caching and invalidating with managed store
Caching and invalidating with managed storeCaching and invalidating with managed store
Caching and invalidating with managed storeirfan1008
 
Converting with custom transformer
Converting with custom transformerConverting with custom transformer
Converting with custom transformerirfan1008
 
Cache for community edition
Cache for community editionCache for community edition
Cache for community editionirfan1008
 
1ª guerra mundial
1ª guerra mundial1ª guerra mundial
1ª guerra mundialHist9
 

Viewers also liked (17)

Mule batch processing
Mule batch processingMule batch processing
Mule batch processing
 
ING-ASR - US household finances survey 2015
ING-ASR - US household finances survey 2015ING-ASR - US household finances survey 2015
ING-ASR - US household finances survey 2015
 
Workshop "Succesvol mijn idee overbrengen"
Workshop "Succesvol mijn idee overbrengen"Workshop "Succesvol mijn idee overbrengen"
Workshop "Succesvol mijn idee overbrengen"
 
Mule anypoint exchange
Mule anypoint exchangeMule anypoint exchange
Mule anypoint exchange
 
Mule security jaas
Mule security jaasMule security jaas
Mule security jaas
 
Mule soap
Mule soapMule soap
Mule soap
 
Mule esb stripe
Mule esb stripeMule esb stripe
Mule esb stripe
 
Mule architecture
Mule architectureMule architecture
Mule architecture
 
15.10.21. RICS Preston - 11 November 2015 - Rural Vitality - Copy
15.10.21. RICS Preston - 11 November 2015 - Rural Vitality - Copy15.10.21. RICS Preston - 11 November 2015 - Rural Vitality - Copy
15.10.21. RICS Preston - 11 November 2015 - Rural Vitality - Copy
 
2nd Middle East CNG forum
2nd Middle East CNG forum2nd Middle East CNG forum
2nd Middle East CNG forum
 
Question 6
Question 6 Question 6
Question 6
 
Xslt in mule
Xslt in muleXslt in mule
Xslt in mule
 
Groovy with Mule
Groovy with MuleGroovy with Mule
Groovy with Mule
 
Caching and invalidating with managed store
Caching and invalidating with managed storeCaching and invalidating with managed store
Caching and invalidating with managed store
 
Converting with custom transformer
Converting with custom transformerConverting with custom transformer
Converting with custom transformer
 
Cache for community edition
Cache for community editionCache for community edition
Cache for community edition
 
1ª guerra mundial
1ª guerra mundial1ª guerra mundial
1ª guerra mundial
 

Similar to How to use expression 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
 
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
 
Expression filter in Mule
Expression filter in MuleExpression filter in Mule
Expression filter in MuleKhan625
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties componentprinceirfancivil
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties componentirfan1008
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties componentPhaniu
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties componentmdfkhan625
 
Filter expression in mule demo
Filter expression in mule demoFilter expression in mule demo
Filter expression in mule demoSudha Ch
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties componentmaheshtheapex
 
Message properties component
Message properties component Message properties component
Message properties component Sunil Komarapu
 
Message properties component
Message properties componentMessage properties component
Message properties componentF K
 
Message properties component in mule
Message properties component in muleMessage properties component in mule
Message properties component in mulejaveed_mhd
 
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
 

Similar to How to use expression 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
 
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
 
Expression filter in Mule
Expression filter in MuleExpression filter in Mule
Expression filter 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
 
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
 
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 in mule demo
Filter expression in mule demoFilter expression in mule demo
Filter expression in mule demo
 
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
Message properties component Message properties component
Message properties component
 
Message properties component
Message properties componentMessage properties component
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
 
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
 

More from irfan1008

Validate Soap Request in Mule
Validate Soap Request in MuleValidate Soap Request in Mule
Validate Soap Request in Muleirfan1008
 
WebService with VM Mule
WebService with VM MuleWebService with VM Mule
WebService with VM Muleirfan1008
 
Developing Oracle Connector Using Mule
Developing Oracle Connector Using MuleDeveloping Oracle Connector Using Mule
Developing Oracle Connector Using Muleirfan1008
 
Send email attachment using smtp in mule esb
Send email attachment using smtp  in mule esbSend email attachment using smtp  in mule esb
Send email attachment using smtp in mule esbirfan1008
 
Mule oracle connectors
Mule oracle connectorsMule oracle connectors
Mule oracle connectorsirfan1008
 
Mule google connectors
Mule google connectorsMule google connectors
Mule google connectorsirfan1008
 
Mule execution
Mule executionMule execution
Mule executionirfan1008
 
Mule database-connectors
Mule database-connectorsMule database-connectors
Mule database-connectorsirfan1008
 
Mule security saml
Mule security samlMule security saml
Mule security samlirfan1008
 
Mule for each scope headerc ollection
Mule for each scope headerc ollectionMule for each scope headerc ollection
Mule for each scope headerc ollectionirfan1008
 
Mule esb api layer
Mule esb api layerMule esb api layer
Mule esb api layerirfan1008
 
Mmc rest api user groups
Mmc rest api user groupsMmc rest api user groups
Mmc rest api user groupsirfan1008
 
Mmc rest api user groups
Mmc rest api user groupsMmc rest api user groups
Mmc rest api user groupsirfan1008
 
Mapping and listing with mule
Mapping and listing with muleMapping and listing with mule
Mapping and listing with muleirfan1008
 

More from irfan1008 (19)

Mule
MuleMule
Mule
 
Validate Soap Request in Mule
Validate Soap Request in MuleValidate Soap Request in Mule
Validate Soap Request in Mule
 
WebService with VM Mule
WebService with VM MuleWebService with VM Mule
WebService with VM Mule
 
Developing Oracle Connector Using Mule
Developing Oracle Connector Using MuleDeveloping Oracle Connector Using Mule
Developing Oracle Connector Using Mule
 
Send email attachment using smtp in mule esb
Send email attachment using smtp  in mule esbSend email attachment using smtp  in mule esb
Send email attachment using smtp in mule esb
 
Mule oracle connectors
Mule oracle connectorsMule oracle connectors
Mule oracle connectors
 
Mule google connectors
Mule google connectorsMule google connectors
Mule google connectors
 
Mule execution
Mule executionMule execution
Mule execution
 
Mule database-connectors
Mule database-connectorsMule database-connectors
Mule database-connectors
 
Mule soa
Mule soaMule soa
Mule soa
 
Mule security saml
Mule security samlMule security saml
Mule security saml
 
Mule for each scope headerc ollection
Mule for each scope headerc ollectionMule for each scope headerc ollection
Mule for each scope headerc ollection
 
Mule esb
Mule esbMule esb
Mule esb
 
Mule esb api layer
Mule esb api layerMule esb api layer
Mule esb api layer
 
Mmc 2
Mmc 2Mmc 2
Mmc 2
 
Mmc rest api user groups
Mmc rest api user groupsMmc rest api user groups
Mmc rest api user groups
 
Mmc
MmcMmc
Mmc
 
Mmc rest api user groups
Mmc rest api user groupsMmc rest api user groups
Mmc rest api user groups
 
Mapping and listing with mule
Mapping and listing with muleMapping and listing with mule
Mapping and listing with mule
 

Recently uploaded

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 

Recently uploaded (20)

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 

How to use expression filter

  • 1. How to use Expression Filter
  • 2. Abstract • 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