Workflow Validation

GWE performs static validation on workflow definitions to catch errors before runtime. The validation system simulates workflow execution with dummy inputs to verify that all execution paths produce the required outputs and that the workflow structure is sound.

What Static Validation Checks

Static validation verifies:

  • All required bindings are present: Every required input port has a binding.
  • Type compatibility: All bindings connect compatible types (see Type System).
  • No cycles: The workflow DAG contains no circular dependencies.
  • Required outputs are produced: Every required Named Output is produced on every possible execution path.
  • Custom rules: Any persona-type-specific validation rules are satisfied.

How Validation Works

The validation process has two stages:

Stage 1: Path Enumeration

The engine enumerates all possible execution paths through the workflow. A path is the set of agents that execute based on the conditional branching rules.

Branching agents: An agent is considered a branching agent if one of its outputs is used in a run-if condition by at least one downstream agent. When the engine encounters a branching agent during traversal, it creates a separate path for each possible output value.

For example, if a CLASSIFY agent produces an enum with three values (Class1, Class2, Class3), the engine creates three paths:

Path 1: Trigger -> CLASSIFY(->Class1) -> B -> C -> D -> Output
Path 2: Trigger -> CLASSIFY(->Class2) -> E -> F -> Output
Path 3: Trigger -> CLASSIFY(->Class3) -> G -> Output

Stage 2: Per-Path Validation

For each enumerated path, the engine:

  1. Plugs in dummy inputs for workflow inputs and widget bindings.
  2. Simulates agent execution by plugging in dummy outputs for each non-branching agent that is allowed to execute.
  3. For branching agents, uses the specific branch value chosen for this path and dummy values for all other outputs.
  4. Validates that all required Named Outputs are produced.
  5. Validates any custom rules defined for the persona type (e.g., Agent Assist AI Employees may have specific output requirements).

Validation skips all calls to databases and external microservices. It tests the workflow structure, not the runtime behavior of individual agents.

Validation Errors

Validation errors appear in the Issues tab of the Workflow Builder. Common validation errors include:

ErrorCauseResolution
Required output not producedA required Named Output is not bound to any agent on one or more paths.Connect the output to an eligible agent on the missing path.
Missing required bindingAn agent's required input has no binding.Add a binding (upstream output, workflow input, constant, or widget).
Type mismatchA binding connects incompatible types.Verify that the source type matches the destination port type.
Cycle detectedThe workflow graph contains a circular dependency.Remove the circular binding.
Unknown agent typeAn agent instance references an unregistered agent type.Verify the agent type name and ensure it is registered.

When Validation Runs

  • On save: Validation runs automatically when you save a workflow in the Workflow Builder. Workflows with validation errors cannot be saved by default.
  • On deploy: The engine re-validates before executing a workflow. If validation fails, the execution is rejected.
  • Static validation errors are stored alongside the workflow definition and are surfaced in the Issues tab.

Next: Workflow Version History

Last updated: Jul 3, 2026