MCPcopy Create free account
hub / github.com/astercloud/aster / executeConditionNode

Method executeConditionNode

pkg/workflow/engine.go:669–682  ·  view source on GitHub ↗

executeConditionNode 执行条件节点

(execution *WorkflowExecution, node *NodeDef, result *NodeResult)

Source from the content-addressed store, hash-verified

667
668// executeConditionNode 执行条件节点
669func (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 执行循环节点
685func (e *Engine) executeLoopNode(execution *WorkflowExecution, node *NodeDef, result *NodeResult) error {

Callers 1

executeNodeMethod · 0.95

Calls 1

evaluateConditionMethod · 0.95

Tested by

no test coverage detected