# ExecutionStalled Constructors

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.tasks.diagnostics.durabletaskevents.executionstalled/)

## ExecutionStalled(IGrainContext, TaskId, DurableTaskAttemptCancellationReason, Exception) {#constructor-orleans-runtime-igraincontext-orleans-durable-tasks-taskid-orleans-d-5ecf7ada}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.tasks.diagnostics.durabletaskevents.executionstalled/constructors/constructor-orleans-runtime-igraincontext-orleans-durable-tasks-taskid-orleans-d-5ecf7ada/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Durable/DurableTasks/Diagnostics/DurableTaskEvents.cs#L172-L178)

```csharp
public ExecutionStalled(IGrainContext grainContext, TaskId taskId, DurableTaskAttemptCancellationReason reason, Exception exception)
```

Event payload for an attempt which stalled because the running code can't replay its execution: the execution recorded a version which the code doesn't support, or the code diverged from the recorded execution. The runtime discarded the attempt's result and keeps the task pending, and a later activation replays it.

### Parameters

- `grainContext` (`IGrainContext`): The activation whose runtime raised the event.
- `taskId` (`TaskId`): The stalled execution.
- `reason` (`DurableTaskAttemptCancellationReason`): Why the attempt stalled: [DurableTaskAttemptCancellationReason](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.durabletaskattemptcancellationreason/) or [DurableTaskAttemptCancellationReason](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.durabletaskattemptcancellationreason/).
- `exception` (`Exception`): The exception which describes the stall: a [DurableTaskVersionException](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.durabletaskversionexception/) for an unsupported version, or an `System.InvalidOperationException` which describes the divergence.
