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,payloadandmetadata, 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(default10000),yukta.script.max-statements(default50000000),yukta.script.max-heap-bytes(default0, 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. ASCRIPTnode is rejected at validation whenscript-jsis not in the build.
CONTENT_FILTER
Keeps or removes parts of a payload.
- Output ports:
default, pluserrorPortwhen 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’sfailureReason). - 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>.