Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

You can have multiple functions in the same expression: "Hello ${in.header.name} this is ${in.header.me} speaking".
However you can not nest functions in Camel 2.8.x or older (i.e. having another ${ } placeholder in an existing, is not allowed).
From Camel 2.9 onwards you can nest functions.

Variables

Div
classconfluenceTableSmall

Variable

Type

Description

camelId

String

Camel

Wiki Markup
{div:class=confluenceTableSmall} || Variable || Type || Description || | camelId | String | *Camel

2.10:

*

the

[] name | |

name

camelContext.

*

OGNL

* | Object | *Camel

Object

Camel 2.11:

*

the

CamelContext

invoked

using

a

Camel

OGNL

expression.

| | exchangeId | String | *Camel

exchangeId

String

Camel 2.3:

*

the

exchange

id

| | id | String | the input message id | | body | Object | the input body | | in.body | Object | the input body | | body.*OGNL* | Object | *Camel 2.3:* the input body invoked using a Camel OGNL expression. | | in.body.*OGNL* | Object | *Camel 2.3:* the input body invoked using a Camel OGNL expression. | | bodyAs(_type_) | Type | *Camel 2.3:* Converts the body to the given type determined by its classname. The converted body can be null. | | mandatoryBodyAs(_type_) | Type | *Camel 2.5:* Converts the body to the given type determined by its classname, and expects the body to be not null. | | out.body | Object | the output body | | header.foo | Object | refer to the input foo header | | header\[foo\] | Object | *Camel 2.9.2:* refer to the input foo header | | headers.foo | Object | refer to the input foo header | | headers\[foo\] | Object | *Camel 2.9.2:* refer to the input foo header | | in.header.foo | Object | refer to the input foo header | | in.header\[foo\] | Object | *Camel 2.9.2:* refer to the input foo header | | in.headers.foo | Object | refer to the input foo header | | in.headers\[foo\] | Object | *Camel 2.9.2:* refer to the input foo header | | header.foo\[bar\] | Object | *Camel 2.3:* regard input foo header as a map and perform lookup on the map with bar as key | | in.header.foo\[bar\] | Object | *Camel 2.3:* regard input foo header as a map and perform lookup on the map with bar as key | | in.headers.foo\[bar\] | Object | *Camel 2.3:* regard input foo header as a map and perform lookup on the map with bar as key | | header.foo.*OGNL* | Object | *Camel 2.3:* refer to the input foo header and invoke its value using a Camel OGNL expression. | | in.header.foo.*OGNL* | Object | *Camel 2.3:* refer to the input foo header and invoke its value using a Camel OGNL expression. | | in.headers.foo.*OGNL* | Object | *Camel 2.3:* refer to the input foo header and invoke its value using a Camel OGNL expression. | | out.header.foo | Object | refer to the out header foo | | out.header\[foo\] | Object | *Camel 2.9.2:* refer to the out header foo | | out.headers.foo | Object | refer to the out header foo | | out.headers\[foo\] | Object | *Camel 2.9.2:* refer to the out header foo | | headerAs(_key_,_type_) | Type | *Camel 2.5:* Converts the header to the given type determined by its classname | | headers | Map | *Camel 2.9:* refer to the input headers | | in.headers | Map | *Camel 2.9:* refer to the input headers | | property.foo | Object | refer to the foo property on the exchange | | property\[foo\] | Object | *Camel 2.9.2:* refer to the foo property on the exchange | | property.foo.*OGNL* | Object | *Camel 2.8:* refer to the foo property on the exchange and invoke its value using a Camel OGNL expression. | | sys.foo | String | refer to the system property | | sysenv.foo | String | *Camel 2.3:* refer to the system environment | | exception | Object | *Camel 2.4:* Refer to the exception object on the exchange, is *null* if no exception set on exchange. Will fallback and grab caught exceptions ({{Exchange.EXCEPTION_CAUGHT}}) if the Exchange has any. | | exception.*OGNL* | Object | *Camel 2.4:* Refer to the exchange exception invoked using a Camel OGNL expression object | | exception.message | String | Refer to the exception.message on the exchange, is *null* if no exception set on exchange. Will fallback and grab caught exceptions ({{Exchange.EXCEPTION_CAUGHT}}) if the Exchange has any. | | exception.stacktrace | String | *Camel 2.6.* Refer to the exception.stracktrace on the exchange, is *null* if no exception set on exchange. Will fallback and grab caught exceptions ({{Exchange.EXCEPTION_CAUGHT}}) if the Exchange has any. | | date:_command:pattern_ | String | Date formatting using the {{java.text.SimpleDataFormat}} patterns. Supported commands are: *now* for current timestamp, *in.header.xxx* or *header.xxx* to use the Date object in the IN header with the key xxx. *out.header.xxx* to use the Date object in the OUT header with the key xxx.| | bean:_bean expression_ | Object | Invoking a bean expression using the [Bean] language. Specifying a method name you must use dot as separator. We also support the ?method=methodname syntax that is used by the [Bean] component. | | properties:_locations:key_ | String | *Camel 2.3:* Lookup a property with the given key. The {{locations}} option is optional. See more at [Using PropertyPlaceholder]. | | routeId | String | *Camel 2.11:* Returns the id of the current route the [Exchange] is being routed. | | threadName | String | *Camel 2.3:* Returns the name of the current thread. Can be used for logging purpose. | | ref:xxx | Object | *Camel 2.6:* To lookup a bean from the [Registry] with the given id. | | type:name.field | Object | *Camel 2.11:* To refer to a type or field by its FQN name. To refer to a field you can append .FIELD_NAME. For example you can refer to the constant field from Exchange as: {{

id

String

the input message id

body

Object

the input body

in.body

Object

the input body

body.OGNL

Object

Camel 2.3: the input body invoked using a Camel OGNL expression.

in.body.OGNL

Object

Camel 2.3: the input body invoked using a Camel OGNL expression.

bodyAs(type)

Type

Camel 2.3: Converts the body to the given type determined by its classname. The converted body can be null.

mandatoryBodyAs(type)

Type

Camel 2.5: Converts the body to the given type determined by its classname, and expects the body to be not null.

out.body

Object

the output body

header.foo

Object

refer to the input foo header

header[foo]

Object

Camel 2.9.2: refer to the input foo header

headers.foo

Object

refer to the input foo header

headers[foo]

Object

Camel 2.9.2: refer to the input foo header

in.header.foo

Object

refer to the input foo header

in.header[foo]

Object

Camel 2.9.2: refer to the input foo header

in.headers.foo

Object

refer to the input foo header

in.headers[foo]

Object

Camel 2.9.2: refer to the input foo header

header.foo[bar]

Object

Camel 2.3: regard input foo header as a map and perform lookup on the map with bar as key

in.header.foo[bar]

Object

Camel 2.3: regard input foo header as a map and perform lookup on the map with bar as key

in.headers.foo[bar]

Object

Camel 2.3: regard input foo header as a map and perform lookup on the map with bar as key

header.foo.OGNL

Object

Camel 2.3: refer to the input foo header and invoke its value using a Camel OGNL expression.

in.header.foo.OGNL

Object

Camel 2.3: refer to the input foo header and invoke its value using a Camel OGNL expression.

in.headers.foo.OGNL

Object

Camel 2.3: refer to the input foo header and invoke its value using a Camel OGNL expression.

out.header.foo

Object

refer to the out header foo

out.header[foo]

Object

Camel 2.9.2: refer to the out header foo

out.headers.foo

Object

refer to the out header foo

out.headers[foo]

Object

Camel 2.9.2: refer to the out header foo

headerAs(key,type)

Type

Camel 2.5: Converts the header to the given type determined by its classname

headers

Map

Camel 2.9: refer to the input headers

in.headers

Map

Camel 2.9: refer to the input headers

property.foo

Object

refer to the foo property on the exchange

property[foo]

Object

Camel 2.9.2: refer to the foo property on the exchange

property.foo.OGNL

Object

Camel 2.8: refer to the foo property on the exchange and invoke its value using a Camel OGNL expression.

sys.foo

String

refer to the system property

sysenv.foo

String

Camel 2.3: refer to the system environment

exception

Object

Camel 2.4: Refer to the exception object on the exchange, is null if no exception set on exchange. Will fallback and grab caught exceptions (Exchange.EXCEPTION_CAUGHT) if the Exchange has any.

exception.OGNL

Object

Camel 2.4: Refer to the exchange exception invoked using a Camel OGNL expression object

exception.message

String

Refer to the exception.message on the exchange, is null if no exception set on exchange. Will fallback and grab caught exceptions (Exchange.EXCEPTION_CAUGHT) if the Exchange has any.

exception.stacktrace

String

Camel 2.6. Refer to the exception.stracktrace on the exchange, is null if no exception set on exchange. Will fallback and grab caught exceptions (Exchange.EXCEPTION_CAUGHT) if the Exchange has any.

date:command:pattern

String

Date formatting using the java.text.SimpleDataFormat patterns. Supported commands are: now for current timestamp, in.header.xxx or header.xxx to use the Date object in the IN header with the key xxx. out.header.xxx to use the Date object in the OUT header with the key xxx.

bean:bean expression

Object

Invoking a bean expression using the Bean language. Specifying a method name you must use dot as separator. We also support the ?method=methodname syntax that is used by the Bean component.

properties:locations:key

String

Camel 2.3: Lookup a property with the given key. The locations option is optional. See more at Using PropertyPlaceholder.

routeId

String

Camel 2.11: Returns the id of the current route the Exchange is being routed.

threadName

String

Camel 2.3: Returns the name of the current thread. Can be used for logging purpose.

ref:xxx

Object

Camel 2.6: To lookup a bean from the Registry with the given id.

type:name.field

Object

Camel 2.11: To refer to a type or field by its FQN name. To refer to a field you can append .FIELD_NAME. For example you can refer to the constant field from Exchange as: org.apache.camel.Exchange.FILE_NAME

}} |. | null | | *Camel

.

null

 

Camel 2.12.3:

*

represents

a

*

null

* | {div}

OGNL expression support

Available as of Camel 2.3

...