sdk-typescript
sdk-typescript copied to clipboard
[Feature Request] Add `ChildWorkflowHandle.cancel()`
Is your feature request related to a problem? Please describe.
Currently can only cancel a child by canceling a scope.
Describe the solution you'd like
Would be convenient to be able to do childHandle.cancel()
Current handle API: https://typescript.temporal.io/api/interfaces/workflow.childworkflowhandle/
Related Slack discussion.
Two possible work arounds:
- Use
getExternalWorkflowHandleto get a regularWorkflowHandleon the child workflow. Then use that handle to send the cancel command. - Start the child in a cancellation scope, then cancel the scope.