MastraM
Mastraโ€ข3mo agoโ€ข
5 replies
ewald

Resume to a suspended Workflow run

I am trying to return to a suspended workflow run using
workflow.createRunAsync({runId: ... })
and I see in the method that it is looking inside the run-map if the run already exists and than looks it up in the snapshot storage but never returns this data, but instead the one in the process run-map. Why is that? I want to resume to my workflow but this way it always creates a new pending one if i am not in the same instance of this workflow class. Like if I have two different requests. How would i approach this? โ€“ Like have a first API call that is starting the workflow and is causing a suspend and second request is continuing the same workflow using the latest workflow run with the specific runId. Help is appreciated ๐Ÿ™‚ thank u!
GitHub
The TypeScript AI agent framework. โšก Assistants, RAG, observability. Supports any LLM: GPT-4, Claude, Gemini, Llama. - mastra-ai/mastra
mastra/packages/core/src/workflows/workflow.ts at c710c1652dccfdc41...
Was this page helpful?