Class ValidateStep
A step that validates a condition against the workflow data and aborts if not met.
public sealed class ValidateStep : IStep<AgentWorkflowData>
- Inheritance
-
ValidateStep
- Implements
-
IStep<AgentWorkflowData>
- Inherited Members
Constructors
ValidateStep(string, Func<AgentWorkflowData, bool>, string)
public ValidateStep(string name, Func<AgentWorkflowData, bool> predicate, string failureMessage = "Validation failed")
Parameters
namestringpredicateFunc<AgentWorkflowData, bool>failureMessagestring
Properties
Name
Gets the name of this step.
public string Name { get; }
Property Value
Methods
ExecuteAsync(IWorkflowContext<AgentWorkflowData>)
Executes this step with the given typed context.
public Task ExecuteAsync(IWorkflowContext<AgentWorkflowData> context)
Parameters
contextIWorkflowContext<AgentWorkflowData>The workflow context.
Returns
- Task
A task representing the asynchronous operation.