{"record":{"id":"f3109160f72fbbe8","repo":"hcengineering/platform","slug":"process-error-methodnotfound-f31091","errorCode":"process:error:MethodNotFound","errorMessage":"Method not found: {methodId}","messagePattern":"Method not found: (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"services/process/src/main.ts","lineNumber":260,"sourceCode":"      await control.client.tx(tx)\n      clearTimeout(timeout)\n    }\n    if (res.rollback != null) {\n      execution.rollback = execution.rollback.length > 30 ? execution.rollback.slice(-30) : execution.rollback\n      await control.client.update(execution, { rollback: execution.rollback })\n    }\n  }\n}\n\nasync function executeResultSet (\n  control: ProcessControl,\n  results: UserResult[],\n  execution: Execution\n): Promise<ExecuteResult> {\n  try {\n    const method = control.client.getModel().findObject(process.method.UpdateCard)\n    if (method === undefined) {\n      throw processError(process.error.MethodNotFound, { methodId: process.method.UpdateCard }, {}, true)\n    }\n    const impl = control.client.getHierarchy().as(method, serverProcess.mixin.MethodImpl) as MethodImpl<any>\n    if (impl === undefined) {\n      throw processError(process.error.MethodNotFound, { methodId: process.method.UpdateCard }, {}, true)\n    }\n    const params = {}\n    for (const res of results) {\n      if (res.key == null) continue\n      ;(params as any)[res.key] = execution.context[res._id]\n    }\n    if (!control.cache.has(execution.card)) {\n      const card = await control.client.findOne(cardPlugin.class.Card, { _id: execution.card })\n      if (card !== undefined) {\n        control.cache.set(execution.card, card)\n      }\n    }\n    const f = await getResource(impl.func)\n    const res = await f(params, execution, control, undefined)","sourceCodeStart":242,"sourceCodeEnd":278,"githubUrl":"https://github.com/hcengineering/platform/blob/63e28dc96483967b2fc21c881b3f1023c1de7718/services/process/src/main.ts#L242-L278","documentation":"The process service could not resolve the hard-coded UpdateCard method in the client model: findObject(process.method.UpdateCard) returned undefined. This means the workspace model does not contain the UpdateCard method class required to apply user results to the execution card. It is thrown because executing a result set without that method would silently skip card updates.","triggerScenarios":"Calling executeResultSet (via res) in a workspace whose model lacks the process.method.UpdateCard class — e.g. the process model upgrade/migration was not applied, or the method id changed between versions.","commonSituations":"Deploying an older process service against a newer model (or vice versa), a failed or skipped model migration, or custom deployments that stripped or renamed the UpdateCard method class.","solutions":["Verify process.method.UpdateCard exists in the workspace model via control.client.getModel().findObject.","Re-run model migrations / upgrade the process service and model to matching versions.","Check that the process.method.UpdateCard constant matches the actual class id in the model definitions.","If the method was intentionally removed, replace the hard-coded UpdateCard lookup with a configured or optional method id."],"exampleFix":"// before\nconst method = control.client.getModel().findObject(process.method.UpdateCard)\nif (method === undefined) {\n  throw processError(process.error.MethodNotFound, { methodId: process.method.UpdateCard }, {}, true)\n}\n// after\nconst method = control.client.getModel().findObject(process.method.UpdateCard)\nif (method === undefined) {\n  console.error('UpdateCard method missing from model; run model upgrade', { methodId: process.method.UpdateCard })\n  throw processError(process.error.MethodNotFound, { methodId: process.method.UpdateCard }, {}, true)\n}","handlingStrategy":"validation","validationCode":"const method = control.client.getModel().findObject(process.method.UpdateCard)\nif (method === undefined) throw new Error(`Model missing UpdateCard: ${process.method.UpdateCard}; run model migrations`)","typeGuard":"function hasMethod(model: Model, id: Ref<Class<Doc>>): boolean { return model.findObject(id) !== undefined }","tryCatchPattern":"try {\n  await executeResultSet(control, results, execution)\n} catch (err) {\n  if (err.code === 'process:error:MethodNotFound' && err.methodId === process.method.UpdateCard) {\n    console.error('UpdateCard method missing; apply model upgrade before running processes')\n    return\n  }\n  throw err\n}","preventionTips":["Keep service and model versions in lockstep; always run migrations on upgrade.","Add a startup check that all process.method constants resolve in the model.","Do not strip mixins or classes when importing model data.","Monitor process:error:MethodNotFound occurrences as a deploy health signal."],"tags":["model","method-lookup","process"],"backgroundTag":"method-not-found-in-model","analyzedSha":"63e28dc96483967b2fc21c881b3f1023c1de7718","analyzedAt":"2026-08-29T15:21:27.377Z","schemaVersion":2},"datasetVersion":"2026-08-29T17:17:51.833Z"}