{"record":{"id":"34ba22bc229fd514","repo":"microsoft/semantic-kernel","slug":"workflow-inputs-are-not-specified","errorCode":null,"errorMessage":"Workflow inputs are not specified.","messagePattern":"Workflow inputs are not specified\\.","errorType":"validation","errorClass":"ArgumentException","httpStatus":null,"severity":"error","filePath":"dotnet/src/Experimental/Process.Core/Workflow/WorkflowBuilder.cs","lineNumber":46,"sourceCode":"    /// <summary>\n    /// Builds a process from a workflow definition.\n    /// </summary>\n    /// <param name=\"workflow\">An instance of <see cref=\"Workflow\"/>.</param>\n    /// <param name=\"yaml\">Workflow definition in YAML format.</param>\n    /// <param name=\"stepTypes\">Collection of preloaded step types.</param>\n    public async Task<KernelProcess?> BuildProcessAsync(Workflow workflow, string yaml, Dictionary<string, Type>? stepTypes = null)\n    {\n        this._yaml = yaml;\n        var stepBuilders = new Dictionary<string, ProcessStepBuilder>();\n\n        if (workflow.Nodes is null || workflow.Nodes.Count == 0)\n        {\n            throw new ArgumentException(\"Workflow nodes are not specified.\");\n        }\n\n        if (workflow.Inputs is null)\n        {\n            throw new ArgumentException(\"Workflow inputs are not specified.\");\n        }\n\n        // TODO: Process outputs\n        // TODO: Process variables\n\n        ProcessBuilder processBuilder = new(workflow.Id, description: workflow.Description, stateType: typeof(ProcessDefaultState));\n\n        if (workflow.Inputs.Events?.CloudEvents is not null)\n        {\n            foreach (CloudEvent inputEvent in workflow.Inputs.Events.CloudEvents)\n            {\n                await this.AddInputEventAsync(inputEvent, processBuilder).ConfigureAwait(false);\n            }\n        }\n\n        if (workflow.Inputs.Messages is not null)\n        {\n            await this.AddInputMessagesEventAsync(processBuilder).ConfigureAwait(false);","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/microsoft/semantic-kernel/blob/c028a0c7dc4f0814cdcbaba9d998f187a41197bf/dotnet/src/Experimental/Process.Core/Workflow/WorkflowBuilder.cs#L28-L64","documentation":"Thrown by WorkflowBuilder.BuildProcessAsync when workflow.Inputs is null. Even if nodes are present, the builder requires an Inputs object to wire input events into the process, so a null Inputs is rejected after the nodes check.","triggerScenarios":"Calling BuildProcessAsync with a Workflow whose Inputs property is null (YAML omits the inputs section, or deserialization leaves it unset).","commonSituations":"Workflow definitions that declare nodes but forget the inputs block; partial test fixtures; schema mismatches during deserialization.","solutions":["Include a non-null 'inputs' section in the workflow definition.","Validate workflow.Inputs != null before calling BuildProcessAsync.","If the workflow genuinely has no external inputs, supply an empty Inputs object rather than null."],"exampleFix":"// before\nworkflow.Inputs = null;\nawait builder.BuildProcessAsync(workflow, yaml);\n\n// after\nworkflow.Inputs ??= new Inputs();\nawait builder.BuildProcessAsync(workflow, yaml);","handlingStrategy":"validation","validationCode":"if (workflow.Inputs is null)\n    throw new ArgumentException(\"Workflow must declare an inputs section.\");","typeGuard":"static bool HasInputs(Workflow w) => w.Inputs is not null;","tryCatchPattern":"try { await builder.BuildProcessAsync(workflow, yaml); }\ncatch (ArgumentException ex) when (ex.Message.Contains(\"inputs are not specified\"))\n{ /* supply an Inputs object, possibly empty */ }","preventionTips":["Always include an 'inputs' block in workflow definitions.","Default Inputs to an empty object when authoring programmatically.","Validate Inputs != null right after the Nodes check in a pre-build validator."],"tags":["semantic-kernel","process","workflow","validation"],"backgroundTag":null,"analyzedSha":"c028a0c7dc4f0814cdcbaba9d998f187a41197bf","analyzedAt":"2026-08-13T13:48:05.040Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}