Skip to main content

Iterating

Iterating node is a core component designed for loop processing scenarios, capable of automating the handling of structured data (arrays/objects). By flexibly configuring sub-agents or workflows, combined with parallel processing and intelligent error-handling mechanisms, it significantly enhances the execution efficiency of complex tasks.

Iterating node
Iterating Node

Core Functionality Breakdownโ€‹

1. Data Structure Supportโ€‹

Data TypeProcessing MethodOutput Format
ArrayIterates through each element (in index order or random order)New array (collection of processed elements)
ObjectIterates through each key-value pair (property-level processing)New object (restructured key-value pairs)

2. Processing Modesโ€‹

ModeExecution MethodApplicable Scenarios
SequentialExecutes in sequenceTasks with strong data dependencies or resource-sensitive tasks
ParallelMulti-threaded concurrency (configurable concurrency level)I/O-intensive tasks or independent element processing tasks

3. Error Handling Strategiesโ€‹

StrategyBehavior DescriptionData Integrity Assurance
Abort on ErrorStops the process immediately and throws an exceptionHigh requirement for full data consistency
Ignore ErrorsSkips errored items, retains original dataAllows partial failure, logs errors
Remove Failed ResultsAutomatically filters out failed items, outputs valid result setPrioritizes result usability

Best Practice Guideโ€‹

Mode Selection Recommendationsโ€‹

  • Prioritize Parallel Processing when:

    • Element processing logic has no state dependencies
    • External APIs/services have high availability
    • There are explicit concurrency limits (e.g., database connection pools)
  • Use Sequential Processing when:

    • Processing order must be maintained (e.g., time-series data)
    • Involves transactional operations (e.g., database writes)
    • The process consumes significant computational resources

Error Strategy Decision Treeโ€‹

                   Start
โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ–ผ โ–ผ
Allow partial failure? Must be 100% successful
โ”‚ โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”
โ–ผ โ–ผ โ–ผ โ–ผ
Retain original data Only need valid results Select "Abort on Error"
โ”‚ โ”‚
Select "Ignore Errors" Select "Remove Failed Results"

By leveraging the iterative node effectively, users can build integrated solutions ranging from simple data cleaning to complex business process automation.