Flow Studio
No Action (Fail on Timeout)
When timeoutBehavior is set to Fail (or left unset), the workflow fails entirely on timeout with a HILTimeoutError. No output port is used — this is a terminal failure state.
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
| Field | Value |
|---|---|
| Execution Status | Failed |
| FailedNodeId | The HIL node's ID |
| ErrorType | HILTimeoutError |
| ErrorMessage | "HIL task at node '{nodeId}' timed out without a response." |
When to Use Fail
- The task MUST have human involvement — no automated fallback is acceptable.
- Missing a deadline is itself a business process failure that must be tracked and investigated.
- The workflow is non-critical and can be restarted from scratch by the initiator.
Recovery After Fail
Once a workflow fails on HIL timeout, it cannot be resumed through the normal resume API. Recovery options:
- The initiator creates a new execution of the same workflow.
- An admin uses the force-resume API if the state needs to be recovered (advanced).
- A monitoring alert fires (Guide 28) — the ops team investigates and restarts manually.
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.