{"record":{"id":"df77b96c7d1c3d3a","repo":"apache/beam","slug":"param-pardoparamname-not-defined-outside-of-a-process-call","errorCode":null,"errorMessage":"${param.parDoParamName} not defined outside of a process() call.","messagePattern":"(.+?) not defined outside of a process\\(\\) call\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"sdks/typescript/src/apache_beam/worker/pardo_context.ts","lineNumber":157,"sourceCode":"    if (wvalue === null || wvalue === undefined) {\n      return operators.NonPromise;\n    }\n    // We have to prefetch all the side inputs.\n    // TODO: (API) Let the user's process() await them.\n    if (this.prefetchCallbacks.length === 0) {\n      return operators.NonPromise;\n    } else {\n      const result = new operators.ProcessResultBuilder();\n      for (const cb of this.prefetchCallbacks) {\n        result.add(cb(wvalue!.windows[0]));\n      }\n      return result.build();\n    }\n  }\n\n  lookup(param) {\n    if (this.wvalue === null || this.wvalue === undefined) {\n      throw new Error(\n        param.parDoParamName + \" not defined outside of a process() call.\",\n      );\n    }\n\n    switch (param.parDoParamName) {\n      case \"window\":\n        // If we're here and there was more than one window, we have exploded.\n        return this.wvalue.windows[0];\n\n      case \"timestamp\":\n        return this.wvalue.timestamp;\n\n      case \"paneinfo\":\n        return this.wvalue.pane;\n\n      case \"sideInput\":\n        return this.sideInputValues.get(param.sideInputId) as any;\n","sourceCodeStart":139,"sourceCodeEnd":175,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/typescript/src/apache_beam/worker/pardo_context.ts#L139-L175","documentation":"DoFnProcessContext.lookup was called while the context has no current windowed value (this.wvalue is null), i.e. a side-input/state parameter accessor was invoked outside of an active process() invocation for an element. The param named by parDoParamName is the input at fault; the guard exists because side inputs can only be resolved against the current element's window.","triggerScenarios":"Thrown at sdks/typescript/src/apache_beam/worker/pardo_context.ts:157 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Move the accessor call (e.g. sideInput()/state lookups) inside the DoFn's process method so a current element/window exists.","Use a startBundle/finishBundle-safe API for context-free data instead of per-element parameters.","Never cache the context object and reuse it across elements; re-read params from the process argument each call."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}