How to do we restart a process instance using zeebe Client?

I want to use Zeebe as a workflow engine working with my microservice and so far, I am liking it because of its scalibility. I am not sure if it is possible to cater all the scenarios which Camunda offers as matured workflow engine. One of the scenarios is “Restarting a process Instance”. In my project I may have the reuirement that a running process is cancelled and can be restarted again asynchronously.
I know camunda offers it but is there any way how we can achieve the same wirh zeebe?

The API has a cancelWorkflowInstance method, but there is no resurrectCancelledWorkflowInstance method, if that is what you are looking for.

1 Like

I am actually looking for something sort of resurrectCancelledWorkflowInstance method. :slight_smile:

1 Like

If you open a GitHub issue requesting it, here is a picture for it:

zombie

1 Like

:grinning: nice one

Actually, thinking about this - it will be challenging. Once the workflow is cancelled, it ceases to exist.

If you export the events in the broker to an external source (like Elastic Search), you have an event stream that you can replay to get its state - but you are missing any messages that arrived after it was cancelled, and I’m not sure about reconstructing the timers. I guess you could do that from the entry to the timer and the cancellation event…

But you are basically looking at a feature to stream events back into the broker from an external source, which is a separate concern.

The only “persistent” state in Zeebe is active workflows. After they finish or are cancelled, they are gone. The only record of their existence is the echo of the exported events in some other system.

1 Like