hcengineering/platform · error · ProcessError

process.error.UserRequestedValueNotProvided

process.error.UserRequestedValueNotProvided

Error message

User requested value not provided: {attr}

What it means

getUserRequestValue looks up the value the user was supposed to supply in execution.context[context.id]; if absent, it throws UserRequestedValueNotProvided naming the attribute label. The process paused for user input that never arrived.

Source

Thrown at server-plugins/process-resources/src/utils.ts:282

    const funcImpl = control.client.getHierarchy().as(transform, serverProcess.mixin.FuncImpl)
    const f = await getResource(funcImpl.func)
    const val = await f(res, {}, control, execution)
    if (val == null && context.func !== process.function.EmptyValue) {
      throw processError(process.error.EmptyFunctionResult, {}, { func: func.label })
    }
    return val
  }
  if (res == null && context.func !== process.function.EmptyValue) {
    throw processError(process.error.EmptyFunctionResult, {}, { func: func.label })
  }
  return res
}

function getUserRequestValue (control: ProcessControl, execution: Execution, context: SelectedUserRequest): any {
  const userContext = execution.context[context.id]
  if (userContext !== undefined) return userContext
  const attr = control.client.getHierarchy().findAttribute(context._class, context.key)
  throw processError(
    process.error.UserRequestedValueNotProvided,
    {},
    { attr: attr?.label ?? getEmbeddedLabel(context.key) }
  )
}

async function getExecutionContextValue (
  control: ProcessControl,
  execution: Execution,
  context: SelectedExecutionContext
): Promise<any> {
  const userContext = execution.context[context.id]
  const _process = control.client.getModel().findObject(execution.process)
  const processContext = _process?.context?.[context.id]
  if (userContext !== undefined) {
    if (context.key == null || context.key === '' || context.key === '_id') return userContext
    if (processContext !== undefined) {
      const contextVal =

View on GitHub (pinned to 63e28dc964)

Solutions

  1. Ensure the client writes the user's answer to execution.context[context.id] before resuming the process
  2. Verify the context id used when resuming matches the SelectedUserRequest id
  3. Validate required user inputs in the UI before completing the step
  4. Catch the error and re-prompt the user for the missing attribute

Example fix

// before
await process.resume(executionId) // user answer never stored
// after
await process.resume(executionId, { context: { [requestContext.id]: userInput } })
Defensive patterns

Strategy: validation

Validate before calling

if (execution.context[requestContext.id] === undefined) {
  throw new Error(`user input for ${requestContext.key} is required before resuming`)
}

Try / catch

try {
  val = await getContextValue(control, execution, context)
} catch (e) {
  if (e?.code === 'process.error.UserRequestedValueNotProvided') {
    return promptUserFor(e.params?.attr) // re-prompt instead of failing
  }
  throw e
}

Prevention

When it happens

Trigger: execution.context lacks an entry for context.id when the user-request context is evaluated — user skipped a form step, the answer was never stored back into execution.context, or the id key mismatches.

Common situations: Client UI not persisting the user's answer under the expected context id; process resumed programmatically without injecting the requested value; id mismatch between the request step and the resume call.

Related errors


AI-assisted analysis of hcengineering/platform@63e28dc964 (2026-08-29). Data as JSON: /api/errors/35f7323bfa658ac0. Report an issue: GitHub.