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

Method validateInputs

pkg/workflow/engine.go:389–398  ·  view source on GitHub ↗

validateInputs 验证输入

(def *WorkflowDefinition, inputs map[string]any)

Source from the content-addressed store, hash-verified

387
388// validateInputs 验证输入
389func (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 创建执行实例
401func (e *Engine) createExecution(def *WorkflowDefinition, inputs map[string]any) (*WorkflowExecution, error) {

Callers 3

ExecuteMethod · 0.95
ExecuteAsyncMethod · 0.95
ExecuteWithActorsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected