parallelNode
Creates a FunctionNode that runs block concurrently on each item of a list input and returns the results as a List of O in input order. A text-only Content input, unless I is Content, is read as JSON so a JSON list fans out. Any other non-list input runs as one item.
config, the schemas, rerunOnResume and requireConfirmation apply to each item's run, so each item asks for its own approval; the fan-out node shares waitForOutput and stateSchema, declares no input or output schema, has no retry or timeout, and always reruns on resume.
Parameters
Maximum number of items run at a time, or null for no limit.
Whether each item's run first asks the user to approve it: pass true, or a predicate that decides for each item, as in node, which describes a rejected run's output.
Throws
if maxParallelWorkers is less than 1, or as in node.
Creates a fan-out FunctionNode as the other block-form parallelNode does, asking to approve an item's run only when requireConfirmation returns true for it. The predicate runs on each item's run with no answer yet; once the item has asked, the answer decides. A rejected item outputs as in node.
Parameters
Maximum number of items run at a time, or null for no limit.
Throws
if maxParallelWorkers is less than 1, or as in node.
Wraps node so it runs concurrently on each item of a list input and returns the results in input order. node's configuration and schemas apply to each item's run; the fan-out node declares no input or output schema.
Parameters
Maximum number of items run at a time, or null for no limit.
Throws
if maxParallelWorkers is less than 1.
Returns a node that runs node once per item of a list input concurrently and outputs the items' outputs as a list in input order. A text-only Content input, unless node is a function node taking Content, is read as JSON so a JSON list fans out; text that is not JSON arrives as a string. Any other non-list input runs as a single item.
The returned node takes node's name, description, Node.stateSchema and Node.requiresAllPredecessors, and declares no input or output schema. node's Node.config and schemas apply to each item; the fan-out itself has a default NodeConfig.
Parameters
Single-item node to execute for each list element.
Maximum number of items to run concurrently; null means no limit.
Throws
if node is Start or maxParallelWorkers is less than 1.