Configuration Reference
All properties, per-operation parameter requirements, and error-handling settings.
Properties
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
operation | string enum | Yes | — | The operation to perform. One of: filter, map, reduce, sort, distinct, count, first, last, reverse. |
inlineDataSource | string (JSON array) | No* | "" | Inline JSON array literal. Shared base-class setting (InlineDataSource on BaseNodeExecutorSettings, config key inlineDataSource) — the same setting DataMapping uses. If non-empty, it wins outright over reading InputData["items"]. *Either this or a resolvable upstream items input must be present. |
expression | string (JS expression) | Depends | — | A JavaScript expression evaluated per element. The current element is available as item. Required for filter, map, reduce — the node throws "collectionExpression is required for {operation}" if missing. |
field | string | Depends | — | Field name used by sort and distinct operations to specify which property to sort or deduplicate on. Omit for arrays of primitive values. |
direction | string enum | No | asc | Sort direction for the sort operation. One of: asc (ascending) or desc (descending). |
initialValue | string | No | — | The starting accumulator value for reduce, given as a plain string. Parsed as long, then double, then bool, falling back to the raw string if none match — so "0" becomes the number 0, and "" stays an empty string for concatenation. Left as null if omitted. |
onError | string enum | No | continue | Shared base-class setting. "continue": skip failing items, keep processing, never fail the node on error count alone. "error": fail the node once errorCount exceeds maxErrorCount. |
maxErrorCount | integer | No | 0 | Used only when onError is "error". The node fails once item errors exceed this count. 0 = fail on any error. |
maxErrorsToCollect | integer | No | 0 | Safety cap, independent of onError: stop processing and fail once this many item errors are seen. 0 = unlimited (no circuit-breaker). |
Expression Context
item and acc Variables
In filter and map, the expression is evaluated once per element with the current element bound to item. For reduce, the expression receives both item (current element) and acc (current accumulator) — each evaluation's result becomes the next step's acc.
Per-Operation Parameter Requirements
| Operation | expression | field | direction | initialValue |
|---|---|---|---|---|
filter | Required (boolean expression) | — | — | — |
map | Required (transform expression) | — | — | — |
reduce | Required (acc + item expr) | — | — | Recommended (defaults to null) |
sort | — | Optional (omit for primitive arrays) | Optional | — |
distinct | — | Optional (for objects) | — | — |
count | — | — | — | — |
first | — | — | — | — |
last | — | — | — | — |
reverse | — | — | — | — |
Note: unlike filter/map/reduce, count/first/last do not take a filter expression — they operate on the whole resolved collection as-is. Filter first with a separate filter operation if you need a conditional count/first/last.
Example Configurations
// Filter: keep only active orders
{
"operation": "filter",
"expression": "item.status === 'active'"
}
// Map: extract just the IDs
{
"operation": "map",
"expression": "item.orderId"
}
// Reduce: sum all totals
{
"operation": "reduce",
"expression": "acc + item.total",
"initialValue": "0"
}
// Sort: by price descending
{
"operation": "sort",
"field": "price",
"direction": "desc"
}
// Distinct: unique by email field
{
"operation": "distinct",
"field": "email"
}
// Filter with strict error handling: fail if more than 5 items error out
{
"operation": "filter",
"expression": "item.status === 'active'",
"onError": "error",
"maxErrorCount": 5
}
For map and reduce, if the expression evaluates to NaN (e.g. arithmetic on a missing or non-numeric field), that item is recorded as a failure in errorRecords/errorCount rather than writing NaN into the result. This is different from a resolved-but-empty collection: an empty or null source (see below) is not an error at all.
If the resolved collection is an empty array, the node still succeeds: an empty items array for list operations, null for first/last, 0 for count, or the untouched initialValue for reduce. The error port fires only when the collection cannot be resolved at all (no inlineDataSource and no upstream items), not when it resolves to a valid empty array.