Is there a way to perform saga.compensate upon workflow terminate?

Hi i use saga for my in my workflow a lot.
when a workflow is running too long, there are cases where we want to terminate it, in case of terminate, i want the compensate all previous saga to be called. can this be achieved using some configuration?

if not what will be an alternate way signals?

3 Likes

Termination by definition is the hard kill. So no cleanup is expected. If you want to perform cleanup use cancel. See this discussion on how workflow can handle cancellation.

2 Likes