1
votes

I create one batch flow. From one batch flow i am calling another batch and from 2nd batch i am calling simple 3rd flow.

I am getting problem in this scenario All are not working sequentially I need all flows should work sequentially manner

For example I have 5 records are comming in batch and in 2nd batch 10 records are comming and from 2nd batch i am calling 3rd flow which is simple flow

Problem is 2nd batch is not waiting to finish 3rd flow execution,it continuously executed till 10 records,

I need first 3rd flow exection should be complete then and only then 2 records should be come

How can I solve this scenario

Please help me

1
It is a lot faster and easier for us to find and solve a problem when we can see the code. - MC ND
I believe this is not actually related to batch-file, so, in case, please read the tag info and correct your post accordingly... - aschipfl

1 Answers

1
votes

According to Mulesoft Documentation

Batch Processing at a Glance
https://docs.mulesoft.com/mule-user-guide/v/3.8/batch-processing

A batch job is a top-level element in Mule which exists outside all Mule flows. Batch jobs split large messages into records which Mule processes asynchronously in a batch job; just as flows process messages, batch jobs process records.

So the answer is that you are not able to run batch synchronously. After the input stage, mule will do a load&dispatch and transform the collection into a queue of individuals recordes that are processed asynchronously.

Any reason why you are using batch instead of normal Flow ???