executeConditionNode 执行条件节点
(execution *WorkflowExecution, node *NodeDef, result *NodeResult)
| 667 | |
| 668 | // executeConditionNode 执行条件节点 |
| 669 | func (e *Engine) executeConditionNode(execution *WorkflowExecution, node *NodeDef, result *NodeResult) error { |
| 670 | if node.Condition == nil { |
| 671 | return errors.New("condition node requires condition configuration") |
| 672 | } |
| 673 | |
| 674 | // 评估条件 |
| 675 | evaluated, err := e.evaluateCondition(execution, node.Condition) |
| 676 | if err != nil { |
| 677 | return fmt.Errorf("failed to evaluate condition: %w", err) |
| 678 | } |
| 679 | |
| 680 | result.Outputs["condition_result"] = evaluated |
| 681 | return nil |
| 682 | } |
| 683 | |
| 684 | // executeLoopNode 执行循环节点 |
| 685 | func (e *Engine) executeLoopNode(execution *WorkflowExecution, node *NodeDef, result *NodeResult) error { |
no test coverage detected