# WorkflowPendingRequest

> Tracon documentation. Tracon is a .NET package family that adds a control
> plane on Microsoft Agent Framework, published as NuGet packages that run
> inside your own ASP.NET Core application.
>
> Page: https://tracon.dev/api/tracon.workflowpendingrequest/
> Summary: WorkflowPendingRequest: Represents human input awaited by a workflow run.

<div class="api-provenance">Namespace Tracon · Assembly <code>Tracon.Abstractions.dll</code></div>

Represents human input awaited by a workflow run.

```csharp
public sealed record WorkflowPendingRequest : IEquatable<WorkflowPendingRequest>
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="/api/tracon.workflowpendingrequest/">WorkflowPendingRequest</a></dd><dt>Implements</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable&lt;WorkflowPendingRequest&gt;</a></dd><dt>Inherited Members</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a></dd></dl>

## Remarks

The request itself (its prompt and its form) lives in the run's
[RunEventType.WorkflowRequest](/api/tracon.runeventtype/) 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](/api/tracon.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.

## Constructors

### <a id="Tracon_WorkflowPendingRequest__ctor"></a> WorkflowPendingRequest\(\)

```csharp
public WorkflowPendingRequest()
```

## Properties

### <a id="Tracon_WorkflowPendingRequest_Answered"></a> Answered

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.

```csharp
public bool Answered { get; init; }
```

#### Property Value

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_WorkflowPendingRequest_ExpiresAt"></a> ExpiresAt

Gets when the request expires (UTC). [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when the workflow sets no
request timeout, or when the request was published before requests had an expiry.

```csharp
public DateTimeOffset? ExpiresAt { get; init; }
```

#### Property Value

 [DateTimeOffset](https://learn.microsoft.com/dotnet/api/system.datetimeoffset)?

#### Remarks

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.

### <a id="Tracon_WorkflowPendingRequest_Form"></a> Form

Gets the input field the UI should display.

```csharp
public required WorkflowRequestForm Form { get; init; }
```

#### Property Value

 [WorkflowRequestForm](/api/tracon.workflowrequestform/)

### <a id="Tracon_WorkflowPendingRequest_LastResponseRunId"></a> LastResponseRunId

Gets the run that carried out the latest answer; [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/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.

```csharp
public Guid? LastResponseRunId { get; init; }
```

#### Property Value

 [Guid](https://learn.microsoft.com/dotnet/api/system.guid)?

### <a id="Tracon_WorkflowPendingRequest_PortId"></a> PortId

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

```csharp
public required string PortId { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_WorkflowPendingRequest_Prompt"></a> Prompt

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

```csharp
public string? Prompt { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

### <a id="Tracon_WorkflowPendingRequest_RequestId"></a> RequestId

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

```csharp
public required string RequestId { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_WorkflowPendingRequest_RequestType"></a> RequestType

Gets the request data type name.

```csharp
public string? RequestType { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

### <a id="Tracon_WorkflowPendingRequest_RequestedAt"></a> RequestedAt

Gets the UTC time when the request was published.

```csharp
public DateTimeOffset RequestedAt { get; init; }
```

#### Property Value

 [DateTimeOffset](https://learn.microsoft.com/dotnet/api/system.datetimeoffset)

### <a id="Tracon_WorkflowPendingRequest_ResponseType"></a> ResponseType

Gets the expected response type name.

```csharp
public string? ResponseType { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

### <a id="Tracon_WorkflowPendingRequest_RunId"></a> RunId

Gets the identifier of the run that produced the request.

```csharp
public required Guid RunId { get; init; }
```

#### Property Value

 [Guid](https://learn.microsoft.com/dotnet/api/system.guid)

### <a id="Tracon_WorkflowPendingRequest_SessionId"></a> SessionId

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.

```csharp
public string? SessionId { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

### <a id="Tracon_WorkflowPendingRequest_WorkflowName"></a> WorkflowName

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

```csharp
public string? WorkflowName { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

## Methods

### <a id="Tracon_WorkflowPendingRequest_Equals_System_Object_"></a> Equals\(object?\)

```csharp
public override bool Equals(object? obj)
```

#### Parameters

`obj` [object](https://learn.microsoft.com/dotnet/api/system.object)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_WorkflowPendingRequest_Equals_Tracon_WorkflowPendingRequest_"></a> Equals\(WorkflowPendingRequest?\)

```csharp
public bool Equals(WorkflowPendingRequest? other)
```

#### Parameters

`other` [WorkflowPendingRequest](/api/tracon.workflowpendingrequest/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_WorkflowPendingRequest_GetHashCode"></a> GetHashCode\(\)

```csharp
public override int GetHashCode()
```

#### Returns

 [int](https://learn.microsoft.com/dotnet/api/system.int32)

### <a id="Tracon_WorkflowPendingRequest_ToString"></a> ToString\(\)

```csharp
public override string ToString()
```

#### Returns

 [string](https://learn.microsoft.com/dotnet/api/system.string)

## Operators

### <a id="Tracon_WorkflowPendingRequest_op_Equality_Tracon_WorkflowPendingRequest_Tracon_WorkflowPendingRequest_"></a> operator ==\(WorkflowPendingRequest?, WorkflowPendingRequest?\)

```csharp
public static bool operator ==(WorkflowPendingRequest? left, WorkflowPendingRequest? right)
```

#### Parameters

`left` [WorkflowPendingRequest](/api/tracon.workflowpendingrequest/)?

`right` [WorkflowPendingRequest](/api/tracon.workflowpendingrequest/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_WorkflowPendingRequest_op_Inequality_Tracon_WorkflowPendingRequest_Tracon_WorkflowPendingRequest_"></a> operator \!=\(WorkflowPendingRequest?, WorkflowPendingRequest?\)

```csharp
public static bool operator !=(WorkflowPendingRequest? left, WorkflowPendingRequest? right)
```

#### Parameters

`left` [WorkflowPendingRequest](/api/tracon.workflowpendingrequest/)?

`right` [WorkflowPendingRequest](/api/tracon.workflowpendingrequest/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)
