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 2019/03/31 15:23:09 UTC

svn commit: r1042911 [7/48] - in /websites/production/camel/content: ./ 2007/08/17/ 2008/04/08/ 2008/04/28/ 2009/01/19/ 2009/10/26/ 2012/01/17/ 2012/03/01/ 2019/03/ 2019/03/31/

Modified: websites/production/camel/content/book-languages-appendix.html
==============================================================================
--- websites/production/camel/content/book-languages-appendix.html (original)
+++ websites/production/camel/content/book-languages-appendix.html Sun Mar 31 15:23:07 2019
@@ -98,12 +98,12 @@
 
 <p>To support flexible and powerful <a shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration Patterns</a> Camel supports various Languages to create an <a shape="rect" href="expression.html">Expression</a> or <a shape="rect" href="predicate.html">Predicate</a> within either the <a shape="rect" href="dsl.html">Routing Domain Specific Language</a> or the <a shape="rect" href="xml-configuration.html">Xml Configuration</a>. The following languages are supported</p>
 
-<div class="conf-macro output-block" data-hasbody="false" data-macro-name="include"><h2 id="BookLanguagesAppendix-BeanLanguage">Bean Language</h2><p>The purpose of the Bean Language is to be able to implement an <a shape="rect" href="expression.html">Expression</a> or <a shape="rect" href="predicate.html">Predicate</a> using a simple method on a bean. The bean name is resolved using a <a shape="rect" href="registry.html">Registry</a>, such as the <a shape="rect" href="spring.html">Spring</a>&#160;<strong><code>ApplicationContext</code></strong>, then a method is invoked to evaluate the <a shape="rect" href="expression.html">Expression</a> or <a shape="rect" href="predicate.html">Predicate</a>. If no method name is provided then one is chosen using the rules for <a shape="rect" href="bean-binding.html">Bean Binding</a>; using the type of the message body and using any annotations on the bean methods.</p><p>The <a shape="rect" href="bean-binding.html">Bean Binding</a> rules are used t
 o bind the <a shape="rect" href="message.html">Message</a> Exchange to the method parameters; so you can annotate the bean to extract headers or other expressions such as <a shape="rect" href="xpath.html">XPath</a> or <a shape="rect" href="xquery.html">XQuery</a> from the message.</p><h3 id="BookLanguagesAppendix-UsingBeanExpressionsinJava">Using Bean Expressions in Java</h3><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<div class="conf-macro output-block" data-hasbody="false" data-macro-name="include"><h2 id="BookLanguagesAppendix-BeanLanguage">Bean Language</h2><p>The purpose of the Bean Language is to be able to implement an <a shape="rect" href="expression.html">Expression</a> or <a shape="rect" href="predicate.html">Predicate</a> using a simple method on a bean. The bean name is resolved using a <a shape="rect" href="registry.html">Registry</a>, such as the <a shape="rect" href="spring.html">Spring</a>&#160;<strong><code>ApplicationContext</code></strong>, then a method is invoked to evaluate the <a shape="rect" href="expression.html">Expression</a> or <a shape="rect" href="predicate.html">Predicate</a>. If no method name is provided then one is chosen using the rules for <a shape="rect" href="bean-binding.html">Bean Binding</a>; using the type of the message body and using any annotations on the bean methods.</p><p>The <a shape="rect" href="bean-binding.html">Bean Binding</a> rules are used t
 o bind the <a shape="rect" href="message.html">Message</a> Exchange to the method parameters; so you can annotate the bean to extract headers or other expressions such as <a shape="rect" href="xpath.html">XPath</a> or <a shape="rect" href="xquery.html">XQuery</a> from the message.</p><h3 id="BookLanguagesAppendix-UsingBeanExpressionsinJava">Using Bean Expressions in Java</h3><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">from("activemq:topic:OrdersTopic")
   .filter().method("myBean", "isGoldCustomer")
     .to("activemq:BigSpendersQueue");
 </pre>
-</div></div><h3 id="BookLanguagesAppendix-UsingBeanExpressionsinSpringXML">Using Bean Expressions in Spring XML</h3><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="BookLanguagesAppendix-UsingBeanExpressionsinSpringXML">Using Bean Expressions in Spring XML</h3><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: xml; gutter: false; theme: Default" data-theme="Default">&lt;route&gt;
   &lt;from uri="activemq:topic:OrdersTopic"/&gt;
   &lt;filter&gt;
@@ -112,39 +112,39 @@
   &lt;/filter&gt;
 &lt;/route&gt;
 </pre>
-</div></div><div class="confluence-information-macro confluence-information-macro-warning conf-macro output-block" data-hasbody="true" data-macro-name="warning"><p class="title">Bean Attribute Now Deprecated</p><span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"> </span><div class="confluence-information-macro-body"><p>The <strong><code>bean</code></strong> attribute of the method expression element is now deprecated. Use the <strong><code>ref</code></strong> attribute instead.</p></div></div><h3 id="BookLanguagesAppendix-WritingtheExpressionBean">Writing the Expression Bean</h3><p>The bean in the above examples is just any old Java Bean with a method called&#160;<strong><code>isGoldCustomer()</code></strong> that returns some object that is easily converted to a <strong><code>boolean</code></strong> value in this case, as its used as a predicate.</p><p>Example:</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-mac
 ro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><div class="confluence-information-macro confluence-information-macro-warning conf-macro output-block" data-hasbody="true" data-macro-name="warning"><p class="title">Bean Attribute Now Deprecated</p><span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"> </span><div class="confluence-information-macro-body"><p>The <strong><code>bean</code></strong> attribute of the method expression element is now deprecated. Use the <strong><code>ref</code></strong> attribute instead.</p></div></div><h3 id="BookLanguagesAppendix-WritingtheExpressionBean">Writing the Expression Bean</h3><p>The bean in the above examples is just any old Java Bean with a method called&#160;<strong><code>isGoldCustomer()</code></strong> that returns some object that is easily converted to a <strong><code>boolean</code></strong> value in this case, as its used as a predicate.</p><p>Example:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" d
 ata-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">public class MyBean {
   public boolean isGoldCustomer(Exchange exchange) {
   	 // ...
   }
 }
 </pre>
-</div></div><p>We can also use the <a shape="rect" href="bean-integration.html">Bean Integration</a> annotations.</p><p>Example:</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>We can also use the <a shape="rect" href="bean-integration.html">Bean Integration</a> annotations.</p><p>Example:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">public boolean isGoldCustomer(String body) {...}
 </pre>
-</div></div><p>or</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>or</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">public boolean isGoldCustomer(@Header(name = "foo") Integer fooHeader) {...}
 </pre>
-</div></div><p>So you can bind parameters of the method to the Exchange, the <a shape="rect" href="message.html">Message</a> or individual headers, properties, the body or other expressions.</p><h3 id="BookLanguagesAppendix-Non-RegistryBeans">Non-Registry Beans</h3><p>The <a shape="rect" href="bean-language.html">Bean Language</a> also supports invoking beans that isn't registered in the <a shape="rect" href="registry.html">Registry</a>. This is usable for quickly to invoke a bean from Java DSL where you don't need to register the bean in the <a shape="rect" href="registry.html">Registry</a> such as the <a shape="rect" href="spring.html">Spring</a> <strong><code>ApplicationContext</code></strong>. Camel can instantiate the bean and invoke the method if given a class or invoke an already existing instance.</p><p>Example:</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl
 ">
+</div></div><p>So you can bind parameters of the method to the Exchange, the <a shape="rect" href="message.html">Message</a> or individual headers, properties, the body or other expressions.</p><h3 id="BookLanguagesAppendix-Non-RegistryBeans">Non-Registry Beans</h3><p>The <a shape="rect" href="bean-language.html">Bean Language</a> also supports invoking beans that isn't registered in the <a shape="rect" href="registry.html">Registry</a>. This is usable for quickly to invoke a bean from Java DSL where you don't need to register the bean in the <a shape="rect" href="registry.html">Registry</a> such as the <a shape="rect" href="spring.html">Spring</a> <strong><code>ApplicationContext</code></strong>. Camel can instantiate the bean and invoke the method if given a class or invoke an already existing instance.</p><p>Example:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl
 ">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">from("activemq:topic:OrdersTopic")
   .filter().expression(BeanLanguage(MyBean.class, "isGoldCustomer"))
   .to("activemq:BigSpendersQueue");
 </pre>
-</div></div><p>The 2nd parameter <strong><code>isGoldCustomer</code></strong> is an optional parameter to explicit set the method name to invoke. If not provided Camel will try to invoke the most suitable method. If case of ambiguity Camel will thrown an Exception. In these situations the 2nd parameter can solve this problem. Also the code is more readable if the method name is provided. The 1st parameter can also be an existing instance of a Bean such as:</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>The 2nd parameter <strong><code>isGoldCustomer</code></strong> is an optional parameter to explicit set the method name to invoke. If not provided Camel will try to invoke the most suitable method. If case of ambiguity Camel will thrown an Exception. In these situations the 2nd parameter can solve this problem. Also the code is more readable if the method name is provided. The 1st parameter can also be an existing instance of a Bean such as:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">private MyBean my;
 
 from("activemq:topic:OrdersTopic")
   .filter().expression(BeanLanguage.bean(my, "isGoldCustomer"))
   .to("activemq:BigSpendersQueue");
 </pre>
-</div></div><p>In <strong>Camel 2.2</strong>: you can avoid the <strong><code>BeanLanguage</code></strong> and have it just as:</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>In <strong>Camel 2.2</strong>: you can avoid the <strong><code>BeanLanguage</code></strong> and have it just as:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">private MyBean my;
 
 from("activemq:topic:OrdersTopic")
   .filter().expression(bean(my, "isGoldCustomer"))
   .to("activemq:BigSpendersQueue");
 </pre>
-</div></div><p>Which also can be done in a bit shorter and nice way:</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>Which also can be done in a bit shorter and nice way:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">private MyBean my;
 
 from("activemq:topic:OrdersTopic")
@@ -152,7 +152,7 @@ from("activemq:topic:OrdersTopic")
   .to("activemq:BigSpendersQueue");
 </pre>
 </div></div><h3 id="BookLanguagesAppendix-OtherExamples">Other Examples</h3><p>We have some test cases you can look at if it'll help</p><ul><li><a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MethodFilterTest.java">MethodFilterTest </a> is a JUnit test case showing the Java <a shape="rect" href="dsl.html">DSL</a> use of the bean expression being used in a filter</li><li><a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/aggregator.xml">aggregator.xml</a> is a Spring XML test case for the <a shape="rect" href="aggregator.html">Aggregator</a> which uses a bean method call to test for the completion of the aggregation.</li></ul><h3 id="BookLanguagesAppendix-Dependencies">Dependencies</h3><p>The Bean language is part of <strong><code>camel-core</code></strong>.</p></div>
-<div class="conf-macro output-block" data-hasbody="false" data-macro-name="include"><h2 id="BookLanguagesAppendix-ConstantExpressionLanguage">Constant Expression Language</h2><p>The Constant Expression Language is really just a way to specify constant strings as a type of expression.</p><h3 id="BookLanguagesAppendix-Exampleusage">Example usage</h3><p>The&#160;<strong><code>setHeader</code></strong> element of the Spring DSL can utilize a constant expression like:</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<div class="conf-macro output-block" data-hasbody="false" data-macro-name="include"><h2 id="BookLanguagesAppendix-ConstantExpressionLanguage">Constant Expression Language</h2><p>The Constant Expression Language is really just a way to specify constant strings as a type of expression.</p><h3 id="BookLanguagesAppendix-Exampleusage">Example usage</h3><p>The&#160;<strong><code>setHeader</code></strong> element of the Spring DSL can utilize a constant expression like:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: xml; gutter: false; theme: Default" data-theme="Default">&lt;route&gt;
   &lt;from uri="seda:a"/&gt;
   &lt;setHeader headerName="theHeader"&gt;
@@ -161,13 +161,13 @@ from("activemq:topic:OrdersTopic")
   &lt;to uri="mock:b"/&gt;     
 &lt;/route&gt;
 </pre>
-</div></div><p>In this case, the <a shape="rect" href="message.html">Message</a> coming from the&#160;<strong><code>seda:a</code></strong> <a shape="rect" href="endpoint.html">Endpoint</a> will have&#160;<strong><code>theHeader</code></strong> header set to the constant value <strong><code>the value</code></strong>.</p><p>And the same example using Java DSL:</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>In this case, the <a shape="rect" href="message.html">Message</a> coming from the&#160;<strong><code>seda:a</code></strong> <a shape="rect" href="endpoint.html">Endpoint</a> will have&#160;<strong><code>theHeader</code></strong> header set to the constant value <strong><code>the value</code></strong>.</p><p>And the same example using Java DSL:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">from("seda:a")
   .setHeader("theHeader", constant("the value"))
   .to("mock:b");
 </pre>
 </div></div><h3 id="BookLanguagesAppendix-Dependencies.1">Dependencies</h3><p>The Constant language is part of <strong><code>camel-core</code></strong>.</p></div> 
-<div class="conf-macro output-block" data-hasbody="false" data-macro-name="include"><h2 id="BookLanguagesAppendix-EL">EL</h2><p>Camel supports the unified JSP and JSF Expression Language via the <a shape="rect" class="external-link" href="http://juel.sourceforge.net/" rel="nofollow">JUEL</a> to allow an <a shape="rect" href="expression.html">Expression</a> or <a shape="rect" href="predicate.html">Predicate</a> to be used in the <a shape="rect" href="dsl.html">DSL</a> or <a shape="rect" href="xml-configuration.html">Xml Configuration</a>.</p><p>For example you could use EL inside a <a shape="rect" href="message-filter.html">Message Filter</a> in XML</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<div class="conf-macro output-block" data-hasbody="false" data-macro-name="include"><h2 id="BookLanguagesAppendix-EL">EL</h2><p>Camel supports the unified JSP and JSF Expression Language via the <a shape="rect" class="external-link" href="http://juel.sourceforge.net/" rel="nofollow">JUEL</a> to allow an <a shape="rect" href="expression.html">Expression</a> or <a shape="rect" href="predicate.html">Predicate</a> to be used in the <a shape="rect" href="dsl.html">DSL</a> or <a shape="rect" href="xml-configuration.html">Xml Configuration</a>.</p><p>For example you could use EL inside a <a shape="rect" href="message-filter.html">Message Filter</a> in XML</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">&lt;route&gt;
   &lt;from uri="seda:foo"/&gt;
   &lt;filter&gt;
@@ -176,7 +176,7 @@ from("activemq:topic:OrdersTopic")
   &lt;/filter&gt;
 &lt;/route&gt;
 </pre>
-</div></div><p>You could also use slightly different syntax, e.g. if the header name is not a valid identifier:</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>You could also use slightly different syntax, e.g. if the header name is not a valid identifier:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">&lt;route&gt;
   &lt;from uri="seda:foo"/&gt;
   &lt;filter&gt;
@@ -185,10 +185,10 @@ from("activemq:topic:OrdersTopic")
   &lt;/filter&gt;
 &lt;/route&gt;
 </pre>
-</div></div><p>You could use EL to create an <a shape="rect" href="predicate.html">Predicate</a> in a <a shape="rect" href="message-filter.html">Message Filter</a> or as an <a shape="rect" href="expression.html">Expression</a> for a <a shape="rect" href="recipient-list.html">Recipient List</a></p><h3 id="BookLanguagesAppendix-Variables">Variables</h3><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>exchange</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Exchange</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the Exchange object</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>in</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Message</p></td><td c
 olspan="1" rowspan="1" class="confluenceTd"><p>the exchange.in message</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>out</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Message</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the exchange.out message</p></td></tr></tbody></table></div><h3 id="BookLanguagesAppendix-Samples">Samples</h3><p>You can use EL dot notation to invoke operations. If you for instance have a body that contains a POJO that has a <code>getFamiliyName</code> method then you can construct the syntax as follows:</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>You could use EL to create an <a shape="rect" href="predicate.html">Predicate</a> in a <a shape="rect" href="message-filter.html">Message Filter</a> or as an <a shape="rect" href="expression.html">Expression</a> for a <a shape="rect" href="recipient-list.html">Recipient List</a></p><h3 id="BookLanguagesAppendix-Variables">Variables</h3><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>exchange</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Exchange</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the Exchange object</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>in</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Message</p></td><td c
 olspan="1" rowspan="1" class="confluenceTd"><p>the exchange.in message</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>out</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Message</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the exchange.out message</p></td></tr></tbody></table></div><h3 id="BookLanguagesAppendix-Samples">Samples</h3><p>You can use EL dot notation to invoke operations. If you for instance have a body that contains a POJO that has a <code>getFamiliyName</code> method then you can construct the syntax as follows:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">"${in.body.familyName}"
 </pre>
-</div></div><h3 id="BookLanguagesAppendix-Dependencies.2">Dependencies</h3><p>To use EL in your camel routes you need to add the a dependency on <strong>camel-juel</strong> which implements the EL language.</p><p>If you use maven you could just add the following to your pom.xml, substituting the version number for the latest &amp; greatest release (see <a shape="rect" href="download.html">the download page for the latest versions</a>).</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="BookLanguagesAppendix-Dependencies.2">Dependencies</h3><p>To use EL in your camel routes you need to add the a dependency on <strong>camel-juel</strong> which implements the EL language.</p><p>If you use maven you could just add the following to your pom.xml, substituting the version number for the latest &amp; greatest release (see <a shape="rect" href="download.html">the download page for the latest versions</a>).</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">&lt;dependency&gt;
   &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
   &lt;artifactId&gt;camel-juel&lt;/artifactId&gt;
@@ -313,12 +313,12 @@ This is done using the following syntax:
 </plain-text-body>
 
 <p>Otherwise, you'll also need <a shape="rect" class="external-link" href="http://repo2.maven.org/maven2/commons-jxpath/commons-jxpath/1.3/commons-jxpath-1.3.jar" rel="nofollow">Commons JXPath</a>.</p></div>
-<div class="conf-macro output-block" data-hasbody="false" data-macro-name="include"><h2 id="BookLanguagesAppendix-Mvel">Mvel</h2><p>Camel allows Mvel to be used as an <a shape="rect" href="expression.html">Expression</a> or <a shape="rect" href="predicate.html">Predicate</a> the <a shape="rect" href="dsl.html">DSL</a> or <a shape="rect" href="xml-configuration.html">Xml Configuration</a>.</p><p>You could use Mvel to create an <a shape="rect" href="predicate.html">Predicate</a> in a <a shape="rect" href="message-filter.html">Message Filter</a> or as an <a shape="rect" href="expression.html">Expression</a> for a <a shape="rect" href="recipient-list.html">Recipient List</a></p><p>You can use Mvel dot notation to invoke operations. If you for instance have a body that contains a POJO that has a <code>getFamiliyName</code> method then you can construct the syntax as follows:</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-wi
 dth: 1px;"><div class="codeContent panelContent pdl">
+<div class="conf-macro output-block" data-hasbody="false" data-macro-name="include"><h2 id="BookLanguagesAppendix-Mvel">Mvel</h2><p>Camel allows Mvel to be used as an <a shape="rect" href="expression.html">Expression</a> or <a shape="rect" href="predicate.html">Predicate</a> the <a shape="rect" href="dsl.html">DSL</a> or <a shape="rect" href="xml-configuration.html">Xml Configuration</a>.</p><p>You could use Mvel to create an <a shape="rect" href="predicate.html">Predicate</a> in a <a shape="rect" href="message-filter.html">Message Filter</a> or as an <a shape="rect" href="expression.html">Expression</a> for a <a shape="rect" href="recipient-list.html">Recipient List</a></p><p>You can use Mvel dot notation to invoke operations. If you for instance have a body that contains a POJO that has a <code>getFamiliyName</code> method then you can construct the syntax as follows:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-n
 ame="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">"request.body.familyName"
    // or 
 "getRequest().getBody().getFamilyName()"
 </pre>
-</div></div><h3 id="BookLanguagesAppendix-Variables.2">Variables</h3><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><strong>this</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Exchange</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the Exchange is the root object</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>exchange</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Exchange</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the Exchange object</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>exception</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Throwable</p></td><td colspan="1" rowspan="1" 
 class="confluenceTd"><p>the Exchange exception (if any)</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>exchangeId</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the exchange id</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>fault</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Message</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the Fault message (if any)</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>request</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Message</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the exchange.in message</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>response</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Message</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the exchange.out message (if any)</p></td></tr><tr><t
 d colspan="1" rowspan="1" class="confluenceTd"><p>properties</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Map</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the exchange properties</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>property(name)</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the property by the given name</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>property(name, type)</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Type</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the property by the given name as the given type</p></td></tr></tbody></table></div><h3 id="BookLanguagesAppendix-Samples.1">Samples</h3><p>For example you could use Mvel inside a <a shape="rect" href="message-filter.html">Message Filter</a> in XML</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-ma
 cro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="BookLanguagesAppendix-Variables.2">Variables</h3><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><strong>this</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Exchange</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the Exchange is the root object</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>exchange</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Exchange</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the Exchange object</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>exception</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Throwable</p></td><td colspan="1" rowspan="1" 
 class="confluenceTd"><p>the Exchange exception (if any)</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>exchangeId</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the exchange id</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>fault</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Message</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the Fault message (if any)</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>request</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Message</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the exchange.in message</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>response</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Message</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the exchange.out message (if any)</p></td></tr><tr><t
 d colspan="1" rowspan="1" class="confluenceTd"><p>properties</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Map</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the exchange properties</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>property(name)</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the property by the given name</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>property(name, type)</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Type</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the property by the given name as the given type</p></td></tr></tbody></table></div><h3 id="BookLanguagesAppendix-Samples.1">Samples</h3><p>For example you could use Mvel inside a <a shape="rect" href="message-filter.html">Message Filter</a> in XML</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" 
 data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">&lt;route&gt;
   &lt;from uri="seda:foo"/&gt;
   &lt;filter&gt;
@@ -327,13 +327,13 @@ This is done using the following syntax:
   &lt;/filter&gt;
 &lt;/route&gt;
 </pre>
-</div></div><p>And the sample using Java DSL:</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>And the sample using Java DSL:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">   from("seda:foo").filter().mvel("request.headers.foo == 'bar'").to("seda:bar");
 </pre>
-</div></div><h3 id="BookLanguagesAppendix-Loadingscriptfromexternalresource.1">Loading script from external resource</h3><p><strong>Available as of Camel 2.11</strong></p><p>You can externalize the script and have Camel load it from a resource such as <code>"classpath:"</code>, <code>"file:"</code>, or <code>"http:"</code>.<br clear="none"> This is done using the following syntax: <code>"resource:scheme:location"</code>, eg to refer to a file on the classpath you can do:</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="BookLanguagesAppendix-Loadingscriptfromexternalresource.1">Loading script from external resource</h3><p><strong>Available as of Camel 2.11</strong></p><p>You can externalize the script and have Camel load it from a resource such as <code>"classpath:"</code>, <code>"file:"</code>, or <code>"http:"</code>.<br clear="none"> This is done using the following syntax: <code>"resource:scheme:location"</code>, eg to refer to a file on the classpath you can do:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">.setHeader("myHeader").mvel("resource:classpath:script.mvel")
 </pre>
-</div></div><h3 id="BookLanguagesAppendix-Dependencies.5">Dependencies</h3><p>To use Mvel in your camel routes you need to add the a dependency on <strong>camel-mvel</strong> which implements the Mvel language.</p><p>If you use maven you could just add the following to your pom.xml, substituting the version number for the latest &amp; greatest release (see <a shape="rect" href="download.html">the download page for the latest versions</a>).</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="BookLanguagesAppendix-Dependencies.5">Dependencies</h3><p>To use Mvel in your camel routes you need to add the a dependency on <strong>camel-mvel</strong> which implements the Mvel language.</p><p>If you use maven you could just add the following to your pom.xml, substituting the version number for the latest &amp; greatest release (see <a shape="rect" href="download.html">the download page for the latest versions</a>).</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">&lt;dependency&gt;
   &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
   &lt;artifactId&gt;camel-mvel&lt;/artifactId&gt;
@@ -341,12 +341,12 @@ This is done using the following syntax:
 &lt;/dependency&gt;
 </pre>
 </div></div></div>
-<div class="conf-macro output-block" data-hasbody="false" data-macro-name="include"><h2 id="BookLanguagesAppendix-OGNL">OGNL</h2><p>Camel allows <a shape="rect" class="external-link" href="http://commons.apache.org/proper/commons-ognl/">OGNL</a> to be used as an <a shape="rect" href="expression.html">Expression</a> or <a shape="rect" href="predicate.html">Predicate</a> the <a shape="rect" href="dsl.html">DSL</a> or <a shape="rect" href="xml-configuration.html">Xml Configuration</a>.</p><p>You could use OGNL to create an <a shape="rect" href="predicate.html">Predicate</a> in a <a shape="rect" href="message-filter.html">Message Filter</a> or as an <a shape="rect" href="expression.html">Expression</a> for a <a shape="rect" href="recipient-list.html">Recipient List</a></p><p>You can use OGNL dot notation to invoke operations. If you for instance have a body that contains a POJO that has a <code>getFamilyName</code> method then you can construct the syntax as follows:</p><div class="code
  panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<div class="conf-macro output-block" data-hasbody="false" data-macro-name="include"><h2 id="BookLanguagesAppendix-OGNL">OGNL</h2><p>Camel allows <a shape="rect" class="external-link" href="http://commons.apache.org/proper/commons-ognl/">OGNL</a> to be used as an <a shape="rect" href="expression.html">Expression</a> or <a shape="rect" href="predicate.html">Predicate</a> the <a shape="rect" href="dsl.html">DSL</a> or <a shape="rect" href="xml-configuration.html">Xml Configuration</a>.</p><p>You could use OGNL to create an <a shape="rect" href="predicate.html">Predicate</a> in a <a shape="rect" href="message-filter.html">Message Filter</a> or as an <a shape="rect" href="expression.html">Expression</a> for a <a shape="rect" href="recipient-list.html">Recipient List</a></p><p>You can use OGNL dot notation to invoke operations. If you for instance have a body that contains a POJO that has a <code>getFamilyName</code> method then you can construct the syntax as follows:</p><div class="code
  panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">"request.body.familyName"
    // or 
 "getRequest().getBody().getFamilyName()"
 </pre>
-</div></div><h3 id="BookLanguagesAppendix-Variables.3">Variables</h3><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><strong>this</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Exchange</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the Exchange is the root object</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>exchange</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Exchange</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the Exchange object</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>exception</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Throwable</p></td><td colspan="1" rowspan="1" 
 class="confluenceTd"><p>the Exchange exception (if any)</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>exchangeId</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the exchange id</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>fault</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Message</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the Fault message (if any)</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>request</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Message</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the exchange.in message</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>response</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Message</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the exchange.out message (if any)</p></td></tr><tr><t
 d colspan="1" rowspan="1" class="confluenceTd"><p>properties</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Map</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the exchange properties</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>property(name)</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the property by the given name</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>property(name, type)</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Type</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the property by the given name as the given type</p></td></tr></tbody></table></div><h3 id="BookLanguagesAppendix-Samples.2">Samples</h3><p>For example you could use OGNL inside a <a shape="rect" href="message-filter.html">Message Filter</a> in XML</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-ma
 cro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="BookLanguagesAppendix-Variables.3">Variables</h3><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><strong>this</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Exchange</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the Exchange is the root object</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>exchange</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Exchange</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the Exchange object</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>exception</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Throwable</p></td><td colspan="1" rowspan="1" 
 class="confluenceTd"><p>the Exchange exception (if any)</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>exchangeId</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>String</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the exchange id</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>fault</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Message</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the Fault message (if any)</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>request</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Message</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the exchange.in message</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>response</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Message</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the exchange.out message (if any)</p></td></tr><tr><t
 d colspan="1" rowspan="1" class="confluenceTd"><p>properties</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Map</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the exchange properties</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>property(name)</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Object</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the property by the given name</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>property(name, type)</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Type</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>the property by the given name as the given type</p></td></tr></tbody></table></div><h3 id="BookLanguagesAppendix-Samples.2">Samples</h3><p>For example you could use OGNL inside a <a shape="rect" href="message-filter.html">Message Filter</a> in XML</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" 
 data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">&lt;route&gt;
   &lt;from uri="seda:foo"/&gt;
   &lt;filter&gt;
@@ -355,13 +355,13 @@ This is done using the following syntax:
   &lt;/filter&gt;
 &lt;/route&gt;
 </pre>
-</div></div><p>And the sample using Java DSL:</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>And the sample using Java DSL:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">   from("seda:foo").filter().ognl("request.headers.foo == 'bar'").to("seda:bar");
 </pre>
-</div></div><h3 id="BookLanguagesAppendix-Loadingscriptfromexternalresource.2">Loading script from external resource</h3><p><strong>Available as of Camel 2.11</strong></p><p>You can externalize the script and have Camel load it from a resource such as <code>"classpath:"</code>, <code>"file:"</code>, or <code>"http:"</code>.<br clear="none"> This is done using the following syntax: <code>"resource:scheme:location"</code>, eg to refer to a file on the classpath you can do:</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="BookLanguagesAppendix-Loadingscriptfromexternalresource.2">Loading script from external resource</h3><p><strong>Available as of Camel 2.11</strong></p><p>You can externalize the script and have Camel load it from a resource such as <code>"classpath:"</code>, <code>"file:"</code>, or <code>"http:"</code>.<br clear="none"> This is done using the following syntax: <code>"resource:scheme:location"</code>, eg to refer to a file on the classpath you can do:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">.setHeader("myHeader").ognl("resource:classpath:myognl.txt")
 </pre>
-</div></div><h3 id="BookLanguagesAppendix-Dependencies.6">Dependencies</h3><p>To use OGNL in your camel routes you need to add the a dependency on <strong>camel-ognl</strong> which implements the OGNL language.</p><p>If you use maven you could just add the following to your pom.xml, substituting the version number for the latest &amp; greatest release (see <a shape="rect" href="download.html">the download page for the latest versions</a>).</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="BookLanguagesAppendix-Dependencies.6">Dependencies</h3><p>To use OGNL in your camel routes you need to add the a dependency on <strong>camel-ognl</strong> which implements the OGNL language.</p><p>If you use maven you could just add the following to your pom.xml, substituting the version number for the latest &amp; greatest release (see <a shape="rect" href="download.html">the download page for the latest versions</a>).</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">&lt;dependency&gt;
   &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
   &lt;artifactId&gt;camel-ognl&lt;/artifactId&gt;
@@ -382,7 +382,7 @@ This is done using the following syntax:
 
 <p>However any <a shape="rect" class="external-link" href="http://jcp.org/en/jsr/detail?id=223" rel="nofollow">JSR 223</a> scripting language can be used using the generic DSL methods.</p>
 
-<div class="conf-macro output-block" data-hasbody="false" data-macro-name="include"><h3 id="BookLanguagesAppendix-ScriptContextOptions"><code>ScriptContext</code> Options</h3><p>&#160;</p><p>The&#160;<code>JSR-223</code> scripting language's&#160;<strong><code>ScriptContext</code></strong> is pre-configured with the following attributes all set at <strong><code>ENGINE_SCOPE</code></strong>.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Attribute</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Value</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><span><code>camelContext</code><br clear="none"></span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.CamelContext</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The Camel Context.</p></td></tr><tr><td colspan="1" r
 owspan="1" class="confluenceTd"><p><code>context</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.CamelContext</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The Camel Context (cannot be used 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>org.apache.camel.Exchange</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The current Exchange.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>properties</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.builder.script.PropertiesFunction</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9:</strong> Function with a <strong><code>resolve</code></strong> method to make it easier to use Camels <a shape="rect" href="properties.html">Properties</a> componen
 t from scripts. See further below for example.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>request</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.Message</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The&#160;<strong><code>IN</code></strong> message.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>response</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.Message</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Deprecated</strong>: The&#160;<strong><code>OUT</code></strong> message. The&#160;<strong><code>OUT</code></strong> message is&#160;<strong><code>null</code></strong> by default. Use the <strong><code>IN</code></strong> message instead.</p></td></tr></tbody></table></div><p>See <a shape="rect" href="scripting-languages.html">Scripting Languages</a> for the list of languages with explicit DSL
  support.</p><h3 id="BookLanguagesAppendix-PassingAdditionalArgumentstotheScriptingEngine">Passing Additional Arguments to the&#160;<code>ScriptingEngine</code></h3><p><strong>Available from Camel 2.8</strong></p><p>You can provide additional arguments to the <strong><code>ScriptingEngine</code></strong> using a header on the Camel message with the key <strong><code>CamelScriptArguments</code></strong>.</p><p>Example:</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<div class="conf-macro output-block" data-hasbody="false" data-macro-name="include"><h3 id="BookLanguagesAppendix-ScriptContextOptions"><code>ScriptContext</code> Options</h3><p>&#160;</p><p>The&#160;<code>JSR-223</code> scripting language's&#160;<strong><code>ScriptContext</code></strong> is pre-configured with the following attributes all set at <strong><code>ENGINE_SCOPE</code></strong>.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Attribute</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Value</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><span><code>camelContext</code><br clear="none"></span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.CamelContext</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The Camel Context.</p></td></tr><tr><td colspan="1" r
 owspan="1" class="confluenceTd"><p><code>context</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.CamelContext</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The Camel Context (cannot be used 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>org.apache.camel.Exchange</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The current Exchange.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>properties</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.builder.script.PropertiesFunction</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9:</strong> Function with a <strong><code>resolve</code></strong> method to make it easier to use Camels <a shape="rect" href="properties.html">Properties</a> componen
 t from scripts. See further below for example.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>request</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.Message</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The&#160;<strong><code>IN</code></strong> message.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>response</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.Message</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Deprecated</strong>: The&#160;<strong><code>OUT</code></strong> message. The&#160;<strong><code>OUT</code></strong> message is&#160;<strong><code>null</code></strong> by default. Use the <strong><code>IN</code></strong> message instead.</p></td></tr></tbody></table></div><p>See <a shape="rect" href="scripting-languages.html">Scripting Languages</a> for the list of languages with explicit DSL
  support.</p><h3 id="BookLanguagesAppendix-PassingAdditionalArgumentstotheScriptingEngine">Passing Additional Arguments to the&#160;<code>ScriptingEngine</code></h3><p><strong>Available from Camel 2.8</strong></p><p>You can provide additional arguments to the <strong><code>ScriptingEngine</code></strong> using a header on the Camel message with the key <strong><code>CamelScriptArguments</code></strong>.</p><p>Example:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">public void testArgumentsExample() throws Exception {
     getMockEndpoint("mock:result").expectedMessageCount(0);
     getMockEndpoint("mock:unmatched").expectedMessageCount(1);
@@ -399,13 +399,13 @@ This is done using the following syntax:
 
 
 &#160;</pre>
-</div></div><h3 id="BookLanguagesAppendix-UsingPropertiesFunction"><br clear="none">Using Properties Function</h3><p><strong>Available from Camel 2.9</strong></p><p>If you need to use the <a shape="rect" href="properties.html">Properties</a> component from a script to lookup property placeholders, then its a bit cumbersome to do so. For example, to set a header name&#160;<strong><code>myHeader</code></strong> with a value from a property placeholder, whose key is taken from a header named <strong><code>foo</code></strong>.</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="BookLanguagesAppendix-UsingPropertiesFunction"><br clear="none">Using Properties Function</h3><p><strong>Available from Camel 2.9</strong></p><p>If you need to use the <a shape="rect" href="properties.html">Properties</a> component from a script to lookup property placeholders, then its a bit cumbersome to do so. For example, to set a header name&#160;<strong><code>myHeader</code></strong> with a value from a property placeholder, whose key is taken from a header named <strong><code>foo</code></strong>.</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: groovy; gutter: false; theme: Default" data-theme="Default">.setHeader("myHeader").groovy("context.resolvePropertyPlaceholders('{{' + request.headers.get('foo') + '}}')")</pre>
-</div></div><p>From <strong>Camel 2.9</strong>: you can now use the properties function and the same example is simpler:</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>From <strong>Camel 2.9</strong>: you can now use the properties function and the same example is simpler:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">.setHeader("myHeader").groovy("properties.resolve(request.headers.get('foo'))")</pre>
-</div></div><h3 id="BookLanguagesAppendix-LoadingScriptFromExternalResource"><br clear="none">Loading Script From External Resource</h3><p><strong>Available from Camel 2.11</strong></p><p>You can externalize the script and have Camel load it from a resource such as <strong><code>classpath:</code></strong>, <strong><code>file:</code></strong>, or <strong><code>http:</code></strong>. This is done using the following syntax: <strong><code>resource:scheme:location</code></strong> e.g. to refer to a file on the classpath you can do:</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="BookLanguagesAppendix-LoadingScriptFromExternalResource"><br clear="none">Loading Script From External Resource</h3><p><strong>Available from Camel 2.11</strong></p><p>You can externalize the script and have Camel load it from a resource such as <strong><code>classpath:</code></strong>, <strong><code>file:</code></strong>, or <strong><code>http:</code></strong>. This is done using the following syntax: <strong><code>resource:scheme:location</code></strong> e.g. to refer to a file on the classpath you can do:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">.setHeader("myHeader").groovy("resource:classpath:mygroovy.groovy")</pre>
-</div></div><h3 id="BookLanguagesAppendix-HowtoGettheResultfromMultipleStatementsScript"><br clear="none">How to Get the Result from Multiple Statements Script</h3><p><strong>Available from Camel 2.14</strong></p><p>The script engine's eval method returns a&#160;<strong><code>null</code></strong> when it runs a multi-statement script. However, Camel can look up the value of a script's result by using the key <strong><code>result</code></strong> from the value set. When writing a multi-statement script set the value of the&#160;<strong><code>result</code></strong> variable as the script return value.</p><p>textbar = "baz"; # some other statements ... # camel take the result value as the script evaluation result result = body * 2 + 1</p><p>&#160;</p><h3 id="BookLanguagesAppendix-Dependencies.8">Dependencies</h3><p>To use scripting languages in your camel routes you need to add the a dependency on <strong><code>camel-script</code></strong> which integrates the JSR-223 scripting engine.
 </p><p>If you use maven you could just add the following to your <strong><code>pom.xml</code></strong>, substituting the version number for the latest &amp; greatest release (see <a shape="rect" href="download.html">the download page for the latest versions</a>).</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="BookLanguagesAppendix-HowtoGettheResultfromMultipleStatementsScript"><br clear="none">How to Get the Result from Multiple Statements Script</h3><p><strong>Available from Camel 2.14</strong></p><p>The script engine's eval method returns a&#160;<strong><code>null</code></strong> when it runs a multi-statement script. However, Camel can look up the value of a script's result by using the key <strong><code>result</code></strong> from the value set. When writing a multi-statement script set the value of the&#160;<strong><code>result</code></strong> variable as the script return value.</p><p>textbar = "baz"; # some other statements ... # camel take the result value as the script evaluation result result = body * 2 + 1</p><p>&#160;</p><h3 id="BookLanguagesAppendix-Dependencies.8">Dependencies</h3><p>To use scripting languages in your camel routes you need to add the a dependency on <strong><code>camel-script</code></strong> which integrates the JSR-223 scripting engine.
 </p><p>If you use maven you could just add the following to your <strong><code>pom.xml</code></strong>, substituting the version number for the latest &amp; greatest release (see <a shape="rect" href="download.html">the download page for the latest versions</a>).</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: xml; gutter: false; theme: Default" data-theme="Default">&lt;dependency&gt;
  &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
  &lt;artifactId&gt;camel-script&lt;/artifactId&gt;
@@ -423,7 +423,7 @@ This is done using the following syntax:
 
 <p>To use a BeanShell expression use the following Java code:</p>
 
-<div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">
 ...choice()
     .when(script("beanshell", "request.getHeaders().get(\"foo\").equals(\"bar\")"))
@@ -433,7 +433,7 @@ This is done using the following syntax:
 
 <p>Or the something like this in your Spring XML:</p>
 
-<div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">
 &lt;filter&gt;
   &lt;language language="beanshell"&gt;request.getHeaders().get("Foo") == null&lt;/language&gt;
@@ -446,7 +446,7 @@ This is done using the following syntax:
 
 <p>You could follow the examples above to create an <a shape="rect" href="predicate.html">Predicate</a> in a <a shape="rect" href="message-filter.html">Message Filter</a> or as an <a shape="rect" href="expression.html">Expression</a> for a <a shape="rect" href="recipient-list.html">Recipient List</a></p>
 
-<div class="conf-macro output-block" data-hasbody="false" data-macro-name="include"><h3 id="BookLanguagesAppendix-ScriptContextOptions.1"><code>ScriptContext</code> Options</h3><p>&#160;</p><p>The&#160;<code>JSR-223</code> scripting language's&#160;<strong><code>ScriptContext</code></strong> is pre-configured with the following attributes all set at <strong><code>ENGINE_SCOPE</code></strong>.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Attribute</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Value</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><span><code>camelContext</code><br clear="none"></span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.CamelContext</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The Camel Context.</p></td></tr><tr><td colspan="1"
  rowspan="1" class="confluenceTd"><p><code>context</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.CamelContext</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The Camel Context (cannot be used 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>org.apache.camel.Exchange</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The current Exchange.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>properties</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.builder.script.PropertiesFunction</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9:</strong> Function with a <strong><code>resolve</code></strong> method to make it easier to use Camels <a shape="rect" href="properties.html">Properties</a> compon
 ent from scripts. See further below for example.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>request</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.Message</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The&#160;<strong><code>IN</code></strong> message.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>response</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.Message</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Deprecated</strong>: The&#160;<strong><code>OUT</code></strong> message. The&#160;<strong><code>OUT</code></strong> message is&#160;<strong><code>null</code></strong> by default. Use the <strong><code>IN</code></strong> message instead.</p></td></tr></tbody></table></div><p>See <a shape="rect" href="scripting-languages.html">Scripting Languages</a> for the list of languages with explicit D
 SL support.</p><h3 id="BookLanguagesAppendix-PassingAdditionalArgumentstotheScriptingEngine.1">Passing Additional Arguments to the&#160;<code>ScriptingEngine</code></h3><p><strong>Available from Camel 2.8</strong></p><p>You can provide additional arguments to the <strong><code>ScriptingEngine</code></strong> using a header on the Camel message with the key <strong><code>CamelScriptArguments</code></strong>.</p><p>Example:</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<div class="conf-macro output-block" data-hasbody="false" data-macro-name="include"><h3 id="BookLanguagesAppendix-ScriptContextOptions.1"><code>ScriptContext</code> Options</h3><p>&#160;</p><p>The&#160;<code>JSR-223</code> scripting language's&#160;<strong><code>ScriptContext</code></strong> is pre-configured with the following attributes all set at <strong><code>ENGINE_SCOPE</code></strong>.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Attribute</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Value</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><span><code>camelContext</code><br clear="none"></span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.CamelContext</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The Camel Context.</p></td></tr><tr><td colspan="1"
  rowspan="1" class="confluenceTd"><p><code>context</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.CamelContext</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The Camel Context (cannot be used 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>org.apache.camel.Exchange</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The current Exchange.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>properties</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.builder.script.PropertiesFunction</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9:</strong> Function with a <strong><code>resolve</code></strong> method to make it easier to use Camels <a shape="rect" href="properties.html">Properties</a> compon
 ent from scripts. See further below for example.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>request</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.Message</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The&#160;<strong><code>IN</code></strong> message.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>response</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.Message</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Deprecated</strong>: The&#160;<strong><code>OUT</code></strong> message. The&#160;<strong><code>OUT</code></strong> message is&#160;<strong><code>null</code></strong> by default. Use the <strong><code>IN</code></strong> message instead.</p></td></tr></tbody></table></div><p>See <a shape="rect" href="scripting-languages.html">Scripting Languages</a> for the list of languages with explicit D
 SL support.</p><h3 id="BookLanguagesAppendix-PassingAdditionalArgumentstotheScriptingEngine.1">Passing Additional Arguments to the&#160;<code>ScriptingEngine</code></h3><p><strong>Available from Camel 2.8</strong></p><p>You can provide additional arguments to the <strong><code>ScriptingEngine</code></strong> using a header on the Camel message with the key <strong><code>CamelScriptArguments</code></strong>.</p><p>Example:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">public void testArgumentsExample() throws Exception {
     getMockEndpoint("mock:result").expectedMessageCount(0);
     getMockEndpoint("mock:unmatched").expectedMessageCount(1);
@@ -463,13 +463,13 @@ This is done using the following syntax:
 
 
 &#160;</pre>
-</div></div><h3 id="BookLanguagesAppendix-UsingPropertiesFunction.1"><br clear="none">Using Properties Function</h3><p><strong>Available from Camel 2.9</strong></p><p>If you need to use the <a shape="rect" href="properties.html">Properties</a> component from a script to lookup property placeholders, then its a bit cumbersome to do so. For example, to set a header name&#160;<strong><code>myHeader</code></strong> with a value from a property placeholder, whose key is taken from a header named <strong><code>foo</code></strong>.</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="BookLanguagesAppendix-UsingPropertiesFunction.1"><br clear="none">Using Properties Function</h3><p><strong>Available from Camel 2.9</strong></p><p>If you need to use the <a shape="rect" href="properties.html">Properties</a> component from a script to lookup property placeholders, then its a bit cumbersome to do so. For example, to set a header name&#160;<strong><code>myHeader</code></strong> with a value from a property placeholder, whose key is taken from a header named <strong><code>foo</code></strong>.</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: groovy; gutter: false; theme: Default" data-theme="Default">.setHeader("myHeader").groovy("context.resolvePropertyPlaceholders('{{' + request.headers.get('foo') + '}}')")</pre>
-</div></div><p>From <strong>Camel 2.9</strong>: you can now use the properties function and the same example is simpler:</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>From <strong>Camel 2.9</strong>: you can now use the properties function and the same example is simpler:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">.setHeader("myHeader").groovy("properties.resolve(request.headers.get('foo'))")</pre>
-</div></div><h3 id="BookLanguagesAppendix-LoadingScriptFromExternalResource.1"><br clear="none">Loading Script From External Resource</h3><p><strong>Available from Camel 2.11</strong></p><p>You can externalize the script and have Camel load it from a resource such as <strong><code>classpath:</code></strong>, <strong><code>file:</code></strong>, or <strong><code>http:</code></strong>. This is done using the following syntax: <strong><code>resource:scheme:location</code></strong> e.g. to refer to a file on the classpath you can do:</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="BookLanguagesAppendix-LoadingScriptFromExternalResource.1"><br clear="none">Loading Script From External Resource</h3><p><strong>Available from Camel 2.11</strong></p><p>You can externalize the script and have Camel load it from a resource such as <strong><code>classpath:</code></strong>, <strong><code>file:</code></strong>, or <strong><code>http:</code></strong>. This is done using the following syntax: <strong><code>resource:scheme:location</code></strong> e.g. to refer to a file on the classpath you can do:</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">.setHeader("myHeader").groovy("resource:classpath:mygroovy.groovy")</pre>
-</div></div><h3 id="BookLanguagesAppendix-HowtoGettheResultfromMultipleStatementsScript.1"><br clear="none">How to Get the Result from Multiple Statements Script</h3><p><strong>Available from Camel 2.14</strong></p><p>The script engine's eval method returns a&#160;<strong><code>null</code></strong> when it runs a multi-statement script. However, Camel can look up the value of a script's result by using the key <strong><code>result</code></strong> from the value set. When writing a multi-statement script set the value of the&#160;<strong><code>result</code></strong> variable as the script return value.</p><p>textbar = "baz"; # some other statements ... # camel take the result value as the script evaluation result result = body * 2 + 1</p><p>&#160;</p><h3 id="BookLanguagesAppendix-Dependencies.9">Dependencies</h3><p>To use scripting languages in your camel routes you need to add the a dependency on <strong><code>camel-script</code></strong> which integrates the JSR-223 scripting engin
 e.</p><p>If you use maven you could just add the following to your <strong><code>pom.xml</code></strong>, substituting the version number for the latest &amp; greatest release (see <a shape="rect" href="download.html">the download page for the latest versions</a>).</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="BookLanguagesAppendix-HowtoGettheResultfromMultipleStatementsScript.1"><br clear="none">How to Get the Result from Multiple Statements Script</h3><p><strong>Available from Camel 2.14</strong></p><p>The script engine's eval method returns a&#160;<strong><code>null</code></strong> when it runs a multi-statement script. However, Camel can look up the value of a script's result by using the key <strong><code>result</code></strong> from the value set. When writing a multi-statement script set the value of the&#160;<strong><code>result</code></strong> variable as the script return value.</p><p>textbar = "baz"; # some other statements ... # camel take the result value as the script evaluation result result = body * 2 + 1</p><p>&#160;</p><h3 id="BookLanguagesAppendix-Dependencies.9">Dependencies</h3><p>To use scripting languages in your camel routes you need to add the a dependency on <strong><code>camel-script</code></strong> which integrates the JSR-223 scripting engin
 e.</p><p>If you use maven you could just add the following to your <strong><code>pom.xml</code></strong>, substituting the version number for the latest &amp; greatest release (see <a shape="rect" href="download.html">the download page for the latest versions</a>).</p><div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: xml; gutter: false; theme: Default" data-theme="Default">&lt;dependency&gt;
  &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
  &lt;artifactId&gt;camel-script&lt;/artifactId&gt;
@@ -482,7 +482,7 @@ This is done using the following syntax:
 
 <p>To use a JavaScript expression use the following Java code</p>
 
-<div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">
 ... javaScript("someJavaScriptExpression") ... 
 </pre>
@@ -492,7 +492,7 @@ This is done using the following syntax:
 
 <h3 id="BookLanguagesAppendix-Example">Example</h3>
 <p>In the sample below we use JavaScript to create a <a shape="rect" href="predicate.html">Predicate</a> use in the route path, to route exchanges from admin users to a special queue.</p>
-<div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">
     from("direct:start")
         .choice()
@@ -503,7 +503,7 @@ This is done using the following syntax:
 </div></div>
 
 <p>And a Spring DSL sample as well:</p>
-<div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<div class="code panel pdl conf-macro output-block" style="border-width: 1px;" data-hasbody="true" data-macro-name="code"><div class="codeContent panelContent pdl">
 <pre class="syntaxhighlighter-pre" data-syntaxhighlighter-params="brush: java; gutter: false; theme: Default" data-theme="Default">
     &lt;route&gt;
         &lt;from uri="direct:start"/&gt;
@@ -520,7 +520,7 @@ This is done using the following syntax:
 </pre>
 </div></div>
 
-<div class="conf-macro output-block" data-hasbody="false" data-macro-name="include"><h3 id="BookLanguagesAppendix-ScriptContextOptions.2"><code>ScriptContext</code> Options</h3><p>&#160;</p><p>The&#160;<code>JSR-223</code> scripting language's&#160;<strong><code>ScriptContext</code></strong> is pre-configured with the following attributes all set at <strong><code>ENGINE_SCOPE</code></strong>.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Attribute</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Value</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><span><code>camelContext</code><br clear="none"></span></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.CamelContext</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The Camel Context.</p></td></tr><tr><td colspan="1"
  rowspan="1" class="confluenceTd"><p><code>context</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.CamelContext</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The Camel Context (cannot be used 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>org.apache.camel.Exchange</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The current Exchange.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>properties</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.builder.script.PropertiesFunction</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.9:</strong> Function with a <strong><code>resolve</code></strong> method to make it easier to use Camels <a shape="rect" href="properties.html">Properties</a> compon
 ent from scripts. See further below for example.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>request</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.Message</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The&#160;<strong><code>IN</code></strong> message.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>response</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.Message</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Deprecated</strong>: The&#160;<strong><code>OUT</code></strong> message. The&#160;<strong><code>OUT</code></strong> message is&#160;<strong><code>null</code></strong> by default. Use the <strong><code>IN</code></strong> message instead.</p></td></tr></tbody></table></div><p>See <a shape="rect" href="scripting-languages.html">Scripting Languages</a> for the list of languages with explicit D
 SL support.</p><h3 id="BookLanguagesAppendix-PassingAdditionalArgumentstotheScriptingEngine.2">Passing Additional Arguments to the&#160;<code>ScriptingEngine</code></h3><p><strong>Available from Camel 2.8</strong></p><p>You can provide additional arguments to the <strong><code>ScriptingEngine</code></strong> using a header on the Camel message with the key <strong><code>CamelScriptArguments</code></strong>.</p><p>Example:</p><div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl">

[... 306 lines stripped ...]