ProcessInstance not created yet on whenComplete() callback of newCreateInstanceCommand()

Hello @Sankar ,

the most important question here is:

However when Zeebe says I’m done, shouldn’t it be actually done from the eyes of other components as well?

The answer is no. Here, the cause is that zeebe export processed events, leading to a stream of events that is exported to Elasticsearch. From here, Operate, Tasklist and Optimize are able to use the exported data to calculate the current status of the zeebe.

As this does not happen synchronous, there is a chance that the last event was not already processed by other components, leading to a state where a state change was processed by zeebe, but the resulting event have not yet been processed.

As a workaround, you can wrap the call to Operate into a resilience framework like resilience4j.

I hope this helps

Jonathan