What happens when ASP.NET host is stopped #1500
-
|
What happens with Elsa Workflows that are currently being executed when ASP.NET host is stopped (either externally via stop signal or internally via StopApplication())? Are workflow bursts finished, state written to database and resumed immediately when host is started again (or taken over by parallel instance), or......? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Good question. I don't know actually what happens when a host is shutdown gracefully and whether the current HTTP request (if any) is allowed to finish. I also don't know about Hosted Services, although I presume their CancellationTokens will be triggered, allowing a graceful shutdown. In any case, Elsa does not handle the What Elsa does do however is resume any workflow instances that are still marked as |
Beta Was this translation helpful? Give feedback.
Good question. I don't know actually what happens when a host is shutdown gracefully and whether the current HTTP request (if any) is allowed to finish. I also don't know about Hosted Services, although I presume their CancellationTokens will be triggered, allowing a graceful shutdown.
In any case, Elsa does not handle the
ApplicationStoppingapplication lifecycle event.What Elsa does do however is resume any workflow instances that are still marked as
Runningduring application startup. So even if an ASP.NET Host is suddenly taken out of memory (i.e. an ungraceful shutdown), Elsa will resume from the last-known state.