Expression languages
The expression and predicate languages you can use in Cameleer routes, such as Simple, JSONPath and XPath.
| Name | What it does |
|---|---|
| Bean | The bean language (also named method) calls a function registered in the registry and uses its return value as the expression result. |
| Constant | The constant language returns its text unchanged, optionally converted to a type with resultType. |
| CSimple | The 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. |
| DataSonnet | The datasonnet language maps the message body to a new document with Jsonnet: the body is payload, the result is JSON text by default. |
| ExchangeProperty | The exchangeProperty language returns the value of one exchange property, or null when the property is not set. |
| Groovy | The groovy language evaluates Groovy expressions and scripts against the message, with body, headers, request and exchange available as variables. |
| Header | The header language returns the value of one message header, or null when the header is not set. |
| HL7 Terser | The hl7terser language reads a field from an HL7 v2 message with a terser path such as PID-5-1 (patient family name). |
| Java | The java language (also joor) evaluates Java snippets against the message, with exchange, message and body available as variables. |
| JavaScript | The js language evaluates JavaScript expressions and scripts against the message, with body, headers and exchange available as variables. |
| jq | The jq language queries and transforms JSON with jq 1.7 programs such as .items | map(.price) | add. |
| JSONPath | The jsonpath language selects values from a JSON document with JSONPath expressions such as $.choices[0].message.content. |
| MVEL | The mvel language evaluates MVEL 2 expressions against the exchange, with request, headers, body and exchange as the root object's properties. |
| OGNL | The ognl language evaluates OGNL expressions against the exchange, with request, headers, body and exchange as the root object's properties. |
| Python | The python language evaluates Python 3 expressions and scripts against the message, with body, headers, request and exchange available as variables. |
| Ref | The ref language looks up an expression or predicate by name in the registry and evaluates it, so routes can reuse logic written in Rust. |
| Simple | Simple 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. |
| SpEL | The spel language evaluates Spring Expression Language expressions and #{...} templates against the exchange. |
| Tokenize | The 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. |
| Variable | The variable language returns the value of one exchange variable (set with setVariable), or null when it is not set. |
| XPath | The xpath language selects values from an XML message with XPath 1.0 expressions such as /order/@id or count(//item). |
| XQuery | The xquery language evaluates an XQuery expression (FLWOR, constructors, XPath) against an XML message and returns the result. |