GraphJoinMode
NexusLabs.Needlr.AgentFramework¶
NexusLabs.Needlr.AgentFramework¶
GraphJoinMode Enum¶
Controls how a target node handles multiple incoming edges in a graph workflow.
Fields¶
WaitAll 0
Barrier join: the target node waits for ALL incoming edges to complete
before executing. Maps to MAF's FanInEdgeData.
WaitAny 1
The target node proceeds when ANY incoming edge completes. The first branch to finish triggers execution of the target; results from later-completing branches are available in the result dictionary if they finish before the graph terminates.
Remarks¶
MAF's BSP execution model uses mandatory synchronization barriers,
so WaitAny is not compatible with
CreateGraphWorkflow(string) (which returns
a MAF Workflow). Use the RunGraphAsync extension method
from NexusLabs.Needlr.AgentFramework.Workflows instead — it detects
WaitAny nodes and uses Needlr's own graph executor with
System.Threading.Tasks.Task.WhenAny(System.Threading.Tasks.Task[]).