Create non-blocking workflow instances
Prerequisites​
- Running Zeebe broker with endpoint
localhost:26500
(default) - Run the deploy a workflow example
NonBlockingWorkflowInstanceCreator.java​
long instancesCreating = 0;
while (instancesCreating < numberOfInstances) {
// this is non-blocking/async => returns a future
final ZeebeFuture<WorkflowInstanceEvent> future =
client.newCreateInstanceCommand().bpmnProcessId(bpmnProcessId).latestVersion().send();
// could put the future somewhere and eventually wait for its completion
instancesCreating++;
}