Hi I’m wondering if there is a way to get the result of an already finished workflow.
example: I have a workflow that gets some information on an external api using an activity,
I would like to keep using the result of that workflow execution for some time without needing to restart it. similar to how a cache works.
Is there a way to do that?
Yes, you can get the result from closed workflows as long as the history is saved on the server (depends on the configured retention period).
In TS you can get a handle to your workflow and use it to get the result Workflow Clients in TypeScript | Temporal Documentation
Thanks for the answer, the link to the documentation that you provided shows how to get handle with a client, but I want to do that within a workflow execution.
from what I see the api for getExternalWorkflowHandle() does not seem to return the sames function as gethandles is that by design. Is there a way around it ?
A workflow can only get result of its own child workflows, if you need to get the result of an external workflow you should use an activity.