Portal Community
What is this? The Expression Evaluation Framework replaces ad-hoc Jint-based field resolution with a first-class directive system. Any node field value can contain expressions like {@ $ctx.user.name } or {@ $var.invoiceTotal @uppercase } and they are resolved at runtime by the appropriate directive.

Core Concepts

ConceptWhat it is
DirectiveA named plug-in that resolves a specific type of expression (e.g., $ctx, $var, $input)
ExpressionA wildcard string inside a field value: {@ $directive.path @option }
OptionA post-resolution transform applied to the resolved value: @uppercase, @json, @cache
Template StringA field that contains one or more embedded expressions: Hello {@ $ctx.user.name }, your balance is {@ $var.balance }
Canned ExpressionA named, reusable expression stored in the database, referenced as @aliasName
EvaluationContextExecution state shared across all field resolutions in a single node invocation

Built-in Directives

DirectivePurposeExample
$ctxEnvironment, tenant, user, time context{@ $ctx.user.name }
$varWorkflow memory variables{@ $var.invoiceTotal }
$inputCurrent node input data{@ $input.current.email }
$outputOutput from a previous node{@ $output.ParseNode.amount }
$execExecution metadata{@ $exec.executionId }
$flowWorkflow metadata{@ $flow.current.name }
$jsInline JavaScript (Jint sandbox){@ $js`return input.price * 1.1` }
$csInline C# (Roslyn, Trusted only){@ $cs`return input.Amount * TaxRate` }
$tplLiquid template rendering{@ $tpl.InvoiceEmail }
$apiExternal HTTP API call{@ $api.CurrencyService/rates/USD }
$mathMath functions{@ $math.round(2).of($var.total) }
$itemsGlobal item collection functions{@ $items.count }
@Canned expression alias@company.taxRate

Supported Syntax Flavors

AtBrace — System Default
{@ $ctx.user.name @uppercase }
DoubleBrace — n8n / Handlebars Compatible
{{ $ctx.user.name @uppercase }}
AtSign — Canned Expression Shorthand
@company.taxRate

Documentation Guides

⚙️

How It Works

Pipeline architecture, parsing, directive routing, and template interpolation flow.

🔌

Integration Guide

DI registration, EvaluationContext setup, calling from node executors, handling responses.

🧩

Directive Structure

Anatomy of a directive: interfaces, base class, path resolution, chaining.

📋

Expression Samples

Working examples for every built-in directive with common patterns.

🔧

Options Reference

All built-in options — transforms, validation, caching — with examples.

📄

Nested Templates

Multi-expression template strings, multi-pass resolution, depth tracking.

🗄️

Canned Expressions

Database-stored reusable expressions, aliasing, tenant/app scoping.

🔀

Complex Use Cases

Chaining directives, multi-step resolution, real-world workflow patterns.

⚠️

Edge Cases

Null paths, depth limits, cycle detection, isolation violations, error codes.

🚀

Plugin Guide

Build your own directive for a third-party service or internal domain concept.

🔍

Discovery API

Self-describing metadata API powering the expression builder UI with autocomplete.

📖

Vocabulary

Glossary of all terms: directive, path, option, token, context, isolation level.

Quick Project Map

ProjectSolution FolderResponsibility
DomainDomainAll contracts, interfaces, enums, base classes
Core.ServicesCoreOrchestrator, parsers, options, validator, cache
Catalog.ServicesDirectives@ canned expression store and directive
Context.ServicesDirectives$ctx — env / tenant / user / time
Memory.ServicesDirectives$var — workflow variables
NodeData.ServicesDirectives$input, $output
FlowExecution.ServicesDirectives$exec, $flow
Scripting.Js.ServicesDirectives$js — Jint JavaScript sandbox
Scripting.Cs.ServicesDirectives$cs — Roslyn C# sandbox
Template.ServicesDirectives$tpl — Liquid/Fluid templates
Api.ServicesDirectives$api — HTTP API calls
Functions.ServicesDirectives$math, $items