Cameleer

Expression languages

The expression and predicate languages you can use in Cameleer routes, such as Simple, JSONPath and XPath.

NameWhat it does
BeanThe bean language (also named method) calls a function registered in the registry and uses its return value as the expression result.
ConstantThe constant language returns its text unchanged, optionally converted to a type with resultType.
CSimpleThe csimple language is an alias of the Simple language in Cameleer: the same syntax and the same results, so routes written for Camel's compiled Simple run unchanged.
DataSonnetThe datasonnet language maps the message body to a new document with Jsonnet: the body is payload, the result is JSON text by default.
ExchangePropertyThe exchangeProperty language returns the value of one exchange property, or null when the property is not set.
GroovyThe groovy language evaluates Groovy expressions and scripts against the message, with body, headers, request and exchange available as variables.
HeaderThe header language returns the value of one message header, or null when the header is not set.
HL7 TerserThe hl7terser language reads a field from an HL7 v2 message with a terser path such as PID-5-1 (patient family name).
JavaThe java language (also joor) evaluates Java snippets against the message, with exchange, message and body available as variables.
JavaScriptThe js language evaluates JavaScript expressions and scripts against the message, with body, headers and exchange available as variables.
jqThe jq language queries and transforms JSON with jq 1.7 programs such as .items | map(.price) | add.
JSONPathThe jsonpath language selects values from a JSON document with JSONPath expressions such as $.choices[0].message.content.
MVELThe mvel language evaluates MVEL 2 expressions against the exchange, with request, headers, body and exchange as the root object's properties.
OGNLThe ognl language evaluates OGNL expressions against the exchange, with request, headers, body and exchange as the root object's properties.
PythonThe python language evaluates Python 3 expressions and scripts against the message, with body, headers, request and exchange available as variables.
RefThe ref language looks up an expression or predicate by name in the registry and evaluates it, so routes can reuse logic written in Rust.
SimpleSimple is Camel's built-in expression language: text templates with ${...} functions that read the body, headers, properties and variables, plus predicates with operators such as ==, contains, regex and in.
SpELThe spel language evaluates Spring Expression Language expressions and #{...} templates against the exchange.
TokenizeThe tokenize language cuts text into a list of pieces (by a token, a regular expression, a start and end token, or an XML element name), mostly to drive the split EIP.
VariableThe variable language returns the value of one exchange variable (set with setVariable), or null when it is not set.
XPathThe xpath language selects values from an XML message with XPath 1.0 expressions such as /order/@id or count(//item).
XQueryThe xquery language evaluates an XQuery expression (FLWOR, constructors, XPath) against an XML message and returns the result.