Portal Community

What Is HIL?

Automated workflows often reach points that require human judgment — an approval decision, a data entry step, or a review of AI-generated content. HIL is the mechanism by which a workflow pauses at such a point, notifies the right person, and resumes when they respond.

Key properties of the HIL system:

The HIL Lifecycle

1

HIL node executes

Engine calls the HIL executor. It returns NodeExecutionResult.Suspend(payload).

2

State persisted

Engine serialises ExecutionMemory and writes to Process_SuspendedExecutions. A correlation token is generated and stored.

3

Actor notified

A HIL task is created. Notification channels (email, Slack, inbox) are triggered by event handlers.

4

Actor responds

Actor calls POST /api/executions/{executionResId}/resume with their response data.

5

Execution resumes

Engine restores ExecutionMemory, merges response data, and continues from the suspended node's output port.

Why the Engine Is Freed During Suspension

Workflows can be suspended for hours, days, or indefinitely. If the engine held an in-process thread for each suspended execution, the server would exhaust resources quickly. Instead, suspension is a database operation — the thread is freed and the engine can handle other executions. When resume is called, a new thread is allocated and the state is restored from the database.

Cross-process resume: If the server restarts between suspension and resume, the resume API call still works — the state is in the database, not in process memory. Any server instance in the cluster can handle the resume call.