Skip to main content
Version: 8.8 (unreleased)

Cancel process instance in a batch

Prerequisites

  1. Run the Zeebe broker with endpoint localhost:26500 (default).
  2. Run the deploy a process example.
  3. Run the create a process instance example multiple times.

CancelProcessInstanceBatchCreator.java

This example demonstrates how to cancel multiple process instances using a batch operation in Zeebe. The batch operation is applied to all active root process instances matching the given filter object:

final CreateBatchOperationResponse result =
camundaClient
.newCreateBatchOperationCommand()
.processInstanceCancel()
.filter(b -> b.processDefinitionId(bpmnProcessId))
.send()
.join();