I would like to use workflow.RequestCancelExternalWorkflow to cancel long running workflow as part of my deletion business logic. I understand from documentation and sampling locally that this is an async operation and it returns
Future, meaning I have no way to know if the given workflow was actually cancelled yet, just scheduled to be cancelled.
Question: What would be an appropriate way to poll for completed cancellation of a given external workflow within yet another workflow? GetWorkflowHistory
?
If so why does client sdk says:
// Package client is used by external programs to communicate with Temporal service.
// NOTE: DO NOT USE THIS API INSIDE OF ANY WORKFLOW CODE!!!
And what would be an alternative?