camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-4169) simple calculations in route
Date Sat, 10 Sep 2011 06:09:09 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-4169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13101991#comment-13101991
] 

Claus Ibsen commented on CAMEL-4169:
------------------------------------

The Simple language now supports ++ and -- as an unary operator in Camel 2.9 onwards. So you
can do
{code}
<setHeader headerName="myCounter">
  <simple>${header.myCounter}++</simple>
</setHeader>
{code}

In terms of the other math operators. I wonder how much usable they are?

> simple calculations in route
> ----------------------------
>
>                 Key: CAMEL-4169
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4169
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-core
>    Affects Versions: 2.7.2
>            Reporter: Marco Westermann
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: Future
>
>
> create calculation possibilities in simple language. For example to increment a header
property: ${header.counter}++
> example:
> from("direct:getLastValueFromCache")
> .transform().simple("${header.lastProcessedOrder}++")
> .to("direct:createNewOrderWithNewProcessingNumber");

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message