SlideShare a Scribd company logo
 Batch component is used to process huge messages in batches. In
batch we have 3 phases.
1. Input
2. Process Records
3. On complete
Input:
Input phase is used to prepare a collection object with input
message. Because process records phase expects a collection object.
Process Records:
 Process Record phase expects a collection object to process the
each record of collection in individually and parallel. Here each object
of collection is a record.
On Complete:
 On complete phase is used to summarize the flow. Following
variables are available in On Complete phase to get the status of flow.
• Count of Successful records
• Count of Failure records
• Count of total records.
Example:
 In the following example, it explains how to transform CSV to XML using
batch. This example exposes a HTTP rest service.
 In the main flow input csv file path sets to payload and refer to a batch
job.
 In Input phase, an expression component is used to read file
(src/main/resources/input.csv) data. This expression component refers
to a file (src/main/resources/ReadFile.txt) which has code to read file
data. Another expression component has below expression to create a
collection object.
 payload = new com.techm.common.util.LineIterator(payload);
 LineIterator is our custom class which implements Iterator Interface to
implement collection object. Below is code of LineIterator class.
Note : Java Code Continuation from line 31 on next slide.
 In Process Records phase, we have two batch steps to transform
payload from csv to xml using datamapper and write the xml data into
a file. Second batch step contains batch commit. The message
processors which are in batch commit scope get execute depends of
size of batch commit.
 <batch:commit size="5" doc:name="Batch Commit">
 This batch commit get executed for every 5 records as configured.
 On Complete phase has one logger component which logs
successful, failure and total no of records.
 Note : SOAP UI project to test this application is placed in
src/test/resources.
Thank You All

More Related Content

What's hot

Mule ESB - Mock Salesforce Interface
Mule ESB - Mock Salesforce InterfaceMule ESB - Mock Salesforce Interface
Mule ESB - Mock Salesforce Interface
krishananth
 
Junit in mule demo
Junit in mule demo Junit in mule demo
Junit in mule demo
javeed_mhd
 
Mule testing
Mule   testingMule   testing
Mule testing
Sindhu VL
 
Mule - logger
Mule -  loggerMule -  logger
Mule - logger
Ankush Sharma
 
Mule dataweave
Mule dataweaveMule dataweave
Mule dataweave
Son Nguyen
 
Using message enricher
Using message enricherUsing message enricher
Using message enricher
Son Nguyen
 
Xslt in mule
Xslt in muleXslt in mule
Xslt in mule
Mohammed246
 
Mule Esb Data Weave
Mule Esb Data WeaveMule Esb Data Weave
Mule Esb Data Weave
Mohammed246
 
Mule enricher
Mule enricher Mule enricher
Mule enricher
Karnam Karthik
 
Using spring task scheduler in java in mule
Using spring task scheduler in java in muleUsing spring task scheduler in java in mule
Using spring task scheduler in java in mule
Anirban Sen Chowdhary
 
Mule debugging
Mule   debuggingMule   debugging
Mule debugging
Sindhu VL
 
Mule system properties
Mule system propertiesMule system properties
Mule system properties
Ravinder Singh
 
Splitting with mule part2
Splitting with mule part2Splitting with mule part2
Splitting with mule part2
Anirban Sen Chowdhary
 
Mule introduction
Mule introductionMule introduction
Mule introduction
Satya Sekhar Das Mandal
 
Mule esb How to convert from CSV to Json in 5 minutes
Mule esb How to convert from CSV to Json in 5 minutesMule esb How to convert from CSV to Json in 5 minutes
Mule esb How to convert from CSV to Json in 5 minutes
Gennaro Spagnoli
 
Filter expression in mule
Filter expression in muleFilter expression in mule
Filter expression in mule
Rajkattamuri
 
Mule Ajax Connector
Mule Ajax ConnectorMule Ajax Connector
Mule Ajax Connector
Ankush Sharma
 
For each component in mule
For each component in muleFor each component in mule
For each component in mule
Rajkattamuri
 

What's hot (18)

Mule ESB - Mock Salesforce Interface
Mule ESB - Mock Salesforce InterfaceMule ESB - Mock Salesforce Interface
Mule ESB - Mock Salesforce Interface
 
Junit in mule demo
Junit in mule demo Junit in mule demo
Junit in mule demo
 
Mule testing
Mule   testingMule   testing
Mule testing
 
Mule - logger
Mule -  loggerMule -  logger
Mule - logger
 
Mule dataweave
Mule dataweaveMule dataweave
Mule dataweave
 
Using message enricher
Using message enricherUsing message enricher
Using message enricher
 
Xslt in mule
Xslt in muleXslt in mule
Xslt in mule
 
Mule Esb Data Weave
Mule Esb Data WeaveMule Esb Data Weave
Mule Esb Data Weave
 
Mule enricher
Mule enricher Mule enricher
Mule enricher
 
Using spring task scheduler in java in mule
Using spring task scheduler in java in muleUsing spring task scheduler in java in mule
Using spring task scheduler in java in mule
 
Mule debugging
Mule   debuggingMule   debugging
Mule debugging
 
Mule system properties
Mule system propertiesMule system properties
Mule system properties
 
Splitting with mule part2
Splitting with mule part2Splitting with mule part2
Splitting with mule part2
 
Mule introduction
Mule introductionMule introduction
Mule introduction
 
Mule esb How to convert from CSV to Json in 5 minutes
Mule esb How to convert from CSV to Json in 5 minutesMule esb How to convert from CSV to Json in 5 minutes
Mule esb How to convert from CSV to Json in 5 minutes
 
Filter expression in mule
Filter expression in muleFilter expression in mule
Filter expression in mule
 
Mule Ajax Connector
Mule Ajax ConnectorMule Ajax Connector
Mule Ajax Connector
 
For each component in mule
For each component in muleFor each component in mule
For each component in mule
 

Viewers also liked

Mule batch job
Mule batch jobMule batch job
Mule batch job
Anirban Sen Chowdhary
 
Mule properties
Mule propertiesMule properties
Mule properties
Ravinder Singh
 
Dataweave 160103180124
Dataweave 160103180124Dataweave 160103180124
Dataweave 160103180124
vijay dhanakodi
 
Mule using Salesforce
Mule using SalesforceMule using Salesforce
Mule using Salesforce
Khasim Cise
 
Automatic documentation with mule
Automatic documentation with muleAutomatic documentation with mule
Automatic documentation with mule
F K
 
Mule esb How to convert from Object to Json in 5 minutes
Mule esb How to convert from Object to Json in 5 minutesMule esb How to convert from Object to Json in 5 minutes
Mule esb How to convert from Object to Json in 5 minutes
Gennaro Spagnoli
 
Simple Poll in Mule
Simple Poll in MuleSimple Poll in Mule
Simple Poll in Mule
Christian Hipolito
 
Cloudhub deployment
Cloudhub deploymentCloudhub deployment
Cloudhub deployment
D.Rajesh Kumar
 
Cloudhub – architecture
Cloudhub – architectureCloudhub – architecture
Cloudhub – architecture
D.Rajesh Kumar
 
Spring Boot Update
Spring Boot UpdateSpring Boot Update
Spring Boot Update
Sergi Almar i Graupera
 
Mule ESB Training
Mule ESB TrainingMule ESB Training
Mule ESB Training
Attune University
 
Mule ESB Tutorial Part 2
Mule ESB Tutorial Part 2Mule ESB Tutorial Part 2
Mule ESB Tutorial Part 2Srikanth N
 
Mule - error handling
Mule - error handling Mule - error handling
Mule - error handling
Sindhu VL
 
Mulesoft ppt
Mulesoft pptMulesoft ppt
Mulesoft ppt
Achyuta Lakshmi
 
Mule ESB Tutorial Part 1
Mule ESB Tutorial Part 1Mule ESB Tutorial Part 1
Mule ESB Tutorial Part 1
Srikanth N
 
Mule ESB Fundamentals
Mule ESB FundamentalsMule ESB Fundamentals
Mule ESB Fundamentals
Naresh Chintalcheru
 
Mule ESB - Integration Simplified
Mule ESB - Integration SimplifiedMule ESB - Integration Simplified
Mule ESB - Integration Simplified
Rich Software
 

Viewers also liked (17)

Mule batch job
Mule batch jobMule batch job
Mule batch job
 
Mule properties
Mule propertiesMule properties
Mule properties
 
Dataweave 160103180124
Dataweave 160103180124Dataweave 160103180124
Dataweave 160103180124
 
Mule using Salesforce
Mule using SalesforceMule using Salesforce
Mule using Salesforce
 
Automatic documentation with mule
Automatic documentation with muleAutomatic documentation with mule
Automatic documentation with mule
 
Mule esb How to convert from Object to Json in 5 minutes
Mule esb How to convert from Object to Json in 5 minutesMule esb How to convert from Object to Json in 5 minutes
Mule esb How to convert from Object to Json in 5 minutes
 
Simple Poll in Mule
Simple Poll in MuleSimple Poll in Mule
Simple Poll in Mule
 
Cloudhub deployment
Cloudhub deploymentCloudhub deployment
Cloudhub deployment
 
Cloudhub – architecture
Cloudhub – architectureCloudhub – architecture
Cloudhub – architecture
 
Spring Boot Update
Spring Boot UpdateSpring Boot Update
Spring Boot Update
 
Mule ESB Training
Mule ESB TrainingMule ESB Training
Mule ESB Training
 
Mule ESB Tutorial Part 2
Mule ESB Tutorial Part 2Mule ESB Tutorial Part 2
Mule ESB Tutorial Part 2
 
Mule - error handling
Mule - error handling Mule - error handling
Mule - error handling
 
Mulesoft ppt
Mulesoft pptMulesoft ppt
Mulesoft ppt
 
Mule ESB Tutorial Part 1
Mule ESB Tutorial Part 1Mule ESB Tutorial Part 1
Mule ESB Tutorial Part 1
 
Mule ESB Fundamentals
Mule ESB FundamentalsMule ESB Fundamentals
Mule ESB Fundamentals
 
Mule ESB - Integration Simplified
Mule ESB - Integration SimplifiedMule ESB - Integration Simplified
Mule ESB - Integration Simplified
 

Similar to Mule batch processing

Mulebatch
MulebatchMulebatch
Mulebatch
shakeela shaik
 
Mule batch
Mule batchMule batch
Mule batch
Gandham38
 
M batching
M batchingM batching
M batching
Vasanthii Chowdary
 
Mule batch
Mule batchMule batch
Mule batch
Karnam Karthik
 
Mule batch introduction
Mule batch introductionMule batch introduction
Mule batch introduction
Son Nguyen
 
Batch processing
Batch processingBatch processing
Batch processing
Harish43
 
Batch processing
Batch processingBatch processing
Batch processing
Harish43
 
Batch processing
Batch processingBatch processing
Batch processing
bapiraju
 
Introduction to transaction processing concepts and theory
Introduction to transaction processing concepts and theoryIntroduction to transaction processing concepts and theory
Introduction to transaction processing concepts and theory
Zainab Almugbel
 
What is COTI?
What is COTI? What is COTI?
What is COTI?
Ovidius GmbH
 
Build process ppt.pptx
Build process ppt.pptxBuild process ppt.pptx
Build process ppt.pptx
SHIVANISRECECE
 
Synchronization
SynchronizationSynchronization
Synchronization
misra121
 
My ppt hpc u4
My ppt hpc u4My ppt hpc u4
How to Integrate Internet of Things with Webserver with
How to Integrate Internet of Things with Webserver with How to Integrate Internet of Things with Webserver with
How to Integrate Internet of Things with Webserver with
Ionela
 
Monit
MonitMonit

Similar to Mule batch processing (20)

Mulebatch
MulebatchMulebatch
Mulebatch
 
Mule batch
Mule batchMule batch
Mule batch
 
M batching
M batchingM batching
M batching
 
Mule batch
Mule batchMule batch
Mule batch
 
Mule batch introduction
Mule batch introductionMule batch introduction
Mule batch introduction
 
Batch processing
Batch processingBatch processing
Batch processing
 
Batch processing
Batch processingBatch processing
Batch processing
 
Batch processing
Batch processingBatch processing
Batch processing
 
Introduction to transaction processing concepts and theory
Introduction to transaction processing concepts and theoryIntroduction to transaction processing concepts and theory
Introduction to transaction processing concepts and theory
 
What is COTI?
What is COTI? What is COTI?
What is COTI?
 
Build process ppt.pptx
Build process ppt.pptxBuild process ppt.pptx
Build process ppt.pptx
 
Synchronization
SynchronizationSynchronization
Synchronization
 
My ppt hpc u4
My ppt hpc u4My ppt hpc u4
My ppt hpc u4
 
How to Integrate Internet of Things with Webserver with
How to Integrate Internet of Things with Webserver with How to Integrate Internet of Things with Webserver with
How to Integrate Internet of Things with Webserver with
 
Monit
MonitMonit
Monit
 
Toby3
Toby3Toby3
Toby3
 
xxxx
xxxxxxxx
xxxx
 
yyyyxxxdd
yyyyxxxddyyyyxxxdd
yyyyxxxdd
 
new title
new titlenew title
new title
 
yyyyxxx
yyyyxxxyyyyxxx
yyyyxxx
 

More from Ravinder Singh

Mule in a nutshell
Mule in a nutshellMule in a nutshell
Mule in a nutshell
Ravinder Singh
 
Mule java part-4
Mule java part-4Mule java part-4
Mule java part-4
Ravinder Singh
 
Mule java part-3
Mule java part-3Mule java part-3
Mule java part-3
Ravinder Singh
 
Mule java part-2
Mule java part-2Mule java part-2
Mule java part-2
Ravinder Singh
 
Mule java part-1
Mule java part-1Mule java part-1
Mule java part-1
Ravinder Singh
 
Mule enricher
Mule enricher Mule enricher
Mule enricher
Ravinder Singh
 
Mule splitters
Mule splittersMule splitters
Mule splitters
Ravinder Singh
 
Mule expression
Mule expressionMule expression
Mule expression
Ravinder Singh
 
Jms topics
Jms topicsJms topics
Jms topics
Ravinder Singh
 

More from Ravinder Singh (9)

Mule in a nutshell
Mule in a nutshellMule in a nutshell
Mule in a nutshell
 
Mule java part-4
Mule java part-4Mule java part-4
Mule java part-4
 
Mule java part-3
Mule java part-3Mule java part-3
Mule java part-3
 
Mule java part-2
Mule java part-2Mule java part-2
Mule java part-2
 
Mule java part-1
Mule java part-1Mule java part-1
Mule java part-1
 
Mule enricher
Mule enricher Mule enricher
Mule enricher
 
Mule splitters
Mule splittersMule splitters
Mule splitters
 
Mule expression
Mule expressionMule expression
Mule expression
 
Jms topics
Jms topicsJms topics
Jms topics
 

Recently uploaded

1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 

Recently uploaded (20)

1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 

Mule batch processing

  • 1.
  • 2.  Batch component is used to process huge messages in batches. In batch we have 3 phases. 1. Input 2. Process Records 3. On complete Input: Input phase is used to prepare a collection object with input message. Because process records phase expects a collection object.
  • 3. Process Records:  Process Record phase expects a collection object to process the each record of collection in individually and parallel. Here each object of collection is a record. On Complete:  On complete phase is used to summarize the flow. Following variables are available in On Complete phase to get the status of flow. • Count of Successful records • Count of Failure records • Count of total records.
  • 4. Example:  In the following example, it explains how to transform CSV to XML using batch. This example exposes a HTTP rest service.
  • 5.  In the main flow input csv file path sets to payload and refer to a batch job.
  • 6.  In Input phase, an expression component is used to read file (src/main/resources/input.csv) data. This expression component refers to a file (src/main/resources/ReadFile.txt) which has code to read file data. Another expression component has below expression to create a collection object.  payload = new com.techm.common.util.LineIterator(payload);  LineIterator is our custom class which implements Iterator Interface to implement collection object. Below is code of LineIterator class.
  • 7. Note : Java Code Continuation from line 31 on next slide.
  • 8.
  • 9.  In Process Records phase, we have two batch steps to transform payload from csv to xml using datamapper and write the xml data into a file. Second batch step contains batch commit. The message processors which are in batch commit scope get execute depends of size of batch commit.  <batch:commit size="5" doc:name="Batch Commit">  This batch commit get executed for every 5 records as configured.  On Complete phase has one logger component which logs successful, failure and total no of records.  Note : SOAP UI project to test this application is placed in src/test/resources.