Table of Contents

Class ValidateStep

Namespace
JD.AI.Workflows.Steps
Assembly
JD.AI.Workflows.dll

A step that validates a condition against the workflow data and aborts if not met.

public sealed class ValidateStep : IStep<AgentWorkflowData>
Inheritance
ValidateStep
Implements
Inherited Members

Constructors

ValidateStep(string, Func<AgentWorkflowData, bool>, string)

public ValidateStep(string name, Func<AgentWorkflowData, bool> predicate, string failureMessage = "Validation failed")

Parameters

name string
predicate Func<AgentWorkflowData, bool>
failureMessage string

Properties

Name

Gets the name of this step.

public string Name { get; }

Property Value

string

Methods

ExecuteAsync(IWorkflowContext<AgentWorkflowData>)

Executes this step with the given typed context.

public Task ExecuteAsync(IWorkflowContext<AgentWorkflowData> context)

Parameters

context IWorkflowContext<AgentWorkflowData>

The workflow context.

Returns

Task

A task representing the asynchronous operation.