BatchFlow<I, O> class

A BatchFlow is a specialized Flow that processes a batch of inputs.

It orchestrates a series of nodes to be executed sequentially for each input in a provided list.

Inheritance

Constructors

BatchFlow(List<Node> nodes)
Creates a new BatchFlow with a list of nodes.

Properties

hashCode int
The hash code for this object.
no setterinherited
log ↔ void Function(String)
A function for logging messages.
getter/setter pairinherited
name String?
The unique name of the node.
getter/setter pairinherited
params Map<String, dynamic>
The parameters for the node.
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shared Map<String, dynamic>
Shared storage reference for use in exec method. This is set by the run method before calling exec.
getter/setter pairinherited
successors Map<String, BaseNode>
The successor nodes.
finalinherited

Methods

clone() BatchFlow<I, O>
Creates a deep copy of this BatchFlow.
override
copy<T extends Flow>([T factory()?]) → T
Creates a deep copy of this Flow.
inherited
createInstance() BaseNode
Creates a new instance of Flow.
inherited
exec(dynamic prepResult) Future
The main execution logic for the flow.
inherited
getNextNode(BaseNode curr, dynamic action) BaseNode?
Gets the next node based on the current node and action.
inherited
next(BaseNode node, {String action = 'default'}) BaseNode
Defines the next node in the sequence.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
orch(Map<String, dynamic> shared, [Map<String, dynamic>? params, int? maxSteps]) Future
Core orchestration method that executes the flow graph.
inherited
post(Map<String, dynamic> shared, dynamic prepResult, dynamic execResult) Future
Post-processing logic after exec.
inherited
prep(Map<String, dynamic> shared) Future<List<Map<String, dynamic>>>
Prepares batch parameters for processing.
override
run(Map<String, dynamic> shared) Future
Runs the flow for a batch of inputs.
override
start(BaseNode node) BaseNode
Sets the starting node for the flow. This is the entry point for the execution of the flow.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator -(String action) ConditionalTransition
Creates a conditional transition with the given action.
inherited
operator ==(Object other) bool
The equality operator.
inherited
operator >>(BaseNode other) BaseNode
Chains the current node to the other node.
inherited