validateInputs 验证输入
(def *WorkflowDefinition, inputs map[string]any)
| 387 | |
| 388 | // validateInputs 验证输入 |
| 389 | func (e *Engine) validateInputs(def *WorkflowDefinition, inputs map[string]any) error { |
| 390 | for _, inputDef := range def.Inputs { |
| 391 | if inputDef.Required { |
| 392 | if _, exists := inputs[inputDef.Name]; !exists { |
| 393 | return fmt.Errorf("required input missing: %s", inputDef.Name) |
| 394 | } |
| 395 | } |
| 396 | } |
| 397 | return nil |
| 398 | } |
| 399 | |
| 400 | // createExecution 创建执行实例 |
| 401 | func (e *Engine) createExecution(def *WorkflowDefinition, inputs map[string]any) (*WorkflowExecution, error) { |
no outgoing calls
no test coverage detected