Skip to Content
This documentation is provided with the HEAT environment and is relevant for this HEAT instance only.
RunnersCore Utilssession-users-from-json

session-users-from-json

The session-users-from-json node reads a parent JSON output, selects the user entries at usersPath, and makes the session’s users cover them through the Core API session users endpoint. It is the generic form of what react-utils does with USER_REGISTRATION events: HEAT Capture streams carry no HEAT Auth identity, only each capture instance’s origin_uuid, so a template that has already resolved origins to roles registers those origins as the session’s users. Dashboards then attribute themselves to them through dashboard_users (see dashboard-v2 upstream contract), which is what lists roles in the session header and makes a session visible to its trainees.

When to use it

Use it in capture templates where a node already knows which origin belongs to which seat or station (for example a system-arbex-js session model that binds headset origins to aircraft through the DIS application id). Put it directly under that node. No session metadata or Capture registration is required.

Behaviour

  • Runs on the parent’s latest output.
  • Entries whose id is not a GUID or an integer are skipped with a warning; entries without an id are skipped silently.
  • Idempotent: existing links are kept; a link whose role or grouping differs from the data is removed and re-added (Core has no patch for a session user); nothing the data no longer mentions is removed.
  • Output: a small JSON summary (users, added, updated, unchanged, warnings).

Configuration

PropertyDefaultDescription
usersPathoutput.origins[?role && !central]JMESPath selecting an array of objects or an object map of objects.
idFieldoriginUuidField holding the user id (Auth GUID, origin_uuid, or numeric core user id).
roleFieldroleField holding the role (seat or station label).
groupingFieldgroupingField holding the grouping.
defaultGrouping1Grouping when the entry has none.
defaultRoleParticipantRole when the entry has none.
inputModelatestInput selection policy.

Example

Parent output (a session model):

{ "output": { "origins": [ { "originUuid": "a289309f-…", "role": "Aircraft 1", "central": false }, { "originUuid": "5eec86bf-…", "role": null, "label": "DIS feed", "central": true } ] } }

Node configuration:

{ "inputMode": "latest", "usersPath": "output.origins[?role && !central]" }

Result: one session user with external id a289309f-… and role Aircraft 1. The central DIS feed is not a user. A dashboard whose payload lists "dashboard_users": ["a289309f-…"] is attributed to that user.