c8volt cancel process-instance
Cancel process instances by key or filters
Synopsis
Cancel process instances by key or search filters.
By default c8volt validates the affected root and descendant instances, asks for confirmation, and waits until cancellation is observed. Use –force when a selected child must be escalated to its root instance.
Tenant contract: –tenant scopes search-derived candidate discovery where supported. Explicit –key and stdin keys are backend-authorized admin input; existing dry-run, confirmation, force, and wait safety checks still apply.
When –bpmn-process-id is set, c8volt validates that the process definition is visible before searching process instances. A missing selector fails with a local diagnostic before paging, dry-run planning, confirmation, or cancellation; –json, –automation, and non-TTY runs never prompt for recovery output. If the selector is visible but no matching instances are found, no cancellation request is submitted.
Use –dry-run to preview selected, in-scope, final-state, and partial-scope instances without cancelling.
Use –auto-confirm for unattended destructive runs.
c8volt cancel process-instance [flags]
Examples
./c8volt cancel pi --key <process-instance-key>
./c8volt cancel pi --key <process-instance-key> --dry-run
./c8volt cancel pi --key <process-instance-key> --force
./c8volt cancel pi --state active --batch-size 250 --limit 5 --dry-run
./c8volt cancel pi --state active --start-date-before 2026-05-31 --limit 5 --dry-run
./c8volt cancel pi --state active --start-date-newer-days 30 --limit 5 --dry-run
./c8volt cancel pi --bpmn-process-id <bpmn-process-id> --state active --limit 5 --auto-confirm
./c8volt expect pi --key <process-instance-key> --state canceled
./c8volt get pi --key <process-instance-key> --keys-only | ./c8volt cancel pi --auto-confirm -
Options
-n, --batch-size int32 number of process instances to process per page (max limit 1000 enforced by server) (default 1000)
-b, --bpmn-process-id string BPMN process ID to filter process instances
--dry-run preview cancel scope without submitting cancellation
--end-date-after string only include process instances with end date >= YYYY-MM-DD
--end-date-before string only include process instances with end date <= YYYY-MM-DD
--end-date-newer-days int only include process instances with end date N days old or newer (0 means today) (default -1)
--end-date-older-days int only include process instances with end date N days old or older (default -1)
--fail-fast stop scheduling new instances after the first error
--force cancel the root instance when a selected instance is a child
-h, --help help for process-instance
-k, --key strings process instance key(s) to cancel
-l, --limit int32 maximum number of matching process instances to process across all pages
--no-state-check skip checking the current state of the process instance before cancelling it
--no-wait return after cancellation is accepted
--no-worker-limit use all queued jobs as workers when --workers is unset
--pd-version int32 process definition version
--pd-version-tag string process definition version tag
--start-date-after string only include process instances with start date >= YYYY-MM-DD
--start-date-before string only include process instances with start date <= YYYY-MM-DD
--start-date-newer-days int only include process instances N days old or newer (0 means today) (default -1)
--start-date-older-days int only include process instances N days old or older (default -1)
-s, --state string state to filter process instances: all, active, completed, canceled, terminated (default "all")
-w, --workers int maximum concurrent workers when --batch-size > 1 (default: min(batch-size, 2*GOMAXPROCS, 32))
Options inherited from parent commands
-y, --auto-confirm auto-confirm prompts for non-interactive use
--automation enable non-interactive mode for commands that explicitly support it
--config string path to config file
--debug enable debug logging
-j, --json output as JSON (where applicable)
--keys-only output keys only (where applicable)
--log-level string log level (debug, info, warn, error) (default "info")
--no-indicator disable transient terminal activity indicators
--profile string config active profile name to use (e.g. dev, prod)
-q, --quiet suppress output except errors
--tenant string tenant ID for discovery/search, selection, create, deploy, and run flows; explicit keys/IDs remain backend-authorized
--timeout duration HTTP request timeout (default 30s)
-v, --verbose show additional output
SEE ALSO
- c8volt cancel - Cancel running process instances