# Batch jobs, steps and aggregators

*MuleSoft Developer Study Guide · Processing Records · Last updated October 28, 2026 · https://www.certifyforce.com/study-guide/mulesoft-developer/processing-records/batch-jobs-steps-and-aggregators*

Trace a record through the Load and Dispatch, Process and On Complete phases, predict which Batch Steps accept it under `acceptPolicy`, `acceptExpression` and `maxFailedRecords`, size a Batch Aggregator, and read the On Complete report.

- Certification: Salesforce MuleSoft Developer
- Exam section: Processing Records
- Study guide: https://www.certifyforce.com/study-guide/mulesoft-developer

**Official exam objective:**

> Apply correct processors/syntax to process individual records in a collection using batch scopes, and predict outcomes.

## What the exam expects

- Order the three batch phases and name what happens in each, including what Load and Dispatch does before any step runs.
- Predict which records a Batch Step processes from its `acceptPolicy`, its `acceptExpression` and the job's `maxFailedRecords`.
- Configure a Batch Aggregator with `size` or `streaming` and predict how many arrays it hands its processors.
- Predict `payload`, `vars` and `attributes` inside a step, in On Complete, and after the Batch Job, and keep the input with `target`.
- Prepare the input so the Batch Job can split it (arrays, iterables, JSON, XML).

Key terms:
- **Batch job instance**: one execution of the Batch Job, identified by `vars.batchJobInstanceId`.
- **Record**: one split item; inside a step it is the `payload`.
- **Stepping queue**: the persistent queue that holds records between steps.
- **Accept policy**: the step filter based on whether a record failed in an earlier step.
- **Batch Aggregator**: an optional step child that processes records as arrays.

## Key facts

| Fact | Detail | Source |
|---|---|---|
| Phase order | Load and Dispatch, Process, On Complete | [Batch Job Phases](https://docs.mulesoft.com/mule-runtime/latest/batch-phases) |
| Valid input | Java Iterables, Iterators, Arrays, JSON, XML | [Batch Processing](https://docs.mulesoft.com/mule-runtime/latest/batch-processing-concept) |
| `blockSize` default | 100 records per block | [Batch Component Reference](https://docs.mulesoft.com/mule-runtime/latest/batch-reference) |
| `maxFailedRecords` | Default `0`; `-1` = no limit; exceeding it gives `FAILED_PROCESS_RECORDS` | [Batch Component Reference](https://docs.mulesoft.com/mule-runtime/latest/batch-reference) |
| `acceptPolicy` default | `NO_FAILURES`; also `ONLY_FAILURES`, `ALL`; evaluated before `acceptExpression` | [Batch Component Reference](https://docs.mulesoft.com/mule-runtime/latest/batch-reference) |
| Aggregator settings | `size` or `streaming`, required, mutually exclusive; one per step | [Batch Component Reference](https://docs.mulesoft.com/mule-runtime/latest/batch-reference) |
| Last aggregator array | Smaller when fewer records remain than `size` | [Batch Component Reference](https://docs.mulesoft.com/mule-runtime/latest/batch-reference) |
| Streaming aggregator | Sequential access only | [Configuring Batch Components](https://docs.mulesoft.com/mule-runtime/latest/batch-filters-and-batch-aggregator) |
| `attributes` in steps and aggregators | `null` | [Batch Component Reference](https://docs.mulesoft.com/mule-runtime/latest/batch-reference) |
| On Complete variables | Inherited and standard ones only; Process-phase changes are not visible | [Batch Processing](https://docs.mulesoft.com/mule-runtime/latest/batch-processing-concept) |
| Failed-record count | `payload.failedRecords` in On Complete | [Batch Job Phases](https://docs.mulesoft.com/mule-runtime/latest/batch-phases) |
| Input after the job | Only through the Batch Job `target` | [Batch Component Reference](https://docs.mulesoft.com/mule-runtime/latest/batch-reference) |

## Check yourself

- What happens in Load and Dispatch?
- Why does a default-policy step after a failing step skip some records?
- When does a fixed-size aggregator pass a smaller array?
- When would a repair step call `#[Batch::getFirstError()]`?

## Sources

- [Batch Component Reference](https://docs.mulesoft.com/mule-runtime/latest/batch-reference)
- [Batch Job Phases](https://docs.mulesoft.com/mule-runtime/latest/batch-phases)
- [Configuring Batch Components](https://docs.mulesoft.com/mule-runtime/latest/batch-filters-and-batch-aggregator)
- [Batch Processing](https://docs.mulesoft.com/mule-runtime/latest/batch-processing-concept)
- [Batch Errors](https://docs.mulesoft.com/mule-runtime/latest/batch-error-concept)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit, its 11 linked practice questions, and unlimited timed mock exams are included with the MuleSoft Developer pack (USD $19): https://www.certifyforce.com/practice-exams
