Skip to main content
Version: 8.4

Create non-blocking process instances

Prerequisites

  1. Run the Zeebe broker with endpoint localhost:26500 (default).
  2. Run the deploy a process example.

NonBlockingProcessInstanceCreator.java

Source on GitHub

long instancesCreating = 0;

while (instancesCreating < numberOfInstances) {
// this is non-blocking/async => returns a future
final ZeebeFuture<ProcessInstanceEvent> future =
client.newCreateInstanceCommand().bpmnProcessId(bpmnProcessId).latestVersion().send();

// could put the future somewhere and eventually wait for its completion

instancesCreating++;
}