camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Simple language question
Date Tue, 19 Jun 2012 03:34:35 GMT
On Mon, Jun 18, 2012 at 11:49 PM, Gershaw, Geoffrey <
geoffrey.gershaw@credit-suisse.com> wrote:

> Hello all,
>
>
>
> I am using the Spring DSL with the Filter EIP. The below snippet works,
> but  its confusing. I am trying to include a msg with a non-null body
> the outcome of bean:CXRefDataCache?method=put  equals false.
>
>
>
> Is there a cleaner way?
>
>
>
Why is that confusing? You have 2 predicates to test for. And that is what
you use in the simple expression.
You can put that logic behind a single bean method and give the method a
meaningful name

<filter>
  <method ref="myBean" method="someMeaningfulNameHere"/>
   ...
</filter>

And there is many other scripting languages you can use, if you think they
can provide a less confusing way
http://camel.apache.org/languages


> <filter>
>
> <!-- Only process valid (non-null) SecDefs. cache CXRefdata. Return true
> if its an update-->
>
>      <simple>${body} != null and false ==
> ${bean:CXRefDataCache?method=put}</simple>
>
> ........
>
>
>
> Thanks
>
>
>
> Geoffrey A. Gershaw
>
>
>
>
>
> ===============================================================================
> Please access the attached hyperlink for an important electronic
> communications disclaimer:
> http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
>
> ===============================================================================
>
>


-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message