StreamingBatchFlow<TIn, TOut> class

A flow that processes a batch of items sequentially through a series of nodes.

StreamingBatchFlow is designed for scenarios where a collection of items needs to be processed in a pipeline fashion. Each node in the flow receives the batch of items, performs an operation, and passes the modified batch to the next node.

The flow is asynchronous, leveraging Dart's Future to handle operations that may not complete immediately.

Inheritance

Constructors

StreamingBatchFlow(List<BaseNode> nodes)
Creates an instance of StreamingBatchFlow.

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
nodes List<BaseNode>
The list of nodes in the flow.
final
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() StreamingBatchFlow<TIn, TOut>
Creates a deep copy of this AsyncFlow.
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
execAsync(dynamic prepResult) Future
Async execution logic - calls orchAsync.
inherited
execFallbackAsync(dynamic prepResult, Exception error) Future
Async fallback logic when execAsync fails.
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
orchAsync(Map<String, dynamic> shared, [Map<String, dynamic>? params, int? maxSteps]) Future
Async orchestration method that executes the flow graph.
inherited
post(Map<String, dynamic> shared, dynamic prepResult, dynamic execResult) Future
Post-processing logic after exec.
inherited
postAsync(Map<String, dynamic> shared, dynamic prepResult, dynamic execResult) Future
Async post-processing logic after execAsync.
inherited
prep(Map<String, dynamic> shared) Future
Pre-processing logic before exec.
inherited
prepAsync(Map<String, dynamic> shared) Future
Async pre-processing logic before orchAsync.
inherited
run(Map<String, dynamic> shared) Future
Executes the streaming batch flow.
override
runAsync(Map<String, dynamic> shared) Future
Async-specific run method for AsyncFlow.
inherited
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