SlideShare ist ein Scribd-Unternehmen logo
1 von 14
How to use Batch component
28-05-2015
Abstract
• The main motto of this PPT is How to use
Batch component in our applications.
Introduction
• Mule possesses the ability to process messages
in batches. Within an application, you can initiate
a batch job which is a block of code that splits
messages into individual records, performs
actions upon each record, then reports on the
results and potentially pushes the processed
output to other systems or queues. This
functionality is particularly useful when working
with streaming input or when engineering "near
real-time" data integration between SaaS
applications.
Example
.mflow
• <?xml version="1.0" encoding="UTF-8"?>
• <mule xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:db="http://www.mulesoft.org/schema/mule/db"
xmlns:batch="http://www.mulesoft.org/schema/mule/batch" 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"
• 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/batch http://www.mulesoft.org/schema/mule/batch/current/mule-batch.xsd
• http://www.mulesoft.org/schema/mule/db http://www.mulesoft.org/schema/mule/db/current/mule-db.xsd
• http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd">
• <http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8089" doc:name="HTTP Listener Configuration"/>
• <db:generic-config name="Generic_Database_Configuration" url="jdbc:sqlserver://localhost:1433;databaseName=SOA_VMES_DB;user=****;password=****;"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" doc:name="Generic Database Configuration"/>
• <batch:job name="SampleBatch" max-failed-records="-1">
• <batch:process-records>
• <batch:step name="Batch_Step">
• <logger message="--Batch step--#[payload]--" level="INFO" doc:name="Logger"/>
• <foreach doc:name="For Each">
• <logger message="--for each--batch step--#[payload]" level="INFO" doc:name="Logger"/>
• <choice doc:name="Choice">
• <when expression="#[payload==5]">
• <db:update config-ref="Generic_Database_Configuration" doc:name="Database">
• <db:parameterized-query><![CDATA[update mytable22 set status='successsuccesssuccesssuccesssuccesssuccess' where num=#[payload]]]></db:parameterized-query>
• </db:update>
• </when>
• <otherwise>
• <db:update config-ref="Generic_Database_Configuration" doc:name="Database">
• <db:parameterized-query><![CDATA[update mytable22 set status='Success' where num=#[payload]]]></db:parameterized-query>
• </db:update>
• </otherwise>
• </choice>
• </foreach>
• </batch:step>
• <batch:step name="Batch_Step1" accept-policy="ONLY_FAILURES">
• <logger message="--step1--#[payload]" level="INFO" doc:name="Logger"/>
• <foreach doc:name="For Each">
• <logger message="--for each--batch step1--#[payload]--" level="INFO" doc:name="Logger"/>
• <db:update config-ref="Generic_Database_Configuration" doc:name="Database">
• <db:parameterized-query><![CDATA[update mytable22 set status='batch fail' where num=#[payload]]]></db:parameterized-query>
• </db:update>
• </foreach>
• </batch:step>
• </batch:process-records>
• <batch:on-complete>
• <logger message="--complete--#[message.payload]" level="INFO" doc:name="Logger"/>
• </batch:on-complete>
• </batch:job>
• <flow name="SampleFlow">
• <http:listener config-ref="HTTP_Listener_Configuration" path="/*" doc:name="HTTP"/>
• <logger level="INFO" doc:name="Logger" message="--Hai"/>
• <expression-component doc:name="Expression"><![CDATA[import java.util.List;
• import java.util.Map;
• import java.util.ArrayList;
• import java.util.HashMap;
• List l1 = new ArrayList();
• Map m2 = new HashMap();
• m2.put("b","2");
• m2.put("c","3");
• l1.add(m2);
• Map m1 = new HashMap();
• m1.put("a","1");
• l1.add(m1);
• Map m4 = new HashMap();
• m4.put("e","5");
• l1.add(m4);
• Map m3 = new HashMap();
• m3.put("d","4");
• l1.add(m3);
• payload = l1;
• return payload;]]></expression-component>
• <logger message="--main flow--#[payload]" level="INFO" doc:name="Logger"/>
• <batch:execute name="SampleBatch" doc:name="SampleBatch"/>
• </flow>
• </mule>
• Output:
• Data in DB:
• Before execute:
After execute:
• INFO 2016-05-28 18:51:48,882 [main] org.mule.module.launcher.MuleDeploymentService:
• ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
• + Started app 'Sample' +
• ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
• INFO 2016-05-28 18:51:48,886 [main] org.mule.module.launcher.DeploymentDirectoryWatcher:
• ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
• + Mule is up and kicking (every 5000ms) +
• ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
• INFO 2016-05-28 18:51:49,040 [main] org.mule.module.launcher.StartupSummaryDeploymentListener:
• **********************************************************************
• * - - + DOMAIN + - - * - - + STATUS + - - *
• **********************************************************************
• * default * DEPLOYED *
• **********************************************************************
• *******************************************************************************************************
• * - - + APPLICATION + - - * - - + DOMAIN + - - * - - + STATUS + - - *
• *******************************************************************************************************
• * Sample * default * DEPLOYED *
• *******************************************************************************************************
• INFO 2016-05-28 18:51:53,201 [[Sample].HTTP_Listener_Configuration.worker.01] org.mule.api.processor.LoggerMessageProcessor: --Hai
• INFO 2016-05-28 18:51:53,253 [[Sample].HTTP_Listener_Configuration.worker.01] org.mule.api.processor.LoggerMessageProcessor: --main flow--[{b=2, c=3}, {a=1}, {e=5}, {d=4}]
• INFO 2016-05-28 18:51:53,354 [[Sample].HTTP_Listener_Configuration.worker.01] com.mulesoft.module.batch.engine.DefaultBatchEngine: Created instance dc959d50-24fc-11e6-b3de-
30d420524153 for batch job SampleBatch
• INFO 2016-05-28 18:51:53,359 [[Sample].HTTP_Listener_Configuration.worker.01] com.mulesoft.module.batch.engine.DefaultBatchEngine: Batch job SampleBatch has no input phase.
Creating job instance
• INFO 2016-05-28 18:51:53,383 [[Sample].HTTP_Listener_Configuration.worker.01] com.mulesoft.module.batch.engine.queue.BatchQueueLoader: Starting loading phase for instance
'dc959d50-24fc-11e6-b3de-30d420524153' of job 'SampleBatch'
• INFO 2016-05-28 18:51:53,548 [[Sample].HTTP_Listener_Configuration.worker.01] com.mulesoft.module.batch.engine.queue.BatchQueueLoader: Finished loading phase for instance
dc959d50-24fc-11e6-b3de-30d420524153 of job SampleBatch. 4 records were loaded
• INFO 2016-05-28 18:51:53,562 [[Sample].HTTP_Listener_Configuration.worker.01] com.mulesoft.module.batch.engine.DefaultBatchEngine: Started execution of instance 'dc959d50-
24fc-11e6-b3de-30d420524153' of job 'SampleBatch'
• INFO 2016-05-28 18:51:53,711 [batch-job-SampleBatch-work-manager.01] org.mule.api.processor.LoggerMessageProcessor: --Batch step--{b=2, c=3}--
• INFO 2016-05-28 18:51:53,713 [batch-job-SampleBatch-work-manager.01] org.mule.api.processor.LoggerMessageProcessor: --for each--batch step--2
• INFO 2016-05-28 18:52:00,519 [batch-job-SampleBatch-work-manager.01] org.mule.api.processor.LoggerMessageProcessor: --for each--batch step--3
• INFO 2016-05-28 18:52:00,605 [batch-job-SampleBatch-work-manager.01] org.mule.api.processor.LoggerMessageProcessor: --Batch step--{a=1}--
• INFO 2016-05-28 18:52:00,605 [batch-job-SampleBatch-work-manager.01] org.mule.api.processor.LoggerMessageProcessor: --for each--batch step--1
• INFO 2016-05-28 18:52:00,617 [batch-job-SampleBatch-work-manager.01] org.mule.api.processor.LoggerMessageProcessor: --Batch step--{e=5}--
• INFO 2016-05-28 18:52:00,617 [batch-job-SampleBatch-work-manager.01] org.mule.api.processor.LoggerMessageProcessor: --for each--batch step--5
• INFO 2016-05-28 18:52:02,765 [batch-job-SampleBatch-work-manager.01] com.mulesoft.module.batch.DefaultBatchStep: Found exception processing record on step 'Batch_Step' for job
instance 'dc959d50-24fc-11e6-b3de-30d420524153' of job 'SampleBatch'.
• This is the first record to show this exception on this step for this job instance. Subsequent records with the same failureswill not be logged for performance and log readability reasons:
• ********************************************************************************
• Message : String or binary data would be truncated. (com.microsoft.sqlserver.jdbc.SQLServerException). Message payload is of type: String
• Type : org.mule.api.MessagingException
• Code : MULE_ERROR--2
• Payload : 5
• JavaDoc : http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html
• ********************************************************************************
• Exception stack is:
• 1. String or binary data would be truncated. (com.microsoft.sqlserver.jdbc.SQLServerException)
• com.microsoft.sqlserver.jdbc.SQLServerException:216 (null)
• 2. String or binary data would be truncated. (com.microsoft.sqlserver.jdbc.SQLServerException). Message payload is of type: String (org.mule.api.MessagingException)
• org.mule.module.db.internal.processor.AbstractDbMessageProcessor:93 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html)
• ********************************************************************************
• Root Exception stack trace:
• com.microsoft.sqlserver.jdbc.SQLServerException: String or binary data would be truncated.
• at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216)
• at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1515)
• at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:404)
• at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:350)
• at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)
• at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)
• at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:180)
• at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:155)
• at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(SQLServerPreparedStatement.java:314)
• at org.mule.module.db.internal.domain.autogeneratedkey.NoAutoGeneratedKeyStrategy.executeUpdate(NoAutoGeneratedKeyStrategy.java:55)
• at org.mule.module.db.internal.domain.executor.UpdateExecutor.doExecuteQuery(UpdateExecutor.java:43)
• at org.mule.module.db.internal.domain.executor.AbstractSingleQueryExecutor.execute(AbstractSingleQueryExecutor.java:48)
• at org.mule.module.db.internal.processor.UpdateMessageProcessor.doExecuteQuery(UpdateMessageProcessor.java:59)
• at org.mule.module.db.internal.processor.AbstractSingleQueryDbMessageProcessor.executeQuery(AbstractSingleQueryDbMessageProcessor.java:42)
• at org.mule.module.db.internal.processor.AbstractDbMessageProcessor.process(AbstractDbMessageProcessor.java:66)
• at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
• at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107)
• at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
• at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:88)
• at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59)
• at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
• at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107)
• at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
• at org.mule.routing.AbstractSelectiveRouter.processEventWithProcessor(AbstractSelectiveRouter.java:303)
• at org.mule.routing.AbstractSelectiveRouter.routeWithProcessors(AbstractSelectiveRouter.java:293)
• at org.mule.routing.AbstractSelectiveRouter.process(AbstractSelectiveRouter.java:193)
• at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
• at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107)
• at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
• at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:88)
• at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59)
• at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
• at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
• at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:98)
• at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59)
• at org.mule.routing.outbound.AbstractMessageSequenceSplitter.processParts(AbstractMessageSequenceSplitter.java:129)
• at org.mule.routing.outbound.AbstractMessageSequenceSplitter.process(AbstractMessageSequenceSplitter.java:59)
• at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
• at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107)
• at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
• at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:88)
• at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59)
• at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
• at org.mule...
• ********************************************************************************
• INFO 2016-05-28 18:52:02,768 [batch-job-SampleBatch-work-manager.01] com.mulesoft.module.batch.DefaultBatchStep: Found exception processing record on step 'Batch_Step' for job
instance 'dc959d50-24fc-11e6-b3de-30d420524153' of job 'SampleBatch'.
• This is the first record to show this exception on this step for this job instance. Subsequent records with the same failureswill not be logged for performance and log readability reasons:
• ********************************************************************************
• Message : String or binary data would be truncated. (com.microsoft.sqlserver.jdbc.SQLServerException). Message payload is of type: String
• Type : org.mule.api.MessagingException
• Code : MULE_ERROR--2
• Payload : 5
• JavaDoc : http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html
• ********************************************************************************
• Exception stack is:
• 1. String or binary data would be truncated. (com.microsoft.sqlserver.jdbc.SQLServerException)
• com.microsoft.sqlserver.jdbc.SQLServerException:216 (null)
• 2. String or binary data would be truncated. (com.microsoft.sqlserver.jdbc.SQLServerException). Message payload is of type: String (org.mule.api.MessagingException)
• org.mule.module.db.internal.processor.AbstractDbMessageProcessor:93 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html)
• ********************************************************************************
• Root Exc
• com.microsoft.sqlserver.jdbc.SQLServerException: String or binary data would be truncated.
• at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216)
• at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1515)
• at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:404)
• at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:350)
• at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696) eption stack trace:
• at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)
• at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:180)
• at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:155)
• at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(SQLServerPreparedStatement.java:314)
• at org.mule.module.db.internal.domain.autogeneratedkey.NoAutoGeneratedKeyStrategy.executeUpdate(NoAutoGeneratedKeyStrategy.java:55)
• at org.mule.module.db.internal.domain.executor.UpdateExecutor.doExecuteQuery(UpdateExecutor.java:43)
• at org.mule.module.db.internal.domain.executor.AbstractSingleQueryExecutor.execute(AbstractSingleQueryExecutor.java:48)
• at org.mule.module.db.internal.processor.UpdateMessageProcessor.doExecuteQuery(UpdateMessageProcessor.java:59)
• at org.mule.module.db.internal.processor.AbstractSingleQueryDbMessageProcessor.executeQuery(AbstractSingleQueryDbMessageProcessor.java:42)
• at org.mule.module.db.internal.processor.AbstractDbMessageProcessor.process(AbstractDbMessageProcessor.java:66)
• at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
• at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107)
• at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
• at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:88)
• at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59)
• at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
• at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107)
• at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
• at org.mule.routing.AbstractSelectiveRouter.processEventWithProcessor(AbstractSelectiveRouter.java:303)
• at org.mule.routing.AbstractSelectiveRouter.routeWithProcessors(AbstractSelectiveRouter.java:293)
• at org.mule.routing.AbstractSelectiveRouter.process(AbstractSelectiveRouter.java:193)
• at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
• at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107)
• at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
• at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:88)
• at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59)
• at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
• at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
• at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:98)
• at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59)
• at org.mule.routing.outbound.AbstractMessageSequenceSplitter.processParts(AbstractMessageSequenceSplitter.java:129)
• at org.mule.routing.outbound.AbstractMessageSequenceSplitter.process(AbstractMessageSequenceSplitter.java:59)
• at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
• at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107)
• at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
• at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:88)
• at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59)
• at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
• at org.mule...
• ********************************************************************************
• INFO 2016-05-28 18:52:02,769 [batch-job-SampleBatch-work-manager.01] org.mule.api.processor.LoggerMessageProcessor: --Batch step--{d=4}--
• INFO 2016-05-28 18:52:02,769 [batch-job-SampleBatch-work-manager.01] org.mule.api.processor.LoggerMessageProcessor: --for each--batch step--
4
• INFO 2016-05-28 18:52:03,049 [batch-job-SampleBatch-work-manager.01] com.mulesoft.module.batch.DefaultBatchStep: Step Batch_Step finished
processing all records for instance dc959d50-24fc-11e6-b3de-30d420524153 of job SampleBatch
• INFO 2016-05-28 18:52:03,095 [batch-job-SampleBatch-work-manager.02] org.mule.api.processor.LoggerMessageProcessor: --step1--{e=5}
• INFO 2016-05-28 18:52:03,096 [batch-job-SampleBatch-work-manager.02] org.mule.api.processor.LoggerMessageProcessor: --for each--batch
step1--5--
• INFO 2016-05-28 18:52:03,488 [batch-job-SampleBatch-work-manager.02] com.mulesoft.module.batch.engine.DefaultBatchEngine: Starting
execution of onComplete phase for instance dc959d50-24fc-11e6-b3de-30d420524153 of job SampleBatch
• INFO 2016-05-28 18:52:03,508 [batch-job-SampleBatch-work-manager.02] org.mule.api.processor.LoggerMessageProcessor: --complete--
com.mulesoft.module.batch.ImmutableBatchJobResult@1fa547d1
• INFO 2016-05-28 18:52:03,509 [batch-job-SampleBatch-work-manager.02] com.mulesoft.module.batch.engine.DefaultBatchEngine: Finished
execution of onComplete phase for instance dc959d50-24fc-11e6-b3de-30d420524153 of job SampleBatch
• INFO 2016-05-28 18:52:03,509 [batch-job-SampleBatch-work-manager.02] com.mulesoft.module.batch.engine.DefaultBatchEngine: Finished
execution for instance 'dc959d50-24fc-11e6-b3de-30d420524153' of job 'SampleBatch'. Total Records processed: 4. Successful records: 3. Failed
Records: 1
• INFO 2016-05-28 18:52:03,511 [batch-job-SampleBatch-work-manager.02] com.mulesoft.module.batch.engine.DefaultBatchEngine:
• *************************************************************************************************************************
***************************************
• * - - + Exception Type + - - * - - + Step + - - * - - + Count + - - *
• *************************************************************************************************************************
***************************************
• * com.mulesoft.module.batch.exception.BatchException * Batch_Step * 1 *
• *************************************************************************************************************************
***************************************
• INFO 2016-05-28 18:52:03,524 [batch-job-SampleBatch-work-manager.02] com.mulesoft.module.batch.DefaultBatchStep: Step Batch_Step1
finished processing all records for instance dc959d50-24fc-11e6-b3de-30d420524153 of job SampleBatch
• Flow of execution:
1. URL to trigger the service from browser
http://localhost:8089
2. a. Service will update the status to ‘Success’ for
the records whose num is other than 5
b. It will fail while trying to update the status as
‘successsuccesssuccesssuccesssuccesssuccess’ for
the num 5 because the length of the status excides
the size of the column. Hence, the failed map will
process in Batch_Step1 and will update the status
as ‘batch fail’ for the record whose num is 5
References
• https://docs.mulesoft.com/mule-user-
guide/v/3.6/batch-processing

Weitere ähnliche Inhalte

Was ist angesagt?

Create & Execute First Hadoop MapReduce Project in.pptx
Create & Execute First Hadoop MapReduce Project in.pptxCreate & Execute First Hadoop MapReduce Project in.pptx
Create & Execute First Hadoop MapReduce Project in.pptxvishal choudhary
 
PythonBrasil[8] - CPython for dummies
PythonBrasil[8] - CPython for dummiesPythonBrasil[8] - CPython for dummies
PythonBrasil[8] - CPython for dummiesTatiana Al-Chueyr
 
Real-time Stream Processing with Apache Flink @ Hadoop Summit
Real-time Stream Processing with Apache Flink @ Hadoop SummitReal-time Stream Processing with Apache Flink @ Hadoop Summit
Real-time Stream Processing with Apache Flink @ Hadoop SummitGyula Fóra
 
Introduction to Twitter Storm
Introduction to Twitter StormIntroduction to Twitter Storm
Introduction to Twitter StormUwe Printz
 
Distributed real time stream processing- why and how
Distributed real time stream processing- why and howDistributed real time stream processing- why and how
Distributed real time stream processing- why and howPetr Zapletal
 
Anatomy of classic map reduce in hadoop
Anatomy of classic map reduce in hadoop Anatomy of classic map reduce in hadoop
Anatomy of classic map reduce in hadoop Rajesh Ananda Kumar
 
Rally - Benchmarking_as_a_service - Openstack meetup
Rally - Benchmarking_as_a_service - Openstack meetupRally - Benchmarking_as_a_service - Openstack meetup
Rally - Benchmarking_as_a_service - Openstack meetupAnanth Padmanabhan
 
Hadoop Summit Europe 2014: Apache Storm Architecture
Hadoop Summit Europe 2014: Apache Storm ArchitectureHadoop Summit Europe 2014: Apache Storm Architecture
Hadoop Summit Europe 2014: Apache Storm ArchitectureP. Taylor Goetz
 
Postgres Vienna DB Meetup 2014
Postgres Vienna DB Meetup 2014Postgres Vienna DB Meetup 2014
Postgres Vienna DB Meetup 2014Michael Renner
 
EX-6-Implement Matrix Multiplication with Hadoop Map Reduce.pptx
EX-6-Implement Matrix Multiplication with Hadoop Map Reduce.pptxEX-6-Implement Matrix Multiplication with Hadoop Map Reduce.pptx
EX-6-Implement Matrix Multiplication with Hadoop Map Reduce.pptxvishal choudhary
 
Hadoop MapReduce Introduction and Deep Insight
Hadoop MapReduce Introduction and Deep InsightHadoop MapReduce Introduction and Deep Insight
Hadoop MapReduce Introduction and Deep InsightHanborq Inc.
 
Testing Hadoop jobs with MRUnit
Testing Hadoop jobs with MRUnitTesting Hadoop jobs with MRUnit
Testing Hadoop jobs with MRUnitEric Wendelin
 
An Introduction To PostgreSQL Triggers
An Introduction To PostgreSQL TriggersAn Introduction To PostgreSQL Triggers
An Introduction To PostgreSQL TriggersJim Mlodgenski
 
Monitoring InfluxEnterprise
Monitoring InfluxEnterpriseMonitoring InfluxEnterprise
Monitoring InfluxEnterpriseInfluxData
 
Moving In: how to port your content from * to Drupal
Moving In: how to port your content from * to DrupalMoving In: how to port your content from * to Drupal
Moving In: how to port your content from * to DrupalEmma Jane Hogbin Westby
 
An introduction to Test Driven Development on MapReduce
An introduction to Test Driven Development on MapReduceAn introduction to Test Driven Development on MapReduce
An introduction to Test Driven Development on MapReduceAnanth PackkilDurai
 
Big data unit iv and v lecture notes qb model exam
Big data unit iv and v lecture notes   qb model examBig data unit iv and v lecture notes   qb model exam
Big data unit iv and v lecture notes qb model examIndhujeni
 
Hive User Meeting August 2009 Facebook
Hive User Meeting August 2009 FacebookHive User Meeting August 2009 Facebook
Hive User Meeting August 2009 Facebookragho
 

Was ist angesagt? (20)

Create & Execute First Hadoop MapReduce Project in.pptx
Create & Execute First Hadoop MapReduce Project in.pptxCreate & Execute First Hadoop MapReduce Project in.pptx
Create & Execute First Hadoop MapReduce Project in.pptx
 
PythonBrasil[8] - CPython for dummies
PythonBrasil[8] - CPython for dummiesPythonBrasil[8] - CPython for dummies
PythonBrasil[8] - CPython for dummies
 
Real-time Stream Processing with Apache Flink @ Hadoop Summit
Real-time Stream Processing with Apache Flink @ Hadoop SummitReal-time Stream Processing with Apache Flink @ Hadoop Summit
Real-time Stream Processing with Apache Flink @ Hadoop Summit
 
Introduction to Twitter Storm
Introduction to Twitter StormIntroduction to Twitter Storm
Introduction to Twitter Storm
 
Distributed real time stream processing- why and how
Distributed real time stream processing- why and howDistributed real time stream processing- why and how
Distributed real time stream processing- why and how
 
Anatomy of classic map reduce in hadoop
Anatomy of classic map reduce in hadoop Anatomy of classic map reduce in hadoop
Anatomy of classic map reduce in hadoop
 
Rally - Benchmarking_as_a_service - Openstack meetup
Rally - Benchmarking_as_a_service - Openstack meetupRally - Benchmarking_as_a_service - Openstack meetup
Rally - Benchmarking_as_a_service - Openstack meetup
 
Hadoop Summit Europe 2014: Apache Storm Architecture
Hadoop Summit Europe 2014: Apache Storm ArchitectureHadoop Summit Europe 2014: Apache Storm Architecture
Hadoop Summit Europe 2014: Apache Storm Architecture
 
Postgres Vienna DB Meetup 2014
Postgres Vienna DB Meetup 2014Postgres Vienna DB Meetup 2014
Postgres Vienna DB Meetup 2014
 
BD-zero lecture.pptx
BD-zero lecture.pptxBD-zero lecture.pptx
BD-zero lecture.pptx
 
EX-6-Implement Matrix Multiplication with Hadoop Map Reduce.pptx
EX-6-Implement Matrix Multiplication with Hadoop Map Reduce.pptxEX-6-Implement Matrix Multiplication with Hadoop Map Reduce.pptx
EX-6-Implement Matrix Multiplication with Hadoop Map Reduce.pptx
 
Hadoop MapReduce Introduction and Deep Insight
Hadoop MapReduce Introduction and Deep InsightHadoop MapReduce Introduction and Deep Insight
Hadoop MapReduce Introduction and Deep Insight
 
Testing Hadoop jobs with MRUnit
Testing Hadoop jobs with MRUnitTesting Hadoop jobs with MRUnit
Testing Hadoop jobs with MRUnit
 
An Introduction To PostgreSQL Triggers
An Introduction To PostgreSQL TriggersAn Introduction To PostgreSQL Triggers
An Introduction To PostgreSQL Triggers
 
Monitoring InfluxEnterprise
Monitoring InfluxEnterpriseMonitoring InfluxEnterprise
Monitoring InfluxEnterprise
 
Moving In: how to port your content from * to Drupal
Moving In: how to port your content from * to DrupalMoving In: how to port your content from * to Drupal
Moving In: how to port your content from * to Drupal
 
An introduction to Test Driven Development on MapReduce
An introduction to Test Driven Development on MapReduceAn introduction to Test Driven Development on MapReduce
An introduction to Test Driven Development on MapReduce
 
MAVRL Workshop 2014 - pymatgen-db & custodian
MAVRL Workshop 2014 - pymatgen-db & custodianMAVRL Workshop 2014 - pymatgen-db & custodian
MAVRL Workshop 2014 - pymatgen-db & custodian
 
Big data unit iv and v lecture notes qb model exam
Big data unit iv and v lecture notes   qb model examBig data unit iv and v lecture notes   qb model exam
Big data unit iv and v lecture notes qb model exam
 
Hive User Meeting August 2009 Facebook
Hive User Meeting August 2009 FacebookHive User Meeting August 2009 Facebook
Hive User Meeting August 2009 Facebook
 

Andere mochten auch

Душевые кабины Friges – Приложение 5 от Stockist Italy
Душевые кабины Friges – Приложение 5 от Stockist Italy Душевые кабины Friges – Приложение 5 от Stockist Italy
Душевые кабины Friges – Приложение 5 от Stockist Italy P.L.T. Forniture Industriali S.r.l.
 
Reference Enquiry Form Kim 210568
Reference Enquiry Form Kim 210568Reference Enquiry Form Kim 210568
Reference Enquiry Form Kim 210568Kim Kj
 
Integration with dropbox using mule esb
Integration with dropbox using mule esbIntegration with dropbox using mule esb
Integration with dropbox using mule esbsivachandra mandalapu
 
Laudo de tcnicod e vistoria predial
Laudo de tcnicod e vistoria predial Laudo de tcnicod e vistoria predial
Laudo de tcnicod e vistoria predial Wallace Stanford
 
Apostila engenharia civil concreto armado recomendacoes
Apostila engenharia civil concreto armado recomendacoesApostila engenharia civil concreto armado recomendacoes
Apostila engenharia civil concreto armado recomendacoesEdson D. Vizentin
 
Cadbury marketing stratergy
Cadbury marketing stratergyCadbury marketing stratergy
Cadbury marketing stratergyPayal Golui
 
7aloulaaaaaaaa projet final
7aloulaaaaaaaa projet final7aloulaaaaaaaa projet final
7aloulaaaaaaaa projet finalhala youness
 
Les instruments musicales
Les instruments musicalesLes instruments musicales
Les instruments musicaleshala youness
 

Andere mochten auch (15)

Душевые кабины Friges – Приложение 5 от Stockist Italy
Душевые кабины Friges – Приложение 5 от Stockist Italy Душевые кабины Friges – Приложение 5 от Stockist Italy
Душевые кабины Friges – Приложение 5 от Stockist Italy
 
13CSP
13CSP13CSP
13CSP
 
Daniela vrnoga
Daniela vrnogaDaniela vrnoga
Daniela vrnoga
 
Reference Enquiry Form Kim 210568
Reference Enquiry Form Kim 210568Reference Enquiry Form Kim 210568
Reference Enquiry Form Kim 210568
 
Eng Council CEng
Eng Council CEngEng Council CEng
Eng Council CEng
 
Mule esb with amazon s3 Integration
Mule esb with amazon s3 IntegrationMule esb with amazon s3 Integration
Mule esb with amazon s3 Integration
 
Integration with dropbox using mule esb
Integration with dropbox using mule esbIntegration with dropbox using mule esb
Integration with dropbox using mule esb
 
Overview of GST
Overview of GSTOverview of GST
Overview of GST
 
Laudo de tcnicod e vistoria predial
Laudo de tcnicod e vistoria predial Laudo de tcnicod e vistoria predial
Laudo de tcnicod e vistoria predial
 
Children’s book
Children’s bookChildren’s book
Children’s book
 
Apostila engenharia civil concreto armado recomendacoes
Apostila engenharia civil concreto armado recomendacoesApostila engenharia civil concreto armado recomendacoes
Apostila engenharia civil concreto armado recomendacoes
 
EENA 2016 - Customer service in a PSAP (2/3)
EENA 2016 - Customer service in a PSAP (2/3)EENA 2016 - Customer service in a PSAP (2/3)
EENA 2016 - Customer service in a PSAP (2/3)
 
Cadbury marketing stratergy
Cadbury marketing stratergyCadbury marketing stratergy
Cadbury marketing stratergy
 
7aloulaaaaaaaa projet final
7aloulaaaaaaaa projet final7aloulaaaaaaaa projet final
7aloulaaaaaaaa projet final
 
Les instruments musicales
Les instruments musicalesLes instruments musicales
Les instruments musicales
 

Ähnlich wie How to use batch component

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
 
Junit in mule
Junit in muleJunit in mule
Junit in muleF K
 
Junit in mule demo
Junit in mule demo Junit in mule demo
Junit in mule demo javeed_mhd
 
For each component
For each component For each component
For each component F K
 
For each component in mule
For each component in muleFor each component in mule
For each component in muleRajkattamuri
 
For each component in mule
For each component in muleFor each component in mule
For each component in mulejaveed_mhd
 
Hadoop cluster performance profiler
Hadoop cluster performance profilerHadoop cluster performance profiler
Hadoop cluster performance profilerIhor Bobak
 
PaaSTA: Autoscaling at Yelp
PaaSTA: Autoscaling at YelpPaaSTA: Autoscaling at Yelp
PaaSTA: Autoscaling at YelpNathan Handler
 
How to use for each component
How to use for each componentHow to use for each component
How to use for each componentmaheshtheapex
 
Enjoy Munit with Mule
Enjoy Munit with MuleEnjoy Munit with Mule
Enjoy Munit with MuleBui Kiet
 

Ähnlich wie How to use batch component (20)

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
 
J unit
J unitJ unit
J unit
 
Junit in mule
Junit in muleJunit in mule
Junit in mule
 
Junit in mule
Junit in muleJunit in mule
Junit in mule
 
Junit in mule
Junit in muleJunit in mule
Junit in mule
 
Junit in mule demo
Junit in mule demo Junit in mule demo
Junit in mule demo
 
Data herding
Data herdingData herding
Data herding
 
Data herding
Data herdingData herding
Data herding
 
For each component
For each component For each component
For each component
 
For each component in mule
For each component in muleFor each component in mule
For each component in mule
 
For each component
For each component For each component
For each component
 
For each component in mule
For each component in muleFor each component in mule
For each component in mule
 
For each component
For each component For each component
For each component
 
Hadoop cluster performance profiler
Hadoop cluster performance profilerHadoop cluster performance profiler
Hadoop cluster performance profiler
 
For Each Component
For Each ComponentFor Each Component
For Each Component
 
PaaSTA: Autoscaling at Yelp
PaaSTA: Autoscaling at YelpPaaSTA: Autoscaling at Yelp
PaaSTA: Autoscaling at Yelp
 
How to use for each component
How to use for each componentHow to use for each component
How to use for each component
 
Reference exception strategy
Reference exception strategyReference exception strategy
Reference exception strategy
 
TYPO3 Scheduler
TYPO3 SchedulerTYPO3 Scheduler
TYPO3 Scheduler
 
Enjoy Munit with Mule
Enjoy Munit with MuleEnjoy Munit with Mule
Enjoy Munit with Mule
 

Mehr von sivachandra mandalapu (20)

Mock component in munit
Mock component in munitMock component in munit
Mock component in munit
 
Jms selector
Jms selectorJms selector
Jms selector
 
Sftplite
SftpliteSftplite
Sftplite
 
Object store
Object storeObject store
Object store
 
How to use SFTP
How to use SFTPHow to use SFTP
How to use SFTP
 
How to use secure property placeholder
How to use secure property placeholderHow to use secure property placeholder
How to use secure property placeholder
 
Specifying a default exception strategy
Specifying a default exception strategySpecifying a default exception strategy
Specifying a default exception strategy
 
Defining global exception strategies
Defining global exception strategiesDefining global exception strategies
Defining global exception strategies
 
Validate json schema
Validate json schemaValidate json schema
Validate json schema
 
Validation
ValidationValidation
Validation
 
Property place holder
Property place holderProperty place holder
Property place holder
 
Collection aggregator
Collection aggregatorCollection aggregator
Collection aggregator
 
Cloud hub deployment
Cloud hub deploymentCloud hub deployment
Cloud hub deployment
 
Securing api with_o_auth2
Securing api with_o_auth2Securing api with_o_auth2
Securing api with_o_auth2
 
Deployment options for mule applications
Deployment options for mule applicationsDeployment options for mule applications
Deployment options for mule applications
 
Setting up organization with api access
Setting up organization with api accessSetting up organization with api access
Setting up organization with api access
 
API gateway setup
API gateway setupAPI gateway setup
API gateway setup
 
Splitter
SplitterSplitter
Splitter
 
Expression
ExpressionExpression
Expression
 
Bean as Datasource
Bean as DatasourceBean as Datasource
Bean as Datasource
 

Kürzlich hochgeladen

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxUmeshTimilsina1
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 

Kürzlich hochgeladen (20)

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 

How to use batch component

  • 1. How to use Batch component 28-05-2015
  • 2. Abstract • The main motto of this PPT is How to use Batch component in our applications.
  • 3. Introduction • Mule possesses the ability to process messages in batches. Within an application, you can initiate a batch job which is a block of code that splits messages into individual records, performs actions upon each record, then reports on the results and potentially pushes the processed output to other systems or queues. This functionality is particularly useful when working with streaming input or when engineering "near real-time" data integration between SaaS applications.
  • 5. .mflow • <?xml version="1.0" encoding="UTF-8"?> • <mule xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:db="http://www.mulesoft.org/schema/mule/db" xmlns:batch="http://www.mulesoft.org/schema/mule/batch" 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" • 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/batch http://www.mulesoft.org/schema/mule/batch/current/mule-batch.xsd • http://www.mulesoft.org/schema/mule/db http://www.mulesoft.org/schema/mule/db/current/mule-db.xsd • http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd"> • <http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8089" doc:name="HTTP Listener Configuration"/> • <db:generic-config name="Generic_Database_Configuration" url="jdbc:sqlserver://localhost:1433;databaseName=SOA_VMES_DB;user=****;password=****;" driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" doc:name="Generic Database Configuration"/> • <batch:job name="SampleBatch" max-failed-records="-1"> • <batch:process-records> • <batch:step name="Batch_Step"> • <logger message="--Batch step--#[payload]--" level="INFO" doc:name="Logger"/> • <foreach doc:name="For Each"> • <logger message="--for each--batch step--#[payload]" level="INFO" doc:name="Logger"/> • <choice doc:name="Choice"> • <when expression="#[payload==5]"> • <db:update config-ref="Generic_Database_Configuration" doc:name="Database"> • <db:parameterized-query><![CDATA[update mytable22 set status='successsuccesssuccesssuccesssuccesssuccess' where num=#[payload]]]></db:parameterized-query> • </db:update> • </when> • <otherwise> • <db:update config-ref="Generic_Database_Configuration" doc:name="Database"> • <db:parameterized-query><![CDATA[update mytable22 set status='Success' where num=#[payload]]]></db:parameterized-query> • </db:update> • </otherwise> • </choice> • </foreach> • </batch:step>
  • 6. • <batch:step name="Batch_Step1" accept-policy="ONLY_FAILURES"> • <logger message="--step1--#[payload]" level="INFO" doc:name="Logger"/> • <foreach doc:name="For Each"> • <logger message="--for each--batch step1--#[payload]--" level="INFO" doc:name="Logger"/> • <db:update config-ref="Generic_Database_Configuration" doc:name="Database"> • <db:parameterized-query><![CDATA[update mytable22 set status='batch fail' where num=#[payload]]]></db:parameterized-query> • </db:update> • </foreach> • </batch:step> • </batch:process-records> • <batch:on-complete> • <logger message="--complete--#[message.payload]" level="INFO" doc:name="Logger"/> • </batch:on-complete> • </batch:job> • <flow name="SampleFlow"> • <http:listener config-ref="HTTP_Listener_Configuration" path="/*" doc:name="HTTP"/> • <logger level="INFO" doc:name="Logger" message="--Hai"/> • <expression-component doc:name="Expression"><![CDATA[import java.util.List; • import java.util.Map; • import java.util.ArrayList; • import java.util.HashMap; • List l1 = new ArrayList(); • Map m2 = new HashMap(); • m2.put("b","2"); • m2.put("c","3"); • l1.add(m2); • Map m1 = new HashMap(); • m1.put("a","1"); • l1.add(m1); • Map m4 = new HashMap(); • m4.put("e","5"); • l1.add(m4); • Map m3 = new HashMap(); • m3.put("d","4"); • l1.add(m3); • payload = l1; • return payload;]]></expression-component> • <logger message="--main flow--#[payload]" level="INFO" doc:name="Logger"/> • <batch:execute name="SampleBatch" doc:name="SampleBatch"/> • </flow> • </mule>
  • 7. • Output: • Data in DB: • Before execute: After execute:
  • 8. • INFO 2016-05-28 18:51:48,882 [main] org.mule.module.launcher.MuleDeploymentService: • ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ • + Started app 'Sample' + • ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ • INFO 2016-05-28 18:51:48,886 [main] org.mule.module.launcher.DeploymentDirectoryWatcher: • ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ • + Mule is up and kicking (every 5000ms) + • ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ • INFO 2016-05-28 18:51:49,040 [main] org.mule.module.launcher.StartupSummaryDeploymentListener: • ********************************************************************** • * - - + DOMAIN + - - * - - + STATUS + - - * • ********************************************************************** • * default * DEPLOYED * • ********************************************************************** • ******************************************************************************************************* • * - - + APPLICATION + - - * - - + DOMAIN + - - * - - + STATUS + - - * • ******************************************************************************************************* • * Sample * default * DEPLOYED * • ******************************************************************************************************* • INFO 2016-05-28 18:51:53,201 [[Sample].HTTP_Listener_Configuration.worker.01] org.mule.api.processor.LoggerMessageProcessor: --Hai • INFO 2016-05-28 18:51:53,253 [[Sample].HTTP_Listener_Configuration.worker.01] org.mule.api.processor.LoggerMessageProcessor: --main flow--[{b=2, c=3}, {a=1}, {e=5}, {d=4}] • INFO 2016-05-28 18:51:53,354 [[Sample].HTTP_Listener_Configuration.worker.01] com.mulesoft.module.batch.engine.DefaultBatchEngine: Created instance dc959d50-24fc-11e6-b3de- 30d420524153 for batch job SampleBatch • INFO 2016-05-28 18:51:53,359 [[Sample].HTTP_Listener_Configuration.worker.01] com.mulesoft.module.batch.engine.DefaultBatchEngine: Batch job SampleBatch has no input phase. Creating job instance • INFO 2016-05-28 18:51:53,383 [[Sample].HTTP_Listener_Configuration.worker.01] com.mulesoft.module.batch.engine.queue.BatchQueueLoader: Starting loading phase for instance 'dc959d50-24fc-11e6-b3de-30d420524153' of job 'SampleBatch' • INFO 2016-05-28 18:51:53,548 [[Sample].HTTP_Listener_Configuration.worker.01] com.mulesoft.module.batch.engine.queue.BatchQueueLoader: Finished loading phase for instance dc959d50-24fc-11e6-b3de-30d420524153 of job SampleBatch. 4 records were loaded • INFO 2016-05-28 18:51:53,562 [[Sample].HTTP_Listener_Configuration.worker.01] com.mulesoft.module.batch.engine.DefaultBatchEngine: Started execution of instance 'dc959d50- 24fc-11e6-b3de-30d420524153' of job 'SampleBatch' • INFO 2016-05-28 18:51:53,711 [batch-job-SampleBatch-work-manager.01] org.mule.api.processor.LoggerMessageProcessor: --Batch step--{b=2, c=3}-- • INFO 2016-05-28 18:51:53,713 [batch-job-SampleBatch-work-manager.01] org.mule.api.processor.LoggerMessageProcessor: --for each--batch step--2 • INFO 2016-05-28 18:52:00,519 [batch-job-SampleBatch-work-manager.01] org.mule.api.processor.LoggerMessageProcessor: --for each--batch step--3 • INFO 2016-05-28 18:52:00,605 [batch-job-SampleBatch-work-manager.01] org.mule.api.processor.LoggerMessageProcessor: --Batch step--{a=1}-- • INFO 2016-05-28 18:52:00,605 [batch-job-SampleBatch-work-manager.01] org.mule.api.processor.LoggerMessageProcessor: --for each--batch step--1 • INFO 2016-05-28 18:52:00,617 [batch-job-SampleBatch-work-manager.01] org.mule.api.processor.LoggerMessageProcessor: --Batch step--{e=5}-- • INFO 2016-05-28 18:52:00,617 [batch-job-SampleBatch-work-manager.01] org.mule.api.processor.LoggerMessageProcessor: --for each--batch step--5 • INFO 2016-05-28 18:52:02,765 [batch-job-SampleBatch-work-manager.01] com.mulesoft.module.batch.DefaultBatchStep: Found exception processing record on step 'Batch_Step' for job instance 'dc959d50-24fc-11e6-b3de-30d420524153' of job 'SampleBatch'. • This is the first record to show this exception on this step for this job instance. Subsequent records with the same failureswill not be logged for performance and log readability reasons:
  • 9. • ******************************************************************************** • Message : String or binary data would be truncated. (com.microsoft.sqlserver.jdbc.SQLServerException). Message payload is of type: String • Type : org.mule.api.MessagingException • Code : MULE_ERROR--2 • Payload : 5 • JavaDoc : http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html • ******************************************************************************** • Exception stack is: • 1. String or binary data would be truncated. (com.microsoft.sqlserver.jdbc.SQLServerException) • com.microsoft.sqlserver.jdbc.SQLServerException:216 (null) • 2. String or binary data would be truncated. (com.microsoft.sqlserver.jdbc.SQLServerException). Message payload is of type: String (org.mule.api.MessagingException) • org.mule.module.db.internal.processor.AbstractDbMessageProcessor:93 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html) • ******************************************************************************** • Root Exception stack trace: • com.microsoft.sqlserver.jdbc.SQLServerException: String or binary data would be truncated. • at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216) • at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1515) • at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:404) • at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:350) • at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696) • at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715) • at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:180) • at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:155) • at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(SQLServerPreparedStatement.java:314) • at org.mule.module.db.internal.domain.autogeneratedkey.NoAutoGeneratedKeyStrategy.executeUpdate(NoAutoGeneratedKeyStrategy.java:55) • at org.mule.module.db.internal.domain.executor.UpdateExecutor.doExecuteQuery(UpdateExecutor.java:43) • at org.mule.module.db.internal.domain.executor.AbstractSingleQueryExecutor.execute(AbstractSingleQueryExecutor.java:48) • at org.mule.module.db.internal.processor.UpdateMessageProcessor.doExecuteQuery(UpdateMessageProcessor.java:59) • at org.mule.module.db.internal.processor.AbstractSingleQueryDbMessageProcessor.executeQuery(AbstractSingleQueryDbMessageProcessor.java:42) • at org.mule.module.db.internal.processor.AbstractDbMessageProcessor.process(AbstractDbMessageProcessor.java:66) • at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24) • at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107) • at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44) • at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:88) • at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59) • at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24) • at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107) • at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44) • at org.mule.routing.AbstractSelectiveRouter.processEventWithProcessor(AbstractSelectiveRouter.java:303) • at org.mule.routing.AbstractSelectiveRouter.routeWithProcessors(AbstractSelectiveRouter.java:293)
  • 10. • at org.mule.routing.AbstractSelectiveRouter.process(AbstractSelectiveRouter.java:193) • at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24) • at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107) • at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44) • at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:88) • at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59) • at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24) • at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44) • at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:98) • at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59) • at org.mule.routing.outbound.AbstractMessageSequenceSplitter.processParts(AbstractMessageSequenceSplitter.java:129) • at org.mule.routing.outbound.AbstractMessageSequenceSplitter.process(AbstractMessageSequenceSplitter.java:59) • at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24) • at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107) • at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44) • at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:88) • at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59) • at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24) • at org.mule... • ******************************************************************************** • INFO 2016-05-28 18:52:02,768 [batch-job-SampleBatch-work-manager.01] com.mulesoft.module.batch.DefaultBatchStep: Found exception processing record on step 'Batch_Step' for job instance 'dc959d50-24fc-11e6-b3de-30d420524153' of job 'SampleBatch'. • This is the first record to show this exception on this step for this job instance. Subsequent records with the same failureswill not be logged for performance and log readability reasons: • ******************************************************************************** • Message : String or binary data would be truncated. (com.microsoft.sqlserver.jdbc.SQLServerException). Message payload is of type: String • Type : org.mule.api.MessagingException • Code : MULE_ERROR--2 • Payload : 5 • JavaDoc : http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html • ******************************************************************************** • Exception stack is: • 1. String or binary data would be truncated. (com.microsoft.sqlserver.jdbc.SQLServerException) • com.microsoft.sqlserver.jdbc.SQLServerException:216 (null) • 2. String or binary data would be truncated. (com.microsoft.sqlserver.jdbc.SQLServerException). Message payload is of type: String (org.mule.api.MessagingException) • org.mule.module.db.internal.processor.AbstractDbMessageProcessor:93 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html) • ******************************************************************************** • Root Exc • com.microsoft.sqlserver.jdbc.SQLServerException: String or binary data would be truncated. • at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216) • at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1515) • at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:404) • at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:350) • at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696) eption stack trace:
  • 11. • at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715) • at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:180) • at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:155) • at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(SQLServerPreparedStatement.java:314) • at org.mule.module.db.internal.domain.autogeneratedkey.NoAutoGeneratedKeyStrategy.executeUpdate(NoAutoGeneratedKeyStrategy.java:55) • at org.mule.module.db.internal.domain.executor.UpdateExecutor.doExecuteQuery(UpdateExecutor.java:43) • at org.mule.module.db.internal.domain.executor.AbstractSingleQueryExecutor.execute(AbstractSingleQueryExecutor.java:48) • at org.mule.module.db.internal.processor.UpdateMessageProcessor.doExecuteQuery(UpdateMessageProcessor.java:59) • at org.mule.module.db.internal.processor.AbstractSingleQueryDbMessageProcessor.executeQuery(AbstractSingleQueryDbMessageProcessor.java:42) • at org.mule.module.db.internal.processor.AbstractDbMessageProcessor.process(AbstractDbMessageProcessor.java:66) • at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24) • at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107) • at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44) • at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:88) • at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59) • at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24) • at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107) • at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44) • at org.mule.routing.AbstractSelectiveRouter.processEventWithProcessor(AbstractSelectiveRouter.java:303) • at org.mule.routing.AbstractSelectiveRouter.routeWithProcessors(AbstractSelectiveRouter.java:293) • at org.mule.routing.AbstractSelectiveRouter.process(AbstractSelectiveRouter.java:193) • at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24) • at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107) • at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44) • at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:88) • at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59) • at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24) • at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44) • at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:98) • at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59) • at org.mule.routing.outbound.AbstractMessageSequenceSplitter.processParts(AbstractMessageSequenceSplitter.java:129) • at org.mule.routing.outbound.AbstractMessageSequenceSplitter.process(AbstractMessageSequenceSplitter.java:59) • at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24) • at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107) • at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44) • at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:88) • at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59) • at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24) • at org.mule... • ********************************************************************************
  • 12. • INFO 2016-05-28 18:52:02,769 [batch-job-SampleBatch-work-manager.01] org.mule.api.processor.LoggerMessageProcessor: --Batch step--{d=4}-- • INFO 2016-05-28 18:52:02,769 [batch-job-SampleBatch-work-manager.01] org.mule.api.processor.LoggerMessageProcessor: --for each--batch step-- 4 • INFO 2016-05-28 18:52:03,049 [batch-job-SampleBatch-work-manager.01] com.mulesoft.module.batch.DefaultBatchStep: Step Batch_Step finished processing all records for instance dc959d50-24fc-11e6-b3de-30d420524153 of job SampleBatch • INFO 2016-05-28 18:52:03,095 [batch-job-SampleBatch-work-manager.02] org.mule.api.processor.LoggerMessageProcessor: --step1--{e=5} • INFO 2016-05-28 18:52:03,096 [batch-job-SampleBatch-work-manager.02] org.mule.api.processor.LoggerMessageProcessor: --for each--batch step1--5-- • INFO 2016-05-28 18:52:03,488 [batch-job-SampleBatch-work-manager.02] com.mulesoft.module.batch.engine.DefaultBatchEngine: Starting execution of onComplete phase for instance dc959d50-24fc-11e6-b3de-30d420524153 of job SampleBatch • INFO 2016-05-28 18:52:03,508 [batch-job-SampleBatch-work-manager.02] org.mule.api.processor.LoggerMessageProcessor: --complete-- com.mulesoft.module.batch.ImmutableBatchJobResult@1fa547d1 • INFO 2016-05-28 18:52:03,509 [batch-job-SampleBatch-work-manager.02] com.mulesoft.module.batch.engine.DefaultBatchEngine: Finished execution of onComplete phase for instance dc959d50-24fc-11e6-b3de-30d420524153 of job SampleBatch • INFO 2016-05-28 18:52:03,509 [batch-job-SampleBatch-work-manager.02] com.mulesoft.module.batch.engine.DefaultBatchEngine: Finished execution for instance 'dc959d50-24fc-11e6-b3de-30d420524153' of job 'SampleBatch'. Total Records processed: 4. Successful records: 3. Failed Records: 1 • INFO 2016-05-28 18:52:03,511 [batch-job-SampleBatch-work-manager.02] com.mulesoft.module.batch.engine.DefaultBatchEngine: • ************************************************************************************************************************* *************************************** • * - - + Exception Type + - - * - - + Step + - - * - - + Count + - - * • ************************************************************************************************************************* *************************************** • * com.mulesoft.module.batch.exception.BatchException * Batch_Step * 1 * • ************************************************************************************************************************* *************************************** • INFO 2016-05-28 18:52:03,524 [batch-job-SampleBatch-work-manager.02] com.mulesoft.module.batch.DefaultBatchStep: Step Batch_Step1 finished processing all records for instance dc959d50-24fc-11e6-b3de-30d420524153 of job SampleBatch
  • 13. • Flow of execution: 1. URL to trigger the service from browser http://localhost:8089 2. a. Service will update the status to ‘Success’ for the records whose num is other than 5 b. It will fail while trying to update the status as ‘successsuccesssuccesssuccesssuccesssuccess’ for the num 5 because the length of the status excides the size of the column. Hence, the failed map will process in Batch_Step1 and will update the status as ‘batch fail’ for the record whose num is 5