Skip to main content

Transform reference

MAPPER, CONTENT_FILTER and VALIDATE reshape, trim and check payloads; all three are always part of the server, except that MAPPER mode SCRIPT needs the script-js module.

MAPPER

Builds a new payload from the message.
  • Output port: default.
  • SCRIPT bindings: message, payload and metadata, as plain-data copies. A script cannot change the message or call Java methods. An object literal result needs parentheses.
  • SCRIPT limits (JVM system properties): yukta.script.timeout-ms (default 10000), yukta.script.max-statements (default 50000000), yukta.script.max-heap-bytes (default 0, no limit).
  • Errors: Invalid or missing mode. Must be PROJECTION, TEMPLATE, or SCRIPT; mapping is mandatory; Invalid mapping for TEMPLATE mode; Failed to compile Handlebars template; Template application failed. A SCRIPT node is rejected at validation when script-js is not in the build.

CONTENT_FILTER

Keeps or removes parts of a payload.
  • Output ports: default, plus errorPort when set.
  • Errors: paths is mandatory for Content Filter; paths must be a List; mode must be INCLUDE or EXCLUDE; Mandatory path missing: <path>.

VALIDATE

Checks required fields and types of the payload.
  • Output ports: default (valid); invalid (the reasons, joined with ; , are in the message’s failureReason).
  • Errors: 'required' or 'types' must be configured; 'required' must be a list of field names; 'types' must be a map of field name to type; unsupported type: <type>.