This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 8ff655b  Regen
8ff655b is described below

commit 8ff655bbded8c8ca2a0a3c5d82d7dbc0ef00092e
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Sat May 30 07:47:42 2020 +0200

    Regen
---
 camel-dependencies/pom.xml                         |  2 +-
 .../modules/ROOT/pages/jslt-component.adoc         | 28 ++++++++++++++++++++++
 2 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/camel-dependencies/pom.xml b/camel-dependencies/pom.xml
index 917cb2d..1ed27ee 100644
--- a/camel-dependencies/pom.xml
+++ b/camel-dependencies/pom.xml
@@ -543,7 +543,7 @@
     <swagger-java-version>1.5.24</swagger-java-version>
     <tagsoup-version>1.2.1</tagsoup-version>
     <templating-maven-plugin-version>1.0.0</templating-maven-plugin-version>
-    <testcontainers-version>1.14.2</testcontainers-version>
+    <testcontainers-version>1.14.3</testcontainers-version>
     <tika-version>1.24.1</tika-version>
     <trimStackTrace>false</trimStackTrace>
     <twilio-version>7.9.1</twilio-version>
diff --git a/docs/components/modules/ROOT/pages/jslt-component.adoc 
b/docs/components/modules/ROOT/pages/jslt-component.adoc
index 84752d0..cba9fe7 100644
--- a/docs/components/modules/ROOT/pages/jslt-component.adoc
+++ b/docs/components/modules/ROOT/pages/jslt-component.adoc
@@ -107,8 +107,28 @@ with the following path and query parameters:
 |===
 // endpoint options: END
 
+== Passing values to JSLT
 
+Camel can supply exchange information as variables when applying a JSLT 
expression on the body. The available variables from the *Exchange* are:
 
+[width="100%",cols="2,5",options="header"]
+|===
+| name | value
+| headers | The headers of the In message as a json object
+| exchange.properties | The *Exchange* properties as a json object. _exchange_ 
is the name of the variable and _properties_ is the path to the exchange 
properties. Available if _allowContextMapAll_ option is true.
+|===
+
+All the values that cannot be converted to json with Jackson are denied and 
will not be available in the jslt expression.
+
+For example, the header named "type" and the exchange property "instance" can 
be accessed like
+
+[source,json]
+--------------------------------------
+{
+  "type": $headers.type,
+  "instance": $exchange.properties.instance
+}
+--------------------------------------
 
 == Samples
 
@@ -148,4 +168,12 @@ from("direct:in").
   to("jslt:dummy");
 ---------------------------------------------------------------------
 
+Passing exchange properties to the jslt expression can be done like this
+
+[source,java]
+---------------------------------------------------------------------
+from("direct:in").
+  to("jslt:com/acme/MyResponse.json?allowContextMapAll=true");
+---------------------------------------------------------------------
+
 include::camel-spring-boot::page$jslt-starter.adoc[]

Reply via email to