You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by javamonkey79 <ja...@gmail.com> on 2013/04/30 03:03:05 UTC

new camel predicate\expression language

Is is possible to create custom predicate\expression languages within camel?

For example, I have something like this now:

				<when>
					<simple>${in.header.SEND_TO_FOLDER}</simple>
					<to id="outId" uri="file://\\server\folder" />
				</when>

Where I have some logic done in a bean to set "SEND_TO_FOLDER".

However, I have an internal DSL that I would like to use that would
eliminate the need for a bean - is this possible? Something like this:

				<when>
					<my_custom_dsl>@value@ == %foo%</my_custom_dsl>
					<to id="outId" uri="file://\\server\folder" />
				</when>

If this is possible, is there some documentation I can use as a jump off
point?



--
View this message in context: http://camel.465427.n5.nabble.com/new-camel-predicate-expression-language-tp5731762.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: new camel predicate\expression language

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Yeah sure you can write a custom language. Just look at camel-mvel,
camel-ognl etc.

In the XML DSL you can use the generic <language> to refere to your
custom language.

<when>
   <language name="myLanguage">foo bar stuff</language>
  ...



On Tue, Apr 30, 2013 at 3:03 AM, javamonkey79 <ja...@gmail.com> wrote:
> Is is possible to create custom predicate\expression languages within camel?
>
> For example, I have something like this now:
>
>                                 <when>
>                                         <simple>${in.header.SEND_TO_FOLDER}</simple>
>                                         <to id="outId" uri="file://\\server\folder" />
>                                 </when>
>
> Where I have some logic done in a bean to set "SEND_TO_FOLDER".
>
> However, I have an internal DSL that I would like to use that would
> eliminate the need for a bean - is this possible? Something like this:
>
>                                 <when>
>                                         <my_custom_dsl>@value@ == %foo%</my_custom_dsl>
>                                         <to id="outId" uri="file://\\server\folder" />
>                                 </when>
>
> If this is possible, is there some documentation I can use as a jump off
> point?
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/new-camel-predicate-expression-language-tp5731762.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen