Executes multiple child nodes concurrently and merges their results.
FanOutNode encapsulates parallel execution behind the standard Node interface.
It appears as a single state to the Workflow FSM but internally spawns
multiple branches via Task.async_stream.
Merge Strategies
:deep_merge(default) — scopes each branch result under the branch name, then deep-merges into a single map- Custom function — receives
[{branch_name, result}]and returns a map
Error Handling
:fail_fast(default) — returns{:error, reason}on first branch failure:collect_partial— collects all results, including{:error, reason}entries
Summary
Functions
Merges branch results using the specified merge strategy.
Types
@type branch() :: {atom(), struct() | (map() -> Jido.Composer.Node.result())}
@type t() :: %Jido.Composer.Node.FanOutNode{ branches: [branch()], max_concurrency: pos_integer() | nil, merge: merge(), name: String.t(), on_error: :fail_fast | :collect_partial, timeout: pos_integer() | :infinity }
Functions
Merges branch results using the specified merge strategy.
When called from the strategy with a completed_results map, converts to the keyword-list format expected by the merge logic.