SlideShare una empresa de Scribd logo
1 de 8
For Each Component In Mule Demo
Abstract
• The main motto of this PPT is how to use For
Each component in our applications.
Introduction
• The Foreach scope splits a collection into
elements and processes them iteratively
through the processors embedded in the
scope, then returns the original message to
the flow.
Example
• .mflow<?xml version="1.0" encoding="UTF-8"?>
• <mule xmlns:jdbc-ee="http://www.mulesoft.org/schema/mule/ee/jdbc" 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
• http://www.mulesoft.org/schema/mule/ee/jdbc http://www.mulesoft.org/schema/mule/ee/jdbc/current/mule-jdbc-ee.xsd">
• <jdbc-ee:mssql-data-source name="MS_SQL_Data_Source" user=“****" password=“****"
url="jdbc:sqlserver://localhost;databaseName=test1" transactionIsolation="UNSPECIFIED" doc:name="MS SQL Data Source"/>
• <jdbc-ee:connector name="Database" dataSource-ref="MS_SQL_Data_Source" validateConnections="true" queryTimeout="-1"
pollingFrequency="0" doc:name="Database"/>
• <flow name="Database_ComponentFlow1" doc:name="Database_ComponentFlow1">
• <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8087" path="database" doc:name="HTTP"/>
• <logger message="--main flow--" level="INFO" doc:name="Logger"/>
• <jdbc-ee:outbound-endpoint exchange-pattern="request-response" queryKey="select" queryTimeout="-1" connector-
ref="Database" doc:name="Database">
• <jdbc-ee:query key="select" value="select * from mytable"/>
• </jdbc-ee:outbound-endpoint>
• <foreach collection="#[payload]" doc:name="For Each">
• <logger message="--In foreach loop" level="INFO" doc:name="Logger"/>
• <logger message="--Result--#[payload]" level="INFO" doc:name="Logger"/>
• </foreach>
• </flow>
• </mule>
• Output:INFO 2015-10-03 17:50:45,299 [main] org.mule.DefaultMuleContext:
• **********************************************************************
• * Application: Database Component *
• * OS encoding: Cp1252, Mule encoding: UTF-8 *
• * *
• * Agents Running: *
• * Clustering Agent *
• * JMX Agent *
• **********************************************************************
• INFO 2015-10-03 17:50:45,300 [main] org.mule.module.launcher.MuleDeploymentService:
• ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
• + Started app 'Database Component' +
• ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
• INFO 2015-10-03 17:50:52,770 [[Database Component].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: -
-main flow--
• INFO 2015-10-03 17:50:52,778 [[Database Component].connector.http.mule.default.receiver.02] org.mule.lifecycle.AbstractLifecycleManager:
Initialising: 'Database.dispatcher.424429501'. Object is: EEJdbcMessageDispatcher
• INFO 2015-10-03 17:50:52,779 [[Database Component].connector.http.mule.default.receiver.02] org.mule.lifecycle.AbstractLifecycleManager:
Starting: 'Database.dispatcher.424429501'. Object is: EEJdbcMessageDispatcher
• INFO 2015-10-03 17:50:53,042 [[Database Component].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: -
-In foreach loop
• INFO 2015-10-03 17:50:53,046 [[Database Component].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: -
-Result--{subj=Hindi, marks=55, name=Ramesh, id=1}
• INFO 2015-10-03 17:50:53,047 [[Database Component].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: -
-In foreach loop
• INFO 2015-10-03 17:50:53,049 [[Database Component].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: -
-Result--{subj=English, marks=65, name=Mahesh, id=2}
• INFO 2015-10-03 17:50:53,050 [[Database Component].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: -
-In foreach loop
• INFO 2015-10-03 17:50:53,052 [[Database Component].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: -
-Result--{subj=science, marks=75, name=Pavan, id=3}
• INFO 2015-10-03 17:50:53,053 [[Database Component].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: -
-In foreach loop
• INFO 2015-10-03 17:50:53,056 [[Database Component].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: -
-Result--{subj=social, marks=45, name=Siva, id=4}
• Flow of execution:
1. URL to trigger the service from browser
http://localhost:8087/foreach
2. Database component connects to the specific
database, executes the select query and prints
the result (one by one) using for each
component
References
• https://docs.mulesoft.com/mule-user-
guide/v/3.7/foreach

Más contenido relacionado

La actualidad más candente

Mule connector for ibm® as400
Mule connector for ibm® as400Mule connector for ibm® as400
Mule connector for ibm® as400D.Rajesh Kumar
 
Expression filter in Mule
Expression filter in MuleExpression filter in Mule
Expression filter in MuleKhan625
 
Mule Esb Data Weave
Mule Esb Data WeaveMule Esb Data Weave
Mule Esb Data WeaveMohammed246
 
Mule esb add logger to existing flow
Mule esb add logger to existing flowMule esb add logger to existing flow
Mule esb add logger to existing flowGermano Barba
 
Anypoint connectorfor ibm as 400
Anypoint connectorfor ibm as 400Anypoint connectorfor ibm as 400
Anypoint connectorfor ibm as 400himajareddys
 
Mule esb
Mule esbMule esb
Mule esbKhan625
 
Mule security - spring security manager
Mule  security - spring security managerMule  security - spring security manager
Mule security - spring security managerD.Rajesh Kumar
 
Filter expression in mule
Filter expression in muleFilter expression in mule
Filter expression in muleRajkattamuri
 
File component in mule demo
File component in mule demoFile component in mule demo
File component in mule demoSudha Ch
 
Creating restful api using mule esb
Creating restful api using mule esbCreating restful api using mule esb
Creating restful api using mule esbRaviShankar Mishra
 
Mule ESB SMTP Connector Integration
Mule ESB SMTP Connector  IntegrationMule ESB SMTP Connector  Integration
Mule ESB SMTP Connector IntegrationAnilKumar Etagowni
 
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 esbPraneethchampion
 
Mulesoft vm transport reference
Mulesoft vm transport referenceMulesoft vm transport reference
Mulesoft vm transport referencekumar gaurav
 

La actualidad más candente (18)

Mule connector for ibm® as400
Mule connector for ibm® as400Mule connector for ibm® as400
Mule connector for ibm® as400
 
Expression filter in Mule
Expression filter in MuleExpression filter in Mule
Expression filter in Mule
 
Mule esb :Data Weave
Mule esb :Data WeaveMule esb :Data Weave
Mule esb :Data Weave
 
Mule Esb Data Weave
Mule Esb Data WeaveMule Esb Data Weave
Mule Esb Data Weave
 
Mule esb add logger to existing flow
Mule esb add logger to existing flowMule esb add logger to existing flow
Mule esb add logger to existing flow
 
Anypoint connectorfor ibm as 400
Anypoint connectorfor ibm as 400Anypoint connectorfor ibm as 400
Anypoint connectorfor ibm as 400
 
Mule esb
Mule esbMule esb
Mule esb
 
Mule Message Properties Component
Mule Message Properties ComponentMule Message Properties Component
Mule Message Properties Component
 
Configurare https mule
Configurare https muleConfigurare https mule
Configurare https mule
 
xslt in mule
xslt in mulexslt in mule
xslt in mule
 
Simple Poll in Mule
Simple Poll in MuleSimple Poll in Mule
Simple Poll in Mule
 
Mule security - spring security manager
Mule  security - spring security managerMule  security - spring security manager
Mule security - spring security manager
 
Filter expression in mule
Filter expression in muleFilter expression in mule
Filter expression in mule
 
File component in mule demo
File component in mule demoFile component in mule demo
File component in mule demo
 
Creating restful api using mule esb
Creating restful api using mule esbCreating restful api using mule esb
Creating restful api using mule esb
 
Mule ESB SMTP Connector Integration
Mule ESB SMTP Connector  IntegrationMule ESB SMTP Connector  Integration
Mule ESB SMTP Connector Integration
 
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
 
Mulesoft vm transport reference
Mulesoft vm transport referenceMulesoft vm transport reference
Mulesoft vm transport reference
 

Destacado

Mule management console installation
Mule management console installation Mule management console installation
Mule management console installation F K
 
Mule esb made system integration easy
Mule esb made system integration easy Mule esb made system integration easy
Mule esb made system integration easy F K
 
Anypoint data gateway
Anypoint data gatewayAnypoint data gateway
Anypoint data gatewayMohammed246
 
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 esbAnand kalla
 
Mule google connectors
Mule google connectorsMule google connectors
Mule google connectorsAnand kalla
 
Mulesoft Consuming Web Service - Web Service Consumer
Mulesoft Consuming Web Service - Web Service ConsumerMulesoft Consuming Web Service - Web Service Consumer
Mulesoft Consuming Web Service - Web Service ConsumerVince Soliza
 
Until successful component in mule
Until successful component in muleUntil successful component in mule
Until successful component in muleF K
 
Filter expression in mule
Filter expression in muleFilter expression in mule
Filter expression in mulejaveed_mhd
 
Install sonarqube plugin in anypoint
Install sonarqube plugin in anypoint Install sonarqube plugin in anypoint
Install sonarqube plugin in anypoint F K
 
Mapping and listing in mule
Mapping and listing in muleMapping and listing in mule
Mapping and listing in muleKhan625
 
Choice component in mule
Choice component in muleChoice component in mule
Choice component in mulejaveed_mhd
 
How to install sonarqube plugin in anypoint
How to install sonarqube plugin in anypoint How to install sonarqube plugin in anypoint
How to install sonarqube plugin in anypoint javeed_mhd
 
Mule management console installation
Mule management console installation Mule management console installation
Mule management console installation javeed_mhd
 
How to commit a project in svn using svn plugin in anypointstudio
How to commit a project in svn using svn plugin in anypointstudioHow to commit a project in svn using svn plugin in anypointstudio
How to commit a project in svn using svn plugin in anypointstudiojaveed_mhd
 
Message properties component in mule
Message properties component in muleMessage properties component in mule
Message properties component in mulejaveed_mhd
 
Mule database-connectors
Mule database-connectorsMule database-connectors
Mule database-connectorsAnand kalla
 

Destacado (20)

Mule management console installation
Mule management console installation Mule management console installation
Mule management console installation
 
Mule esb made system integration easy
Mule esb made system integration easy Mule esb made system integration easy
Mule esb made system integration easy
 
Dataweave 160103180124
Dataweave 160103180124Dataweave 160103180124
Dataweave 160103180124
 
Anypoint data gateway
Anypoint data gatewayAnypoint data gateway
Anypoint data gateway
 
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 google connectors
Mule google connectorsMule google connectors
Mule google connectors
 
Mulesoft Consuming Web Service - Web Service Consumer
Mulesoft Consuming Web Service - Web Service ConsumerMulesoft Consuming Web Service - Web Service Consumer
Mulesoft Consuming Web Service - Web Service Consumer
 
Until successful component in mule
Until successful component in muleUntil successful component in mule
Until successful component in mule
 
Filter expression in mule
Filter expression in muleFilter expression in mule
Filter expression in mule
 
Install sonarqube plugin in anypoint
Install sonarqube plugin in anypoint Install sonarqube plugin in anypoint
Install sonarqube plugin in anypoint
 
Mapping and listing in mule
Mapping and listing in muleMapping and listing in mule
Mapping and listing in mule
 
Choice component in mule
Choice component in muleChoice component in mule
Choice component in mule
 
How to install sonarqube plugin in anypoint
How to install sonarqube plugin in anypoint How to install sonarqube plugin in anypoint
How to install sonarqube plugin in anypoint
 
Mule management console installation
Mule management console installation Mule management console installation
Mule management console installation
 
Mule esb soap_service
Mule esb soap_serviceMule esb soap_service
Mule esb soap_service
 
How to commit a project in svn using svn plugin in anypointstudio
How to commit a project in svn using svn plugin in anypointstudioHow to commit a project in svn using svn plugin in anypointstudio
How to commit a project in svn using svn plugin in anypointstudio
 
Message properties component in mule
Message properties component in muleMessage properties component in mule
Message properties component in mule
 
Mule soa
Mule soaMule soa
Mule soa
 
Mule jdbc
Mule   jdbcMule   jdbc
Mule jdbc
 
Mule database-connectors
Mule database-connectorsMule database-connectors
Mule database-connectors
 

Similar a For each component in mule

How to use for each component
How to use for each componentHow to use for each component
How to use for each componentmaheshtheapex
 
For each component in mule demo
For each component in mule demoFor each component in mule demo
For each component in mule demoSudha Ch
 
Choice component
Choice component Choice component
Choice component F K
 
How to use choice component
How to use choice componentHow to use choice component
How to use choice componentmaheshtheapex
 
Mule-choice component
Mule-choice componentMule-choice component
Mule-choice componentDivyaSree1391
 
How to use database component using stored procedure call
How to use database component using stored procedure callHow to use database component using stored procedure call
How to use database component using stored procedure callprathyusha vadla
 
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
 
Howtouseforeachcomponent
HowtouseforeachcomponentHowtouseforeachcomponent
Howtouseforeachcomponentakshay yeluru
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties componentmaheshtheapex
 
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
 

Similar a For each component in mule (20)

How to use for each component
How to use for each componentHow to use for each component
How to use for each component
 
For Each Component
For Each ComponentFor Each Component
For Each Component
 
For each component in mule demo
For each component in mule demoFor each component in mule demo
For each component in mule demo
 
Choice component
Choice component Choice component
Choice component
 
Mule Choice component
Mule Choice component Mule Choice component
Mule Choice component
 
Choice component
Choice component Choice component
Choice component
 
How to use choice component
How to use choice componentHow to use choice component
How to use choice component
 
Mule-choice component
Mule-choice componentMule-choice component
Mule-choice component
 
How to use message enricher
How to use message enricherHow to use message enricher
How to use message enricher
 
How to use database component using stored procedure call
How to use database component using stored procedure callHow to use database component using stored procedure call
How to use database component using stored procedure call
 
Message properties component
Message properties component Message properties component
Message properties component
 
Message properties component
Message properties componentMessage properties component
Message properties component
 
Collection aggregator
Collection aggregatorCollection aggregator
Collection aggregator
 
Howtouseforeachcomponent
HowtouseforeachcomponentHowtouseforeachcomponent
Howtouseforeachcomponent
 
How to use Request Reply scope
How to use Request Reply scopeHow to use Request Reply scope
How to use Request Reply scope
 
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
 
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
 

Más de javeed_mhd

File component in mule
File component in muleFile component in mule
File component in mulejaveed_mhd
 
Database component in mule
Database component in muleDatabase component in mule
Database component in mulejaveed_mhd
 
Vm component in mule
Vm component in muleVm component in mule
Vm component in mulejaveed_mhd
 
Until successful component in mule
Until successful component in muleUntil successful component in mule
Until successful component in mulejaveed_mhd
 
Quartz component in mule
Quartz component in muleQuartz component in mule
Quartz component in mulejaveed_mhd
 
Mule esb made system integration easy
Mule esb made system integration easy Mule esb made system integration easy
Mule esb made system integration easy javeed_mhd
 
Junit in mule demo
Junit in mule demo Junit in mule demo
Junit in mule demo javeed_mhd
 
Mapping and listing with mule
Mapping and listing with mule Mapping and listing with mule
Mapping and listing with mule javeed_mhd
 
Mule any point exchange
Mule any point exchangeMule any point exchange
Mule any point exchangejaveed_mhd
 
Mule esb api layer
Mule esb api layer Mule esb api layer
Mule esb api layer javeed_mhd
 
Mule Maven Plugin
Mule Maven PluginMule Maven Plugin
Mule Maven Pluginjaveed_mhd
 
Mule esb stripe
Mule esb stripeMule esb stripe
Mule esb stripejaveed_mhd
 
Mule with stored procedure
Mule with stored procedureMule with stored procedure
Mule with stored procedurejaveed_mhd
 
Deploying and running in mule standalone
Deploying and running in mule standaloneDeploying and running in mule standalone
Deploying and running in mule standalonejaveed_mhd
 
Scatter gather in mule
Scatter gather in muleScatter gather in mule
Scatter gather in mulejaveed_mhd
 
Xml to xml transformation in mule
Xml to xml transformation in muleXml to xml transformation in mule
Xml to xml transformation in mulejaveed_mhd
 
Java programming course for beginners
Java programming course for beginnersJava programming course for beginners
Java programming course for beginnersjaveed_mhd
 

Más de javeed_mhd (20)

File component in mule
File component in muleFile component in mule
File component in mule
 
Database component in mule
Database component in muleDatabase component in mule
Database component in mule
 
Vm component in mule
Vm component in muleVm component in mule
Vm component in mule
 
Until successful component in mule
Until successful component in muleUntil successful component in mule
Until successful component in mule
 
Quartz component in mule
Quartz component in muleQuartz component in mule
Quartz component in mule
 
Mule esb made system integration easy
Mule esb made system integration easy Mule esb made system integration easy
Mule esb made system integration easy
 
Junit in mule demo
Junit in mule demo Junit in mule demo
Junit in mule demo
 
Mapping and listing with mule
Mapping and listing with mule Mapping and listing with mule
Mapping and listing with mule
 
Mule any point exchange
Mule any point exchangeMule any point exchange
Mule any point exchange
 
Mule esb api layer
Mule esb api layer Mule esb api layer
Mule esb api layer
 
Mule Maven Plugin
Mule Maven PluginMule Maven Plugin
Mule Maven Plugin
 
Mule esb stripe
Mule esb stripeMule esb stripe
Mule esb stripe
 
Mule with stored procedure
Mule with stored procedureMule with stored procedure
Mule with stored procedure
 
Deploying and running in mule standalone
Deploying and running in mule standaloneDeploying and running in mule standalone
Deploying and running in mule standalone
 
Presentation
PresentationPresentation
Presentation
 
Scatter gather in mule
Scatter gather in muleScatter gather in mule
Scatter gather in mule
 
Xml to xml transformation in mule
Xml to xml transformation in muleXml to xml transformation in mule
Xml to xml transformation in mule
 
Maven
MavenMaven
Maven
 
Java programming course for beginners
Java programming course for beginnersJava programming course for beginners
Java programming course for beginners
 
Java
JavaJava
Java
 

Último

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 

Último (20)

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 

For each component in mule

  • 1. For Each Component In Mule Demo
  • 2. Abstract • The main motto of this PPT is how to use For Each component in our applications.
  • 3. Introduction • The Foreach scope splits a collection into elements and processes them iteratively through the processors embedded in the scope, then returns the original message to the flow.
  • 5. • .mflow<?xml version="1.0" encoding="UTF-8"?> • <mule xmlns:jdbc-ee="http://www.mulesoft.org/schema/mule/ee/jdbc" 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 • http://www.mulesoft.org/schema/mule/ee/jdbc http://www.mulesoft.org/schema/mule/ee/jdbc/current/mule-jdbc-ee.xsd"> • <jdbc-ee:mssql-data-source name="MS_SQL_Data_Source" user=“****" password=“****" url="jdbc:sqlserver://localhost;databaseName=test1" transactionIsolation="UNSPECIFIED" doc:name="MS SQL Data Source"/> • <jdbc-ee:connector name="Database" dataSource-ref="MS_SQL_Data_Source" validateConnections="true" queryTimeout="-1" pollingFrequency="0" doc:name="Database"/> • <flow name="Database_ComponentFlow1" doc:name="Database_ComponentFlow1"> • <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8087" path="database" doc:name="HTTP"/> • <logger message="--main flow--" level="INFO" doc:name="Logger"/> • <jdbc-ee:outbound-endpoint exchange-pattern="request-response" queryKey="select" queryTimeout="-1" connector- ref="Database" doc:name="Database"> • <jdbc-ee:query key="select" value="select * from mytable"/> • </jdbc-ee:outbound-endpoint> • <foreach collection="#[payload]" doc:name="For Each"> • <logger message="--In foreach loop" level="INFO" doc:name="Logger"/> • <logger message="--Result--#[payload]" level="INFO" doc:name="Logger"/> • </foreach> • </flow> • </mule>
  • 6. • Output:INFO 2015-10-03 17:50:45,299 [main] org.mule.DefaultMuleContext: • ********************************************************************** • * Application: Database Component * • * OS encoding: Cp1252, Mule encoding: UTF-8 * • * * • * Agents Running: * • * Clustering Agent * • * JMX Agent * • ********************************************************************** • INFO 2015-10-03 17:50:45,300 [main] org.mule.module.launcher.MuleDeploymentService: • ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ • + Started app 'Database Component' + • ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ • INFO 2015-10-03 17:50:52,770 [[Database Component].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: - -main flow-- • INFO 2015-10-03 17:50:52,778 [[Database Component].connector.http.mule.default.receiver.02] org.mule.lifecycle.AbstractLifecycleManager: Initialising: 'Database.dispatcher.424429501'. Object is: EEJdbcMessageDispatcher • INFO 2015-10-03 17:50:52,779 [[Database Component].connector.http.mule.default.receiver.02] org.mule.lifecycle.AbstractLifecycleManager: Starting: 'Database.dispatcher.424429501'. Object is: EEJdbcMessageDispatcher • INFO 2015-10-03 17:50:53,042 [[Database Component].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: - -In foreach loop • INFO 2015-10-03 17:50:53,046 [[Database Component].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: - -Result--{subj=Hindi, marks=55, name=Ramesh, id=1} • INFO 2015-10-03 17:50:53,047 [[Database Component].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: - -In foreach loop • INFO 2015-10-03 17:50:53,049 [[Database Component].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: - -Result--{subj=English, marks=65, name=Mahesh, id=2} • INFO 2015-10-03 17:50:53,050 [[Database Component].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: - -In foreach loop • INFO 2015-10-03 17:50:53,052 [[Database Component].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: - -Result--{subj=science, marks=75, name=Pavan, id=3} • INFO 2015-10-03 17:50:53,053 [[Database Component].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: - -In foreach loop • INFO 2015-10-03 17:50:53,056 [[Database Component].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: - -Result--{subj=social, marks=45, name=Siva, id=4}
  • 7. • Flow of execution: 1. URL to trigger the service from browser http://localhost:8087/foreach 2. Database component connects to the specific database, executes the select query and prints the result (one by one) using for each component