Skip to content

qie.resolve

Signature: qie.resolve(key, zoneNs*, globalNs*)

Returns: Object result - the first non-null value found across the lookup layers, or null if no value was found

Resolves the specified key by searching, in order:

  1. message cache

  2. channel cache

  3. channel-scoped shared cache

  4. zone scoped shared cache

  5. system variable

  6. global scoped shared cache

Note

This method can also be used in a node tag as {r:key}.

Note

This convenience lookup is mainly for migrating existing 3rd-party interface engine workflows to QIE. In production channels, you should always use message cache, channel cache, shared cache, or system variable directly so each lookup’s intent and scope stay clear and deterministic.

Parameters

Type Name Description Default
String key the key to resolve
String zoneNs* (optional) the namespace to use when checking zone-scoped shared cache "zone"
String globalNs* (optional) the namespace to use when checking global-scoped shared cache "global"

Example

// qie.resolve(key) searches, in order:
//   1) messageCache
//   2) channelCache
//   3) sharedCache (channel scope)
//   4) sharedCache (zone scope, namespace = zoneNamespace or "zone" by default)
//   5) system variable
//   6) sharedCache (global scope, namespace = globalNamespace or "global" by default)
// and returns the first non-null value found.

// Single-arg: use default zone/global namespaces
var patientId = qie.resolve("patientId");

// Two-arg: override the zone-scope namespace
var siteCode = qie.resolve("siteCode", "siteZone");

// Three-arg: override both zone and global namespaces
var corporateFlag = qie.resolve("corporateFlag", "siteZone", "corporate");

// The {r:...} template node tag calls qie.resolve() under the hood
var patientIdFromTemplate = qie.evaluateTemplate("Patient ID = {r:patientId}");