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

Method evaluateConditionRule

pkg/workflow/engine.go:851–855  ·  view source on GitHub ↗

evaluateConditionRule 评估条件规则

(execution *WorkflowExecution, rule ConditionRule, evaluator *ExpressionEvaluator)

Source from the content-addressed store, hash-verified

849
850// evaluateConditionRule 评估条件规则
851func (e *Engine) evaluateConditionRule(execution *WorkflowExecution, rule ConditionRule, evaluator *ExpressionEvaluator) (bool, error) {
852 // 构建表达式
853 expression := fmt.Sprintf("%s %s %v", rule.Variable, rule.Operator, rule.Value)
854 return evaluator.EvaluateBool(expression)
855}
856
857// markExecutionCompleted 标记执行完成
858func (e *Engine) markExecutionCompleted(execution *WorkflowExecution) {

Callers 1

evaluateConditionMethod · 0.95

Calls 1

EvaluateBoolMethod · 0.80

Tested by

no test coverage detected