Last updated
Was this helpful?
Last updated
Was this helpful?
The Each Component iterates over a list and outputs a new message for each item. It allows processing list elements individually, enabling sequential execution of subsequent actions.
item
Portdone
PortProvide a List
Ensure the input list
is an array or a valid JSON string representing an array.
Processing Items
Each item in the list is sent separately to the item
port.
The done
port is triggered after all items are processed.
Handling Index and Correlation ID
Each item is assigned an index
and a correlationId
to track processing.
Supports JSON Parsing: If list
is a string, it will attempt to parse it as JSON.
State Persistence: Keeps track of progress and resumes processing if interrupted.
Efficient for Iteration: Useful for batch processing workflows requiring individual handling of list elements.
list
array
/ string
The list to iterate over. If a string is provided, it must be a valid JSON array.
in
Receives the list to iterate over.
item
Emits each item from the list with additional metadata.
done
Fires after all items have been processed, providing the total count and correlation ID.
index
The index of the current item in the list.
value
The value of the current item.
count
Total number of items in the list.
correlationId
Unique identifier for tracking batch processing.
count
The total number of processed items.
correlationId
Unique identifier for tracking batch execution.