Visualization & Logging
The ExecutionTree
ExecutionTreetype Action = string | 'default'
interface ExecutionTree {
order: number // Unique order of this node's execution in the flow
type: string // Constructor name of the node (e.g., "MyCustomNode", "Flow")
triggered: Record<Action, ExecutionTree[]> | null
// An object where keys are action names triggered by this node.
// Values are arrays of ExecutionTree(s) for the successor node(s)
// that were executed due to that action.
// `null` if the node was terminal for its branch or did not trigger actions
// that led to further node executions visible in this tree.
// (Note: Even if a node doesn't explicitly trigger, a 'default' action might be
// processed, leading to an empty array if no successor for 'default').
}Logging Best Practices
Example: Python Logging with ExecutionTree
ExecutionTreeVisualization
1. Visualizing the Static Flow Definition
2. Visualizing Runtime Execution from ExecutionTree
ExecutionTree3. Call Stack Debugging
Last updated