Return-Path: X-Original-To: apmail-camel-commits-archive@www.apache.org Delivered-To: apmail-camel-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8A9F018F45 for ; Tue, 23 Jun 2015 17:19:33 +0000 (UTC) Received: (qmail 86234 invoked by uid 500); 23 Jun 2015 17:19:33 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 86181 invoked by uid 500); 23 Jun 2015 17:19:33 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 86076 invoked by uid 99); 23 Jun 2015 17:19:33 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Jun 2015 17:19:33 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 0D089AC065B for ; Tue, 23 Jun 2015 17:19:33 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r955782 [2/2] - in /websites/production/camel/content: book-in-one-page.html book-languages-appendix.html cache/main.pageCache mvel.html Date: Tue, 23 Jun 2015 17:19:32 -0000 To: commits@camel.apache.org From: buildbot@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150623171933.0D089AC065B@hades.apache.org> 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 Tue Jun 23 17:19:32 2015 @@ -359,32 +359,13 @@ This is done using the following syntax:

Otherwise, you'll also need Commons JXPath.

-

Mvel

- -

Camel allows Mvel to be used as an Expression or Predicate the DSL or Xml Configuration.

- -

You could use Mvel to create an Predicate in a Message Filter or as an Expression for a Recipient List

- -

You can use Mvel dot notation to invoke operations. If you for instance have a body that contains a POJO that has a getFamiliyName method then you can construct the syntax as follows:

-
- -
- -

Variables

- -

Variable

Type

Description

this

Exchange

the Exchange is the root object

exchange

Exchange

the Exchange object

exception

Throwable

the Exchange exception (if any)

exchangeId

String

the exchange id

fault

Message

the Fault message (if any)

request

Message

the exchange.in message

response

Message

the exchange.out message (if any)

properties

Map

the exchange properties

property(name)

Object

the property by the given name

property(name, type)

Type

the property by the given name as the given type

- - -

Samples

-

For example you could use Mvel inside a Message Filter in XML

- -
- -
- -

And the sample using Java DSL:

-
- -
- -

Loading script from external resource

-

Available as of Camel 2.11

- -

You can externalize the script and have Camel load it from a resource such as "classpath:", "file:", or "http:".
-This is done using the following syntax: "resource:scheme:location", eg to refer to a file on the classpath you can do:

-
- -
- - -

Dependencies

- -

To use Mvel in your camel routes you need to add the a dependency on camel-mvel which implements the Mvel language.

- -

If you use maven you could just add the following to your pom.xml, substituting the version number for the latest & greatest release (see the download page for the latest versions).

- -
-
- -

Otherwise, you'll also need MVEL

OGNL

Camel allows OGNL to be used as an Expression or Predicate the DSL or Xml Configuration.

You could use OGNL to create an Predicate in a Message Filter or as an Expression for a Recipient List

You can use OGNL dot notation to invoke operations. If you for instance have a body that contains a POJO that has a getFamiliyName method then you can construct the syntax as follows:

-
- -

Variables

- -

Variable

Type

Description

this

Exchange

the Exchange is the root object

exchange

Exchange

the Exchange object

exception

Throwable

the Exchange exception (if any)

exchangeId

String

the exchange id

fault

Message

the Fault message (if any)

request

Message

the exchange.in message

response

Message

the exchange.out message (if any)

properties

Map

the exchange properties

property(name)

Object

the property by the given name

property(name, type)

Type

the property by the given name as the given type

- - -

Samples

-

For example you could use Mvel inside a Message Filter in XML

- -
- -
- -

And the sample using Java DSL:

-
- -
- -

Loading script from external resource

-

Available as of Camel 2.11

- -

You can externalize the script and have Camel load it from a resource such as "classpath:", "file:", or "http:".
-This is done using the following syntax: "resource:scheme:location", eg to refer to a file on the classpath you can do:

-
- -
- - -

Dependencies

- -

To use Mvel in your camel routes you need to add the a dependency on camel-mvel which implements the Mvel language.

- -

If you use maven you could just add the following to your pom.xml, substituting the version number for the latest & greatest release (see the download page for the latest versions).

- -
- -
- -

Otherwise, you'll also need MVEL

+