title: Mule - Batch Job sync or async
body: <p>I have two batch jobs in differents flows. The first, do an Upsert in Salesforce and when it finish, it call to the second flow that has another batch job.</p>
  <p>This image represents the flows:</p>
  <p><a href="https://i.stack.imgur.com/2Ed9R.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2Ed9R.png" alt="enter image description here" /></a></p>
  <p>But when I see the log on the console, <strong>sometimes the log of the second batch is mixed with the log of the first</strong>.</p>
  <p>I get the feeling that the batch processes are asynchronous and the second batch is called even though the first batch is being processed.</p>
  <p><strong>Am I wrong? Should I pay attention to the order of the logs?
  If I wanted it to be totally synchronous, what would be the best way?</strong></p>