# Batch Iterator Sequential batch processing with complete fault isolation per record. **Use when:** Need fault isolation, ordered processing, or simple batch requirements. ## Run ```bash uv run batch_iterator/worker.py # Terminal 1 ``` ```bash uv run batch_iterator/starter.py # Terminal 2 ``` ## How It Works An `IteratorBatchWorkflow` starts child workflows in parallel for each record. After completion, it calls continue-as-new for the next batch, maintaining bounded history. **Flow**: `Batch → [Child1|Child2|Child3] → Complete → Continue-as-New` ## Pattern Comparison | Pattern | Best For | Throughput | Fault Isolation | |---------|----------|------------|-----------------| | **Iterator** | Sequential, ordered data | Medium | Complete per record | | [Sliding Window](../batch_sliding_window/) | High-throughput parallel | High | Complete per record | | [Heartbeating Activity](../batch_heartbeating_activity/) | Long-running I/O | Medium | Limited (whole batch) | ## Learn More - [Child Workflows](https://docs.temporal.io/develop/python/child-workflows) - Core pattern functionality - [Continue-as-New](https://docs.temporal.io/develop/python/continue-as-new) - History management for continuous processing