Problem
Inside ~{ ... } blocks in workflow JSON configs, expressions are evaluated via JSONata's expr.evaluate(context). In JSONata, $identifier is a bound variable, not a path. Since no variable named $message is ever bound, $message is always undefined inside JSONata:
user-dashboard.json: $count($message.groups) = 0 → $count(undefined) = 0 → 0 = 0 → always true → "no groups" message always shows even when user has groups
group-dashboard.json: $message.id = 'manage-documents' → undefined = '...' → always false → wrong right-panel text in admin panel
The correct JSONata path syntax for context.message.groups is message.groups (no $ prefix), since context is the root input $.
Fix
user-dashboard.json: $count($message.groups) → $count(message.groups)
group-dashboard.json: $message.id → message.id in the open-admin-panel handler
Problem
Inside
~{ ... }blocks in workflow JSON configs, expressions are evaluated via JSONata'sexpr.evaluate(context). In JSONata,$identifieris a bound variable, not a path. Since no variable named$messageis ever bound,$messageis alwaysundefinedinside JSONata:user-dashboard.json:$count($message.groups) = 0→$count(undefined) = 0→0 = 0→ alwaystrue→ "no groups" message always shows even when user has groupsgroup-dashboard.json:$message.id = 'manage-documents'→undefined = '...'→ alwaysfalse→ wrong right-panel text in admin panelThe correct JSONata path syntax for
context.message.groupsismessage.groups(no$prefix), sincecontextis the root input$.Fix
user-dashboard.json:$count($message.groups)→$count(message.groups)group-dashboard.json:$message.id→message.idin theopen-admin-panelhandler