After starting a workflow asynchronously, I want to wait for its completion but with a timeout. For example, the WorkflowExecutionTimeout is set to 60 seconds while starting the workflow asynchronously. But I want to wait only for 10 seconds and then return to the caller. The workflow should continue to execute for 60 seconds.
How can I achieve this? I did not find any API to specify the 10 seconds timeout while reconnecting to the already started workflow. I referred to the page Starting workflow executions | Temporal (the API also seems to have changed from the example shown on this page).