Portal Community

Fail Behaviour

// HILFailureService.cs
public async Task FailAsync(SuspendedExecution suspension, CancellationToken ct)
{
    // Mark the suspended execution as Failed
    await _suspendedRepo.UpdateStatusAsync(
        suspension.ExecutionResId, SuspensionStatus.TimedOut, ct);

    // Fail the workflow execution with a terminal error
    await _executionService.FailAsync(suspension.ExecutionId, new HILTimeoutError
    {
        Message      = $"HIL task at node '{suspension.SuspendedNodeId}' timed out without a response.",
        NodeId       = suspension.SuspendedNodeId,
        ExpiredAt    = DateTimeOffset.UtcNow,
        ActorId      = suspension.ActorId
    }, ct);
}

Execution Status After Fail

FieldValue
Execution StatusFailed
FailedNodeIdThe HIL node's ID
ErrorTypeHILTimeoutError
ErrorMessage"HIL task at node '{nodeId}' timed out without a response."

When to Use Fail

Recovery After Fail

Once a workflow fails on HIL timeout, it cannot be resumed through the normal resume API. Recovery options:

Default behavior is Fail: If you set timeoutDuration but leave timeoutBehavior unset, the default is Fail. Be intentional — always set both fields when configuring a timeout.