c8volt delete process-instance
Delete process instances by key or filters
Synopsis
Delete process instances by key or search filters, optionally cancelling first.
By default c8volt validates the complete affected tree before submitting any delete request, prompts before deletion, and waits until deletion is observed. If any affected process instance is not in a final state, the whole delete batch is refused before mutation. Use –force to cancel the affected scope first, then delete it.
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, cancellation, or deletion; –json, –automation, and non-TTY runs never prompt for recovery output. If the selector is visible but no matching instances are found, no deletion request is submitted.
Use –dry-run to preview selected, in-scope, final-state, non-final, and partial-scope instances without deleting or cancelling.
Use –auto-confirm for unattended destructive runs.
c8volt delete process-instance [flags]
Examples
./c8volt delete pi --key <process-instance-key> --force
./c8volt delete pi --key <process-instance-key> --dry-run
./c8volt delete pi --state terminated --batch-size 250 --limit 5 --dry-run
./c8volt delete pi --state terminated --end-date-after 2026-05-01 --end-date-before 2026-05-31 --limit 5 --dry-run
./c8volt delete pi --bpmn-process-id <bpmn-process-id> --state terminated --batch-size 250 --limit 5 --dry-run
./c8volt expect pi --key <process-instance-key> --state absent
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 delete scope without submitting deletion or cancel-before-delete requests
--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 force cancellation of the process instance(s), prior to deletion
-h, --help help for process-instance
-k, --key strings process instance key(s) to delete; repeat or combine with stdin '-'
-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 deleting it
--no-wait return after deletion 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 delete - Delete process instances or definitions