@servicenow/sdk - v4.9.0
    Preparing search index...
    • Defines error evaluation conditions within an action body.

      Error evaluation allows an action to conditionally set its status based on step outputs and input values. This maps to sys_hub_action_status_metadata and sys_hub_status_condition records in the platform.

      Parameters

      Returns void

      A marker type — this function is erased at runtime.

      Action(
      { ... },
      (params) => {
      const step1 = wfa.actionStep(actionStep.createRecord, ...)

      wfa.errorEvaluation([
      {
      label: 'success check',
      condition: `${wfa.dataPill(step1.__step_status__.code, 'integer')}!=500`,
      status: { code: 200, message: 'OK' },
      dontTreatAsError: true,
      },
      ])
      }
      )