danielgerlag/workflow-core

Post workflow middleware can't catch cancelled workflow

wakuflair opened this issue · 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?