issue
There are some Workflows we intentionally cancel mid-execution when we detect additional work is not needed. Normally at the end of these Workflows we run a cleanup activity to get rid of tmp files created by the workflow. However, our cleanup activity is never run when Workflows are cancelled mid-exec. Is there a way to configure this activity to also be run when a workflow is cancelled?
background info
If it makes any difference, Cancellation is triggered from within an activity with a slightly more graceful version of:
let workflowId = Context.current().info.workflowExecution.workflowId
let handle = wfClient.getHandle(workflowId);
await handle.cancel();
Looked at the typescript-sdk-docs on failure handling and the part on cancelled-failure links to a 404.