WorkflowDefinitionValidator
AgentPrism.Core.dllValidates the structural validity of a workflow definition.
public static class WorkflowDefinitionValidatorInheritance
Section titled “Inheritance”object ← WorkflowDefinitionValidator
Inherited Members
Section titled “Inherited Members”object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”The check lives inside AgentPrism.Core because it has two
consumers: the HTTP layer produces a 400 at registration
time, and the workflow compiler throws an exception at run time. If
written separately in two places, one could change while the other stayed behind.
Only structural rules are checked here: name, count, duplicates, pattern-field compatibility. Whether the agents actually exist in the catalog is checked at compile time; the catalog can change between registration and execution, and moving that check to registration time would give a false guarantee.
Methods
Section titled “Methods”Require(WorkflowDefinition)
Section titled “ Require(WorkflowDefinition)”Validates the definition and throws if it is invalid.
public static void Require(WorkflowDefinition definition)Parameters
Section titled “Parameters”definition WorkflowDefinition
The definition to validate.
Exceptions
Section titled “Exceptions”The definition is invalid.
Validate(WorkflowDefinition)
Section titled “ Validate(WorkflowDefinition)”Validates the definition.
public static string? Validate(WorkflowDefinition definition)Parameters
Section titled “Parameters”definition WorkflowDefinition
The definition to validate.
Returns
Section titled “Returns”User-facing error text; null if the definition is valid.
Exceptions
Section titled “Exceptions”definition is null.