{"record":{"id":"9a2d361cf97485f2","repo":"medusajs/medusa","slug":"method-schedulesteptimeout-not-implemented","errorCode":null,"errorMessage":"Method 'scheduleStepTimeout' not implemented.","messagePattern":"Method 'scheduleStepTimeout' not implemented\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/orchestration/src/transaction/datastore/abstract-storage.ts","lineNumber":139,"sourceCode":"    timestamp: number,\n    interval: number\n  ): Promise<void> {\n    throw new Error(\"Method 'scheduleTransactionTimeout' not implemented.\")\n  }\n\n  async clearTransactionTimeout(\n    transaction: DistributedTransactionType\n  ): Promise<void> {\n    throw new Error(\"Method 'clearTransactionTimeout' not implemented.\")\n  }\n\n  async scheduleStepTimeout(\n    transaction: DistributedTransactionType,\n    step: TransactionStep,\n    timestamp: number,\n    interval: number\n  ): Promise<void> {\n    throw new Error(\"Method 'scheduleStepTimeout' not implemented.\")\n  }\n\n  async clearStepTimeout(\n    transaction: DistributedTransactionType,\n    step: TransactionStep\n  ): Promise<void> {\n    throw new Error(\"Method 'clearStepTimeout' not implemented.\")\n  }\n\n  async clearExpiredExecutions(): Promise<void> {\n    throw new Error(\"Method 'clearExpiredExecutions' not implemented.\")\n  }\n}\n","sourceCodeStart":121,"sourceCodeEnd":153,"githubUrl":"https://github.com/medusajs/medusa/blob/5e06e544a296b9033f20f71f11c559f81a0e5739/packages/core/orchestration/src/transaction/datastore/abstract-storage.ts#L121-L153","documentation":"AbstractTransactionStore.scheduleStepTimeout is an optional hook used by the workflow engine to schedule per-step timeouts (e.g. for async waitFor steps or long-running steps with a timeout configured). The abstract base throws to force custom storage adapters to explicitly opt in to timeout scheduling.","triggerScenarios":"A workflow step defines a timeout (e.g. createStep with timeout config, or a step that transitions to WAITING with a scheduled timeout) and the configured workflow storage does not override scheduleStepTimeout. The engine calls it via TransactionOrchestrator when scheduling the step's timeout timestamp.","commonSituations":"Custom Redis/DB storage adapter implementing only persistence methods; version upgrade that introduced step timeout scheduling; using steps with timeout: <seconds> against an outdated community storage adapter.","solutions":["Implement scheduleStepTimeout in your storage adapter (store the timestamp/interval and schedule the timeout check, e.g. via Redis key expiry or a scheduler)","Disable/avoid step-level timeouts if your storage cannot support them","Switch to the official Redis storage which implements timeout scheduling","Update your adapter after upgrading orchestration to pick up new abstract members"],"exampleFix":"// before\nasync scheduleStepTimeout(transaction, step, timestamp, interval) {\n  throw new Error(\"not implemented\")\n}\n\n// after\nasync scheduleStepTimeout(transaction, step, timestamp, interval) {\n  await this.redis.set(\n    `stepTimeout:${transaction.transactionId}:${step.id}`,\n    String(timestamp),\n    \"PX\", Math.max(0, timestamp - Date.now())\n  )\n}","handlingStrategy":"validation","validationCode":"if (storage.scheduleStepTimeout === AbstractTransactionStore.prototype.scheduleStepTimeout) {\n  throw new Error('Step timeouts unsupported by this storage; remove step timeout config')\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Do not configure per-step timeouts unless your storage adapter implements scheduling","Keep schedule/clear timeout implementations paired in the adapter"],"tags":["orchestration","workflow","step-timeout","storage-adapter"],"backgroundTag":"unimplemented-abstract-method","analyzedSha":"5e06e544a296b9033f20f71f11c559f81a0e5739","analyzedAt":"2026-08-27T07:24:39.599Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}