SlideShare a Scribd company logo
1 of 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

More Related Content

What's hot

Microservice Teststrategie mit Symfony2
Microservice Teststrategie mit Symfony2Microservice Teststrategie mit Symfony2
Microservice Teststrategie mit Symfony2Per Bernhardt
 
Kubernetes: Wie Chefkoch.de mit Containern arbeitet
Kubernetes: Wie Chefkoch.de mit Containern arbeitetKubernetes: Wie Chefkoch.de mit Containern arbeitet
Kubernetes: Wie Chefkoch.de mit Containern arbeitetPer Bernhardt
 
What mom never told you about bundle configurations - Symfony Live Paris 2012
What mom never told you about bundle configurations - Symfony Live Paris 2012What mom never told you about bundle configurations - Symfony Live Paris 2012
What mom never told you about bundle configurations - Symfony Live Paris 2012D
 
How to use quartz component
How to use quartz componentHow to use quartz component
How to use quartz componentmaheshtheapex
 
Compress and decompress
Compress and decompressCompress and decompress
Compress and decompressSon Nguyen
 
#30.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...
#30.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...#30.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...
#30.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...탑크리에듀(구로디지털단지역3번출구 2분거리)
 
Spring Boot Actuator
Spring Boot ActuatorSpring Boot Actuator
Spring Boot ActuatorRowell Belen
 
What happens in laravel 4 bootstraping
What happens in laravel 4 bootstrapingWhat happens in laravel 4 bootstraping
What happens in laravel 4 bootstrapingJace Ju
 
Spring Boot and REST API
Spring Boot and REST APISpring Boot and REST API
Spring Boot and REST API07.pallav
 
Running PHP on a Java container
Running PHP on a Java containerRunning PHP on a Java container
Running PHP on a Java containernetinhoteixeira
 
Deploy Rails Application by Capistrano
Deploy Rails Application by CapistranoDeploy Rails Application by Capistrano
Deploy Rails Application by CapistranoTasawr Interactive
 
RESTful Web Services in Drupal7
RESTful Web Services in Drupal7RESTful Web Services in Drupal7
RESTful Web Services in Drupal7bmeme
 
Log grid root
Log grid rootLog grid root
Log grid rootopenmi
 
Zend - Installation And Sample Project Creation
Zend - Installation And Sample Project Creation Zend - Installation And Sample Project Creation
Zend - Installation And Sample Project Creation Compare Infobase Limited
 
Dance for the puppet master: G6 Tech Talk
Dance for the puppet master: G6 Tech TalkDance for the puppet master: G6 Tech Talk
Dance for the puppet master: G6 Tech TalkMichael Peacock
 
Edge Side Include Injection: Abusing Caching Servers into SSRF and Transparen...
Edge Side Include Injection: Abusing Caching Servers into SSRF and Transparen...Edge Side Include Injection: Abusing Caching Servers into SSRF and Transparen...
Edge Side Include Injection: Abusing Caching Servers into SSRF and Transparen...Priyanka Aash
 
Flask - Backend com Python - Semcomp 18
Flask - Backend com Python - Semcomp 18Flask - Backend com Python - Semcomp 18
Flask - Backend com Python - Semcomp 18Lar21
 

What's hot (19)

Microservice Teststrategie mit Symfony2
Microservice Teststrategie mit Symfony2Microservice Teststrategie mit Symfony2
Microservice Teststrategie mit Symfony2
 
Kubernetes: Wie Chefkoch.de mit Containern arbeitet
Kubernetes: Wie Chefkoch.de mit Containern arbeitetKubernetes: Wie Chefkoch.de mit Containern arbeitet
Kubernetes: Wie Chefkoch.de mit Containern arbeitet
 
What mom never told you about bundle configurations - Symfony Live Paris 2012
What mom never told you about bundle configurations - Symfony Live Paris 2012What mom never told you about bundle configurations - Symfony Live Paris 2012
What mom never told you about bundle configurations - Symfony Live Paris 2012
 
How to use quartz component
How to use quartz componentHow to use quartz component
How to use quartz component
 
Compress and decompress
Compress and decompressCompress and decompress
Compress and decompress
 
#30.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...
#30.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...#30.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...
#30.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...
 
Spring Boot Actuator
Spring Boot ActuatorSpring Boot Actuator
Spring Boot Actuator
 
What happens in laravel 4 bootstraping
What happens in laravel 4 bootstrapingWhat happens in laravel 4 bootstraping
What happens in laravel 4 bootstraping
 
Spring Boot and REST API
Spring Boot and REST APISpring Boot and REST API
Spring Boot and REST API
 
Running PHP on a Java container
Running PHP on a Java containerRunning PHP on a Java container
Running PHP on a Java container
 
Catalyst MVC
Catalyst MVCCatalyst MVC
Catalyst MVC
 
Deploy Rails Application by Capistrano
Deploy Rails Application by CapistranoDeploy Rails Application by Capistrano
Deploy Rails Application by Capistrano
 
RESTful Web Services in Drupal7
RESTful Web Services in Drupal7RESTful Web Services in Drupal7
RESTful Web Services in Drupal7
 
Log grid root
Log grid rootLog grid root
Log grid root
 
Zend - Installation And Sample Project Creation
Zend - Installation And Sample Project Creation Zend - Installation And Sample Project Creation
Zend - Installation And Sample Project Creation
 
Dance for the puppet master: G6 Tech Talk
Dance for the puppet master: G6 Tech TalkDance for the puppet master: G6 Tech Talk
Dance for the puppet master: G6 Tech Talk
 
Edge Side Include Injection: Abusing Caching Servers into SSRF and Transparen...
Edge Side Include Injection: Abusing Caching Servers into SSRF and Transparen...Edge Side Include Injection: Abusing Caching Servers into SSRF and Transparen...
Edge Side Include Injection: Abusing Caching Servers into SSRF and Transparen...
 
Flask - Backend com Python - Semcomp 18
Flask - Backend com Python - Semcomp 18Flask - Backend com Python - Semcomp 18
Flask - Backend com Python - Semcomp 18
 
Phinx talk
Phinx talkPhinx talk
Phinx talk
 

Viewers also liked

Ton van der Greef - Exponentieel Groeien
Ton van der Greef - Exponentieel GroeienTon van der Greef - Exponentieel Groeien
Ton van der Greef - Exponentieel GroeienWOW! Het kan anders
 
Securis Sales Presentation-Policy Items for Al
Securis Sales Presentation-Policy Items for AlSecuris Sales Presentation-Policy Items for Al
Securis Sales Presentation-Policy Items for AlEvans Penny
 
René Jansen - "Samenwerken: verstoppen of versterken?"
René Jansen - "Samenwerken: verstoppen of versterken?"René Jansen - "Samenwerken: verstoppen of versterken?"
René Jansen - "Samenwerken: verstoppen of versterken?"WOW! Het kan anders
 
Jos Breas - Nooit meer reorganiseren
Jos Breas - Nooit meer reorganiseren Jos Breas - Nooit meer reorganiseren
Jos Breas - Nooit meer reorganiseren WOW! Het kan anders
 
Web services Overview in depth
Web services Overview in depthWeb services Overview in depth
Web services Overview in depthAbdulImrankhan7
 
Malik Safdar saharan marketing plan
Malik Safdar saharan marketing planMalik Safdar saharan marketing plan
Malik Safdar saharan marketing planmalik safdar
 
Patrick Davidson & Hans van der Loo - Maak van je team een powerhouse
Patrick Davidson & Hans van der Loo - Maak van je team een powerhousePatrick Davidson & Hans van der Loo - Maak van je team een powerhouse
Patrick Davidson & Hans van der Loo - Maak van je team een powerhouseWOW! Het kan anders
 
Burj al arab by oubaid majeed
Burj al arab by oubaid majeed Burj al arab by oubaid majeed
Burj al arab by oubaid majeed junaid bashir
 
2016 Update on sustainability in project management by Gilbert Silvius
2016 Update on sustainability in project management by Gilbert Silvius2016 Update on sustainability in project management by Gilbert Silvius
2016 Update on sustainability in project management by Gilbert SilviusGilbert Silvius
 

Viewers also liked (13)

SABINA ZVINYATSKY-2015
SABINA ZVINYATSKY-2015SABINA ZVINYATSKY-2015
SABINA ZVINYATSKY-2015
 
robertcantrall
robertcantrallrobertcantrall
robertcantrall
 
ABSTRACT_EN
ABSTRACT_ENABSTRACT_EN
ABSTRACT_EN
 
Ton van der Greef - Exponentieel Groeien
Ton van der Greef - Exponentieel GroeienTon van der Greef - Exponentieel Groeien
Ton van der Greef - Exponentieel Groeien
 
Securis Sales Presentation-Policy Items for Al
Securis Sales Presentation-Policy Items for AlSecuris Sales Presentation-Policy Items for Al
Securis Sales Presentation-Policy Items for Al
 
René Jansen - "Samenwerken: verstoppen of versterken?"
René Jansen - "Samenwerken: verstoppen of versterken?"René Jansen - "Samenwerken: verstoppen of versterken?"
René Jansen - "Samenwerken: verstoppen of versterken?"
 
Doc1
Doc1Doc1
Doc1
 
Jos Breas - Nooit meer reorganiseren
Jos Breas - Nooit meer reorganiseren Jos Breas - Nooit meer reorganiseren
Jos Breas - Nooit meer reorganiseren
 
Web services Overview in depth
Web services Overview in depthWeb services Overview in depth
Web services Overview in depth
 
Malik Safdar saharan marketing plan
Malik Safdar saharan marketing planMalik Safdar saharan marketing plan
Malik Safdar saharan marketing plan
 
Patrick Davidson & Hans van der Loo - Maak van je team een powerhouse
Patrick Davidson & Hans van der Loo - Maak van je team een powerhousePatrick Davidson & Hans van der Loo - Maak van je team een powerhouse
Patrick Davidson & Hans van der Loo - Maak van je team een powerhouse
 
Burj al arab by oubaid majeed
Burj al arab by oubaid majeed Burj al arab by oubaid majeed
Burj al arab by oubaid majeed
 
2016 Update on sustainability in project management by Gilbert Silvius
2016 Update on sustainability in project management by Gilbert Silvius2016 Update on sustainability in project management by Gilbert Silvius
2016 Update on sustainability in project management by Gilbert Silvius
 

Similar to 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 demoSudha Ch
 
Choice component
Choice component Choice component
Choice component F K
 
Choice component in mule
Choice component in muleChoice component in mule
Choice component in mulejaveed_mhd
 
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
 
Message properties component in mule
Message properties component in muleMessage properties component in mule
Message properties component in mulejaveed_mhd
 
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
 

Similar to For each component (20)

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
 
Choice component in mule
Choice component in muleChoice component in mule
Choice component in mule
 
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
 
Message properties component in mule
Message properties component in muleMessage properties component in mule
Message properties component in mule
 
Mule Message Properties Component
Mule Message Properties ComponentMule Message Properties Component
Mule 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
 

More from AbdulImrankhan7

More from AbdulImrankhan7 (20)

Install sonarqube plugin
Install sonarqube plugin Install sonarqube plugin
Install sonarqube plugin
 
Junit in mule
Junit in muleJunit in mule
Junit in mule
 
commit a project in svn
commit a project in svncommit a project in svn
commit a project in svn
 
Github plugin setup in anypoint studio
Github plugin setup in anypoint studio Github plugin setup in anypoint studio
Github plugin setup in anypoint studio
 
Filter expression
Filter expressionFilter expression
Filter expression
 
Mule File component
Mule File component Mule File component
Mule File component
 
Mule Database component
Mule Database component Mule Database component
Mule Database component
 
Mule stored procedure
Mule stored procedureMule stored procedure
Mule 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
 
Mule real-world
Mule real-worldMule real-world
Mule real-world
 
Mule Overview
Mule OverviewMule Overview
Mule Overview
 
Webservice with vm in mule
Webservice with vm in muleWebservice with vm in mule
Webservice with vm in mule
 
Validating a soap request in mule
Validating a soap request in mule Validating a soap request in mule
Validating a soap request in mule
 
Using xslt in mule
Using xslt in mule Using xslt in mule
Using xslt in mule
 
Simple groovy example in mule
Simple groovy example in muleSimple groovy example in mule
Simple groovy example in mule
 
Scatter gather flow control
Scatter gather flow control Scatter gather flow control
Scatter gather flow control
 
Mule with velocity
Mule with velocity Mule with velocity
Mule with velocity
 
Mule with rabbit mq
Mule with rabbit mqMule with rabbit mq
Mule with rabbit mq
 
Mule with quartz
Mule with quartz Mule with quartz
Mule with quartz
 
Mule with drools
Mule with drools Mule with drools
Mule with drools
 

Recently uploaded

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
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
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
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
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
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
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
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
 
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
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
🐬 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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 

Recently uploaded (20)

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
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
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
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...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 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...
 
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
 
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...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 

For each component

  • 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