Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.27.6. Variable Reference
Table of variables
Copy linkLink copied to clipboard!
					Table 27.1, “Variables for the Simple Language” shows all of the variables supported by the simple language.
				
| Variable | Type | Description | 
|---|---|---|
| camelContext | Object | The Camel context. Supports OGNL expressions. | 
| camelId | String | The Camel context's ID value. | 
| exchangeId | String | The exchange's ID value. | 
| id | String | The In message ID value. | 
| body | Object | 
									The In message body. Supports OGNL expressions.
								 | 
| in.body | Object | The In message body. Supports OGNL expressions. | 
| out.body | Object | 
									The Out message body.
								 | 
| bodyAs(Type) | Type | The In message body, converted to the specified type. All types, Type, must be specified using their fully-qualified Java name, except for the types: byte[],String,Integer, andLong. The converted body can be null. | 
| mandatoryBodyAs(Type) | Type | The In message body, converted to the specified type. All types, Type, must be specified using their fully-qualified Java name, except for the types: byte[],String,Integer, andLong. The converted body is expected to be non-null. | 
| header.HeaderName | Object | 
									The In message's HeaderName header. Supports OGNL expressions.
								 | 
| header[HeaderName] | Object | 
									The In message's HeaderName header (alternative syntax).
								 | 
| headers.HeaderName | Object | The In message's HeaderName header. | 
| headers[HeaderName] | Object | The In message's HeaderName header (alternative syntax). | 
| in.header.HeaderName | Object | The In message's HeaderName header. Supports OGNL expressions. | 
| in.header[HeaderName] | Object | The In message's HeaderName header (alternative syntax). | 
| in.headers.HeaderName | Object | The In message's HeaderName header. Supports OGNL expressions. | 
| in.headers[HeaderName] | Object | The In message's HeaderName header (alternative syntax). | 
| out.header.HeaderName | Object | 
									The Out message's HeaderName header.
								 | 
| out.header[HeaderName] | Object | 
									The Out message's HeaderName header (alternative syntax).
								 | 
| out.headers.HeaderName | Object | The Out message's HeaderName header. | 
| out.headers[HeaderName] | Object | The Out message's HeaderName header (alternative syntax). | 
| headerAs(Key,Type) | Type | The Key header, converted to the specified type. All types, Type, must be specified using their fully-qualified Java name, except for the types: byte[],String,Integer, andLong. The converted value can be null. | 
| headers | Map | All of the In headers (as a java.util.Maptype). | 
| in.headers | Map | All of the In headers (as a java.util.Maptype). | 
| property.PropertyName | Object | 
									The PropertyName property on the exchange.
								 | 
| property[PropertyName] | Object | 
									The PropertyName property on the exchange (alternative syntax).
								 | 
| sys.SysPropertyName | String | The SysPropertyName Java system property. | 
| sysenv.SysEnvVar | String | The SysEnvVar system environment variable. | 
| exception | String | Either the exception object from Exchange.getException()or, if this value is null, the caught exception from theExchange.EXCEPTION_CAUGHTproperty; otherwise null. Supports OGNL expressions. | 
| exception.message | String | If an exception is set on the exchange, returns the value of Exception.getMessage(); otherwise, returnsnull. | 
| exception.stacktrace | String | If an exception is set on the exchange, returns the value of Exception.getStackTrace(); otherwise, returnsnull. Note: The simple language first tries to retrieve an exception fromExchange.getException(). If that property is not set, it checks for a caught exception, by callingExchange.getProperty(Exchange.CAUGHT_EXCEPTION). | 
| date:command:pattern | String | A date formatted using a java.text.SimpleDateFormat pattern. The following commands are supported: now, for the current date and time;header.HeaderName, orin.header.HeaderName to use a java.util.Date object in the HeaderName header from the In message;out.header.HeaderName to use a java.util.Date object in the HeaderName header from the Out message; | 
| bean:beanID.Method | Object | Invokes a method on the referenced bean and returns the result of the method invocation. To specify a method name, you can either use the beanID.Methodsyntax; or you can use thebeanID?method=methodName syntax. | 
| ref:beanID | Object | Looks up the bean with the ID, beanID, in the registry and returns a reference to the bean itself. For example, if you are using the splitter EIP, you could use this variable to reference the bean that implements the splitting algorithm. | 
| properties:Key | String | The value of the Key property placeholder (see Section 2.7, “Property Placeholders”). | 
| properties:Location:Key | String | The value of the Key property placeholder, where the location of the properties file is given by Location (see Section 2.7, “Property Placeholders”). | 
| threadName | String | The name of the current thread. | 
| routeId | String | Returns the ID of the current route through which the Exchangeis being routed. | 
| type:Name[.Field] | Object | References a type or field by its Fully-Qualified-Name (FQN). To refer to a field, append .Field. For example, you can refer to theFILE_NAMEconstant field from theExchangeclass astype:org.apache.camel.Exchange.FILE_NAME |