{"record":{"id":"b71d8f89cc499f07","repo":"ruvnet/ruflo","slug":"workflow-state-not-found-for-workflowid","errorCode":null,"errorMessage":"Workflow state not found for ${workflowId}","messagePattern":"Workflow state not found for (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/src/task-execution/application/WorkflowEngine.ts","lineNumber":339,"sourceCode":"    };\n  }\n\n  /**\n   * Restore a workflow from persisted state\n   */\n  async restoreWorkflow(workflowId: string): Promise<WorkflowState> {\n    if (!this.memoryBackend) {\n      throw new Error('Memory backend not available');\n    }\n\n    const stateMemory = await this.memoryBackend.retrieve(`workflow-state-${workflowId}`);\n    if (!stateMemory) {\n      // Try alternate key\n      const result = await this.memoryBackend.retrieve('workflow-state');\n      if (result) {\n        return JSON.parse(result.content);\n      }\n      throw new Error(`Workflow state not found for ${workflowId}`);\n    }\n\n    return JSON.parse(stateMemory.content);\n  }\n\n  // ============================================================================\n  // Private Helper Methods\n  // ============================================================================\n\n  private createExecution(workflow: WorkflowDefinition): WorkflowExecution {\n    return {\n      id: workflow.id,\n      state: {\n        id: workflow.id,\n        name: workflow.name,\n        tasks: workflow.tasks,\n        status: 'in-progress',\n        completedTasks: [],","sourceCodeStart":321,"sourceCodeEnd":357,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/src/task-execution/application/WorkflowEngine.ts#L321-L357","documentation":"restoreWorkflow() retrieved key 'workflow-state-<id>' from the memory backend and got nothing, and the fallback 'workflow-state' key also missed. The workflow's persisted state was never written or has expired/been evicted, so there is nothing to restore.","triggerScenarios":"Thrown at v3/src/task-execution/application/WorkflowEngine.ts:339 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the referenced identifier exists before use (list available items and match against user input).","Return a clear 404-style error listing valid identifiers, and have the caller retry with an existing id."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}