Portal Community

When to Cancel

Cancel Sequence

1

Client Sends Cancel Request

POST /api/v1/process-engine/executions/{id}/cancel

2

CancellationToken Signalled

The backend sets the CancellationToken passed to all running node executors. Well-implemented executors check this token and stop gracefully.

3

Grace Period (5s)

Running nodes are given 5 seconds to complete their current operation. After that, they are forcibly terminated.

4

Execution Marked Cancelled

The execution record is marked Cancelled in the database. All pending nodes show as Skipped. Running nodes show as Failed with reason "Cancelled".

Cancel vs Pause Comparison

AspectPauseCancel
Resumable?YesNo
Execution memory preserved?YesPartial (up to cancellation point)
Effect on running nodeWaits for it to finishSignals cancellation, 5s grace period
Final statusPaused (temporary)Cancelled (permanent)
Re-run after?Resume or Run AgainRun Again only (new execution)
Cancellation Is Permanent There is no undo for cancellation. If you need to be able to stop and continue later, use Pause instead.