You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bu...@apache.org on 2017/01/06 16:20:47 UTC

svn commit: r1004271 [2/4] - in /websites/production/camel/content: book-cookbook.html book-in-one-page.html book-languages-appendix.html cache/main.pageCache pojo-producing.html simple.html

Modified: websites/production/camel/content/book-in-one-page.html
==============================================================================
--- websites/production/camel/content/book-in-one-page.html (original)
+++ websites/production/camel/content/book-in-one-page.html Fri Jan  6 16:20:47 2017
@@ -2198,17 +2198,8 @@ Camel uses this algorithm to find the ge
 <p>Using the @Consume annotations are simpler when you are creating a simple route with a single well defined input URI. </p>
 
 <p>However if you require more complex routes or the same bean method needs to be invoked from many places then please use the routing <a shape="rect" href="dsl.html">DSL</a> as shown above.</p>
-There are two different ways to send messages to any Camel <a shape="rect" href="endpoint.html">Endpoint</a> from a POJO
-
-<h4 id="BookInOnePage-@EndpointInject">@EndpointInject</h4>
-
-<p>To allow sending of messages from POJOs you can use the <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/EndpointInject.html">@EndpointInject</a> annotation. This will inject a <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/ProducerTemplate.html">ProducerTemplate</a> so that the bean can participate in message exchanges.</p>
-
-<p>e.g. lets send a message to the <strong>foo.bar</strong> queue in <a shape="rect" href="activemq.html">ActiveMQ</a> at some point</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-
-public class Foo {
+There are two different ways to send messages to any Camel <a shape="rect" href="endpoint.html">Endpoint</a> from a POJO<h4 id="BookInOnePage-@EndpointInject"><code>@EndpointInject</code></h4><p>To allow sending of messages from POJOs you can use the <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/EndpointInject.html">@EndpointInject</a> annotation. This will inject a <a shape="rect" class="external-link" href="http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/ProducerTemplate.html">ProducerTemplate</a> so that the bean can participate in message exchanges.</p><p>Example: send a message to the <strong><code>foo.bar</code></strong> ActiveMQ queue:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[public class Foo {
   @EndpointInject(uri=&quot;activemq:foo.bar&quot;)
   ProducerTemplate producer;
 
@@ -2219,21 +2210,8 @@ public class Foo {
   }
 }
 ]]></script>
-</div></div>
-
-<p>The downside of this is that your code is now dependent on a Camel API, the ProducerTemplate. The next section describes how to remove this</p>
-
-<div class="confluence-information-macro confluence-information-macro-tip"><span class="aui-icon aui-icon-small aui-iconfont-approve confluence-information-macro-icon"></span><div class="confluence-information-macro-body">
-<p>See <a shape="rect" href="pojo-consuming.html">POJO Consuming</a> for how to use a property on the bean as endpoint configuration, eg using the <code>property</code> attribute on @Produce, @EndpointInject.</p></div></div>
-
-<h3 id="BookInOnePage-HidingtheCamelAPIsfromyourcodeusing@Produce">Hiding the Camel APIs from your code using @Produce</h3>
-
-<p>We recommend <a shape="rect" href="hiding-middleware.html">Hiding Middleware</a> APIs from your application code so the next option might be more suitable.<br clear="none">
- You can add the @Produce annotation to an injection point (a field or property setter) using a ProducerTemplate <strong>or</strong> using some interface you use in your business logic. e.g.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-public interface MyListener {
+</div></div><p>The downside of this is that your code is now dependent on a Camel API, the <strong><code>ProducerTemplate</code></strong>. The next section describes how to remove this dependency.</p><div class="confluence-information-macro confluence-information-macro-tip"><span class="aui-icon aui-icon-small aui-iconfont-approve confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>See <a shape="rect" href="pojo-consuming.html">POJO Consuming</a> for how to use a property on the bean as endpoint configuration, e.g., using the <strong><code>property</code></strong> attribute on <strong><code>@Produce</code></strong>, <strong><code>@EndpointInject</code></strong>.</p></div></div><h3 id="BookInOnePage-HidingtheCamelAPIsFromYourCodeUsing@Produce">Hiding the Camel APIs From Your Code Using&#160;<code>@Produce</code></h3><p>We recommend <a shape="rect" href="hiding-middleware.html">Hiding Middleware</a> APIs from your application code so the next op
 tion might be more suitable. You can add the&#160;<strong><code>@Produce</code></strong> annotation to an injection point (a field or property setter) using a&#160;<strong><code>ProducerTemplate</code></strong> <strong>or</strong> using some interface you use in your business logic. Example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[public interface MyListener {
     String sayHello(String name);
 }
 
@@ -2247,11 +2225,7 @@ public class MyBean {
     }
 }
 ]]></script>
-</div></div>
-
-<p>Here Camel will automatically inject a smart client side proxy at the @Produce annotation - an instance of the MyListener instance. When we invoke methods on this interface the method call is turned into an object and using the Camel <a shape="rect" href="spring-remoting.html">Spring Remoting</a> mechanism it is sent to the endpoint - in this case the <a shape="rect" href="activemq.html">ActiveMQ</a> endpoint to queue <strong>foo</strong>; then the caller blocks for a response.</p>
-
-<p>If you want to make asynchronous message sends then use <a shape="rect" href="using-exchange-pattern-annotations.html">an @InOnly annotation on the injection point</a>.</p>
+</div></div><p>Here Camel will automatically inject a smart client side proxy at the&#160;<strong><code>@Produce</code></strong> annotation - an instance of the&#160;<strong><code>MyListener</code></strong> instance. When we invoke methods on this interface the method call is turned into an object and using the Camel <a shape="rect" href="spring-remoting.html">Spring Remoting</a> mechanism it is sent to the endpoint - in this case the <a shape="rect" href="activemq.html">ActiveMQ</a> endpoint to queue <strong><code>foo</code></strong>; then the caller blocks for a response.</p><p>If you want to make asynchronous message sends then use <a shape="rect" href="using-exchange-pattern-annotations.html">an @InOnly annotation on the injection point</a>.</p>
 <h2 id="BookInOnePage-@RecipientListAnnotation">@RecipientList Annotation</h2>
 
 <p>We support the use of @RecipientList on a bean method to easily create a dynamic <a shape="rect" href="recipient-list.html">Recipient List</a> using a Java method.</p>
@@ -3966,11 +3940,11 @@ The tutorial has been designed in two pa
 While not actual tutorials you might find working through the source of the various <a shape="rect" href="examples.html">Examples</a> useful.</li></ul>
 
 <h2 id="BookInOnePage-TutorialonSpringRemotingwithJMS">Tutorial on Spring Remoting with JMS</h2><p>&#160;</p><div class="confluence-information-macro confluence-information-macro-information"><p class="title">Thanks</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>This tutorial was kindly donated to Apache Camel by Martin Gilday.</p></div></div><h2 id="BookInOnePage-Preface">Preface</h2><p>This tutorial aims to guide the reader through the stages of creating a project which uses Camel to facilitate the routing of messages from a JMS queue to a <a shape="rect" class="external-link" href="http://www.springramework.org" rel="nofollow">Spring</a> service. The route works in a synchronous fashion returning a response to the client.</p><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1483449569360 {padding: 0px;}
-div.rbtoc1483449569360 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1483449569360 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1483719538087 {padding: 0px;}
+div.rbtoc1483719538087 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1483719538087 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1483449569360">
+/*]]>*/</style></p><div class="toc-macro rbtoc1483719538087">
 <ul class="toc-indentation"><li><a shape="rect" href="#BookInOnePage-TutorialonSpringRemotingwithJMS">Tutorial on Spring Remoting with JMS</a></li><li><a shape="rect" href="#BookInOnePage-Preface">Preface</a></li><li><a shape="rect" href="#BookInOnePage-Prerequisites">Prerequisites</a></li><li><a shape="rect" href="#BookInOnePage-Distribution">Distribution</a></li><li><a shape="rect" href="#BookInOnePage-About">About</a></li><li><a shape="rect" href="#BookInOnePage-CreatetheCamelProject">Create the Camel Project</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#BookInOnePage-UpdatethePOMwithDependencies">Update the POM with Dependencies</a></li></ul>
 </li><li><a shape="rect" href="#BookInOnePage-WritingtheServer">Writing the Server</a>
@@ -6085,11 +6059,11 @@ So we completed the last piece in the pi
 <p>This example has been removed from <strong>Camel 2.9</strong> onwards. Apache Axis 1.4 is a very old and unsupported framework. We encourage users to use <a shape="rect" href="cxf.html">CXF</a> instead of Axis.</p></div></div>
 
 <style type="text/css">/*<![CDATA[*/
-div.rbtoc1483449570209 {padding: 0px;}
-div.rbtoc1483449570209 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1483449570209 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1483719538348 {padding: 0px;}
+div.rbtoc1483719538348 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1483719538348 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style><div class="toc-macro rbtoc1483449570209">
+/*]]>*/</style><div class="toc-macro rbtoc1483719538348">
 <ul class="toc-indentation"><li><a shape="rect" href="#BookInOnePage-TutorialusingAxis1.4withApacheCamel">Tutorial using Axis 1.4 with Apache Camel</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#BookInOnePage-Prerequisites">Prerequisites</a></li><li><a shape="rect" href="#BookInOnePage-Distribution">Distribution</a></li><li><a shape="rect" href="#BookInOnePage-Introduction">Introduction</a></li><li><a shape="rect" href="#BookInOnePage-SettinguptheprojecttorunAxis">Setting up the project to run Axis</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#BookInOnePage-Maven2">Maven 2</a></li><li><a shape="rect" href="#BookInOnePage-wsdl">wsdl</a></li><li><a shape="rect" href="#BookInOnePage-ConfiguringAxis">Configuring Axis</a></li><li><a shape="rect" href="#BookInOnePage-RunningtheExample">Running the Example</a></li></ul>
@@ -8430,10 +8404,10 @@ result = body * 2 + 1
 &lt;/dependency&gt;
 ]]></script>
 </div></div>
-<h2 id="BookInOnePage-SimpleExpressionLanguage">Simple Expression Language</h2><p>The Simple Expression Language was a really simple language when it was created, but has since grown more powerful. It is primarily intended for being a really small and simple language for evaluating <a shape="rect" href="expression.html">Expression</a>s and <a shape="rect" href="predicate.html">Predicate</a>s without requiring any new dependencies or knowledge of <a shape="rect" href="xpath.html">XPath</a>; so it is ideal for testing in <strong><code>camel-core</code></strong>. The idea was to cover 95% of the common use cases when you need a little bit of expression based script in your Camel routes.</p><p>However for much more complex use cases you are generally recommended to choose a more expressive and powerful language such as:</p><ul><li><a shape="rect" href="spel.html">SpEL</a></li><li><a shape="rect" href="mvel.html">Mvel</a></li><li><a shape="rect" href="groovy.html">Groovy</a></li><li><a s
 hape="rect" href="javascript.html">JavaScript</a></li><li><a shape="rect" href="el.html">EL</a></li><li><a shape="rect" href="ognl.html">OGNL</a></li><li>one of the supported <a shape="rect" href="scripting-languages.html">Scripting Languages</a></li></ul><p>The simple language uses <strong><code>${body</code>}</strong> placeholders for complex expressions where the expression contains constant literals.</p><p><strong>Deprecated</strong>:&#160;The&#160;<strong><code>${ }</code></strong> placeholders can be omitted if the expression starts with the token, or if the token is only itself.</p><div class="confluence-information-macro confluence-information-macro-tip"><p class="title">Alternative syntax</p><span class="aui-icon aui-icon-small aui-iconfont-approve confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>From Camel 2.5 you can also use the alternative syntax which uses&#160;<strong><code>$simple{ }</code></strong> as placeholders. This can
  be used in situations to avoid clashes when using for example Spring property placeholder together with Camel.</p></div></div><div class="confluence-information-macro confluence-information-macro-tip"><p class="title">Configuring result type</p><span class="aui-icon aui-icon-small aui-iconfont-approve confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>From Camel 2.8 you can configure the result type of the <a shape="rect" href="simple.html">Simple</a> expression. For example to set the type as a <strong><code>java.lang.Boolean</code></strong> or a <code>j<strong>ava.lang.Integer</strong></code> etc.</p></div></div><div class="confluence-information-macro confluence-information-macro-information"><p class="title">File language is now merged with Simple language</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>From Camel 2.2, the <a shape="rect
 " href="file-language.html">File Language</a> is now merged with <a shape="rect" href="simple.html">Simple</a> language which means you can use all the file syntax directly within the simple language.</p></div></div><div class="confluence-information-macro confluence-information-macro-information"><p class="title">Simple Language Changes in Camel 2.9 onwards</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>The <a shape="rect" href="simple.html">Simple</a> language have been improved from Camel 2.9 to use a better syntax parser, which can do index precise error messages, so you know exactly what is wrong and where the problem is. For example if you have made a typo in one of the operators, then previously the parser would not be able to detect this, and cause the evaluation to be true. There are a few changes in the syntax which are no longer backwards compatible. When using <a shape=
 "rect" href="simple.html">Simple</a> language as a <a shape="rect" href="predicate.html">Predicate</a> then the literal text <strong>must</strong> be enclosed in either single or double quotes. For example: <code>"<strong>${body} == 'Camel'</strong>"</code>. Notice how we have single quotes around the literal. The old style of using <code>"<strong>body</strong>"</code> and <code>"<strong>header.foo</strong>"</code> to refer to the message body and header is <strong><code>@deprecated</code></strong>, and it is encouraged to always use&#160;<strong><code>${ }</code></strong> tokens for the built-in functions.<br clear="none"> The range operator now requires the range to be in single quote as well as shown: <code>"<strong>${header.zip} between '30000..39999'</strong>"</code>.</p></div></div><p>To get the body of the in message: <strong><code>body</code></strong>, or <strong><code>in.body</code></strong> or <strong><code>${body}</code></strong>.</p><p>A complex expression must use&#160;
 <strong><code>${ }</code></strong> placeholders, such as: <strong><code>Hello ${in.header.name} how are you?</code></strong>.</p><p>You can have multiple functions in the same expression: <code>"<strong>Hello ${in.header.name} this is ${in.header.me} speaking</strong>"</code>. However you can <em><strong>not</strong></em> nest functions in Camel 2.8.x or older e.g., having another&#160;<strong><code>${ }</code></strong> placeholder in an existing, is not allowed. From <strong>Camel 2.9</strong> you can nest functions.</p><h3 id="BookInOnePage-Variables.4">Variables</h3><div class="confluenceTableSmall"><div class="table-wrap">
- <table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Variable</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>camelId</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10:</strong> the <a shape="rect" href="camelcontext.html">CamelContext</a> name.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>camelContext.<strong>OGNL</strong></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> the&#160;<strong><code>CamelContext</code></strong> invoked using a Camel OGNL expression.</p></td></tr><tr><td colspan="1" rowspan="1" class="
 confluenceTd"><p><code>exchange</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Exchange</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.16:</strong> the <a shape="rect" href="exchange.html">Exchange.</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>exchange.<strong>OGNL</strong></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.16:</strong><span> the </span><a shape="rect" href="exchange.html">Exchange</a><span> invoked using a Camel OGNL expression.</span></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>exchangeId</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> the exchange Id.</p></td></tr><tr><td colspan="1" rowspan="1" class="c
 onfluenceTd"><p><code>id</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The input message Id.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>body</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The input body.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>in.body</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The input body.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>body.<strong>OGNL</strong></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> the input body invoked using a Camel 
 OGNL expression.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>in.body.<strong>OGNL</strong></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> the input body invoked using a Camel OGNL expression.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>bodyAs(<em>type</em>)</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Type</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> Converts the body to the given type determined by its classname. The converted body can be <strong><code>null</code></strong>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>bodyAs(<em>type</em>).<strong>OGNL</strong></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="
 confluenceTd"><p><strong>Camel 2.18:</strong><span> Converts the body to the given type determined by its classname and then invoke methods using a Camel OGNL expression. The converted body can be <strong><code>null</code></strong>.</span></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>mandatoryBodyAs(<em>type</em>)</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Type</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.5:</strong> Converts the body to the given type determined by its classname, and expects the body to be not <strong><code>null</code></strong>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>mandatoryBodyAs(<em>type</em>).<strong>OGNL</strong></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.18:</strong><span> Converts the body to the given type 
 determined by its classname and then invoke methods using a Camel OGNL expression.</span></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>out.body</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The output body.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>header.<em>foo</em></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Refer to the input&#160;<strong><code>foo</code></strong> header.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>header[<em>foo</em>]</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9.2:</strong> refer to the input&#160;<strong><code>foo</code></strong> header.</p></td></tr
 ><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>headers.<em>foo</em></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Refer to the input&#160;<strong><code>foo</code></strong> header.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>headers[<em>foo</em>]</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9.2:</strong> refer to the input&#160;<strong><code>foo</code></strong> header.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>in.header.<code><em>foo</em></code></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Refer to the input&#160;<strong><code>foo</code></strong> header.</p></td></tr><tr><td colspan="1" row
 span="1" class="confluenceTd"><p><code>in.header[<code><em>foo</em></code>]</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9.2:</strong> refer to the input&#160;<strong><code>foo</code></strong> header.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>in.headers.<code><em>foo</em></code></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Refer to the input&#160;<strong><code>foo</code></strong> header.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>in.headers[<code><em>foo</em></code>]</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9.2:</strong> refer to the input&#160;<strong><code>foo</code></strong> heade
 r.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>header.foo[<em>bar</em>]</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> regard input&#160;<strong><code>foo</code></strong> header as a map and perform lookup on the map with&#160;<strong><code>bar</code></strong> as key.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>in.header.foo[<code><em>bar</em></code>]</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> regard input&#160;<strong><code>foo</code></strong> header as a map and perform lookup on the map with&#160;<strong><code>bar</code></strong> as key.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>in.headers.foo[<code><em>bar</em></code>]</code></p><
 /td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> regard input&#160;<strong><code>foo</code></strong> header as a map and perform lookup on the map with&#160;<strong><code>bar</code></strong> as key.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>header.<code><em>foo</em></code>.OGNL</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> refer to the input&#160;<strong><code>foo</code></strong> header and invoke its value using a Camel OGNL expression.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>in.header.<code><em>foo</em></code>.OGNL</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2
 .3:</strong> refer to the input&#160;<strong><code>foo</code></strong> header and invoke its value using a Camel OGNL expression.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>in.headers.<code><em>foo</em></code>.OGNL</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> refer to the input&#160;<strong><code>foo</code></strong> header and invoke its value using a Camel OGNL expression.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>out.header.<code><em>foo</em></code></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Refer to the out header <strong><code>foo</code></strong>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>out.header[<code><em>foo</em></code>]</code></p></td><td colspan=
 "1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9.2:</strong> refer to the out header <strong><code>foo</code></strong>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>out.headers.<code><em>foo</em></code></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Refer to the out header <strong><code>foo</code></strong>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>out.headers[<code><em>foo</em></code>]</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9.2:</strong> refer to the out header <strong><code>foo</code></strong>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>headerAs(<em>key</em>,<em>type</em>)</code><
 /p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Type</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.5:</strong> Converts the header to the given type determined by its classname.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>headers</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Map</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9:</strong> refer to the input headers.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>in.headers</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Map</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9:</strong> refer to the input headers.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>property.<code><em>foo</em></code></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code
 ></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong><span style="color: rgb(255,0,0);">Deprecated</span>:</strong> refer to the&#160;<strong><code>foo</code></strong> property on the exchange.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>exchangeProperty.<code><em>foo</em></code></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><span><strong>Camel 2.15:</strong> refer to the&#160;<strong><code>foo</code></strong> property on the exchange.</span></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>property[<code><em>foo</em></code>]</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Deprecated:</strong> refer to the&#160;<strong><code>foo</code></strong> property on the exchange.</p></td></tr><tr><td colspan="1" row
 span="1" class="confluenceTd"><p><span><code>exchangeProperty[<code><em>foo</em></code>]</code></span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.15:</strong><span> refer to the&#160;<strong><code>foo</code></strong> property on the exchange.</span></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>property.<code><em>foo</em></code>.OGNL</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Deprecated:</strong> refer to the&#160;<strong><code>foo</code></strong> property on the exchange and invoke its value using a Camel OGNL expression.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>exchangeProperty.<code><em>foo</em></code>.OGNL</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p><
 /td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.15:</strong><span> refer to the&#160;<strong><code>foo</code></strong> property on the exchange and invoke its value using a Camel OGNL expression.</span></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>sys.<code><em>foo</em></code></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Refer to the system property <span><strong><code>foo</code></strong></span>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>sysenv.<code><em>foo</em></code></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> refer to the system environment property <span><strong><code>foo</code></strong></span>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
 <code>exception</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.4:</strong> Refer to the exception object on the exchange, is <strong><code>null</code></strong> if no exception set on exchange. Will fallback and grab caught exceptions (<strong><code>Exchange.EXCEPTION_CAUGHT</code></strong>) if the Exchange has any.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>exception.OGNL</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.4:</strong> Refer to the exchange exception invoked using a Camel OGNL expression object</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>exception.message</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class=
 "confluenceTd"><p>Refer to the exception.message on the exchange, is <strong>null</strong> if no exception set on exchange. Will fallback and grab caught exceptions (<strong><code>Exchange.EXCEPTION_CAUGHT</code></strong>) if the Exchange has any.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>exception.stacktrace</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.6.</strong> Refer to the&#160;<strong><code>exception.stracktrace</code></strong> on the exchange. Result is&#160;<strong><code>null</code></strong> if no exception set on exchange. Will fallback and grab caught exceptions (<strong><code>Exchange.EXCEPTION_CAUGHT</code></strong>) if the Exchange has any.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>date:<em>command</em>:<em>pattern</em></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><co
 de>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Date formatting using the <strong><code>java.text.SimpleDateFormat</code></strong> patterns. Supported commands are:&#160;</p>
-     <ul><li><p><strong><code>now</code></strong> for current timestamp.</p></li><li><p><strong><code>in.header.xxx</code></strong> or&#160;<strong><code>header.xxx</code></strong> to use the&#160;<strong><code>Date</code></strong> object in the&#160;<strong><code>IN</code></strong> header with the key <strong><code>xxx</code></strong>.</p></li><li><p><strong><code>out.header.xxx</code></strong> to use the&#160;<strong><code>Date</code></strong> object in the&#160;<strong><code>OUT</code></strong> header with the key <strong><code>xxx</code></strong>.</p></li></ul></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>bean:<em>bean expression</em></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Invoking a bean expression using the <a shape="rect" href="bean.html">Bean</a> language. Specifying a method name you must use dot as separator. We also support the&#160;<strong
 ><code>?method=methodname</code></strong> syntax that is used by the <a shape="rect" href="bean.html">Bean</a> component.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>properties:<em>locations</em>:key</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong><span style="color: rgb(255,0,0);">Deprecated</span> (use properties-location instead) Camel 2.3:</strong> Lookup a property with the given key. The <strong><code>locations</code></strong> option is optional. See more at <a shape="rect" href="using-propertyplaceholder.html">Using PropertyPlaceholder</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>properties-location:<em>locations:key</em></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.14.1:</strong> Lookup a 
 property with the given key. The <code>locations</code> option is optional. See more at <a shape="rect" href="using-propertyplaceholder.html">Using PropertyPlaceholder</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>properties:key:default</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.14.1</strong>: Lookup a property with the given key. If the key does not exists or has no value, then an optional default value can be specified.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>routeId</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> Returns the Id of the current route the <a shape="rect" href="exchange.html">Exchange</a> is being routed.</p></td></tr><tr><td colspan="1" rowspan="1" class=
 "confluenceTd"><p><code>threadName</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> Returns the name of the current thread. Can be used for logging purpose.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>ref:<em>xxx</em></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.6:</strong> To lookup a bean from the <a shape="rect" href="registry.html">Registry</a> with the given Id.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>type:name.field</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> To refer to a type or field by its FQN name. To refer to a field you can append <stro
 ng><code>.FIELD_NAME</code></strong>. For example you can refer to the constant field from Exchange as: <strong><code>org.apache.camel.Exchange.FILE_NAME</code></strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.12.3:</strong> represents a <strong><code>null</code>.</strong></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>random(<em>value</em>)</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Integer</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.16.0: </strong>returns a random Integer between&#160;<em><strong><code>0</code></strong></em> (included) and <strong><em>value</em></strong> (excluded)</p></td></tr><tr><td colspan="1" rowspan="1" c
 lass="confluenceTd"><p><code>random(<em>min</em>,<em>max</em>)</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Integer</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.16.0: </strong>returns a random Integer between <strong><em>min</em></strong> (included) and <strong><em>max</em></strong> (excluded)</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>collate(<em>group</em>)</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>List</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.17:</strong> The collate function iterates the message body and groups the data into sub lists of specified size. This can be used with the <a shape="rect" href="splitter.html">Splitter</a> EIP to split a message body and group/batch the split sub messages into a group of&#160;<strong><code>N</code></strong> sub lists. This method works similar to the collate method in Groo
 vy.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>skip(number)</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>Iterator</code></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.19:</strong> The skip function iterates the message body and skips the first number of items. This can be used with the <a shape="rect" href="splitter.html">Splitter EIP</a> to split a message body and skip the first N number of items.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>messageHistory</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.17:</strong> The message history of the current exchange how it has been routed. This is similar to the route stack-trace message history the error handler logs in case of an un-handled exception.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><span>
 <code>messageHistory(false)</code></span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.17:</strong><span>&#160;</span>As&#160;<strong><code>messageHistory</code></strong> but without the exchange details (only includes the route strack-trace). This can be used if you do not want to log sensitive data from the message itself.</p></td></tr></tbody></table>
-</div></div><h3 id="BookInOnePage-OGNLexpressionsupport">OGNL expression support</h3><p><strong>Available as of Camel 2.3</strong></p><div class="confluence-information-macro confluence-information-macro-information"><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>Camel's OGNL support is for invoking methods only. You cannot access fields.<br clear="none"> From <strong>Camel 2.11.1</strong> onwards we added special support for accessing the length field of Java arrays.</p></div></div><p>The <a shape="rect" href="simple.html">Simple</a> and <a shape="rect" href="bean.html">Bean</a> language now supports a Camel OGNL notation for invoking beans in a chain like fashion. Suppose the Message&#160;<strong><code>IN</code></strong> body contains a POJO which has a <strong><code>getAddress()</code></strong> method.</p><p>Then you can use Camel OGNL notation to access the address object:</p><div
  class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<h2 id="BookInOnePage-SimpleExpressionLanguage">Simple Expression Language</h2><p>The Simple Expression Language was a really simple language when it was created, but has since grown more powerful. It is primarily intended for being a really small and simple language for evaluating <a shape="rect" href="expression.html">Expression</a>s and <a shape="rect" href="predicate.html">Predicate</a>s without requiring any new dependencies or knowledge of <a shape="rect" href="xpath.html">XPath</a>; so it is ideal for testing in <strong><code>camel-core</code></strong>. The idea was to cover 95% of the common use cases when you need a little bit of expression based script in your Camel routes.</p><p>However for much more complex use cases you are generally recommended to choose a more expressive and powerful language such as:</p><ul><li><a shape="rect" href="spel.html">SpEL</a></li><li><a shape="rect" href="mvel.html">Mvel</a></li><li><a shape="rect" href="groovy.html">Groovy</a></li><li><a s
 hape="rect" href="javascript.html">JavaScript</a></li><li><a shape="rect" href="el.html">EL</a></li><li><a shape="rect" href="ognl.html">OGNL</a></li><li>one of the supported <a shape="rect" href="scripting-languages.html">Scripting Languages</a></li></ul><p>The simple language uses <strong><code>${body</code>}</strong> placeholders for complex expressions where the expression contains constant literals.</p><p><strong><span style="color: rgb(255,0,0);">Deprecated</span></strong>:&#160;The&#160;<strong><code>${}</code></strong> placeholders can be omitted if the expression starts with the token, or if the token is only itself.</p><div class="confluence-information-macro confluence-information-macro-tip"><p class="title">Alternative syntax</p><span class="aui-icon aui-icon-small aui-iconfont-approve confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>From Camel 2.5 you can also use the alternative syntax which uses&#160;<strong><code>$simple{}</
 code></strong> as placeholders. This can be used in situations to avoid clashes when using for example Spring property placeholder together with Camel.</p></div></div><div class="confluence-information-macro confluence-information-macro-tip"><p class="title">Configuring result type</p><span class="aui-icon aui-icon-small aui-iconfont-approve confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>From Camel 2.8 you can configure the result type of the <a shape="rect" href="simple.html">Simple</a> expression. For example to set the type as a <strong><code>java.lang.Boolean</code></strong> or a <code>j<strong>ava.lang.Integer</strong></code> etc.</p></div></div><div class="confluence-information-macro confluence-information-macro-information"><p class="title">File language is now merged with Simple language</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-bod
 y"><p>From Camel 2.2, the <a shape="rect" href="file-language.html">File Language</a> is now merged with <a shape="rect" href="simple.html">Simple</a> language which means you can use all the file syntax directly within the simple language.</p></div></div><div class="confluence-information-macro confluence-information-macro-information"><p class="title">Simple Language Changes in Camel 2.9 onwards</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>The <a shape="rect" href="simple.html">Simple</a> language have been improved from Camel 2.9 to use a better syntax parser, which can do index precise error messages, so you know exactly what is wrong and where the problem is. For example if you have made a typo in one of the operators, then previously the parser would not be able to detect this, and cause the evaluation to be true. There are a few changes in the syntax which are no longer ba
 ckwards compatible. When using <a shape="rect" href="simple.html">Simple</a> language as a <a shape="rect" href="predicate.html">Predicate</a> then the literal text <strong>must</strong> be enclosed in either single or double quotes. For example: <code>"<strong>${body} == 'Camel'</strong>"</code>. Notice how we have single quotes around the literal. The old style of using <code>"<strong>body</strong>"</code> and <code>"<strong>header.foo</strong>"</code> to refer to the message body and header is <strong><code>@deprecated</code></strong>, and it is encouraged to always use&#160;<strong><code>${}</code></strong> tokens for the built-in functions.<br clear="none"> The range operator now requires the range to be in single quote as well as shown: <code>"<strong>${header.zip} between '30000..39999'</strong>"</code>.</p></div></div><p>To get the body of the in message: <strong><code>body</code></strong>, or <strong><code>in.body</code></strong> or <strong><code>${body}</code></strong>.</p
 ><p>A complex expression must use&#160;<strong><code>${}</code></strong> placeholders, such as: <strong><code>Hello ${in.header.name} how are you?</code></strong>.</p><p>You can have multiple functions in the same expression: <code>"<strong>Hello ${in.header.name} this is ${in.header.me} speaking</strong>"</code>. However you can <em><strong>not</strong></em> nest functions in Camel 2.8.x or older e.g., having another&#160;<strong><code>${}</code></strong> placeholder in an existing, is not allowed. From <strong>Camel 2.9</strong> you can nest functions.</p><h3 id="BookInOnePage-Variables.4">Variables</h3><div class="confluenceTableSmall"><div class="table-wrap">
+ <table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Variable</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>camelId</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10:</strong> the <a shape="rect" href="camelcontext.html">CamelContext</a> name.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>camelContext.<strong>OGNL</strong></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> the&#160;<strong><code>CamelContext</code></strong> invoked using a Camel OGNL expression.</p></td></tr><tr><td colspan="1" rowspan="1" class="
 confluenceTd"><p><code>collate(<em>group</em>)</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>List</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.17:</strong> The collate function iterates the message body and groups the data into sub lists of specified size. This can be used with the <a shape="rect" href="splitter.html">Splitter</a> EIP to split a message body and group/batch the split sub messages into a group of&#160;<strong><code>N</code></strong> sub lists. This method works similar to the collate method in Groovy.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>exchange</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Exchange</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.16:</strong> the <a shape="rect" href="exchange.html">Exchange.</a></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>exchange.<strong>
 OGNL</strong></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.16:</strong><span> the </span><a shape="rect" href="exchange.html">Exchange</a><span> invoked using a Camel OGNL expression.</span></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>exchangeId</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> the exchange Id.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>id</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The input message Id.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>body</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</co
 de></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The input body.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>in.body</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The input body.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>body.<strong>OGNL</strong></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> the input body invoked using a Camel OGNL expression.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>in.body.<strong>OGNL</strong></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> the input body invoked using a Camel OGNL expression.</p></t
 d></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>bodyAs(<em>type</em>)</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Type</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> Converts the body to the given type determined by its classname. The converted body can be <strong><code>null</code></strong>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>bodyAs(<em>type</em>).<strong>OGNL</strong></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.18:</strong><span> Converts the body to the given type determined by its classname and then invoke methods using a Camel OGNL expression. The converted body can be <strong><code>null</code></strong>.</span></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>mandatoryBodyAs(<em>type</em>)</code></p><
 /td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Type</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.5:</strong> Converts the body to the given type determined by its classname, and expects the body to be not <strong><code>null</code></strong>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>mandatoryBodyAs(<em>type</em>).<strong>OGNL</strong></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.18:</strong><span> Converts the body to the given type determined by its classname and then invoke methods using a Camel OGNL expression.</span></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>out.body</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The output body.</p></td></tr><tr><t
 d colspan="1" rowspan="1" class="confluenceTd"><p><code>header.<em>foo</em></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Refer to the input&#160;<strong><code>foo</code></strong> header.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>header[<em>foo</em>]</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9.2:</strong> refer to the input&#160;<strong><code>foo</code></strong> header.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>headers.<em>foo</em></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Refer to the input&#160;<strong><code>foo</code></strong> header.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluen
 ceTd"><p><code>headers[<em>foo</em>]</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9.2:</strong> refer to the input&#160;<strong><code>foo</code></strong> header.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>in.header.<code><em>foo</em></code></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Refer to the input&#160;<strong><code>foo</code></strong> header.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>in.header[<code><em>foo</em></code>]</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9.2:</strong> refer to the input&#160;<strong><code>foo</code></strong> header.</p></td></tr><tr><td colspan="1" rowsp
 an="1" class="confluenceTd"><p><code>in.headers.<code><em>foo</em></code></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Refer to the input&#160;<strong><code>foo</code></strong> header.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>in.headers[<code><em>foo</em></code>]</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9.2:</strong> refer to the input&#160;<strong><code>foo</code></strong> header.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>header.foo[<em>bar</em>]</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> regard input&#160;<strong><code>foo</code></strong> header as a map and perform
  lookup on the map with&#160;<strong><code>bar</code></strong> as key.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>in.header.foo[<code><em>bar</em></code>]</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> regard input&#160;<strong><code>foo</code></strong> header as a map and perform lookup on the map with&#160;<strong><code>bar</code></strong> as key.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>in.headers.foo[<code><em>bar</em></code>]</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> regard input&#160;<strong><code>foo</code></strong> header as a map and perform lookup on the map with&#160;<strong><code>bar</code></strong> as key.</p></td></tr><tr><td colspan="1" rowspan="1
 " class="confluenceTd"><p><code>header.<code><em>foo</em></code>.OGNL</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> refer to the input&#160;<strong><code>foo</code></strong> header and invoke its value using a Camel OGNL expression.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>in.header.<code><em>foo</em></code>.OGNL</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> refer to the input&#160;<strong><code>foo</code></strong> header and invoke its value using a Camel OGNL expression.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>in.headers.<code><em>foo</em></code>.OGNL</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1"
  rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> refer to the input&#160;<strong><code>foo</code></strong> header and invoke its value using a Camel OGNL expression.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>out.header.<code><em>foo</em></code></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Refer to the out header <strong><code>foo</code></strong>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>out.header[<code><em>foo</em></code>]</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9.2:</strong> refer to the out header <strong><code>foo</code></strong>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>out.headers.<code><em>foo</em></code></code></p></td><td colspan="1" rows
 pan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Refer to the out header <strong><code>foo</code></strong>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>out.headers[<code><em>foo</em></code>]</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9.2:</strong> refer to the out header <strong><code>foo</code></strong>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>headerAs(<em>key</em>,<em>type</em>)</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Type</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.5:</strong> Converts the header to the given type determined by its classname.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>headers</code></p></td><td colspan="1" rowspan="1
 " class="confluenceTd"><p><code>Map</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9:</strong> refer to the input headers.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>in.headers</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Map</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9:</strong> refer to the input headers.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>property.<code><em>foo</em></code></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong><span style="color: rgb(255,0,0);">Deprecated</span>:</strong> refer to the&#160;<strong><code>foo</code></strong> property on the exchange.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>exchangeProperty.<code><em>foo</em></code></code></p></td><td colspan="
 1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><span><strong>Camel 2.15:</strong> refer to the&#160;<strong><code>foo</code></strong> property on the exchange.</span></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>property[<code><em>foo</em></code>]</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong><strong><span style="color: rgb(255,0,0);">Deprecated</span></strong>:</strong> refer to the&#160;<strong><code>foo</code></strong> property on the exchange.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><span><code>exchangeProperty[<code><em>foo</em></code>]</code></span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.15:</strong><span> refer to the&#160;<s
 trong><code>foo</code></strong> property on the exchange.</span></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>property.<code><em>foo</em></code>.OGNL</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong><strong><span style="color: rgb(255,0,0);">Deprecated</span></strong>:</strong> refer to the&#160;<strong><code>foo</code></strong> property on the exchange and invoke its value using a Camel OGNL expression.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>exchangeProperty.<code><em>foo</em></code>.OGNL</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.15:</strong><span> refer to the&#160;<strong><code>foo</code></strong> property on the exchange and invoke its value using a Camel OGNL expression.</span></p></td></tr
 ><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>sys.<code><em>foo</em></code></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Refer to the system property <span><strong><code>foo</code></strong></span>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>sysenv.<code><em>foo</em></code></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> refer to the system environment property <span><strong><code>foo</code></strong></span>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>exception</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.4:</strong> Refer to the exception object on the exchange, i
 s <strong><code>null</code></strong> if no exception set on exchange. Will fallback and grab caught exceptions (<strong><code>Exchange.EXCEPTION_CAUGHT</code></strong>) if the Exchange has any.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>exception.OGNL</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.4:</strong> Refer to the exchange exception invoked using a Camel OGNL expression object</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>exception.message</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Refer to the exception.message on the exchange, is <strong>null</strong> if no exception set on exchange. Will fallback and grab caught exceptions (<strong><code>Exchange.EXCEPTION_CAUGHT</code></strong>) if the Exchange 
 has any.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>exception.stacktrace</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.6.</strong> Refer to the&#160;<strong><code>exception.stracktrace</code></strong> on the exchange. Result is&#160;<strong><code>null</code></strong> if no exception set on exchange. Will fallback and grab caught exceptions (<strong><code>Exchange.EXCEPTION_CAUGHT</code></strong>) if the Exchange has any.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>date:<em>command</em>:<em>pattern</em></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Date formatting using the <strong><code>java.text.SimpleDateFormat</code></strong> patterns. Supported commands are:&#160;</p>
+     <ul><li><p><strong><code>now</code></strong> for current timestamp.</p></li><li><p><strong><code>in.header.xxx</code></strong> or&#160;<strong><code>header.xxx</code></strong> to use the&#160;<strong><code>Date</code></strong> object in the&#160;<strong><code>IN</code></strong> header with the key <strong><code>xxx</code></strong>.</p></li><li><p><strong><code>out.header.xxx</code></strong> to use the&#160;<strong><code>Date</code></strong> object in the&#160;<strong><code>OUT</code></strong> header with the key <strong><code>xxx</code></strong>.</p></li></ul></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>bean:<em>bean expression</em></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Invoking a bean expression using the <a shape="rect" href="bean.html">Bean</a> language. Specifying a method name you must use dot as separator. We also support the&#160;<strong
 ><code>?method=methodname</code></strong> syntax that is used by the <a shape="rect" href="bean.html">Bean</a> component.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>properties:<em>locations</em>:key</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong><span style="color: rgb(255,0,0);">Deprecated</span>: (use properties-location instead) Camel 2.3:</strong> Lookup a property with the given key. The <strong><code>locations</code></strong> option is optional. See more at <a shape="rect" href="using-propertyplaceholder.html">Using PropertyPlaceholder</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>properties-location:<em>locations:key</em></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.14.1:</strong> Lookup a
  property with the given key. The <code>locations</code> option is optional. See more at <a shape="rect" href="using-propertyplaceholder.html">Using PropertyPlaceholder</a>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>properties:key:default</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.14.1</strong>: Lookup a property with the given key. If the key does not exists or has no value, then an optional default value can be specified.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>routeId</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> Returns the Id of the current route the <a shape="rect" href="exchange.html">Exchange</a> is being routed.</p></td></tr><tr><td colspan="1" rowspan="1" class
 ="confluenceTd"><p><code>threadName</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.3:</strong> Returns the name of the current thread. Can be used for logging purpose.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>ref:<em>xxx</em></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.6:</strong> To lookup a bean from the <a shape="rect" href="registry.html">Registry</a> with the given Id.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>type:name.field</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Object</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> To refer to a type or field by its FQN name. To refer to a field you can append <str
 ong><code>.FIELD_NAME</code></strong>. For example you can refer to the constant field from Exchange as: <strong><code>org.apache.camel.Exchange.FILE_NAME</code></strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.12.3:</strong> represents a <strong><code>null</code>.</strong></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>random(<em>value</em>)</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Integer</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.16.0: </strong>returns a random Integer between&#160;<em><strong><code>0</code></strong></em> (included) and <strong><em>value</em></strong> (excluded)</p></td></tr><tr><td colspan="1" rowspan="1" 
 class="confluenceTd"><p><code>random(<em>min</em>,<em>max</em>)</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Integer</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.16.0: </strong>returns a random Integer between <strong><em>min</em></strong> (included) and <strong><em>max</em></strong> (excluded)</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>skip(number)</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Iterator</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.19:</strong> The skip function iterates the message body and skips the first number of items. This can be used with the <a shape="rect" href="splitter.html">Splitter EIP</a> to split a message body and skip the first N number of items.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>messageHistory</code></p></td><td colspan="1" rowspan="1" class="conflu
 enceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.17:</strong> The message history of the current exchange how it has been routed. This is similar to the route stack-trace message history the error handler logs in case of an unhandled exception.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><span><code>messageHistory(false)</code></span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>String</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.17:</strong><span>&#160;</span>As&#160;<strong><code>messageHistory</code></strong> but without the exchange details (only includes the route strack-trace). This can be used if you do not want to log sensitive data from the message itself.</p></td></tr></tbody></table>
+</div></div><h3 id="BookInOnePage-OGNLexpressionsupport">OGNL expression support</h3><p><strong>Available as of Camel 2.3</strong></p><div class="confluence-information-macro confluence-information-macro-information"><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>Camel's OGNL support is for invoking methods only. You cannot access fields.<br clear="none"> From <strong>Camel 2.11.1</strong>: we added special support for accessing the length field of Java arrays.</p></div></div><p>The <a shape="rect" href="simple.html">Simple</a> and <a shape="rect" href="bean.html">Bean</a> language now supports a Camel OGNL notation for invoking beans in a chain like fashion. Suppose the Message&#160;<strong><code>IN</code></strong> body contains a POJO which has a <strong><code>getAddress()</code></strong> method.</p><p>Then you can use Camel OGNL notation to access the address object:</p><div class=
 "code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[simple(&quot;${body.address}&quot;)
 simple(&quot;${body.address.street}&quot;)
 simple(&quot;${body.address.zip}&quot;)
@@ -8444,7 +8418,7 @@ simple(&quot;${body.getAddress.getStreet
 simple(&quot;${body.address.getZip}&quot;)
 simple(&quot;${body.doSomething}&quot;)
 ]]></script>
-</div></div><p>You can also use the null safe operator (<strong><code>?.</code></strong>) to avoid NPE if for example the body does <em>not</em> have an address</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>You can also use the null safe operator (<strong><code>?.</code></strong>) to avoid a NPE if for example the body does <em>not</em> have an address</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[simple(&quot;${body?.address?.street}&quot;)
 ]]></script>
 </div></div><p>It is also possible to index in <strong><code>Map</code></strong> or <strong><code>List</code></strong> types, so you can do:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
@@ -8457,10 +8431,10 @@ simple(&quot;${body.doSomething}&quot;)
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[simple(&quot;${body[foo]}&quot;)
 simple(&quot;${body[this.is.foo]}&quot;)
 ]]></script>
-</div></div><p>Suppose there was no value with the key <strong><code>foo</code></strong> then you can use the null safe operator to avoid the NPE as shown:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>Suppose there was no value with the key <strong><code>foo</code></strong> then you can use the null safe operator to avoid a NPE as shown:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[simple(&quot;${body[foo]?.name}&quot;)
 ]]></script>
-</div></div><p>You can also access <code>List</code> types, for example to get lines from the address you can do:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>You can also access <strong><code>List</code></strong> types, for example to get lines from the address you can do:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[simple(&quot;${body.address.lines[0]}&quot;)
 simple(&quot;${body.address.lines[1]}&quot;)
 simple(&quot;${body.address.lines[2]}&quot;)
@@ -8468,16 +8442,16 @@ simple(&quot;${body.address.lines[2]}&qu
 </div></div><p>There is a special <strong><code>last</code></strong> keyword which can be used to get the last value from a list.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[simple(&quot;${body.address.lines[last]}&quot;)
 ]]></script>
-</div></div><p>And to get the 2nd last you can subtract a number, so we can use <strong><code>last-1</code></strong> to indicate this:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>And to get the penultimate line use subtraction. In this case use <strong><code>last-1</code></strong> for this:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[simple(&quot;${body.address.lines[last-1]}&quot;)
 ]]></script>
-</div></div><p>And the 3rd last is of course:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>And the third last is of course:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[simple(&quot;${body.address.lines[last-2]}&quot;)
 ]]></script>
-</div></div><p>And you can call the size method on the list with</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>And you can call the&#160;<strong><code>size</code></strong> method on the list with</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[simple(&quot;${body.address.lines.size}&quot;)
 ]]></script>
-</div></div><p>From <strong>Camel 2.11.1</strong> we added support for the length field for Java arrays as well, eg:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>From <strong>Camel 2.11.1</strong> we added support for the length field for Java arrays as well. Example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[String[] lines = new String[]{&quot;foo&quot;, &quot;bar&quot;, &quot;cat&quot;};
 exchange.getIn().setBody(lines);
 
@@ -8486,10 +8460,10 @@ simple(&quot;There are ${body.length} li
 </div></div><p>And yes you can combine this with the operator support as shown below:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[simple(&quot;${body.address.zip} &gt; 1000&quot;)
 ]]></script>
-</div></div><h3 id="BookInOnePage-OperatorSupport">Operator Support</h3><p>The parser is limited to only support a single operator. To enable it the left value must be enclosed in <strong><code>${ }</code></strong>.</p><p>The syntax is:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="BookInOnePage-OperatorSupport">Operator Support</h3><p>The parser is limited to only support a single operator. To enable it the left value must be enclosed in <strong><code>${}</code></strong>.</p><p>The syntax is:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[${leftValue} OP rightValue
 ]]></script>

[... 62 lines stripped ...]