Skip to content
Tracon

WorkflowPendingRequest

Namespace Tracon · Assembly Tracon.Abstractions.dll

Represents human input awaited by a workflow run.

public sealed record WorkflowPendingRequest : IEquatable<WorkflowPendingRequest>
Inheritance
object ← WorkflowPendingRequest
Implements
IEquatable<WorkflowPendingRequest>
Inherited Members
object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

The request itself (its prompt and its form) lives in the run’s RunEventType.WorkflowRequest event, which is append-only and tenant-filtered; it is not copied anywhere. What a listing across runs needs to filter on, and what the expiry needs, is kept apart in IWorkflowRequestStore, one row per request; the row names the event it points to, so the two cannot drift apart on the prompt.

A response starts a new run. Responding to a pending request resumes the run from its checkpoint and creates a new runs row. Reopening the same row would violate the event stream’s append-only rule.

public WorkflowPendingRequest()

Gets a value indicating whether somebody answered the request. An answered run stays AwaitingInput and keeps listing its request; the answer continues on a new run, which lastResponseRunId names.

public bool Answered { get; init; }

bool

Gets when the request expires (UTC). null when the workflow sets no request timeout, or when the request was published before requests had an expiry.

public DateTimeOffset? ExpiresAt { get; init; }

DateTimeOffset?

Fixed when the run starts waiting: editing the workflow later does not move it. When the time passes, the run is closed and an answer is refused like an answer to any run that is no longer waiting.

Gets the input field the UI should display.

public required WorkflowRequestForm Form { get; init; }

WorkflowRequestForm

Gets the run that carried out the latest answer; null while the request is unanswered. An answer that stopped before it finished is replaced by the answer that started again, so this names the run to watch.

public Guid? LastResponseRunId { get; init; }

Guid?

Gets the identifier of the port that published the request. It maps to a graph node.

public required string PortId { get; init; }

string

Gets the request text shown to the user. For plan approval, this is the plan itself.

public string? Prompt { get; init; }

string?

Gets the request identifier. Send this value when responding; the resumed execution matches it to the request published with the same id.

public required string RequestId { get; init; }

string

Gets the request data type name.

public string? RequestType { get; init; }

string?

Gets the UTC time when the request was published.

public DateTimeOffset RequestedAt { get; init; }

DateTimeOffset

Gets the expected response type name.

public string? ResponseType { get; init; }

string?

Gets the identifier of the run that produced the request.

public required Guid RunId { get; init; }

Guid

Gets the execution session of the run. The runs that continue one another share it, and the same request id in the same session is one request.

public string? SessionId { get; init; }

string?

Gets the name of the workflow whose run waits on the request.

public string? WorkflowName { get; init; }

string?

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(WorkflowPendingRequest? other)

other WorkflowPendingRequest?

bool

public override int GetHashCode()

int

public override string ToString()

string

operator ==(WorkflowPendingRequest?, WorkflowPendingRequest?)

Section titled “ operator ==(WorkflowPendingRequest?, WorkflowPendingRequest?)”
public static bool operator ==(WorkflowPendingRequest? left, WorkflowPendingRequest? right)

left WorkflowPendingRequest?

right WorkflowPendingRequest?

bool

operator !=(WorkflowPendingRequest?, WorkflowPendingRequest?)

Section titled “ operator !=(WorkflowPendingRequest?, WorkflowPendingRequest?)”
public static bool operator !=(WorkflowPendingRequest? left, WorkflowPendingRequest? right)

left WorkflowPendingRequest?

right WorkflowPendingRequest?

bool