Loop Node
warning
This node is in beta and may not be fully tested or documented. Use with caution.
Call a subflow for each item in an array The Loop Node iterates over each item in an array and calls a Sub Flow for each item concurrently, up to a specified maximum number of concurrent executions. The Error Handler property allows you to specify how errors should be handled during the execution of the subflows. There are three options available:
- None: If an error occurs, it will be thrown and the execution will stop. This is the default behavior.
- Catch: If an error occurs, it will be caught and the first error will be returned from the Loop Node. You can branch the flow logic to handle this error accordingly.
- Null Value: If an error occurs, the execution will continue and the result for the item that caused the error will be null. This option is useful if you want to ensure that the output array has the same length as the input array, even if some items cause errors.
warning
The Loop Node requires an array of objects as input, not an array of primitive types like string, number, or boolean. See the example below for details.
Input
"words": [
{
"word": "dog"
},
{
"word": "cat"
}
]
Output
{
"results": [
{
"translated_word": "perro"
},
{
"translated_word": "gato"
}
]
}
Properties
Label | Property | Type | Description | Default Value | Is Required |
---|---|---|---|---|---|
Sub Flow | subFlowReference | botdojo/types/subflow_reference | null | ||
Max Concurrent | maxConcurrent | botdojo/types/number | 5 | ||
Error Handler | errorHandler | botdojo/types/options | None,Catch,Null Value |