[
https://issues.apache.org/activemq/browse/CAMEL-1419?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-1419.
--------------------------------
Resolution: Fixed
Fix Version/s: 2.0.0
trunk: 776194.
Now the PredicateBuilder uses type coercing so it can compare String with
numbers with an Integer.
This enhanced the Content Based Router as the choice/when uses predicates and
end users can much easier compare. It works even for enum. that is typed as a
String value etc.
> PredicateBuilder - Support type converter to coerce types into compatible
> types for comparisons
> -----------------------------------------------------------------------------------------------
>
> Key: CAMEL-1419
> URL: https://issues.apache.org/activemq/browse/CAMEL-1419
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Fix For: 2.0.0
>
>
> Using predicates in routes in eg choice DSL does not support type convertions
> so you need to do this manual or ensure types are compatible
> We could improve this by testing for true until
> - try with types given
> - try again by convert right to left
> - try again by convert left to right
> This allows you to do routing, eg route with a header value as string by you
> can do
> {code}
> choice(when("foo").isEqualTo(2))...
> choice(when("foo").isGreaterThan(50))...
> {code}
> See nabble:
> http://www.nabble.com/Re%3A-Camel-Routing-based-on-bean-return-object-td22249549.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.