elsa-workflows / elsa-core

A .NET workflows library
https://v3.elsaworkflows.io/
MIT License
6.26k stars 1.14k forks source link

Stop workflow engine #2642

Open sfmskywalker opened 2 years ago

sfmskywalker commented 2 years ago

It would be good to be able to stop the workflow engine, e.g. through a setting or even a single line of code. The challenge would be that there are various components like Quartz and Hangfire hosted services that keep on triggering workflow executions.

senfgurke commented 2 years ago

This would be a usefull feature and could cover the following use cases:

possible Implementation:

mohdali commented 2 years ago

Great idea! In a previous product we had a control panel that allowed to control several sub services and stop them individually or stop all services.

That way for example we can have more fine tuned control to stop timer, http endpoints, service buses, etc. While still being able to interact with the workflow from designer API.

Just a recent example use case that we have: we created a custom activity that's malfunction and causing a memory leak, so we are forced to stop the engine. But we are then unable to view the history and see what went wrong. While we could have two different apps for the API and the engine, it is not really desirable.