workflow-core icon indicating copy to clipboard operation
workflow-core copied to clipboard

Post workflow middleware can't catch cancelled workflow

Open wakuflair opened this issue 5 months ago • 0 comments

Describe the bug A cancelled workflow not be caught in a post workflow middleware.

To Reproduce

  1. Create a post workflow middleware following doc
  2. Start a workflow with a CancellationToken
  3. Cancel the workflow with token
  4. The middleware is not triggered

Expected behavior The post workflow middleware should be triggered with a "Terminated" status workflow.

Additional context

I am not sure if it is by design, if yes, how can I handle a cancelled workflow by using workflow middleware?

wakuflair avatar Jan 24 '24 08:01 wakuflair