Workflow timeout and saga compensation

Hi all

I tried to use this pattern - cancellationScope + Timer - to run compensations if a timeout fires for workflow and meet an unexpected behaviour:
my compensation activity immediately fails because of CanceledFailure ::

Is it true cancel should trigger compensation and allow it to complete?


UPDATE:

Just found another thread in which you say we need to use DetachedCancellationScope to run compensations on cancelFailures.
This fixed my issue.

Thank you

1 Like