* Creates an edge connecting two blocks.
(sourceId: string, targetId: string, sourceHandle?: string, targetHandle?: string)
| 211 | * Creates an edge connecting two blocks. |
| 212 | */ |
| 213 | connect(sourceId: string, targetId: string, sourceHandle?: string, targetHandle?: string): this { |
| 214 | this.edges.push({ |
| 215 | id: `${sourceId}-${targetId}`, |
| 216 | source: sourceId, |
| 217 | target: targetId, |
| 218 | sourceHandle, |
| 219 | targetHandle, |
| 220 | }) |
| 221 | return this |
| 222 | } |
| 223 | |
| 224 | /** |
| 225 | * Adds a workflow variable. |